Class AbstractFormatCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck
-
- All Implemented Interfaces:
Configurable
,Contextualizable
@Deprecated public abstract class AbstractFormatCheck extends AbstractCheck
Deprecated.Checkstyle will not support abstract checks anymore. UseAbstractCheck
instead.Abstract class for checks that verify strings using a
regular expression
. It provides support for setting the regular expression using the property nameformat
.- Author:
- Oliver Burn
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractFormatCheck(String defaultFormat)
Deprecated.Creates a newAbstractFormatCheck
instance.protected
AbstractFormatCheck(String defaultFormat, int compileFlags)
Deprecated.Creates a newAbstractFormatCheck
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getFormat()
Deprecated.Gets the regexp format.Pattern
getRegexp()
Deprecated.Gets the regexp.void
setCompileFlags(int compileFlags)
Deprecated.Set the compile flags for the regular expression.void
setFormat(String format)
Deprecated.Set the format to the specified regular expression.-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, 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
-
-
-
-
Constructor Detail
-
AbstractFormatCheck
protected AbstractFormatCheck(String defaultFormat)
Deprecated.Creates a newAbstractFormatCheck
instance. Defaults the compile flag to 0 (the default).- Parameters:
defaultFormat
- default format- Throws:
org.apache.commons.beanutils.ConversionException
- unable to parse defaultFormat
-
AbstractFormatCheck
protected AbstractFormatCheck(String defaultFormat, int compileFlags)
Deprecated.Creates a newAbstractFormatCheck
instance.- Parameters:
defaultFormat
- default formatcompileFlags
- the Pattern flags to compile the regexp with. SeePattern.compile(String, int)
- Throws:
org.apache.commons.beanutils.ConversionException
- unable to parse defaultFormat
-
-
Method Detail
-
setFormat
public final void setFormat(String format)
Deprecated.Set the format to the specified regular expression.- Parameters:
format
- aString
value- Throws:
org.apache.commons.beanutils.ConversionException
- unable to parse format
-
setCompileFlags
public final void setCompileFlags(int compileFlags)
Deprecated.Set the compile flags for the regular expression.- Parameters:
compileFlags
- the compile flags to use.
-
getRegexp
public final Pattern getRegexp()
Deprecated.Gets the regexp.- Returns:
- the regexp to match against
-
-