|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck
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
.
Constructor Summary | |
---|---|
AbstractFormatCheck(String aDefaultFormat)
Creates a new AbstractFormatCheck instance. |
|
AbstractFormatCheck(String aDefaultFormat,
int aCompileFlags)
Creates a new AbstractFormatCheck instance. |
Method Summary | |
---|---|
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. |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
---|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
---|
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
---|
configure, contextualize, finishLocalSetup, getConfiguration, setupChild |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractFormatCheck(String aDefaultFormat) throws org.apache.commons.beanutils.ConversionException
AbstractFormatCheck
instance. Defaults the
compile flag to 0 (the default).
aDefaultFormat
- default format
org.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 aDefaultFormatMethod Detail |
---|
public final void setFormat(String aFormat) throws org.apache.commons.beanutils.ConversionException
aFormat
- a String
value
org.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()
|
Back to the Checkstyle Home Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |