AbstractCheck
instead.@Deprecated public abstract class AbstractFormatCheck extends AbstractCheck
Abstract class for checks that verify strings using a
regular expression
. It
provides support for setting the regular
expression using the property name format
.
Modifier and Type | Field and Description |
---|---|
private int |
compileFlags
Deprecated.
The flags to create the regular expression with.
|
private java.lang.String |
format
Deprecated.
The format string of the regexp.
|
private java.util.regex.Pattern |
regexp
Deprecated.
The regexp to match against.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractFormatCheck(java.lang.String defaultFormat)
Deprecated.
Creates a new
AbstractFormatCheck instance. |
protected |
AbstractFormatCheck(java.lang.String defaultFormat,
int compileFlags)
Deprecated.
Creates a new
AbstractFormatCheck instance. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFormat()
Deprecated.
Gets the regexp format.
|
java.util.regex.Pattern |
getRegexp()
Deprecated.
Gets the regexp.
|
void |
setCompileFlags(int compileFlags)
Deprecated.
Set the compile flags for the regular expression.
|
void |
setFormat(java.lang.String format)
Deprecated.
Set the format to the specified regular expression.
|
private void |
updateRegexp(java.lang.String regexpFormat,
int compileFlagsParam)
Deprecated.
Updates the regular expression using the supplied format and compiler
flags.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
private int compileFlags
private java.util.regex.Pattern regexp
private java.lang.String format
protected AbstractFormatCheck(java.lang.String defaultFormat)
AbstractFormatCheck
instance. Defaults the
compile flag to 0 (the default).defaultFormat
- default formatorg.apache.commons.beanutils.ConversionException
- unable to parse defaultFormatprotected AbstractFormatCheck(java.lang.String defaultFormat, int compileFlags)
AbstractFormatCheck
instance.defaultFormat
- default formatcompileFlags
- the Pattern flags to compile the regexp with.
See Pattern.compile(String, int)
org.apache.commons.beanutils.ConversionException
- unable to parse defaultFormatpublic final void setFormat(java.lang.String format)
format
- a String
valueorg.apache.commons.beanutils.ConversionException
- unable to parse formatpublic final void setCompileFlags(int compileFlags)
compileFlags
- the compile flags to use.public final java.util.regex.Pattern getRegexp()
public final java.lang.String getFormat()
private void updateRegexp(java.lang.String regexpFormat, int compileFlagsParam)
regexpFormat
- the format of the regular expression.compileFlagsParam
- the compiler flags to use.