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 defaultFormat)
Creates a new
AbstractFormatCheck instance. |
AbstractFormatCheck(String defaultFormat,
int compileFlags)
Creates a new
AbstractFormatCheck instance. |
Modifier and Type | Method and Description |
---|---|
String |
getFormat() |
Pattern |
getRegexp() |
void |
setCompileFlags(int compileFlags)
Set the compile flags for the regular expression.
|
void |
setFormat(String format)
Set the format to the specified regular expression.
|
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
public AbstractFormatCheck(String defaultFormat) throws org.apache.commons.beanutils.ConversionException
AbstractFormatCheck
instance. Defaults the
compile flag to 0 (the default).defaultFormat
- default formatorg.apache.commons.beanutils.ConversionException
- unable to parse defaultFormatpublic AbstractFormatCheck(String defaultFormat, int compileFlags) throws org.apache.commons.beanutils.ConversionException
AbstractFormatCheck
instance.defaultFormat
- default formatcompileFlags
- the Pattern flags to compile the regexp with.
See Pattern.compile(java.lang.String, int)
org.apache.commons.beanutils.ConversionException
- unable to parse defaultFormatpublic final void setFormat(String format) throws org.apache.commons.beanutils.ConversionException
format
- a String
valueorg.apache.commons.beanutils.ConversionException
- unable to parse formatpublic final void setCompileFlags(int compileFlags)
compileFlags
- the compile flags to use.Copyright © 2001–2015. All rights reserved.