public abstract class AbstractFormatCheck extends Check
Abstract class for checks that verify strings using a
regular expression
. It
provides support for setting the regular
expression using the property name format
.
Constructor and Description |
---|
AbstractFormatCheck(String aDefaultFormat)
Creates a new
AbstractFormatCheck instance. |
AbstractFormatCheck(String aDefaultFormat,
int aCompileFlags)
Creates a new
AbstractFormatCheck instance. |
Modifier and Type | Method and Description |
---|---|
String |
getFormat() |
Pattern |
getRegexp() |
void |
setCompileFlags(int aCompileFlags)
Set the compile flags for the regular expression.
|
void |
setFormat(String aFormat)
Set the format to the specified regular expression.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public AbstractFormatCheck(String aDefaultFormat) throws org.apache.commons.beanutils.ConversionException
AbstractFormatCheck
instance. Defaults the
compile flag to 0 (the default).aDefaultFormat
- default formatorg.apache.commons.beanutils.ConversionException
- unable to parse aDefaultFormatpublic AbstractFormatCheck(String aDefaultFormat, int aCompileFlags) throws org.apache.commons.beanutils.ConversionException
AbstractFormatCheck
instance.aDefaultFormat
- default formataCompileFlags
- the Pattern flags to compile the regexp with.
See Pattern.compile(java.lang.String, int)
org.apache.commons.beanutils.ConversionException
- unable to parse aDefaultFormatpublic final void setFormat(String aFormat) throws org.apache.commons.beanutils.ConversionException
aFormat
- a String
valueorg.apache.commons.beanutils.ConversionException
- unable to parse aFormatpublic final void setCompileFlags(int aCompileFlags)
aCompileFlags
- the compile flags to use.public final Pattern getRegexp()
public final String getFormat()