com.puppycrawl.tools.checkstyle.checks
Class AbstractFormatCheck
- Configurable, Contextualizable
public abstract class AbstractFormatCheck
Abstract class for checks that verify strings using a
regular expression
. It
provides support for setting the regular
expression using the property name
format
.
AbstractFormatCheck(String aDefaultFormat) - Creates a new
AbstractFormatCheck instance.
|
AbstractFormatCheck(String aDefaultFormat, int aCompileFlags) - Creates a new
AbstractFormatCheck instance.
|
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 , log , log , setId , setSeverity |
AbstractFormatCheck
public AbstractFormatCheck(String aDefaultFormat)
throws ConversionException
Creates a new AbstractFormatCheck
instance. Defaults the
compile flag to 0 (the default).
aDefaultFormat
- default format
AbstractFormatCheck
public AbstractFormatCheck(String aDefaultFormat,
int aCompileFlags)
throws ConversionException
Creates a new AbstractFormatCheck
instance.
aDefaultFormat
- default formataCompileFlags
- the Pattern flags to compile the regexp with.
See Pattern.compile(java.lang.String, int)
getFormat
public final String getFormat()
getRegexp
public final Pattern getRegexp()
- the regexp to match against
setCompileFlags
public final void setCompileFlags(int aCompileFlags)
Set the compile flags for the regular expression.
aCompileFlags
- the compile flags to use.
setFormat
public final void setFormat(String aFormat)
throws ConversionException
Set the format to the specified regular expression.