Class RegexpOnStringCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.thomasjensen.checkstyle.addons.checks.AbstractAddonsCheck
-
- com.thomasjensen.checkstyle.addons.checks.regexp.RegexpOnStringCheck
-
- All Implemented Interfaces:
Configurable
,Contextualizable
public class RegexpOnStringCheck extends AbstractAddonsCheck
This check applies a regular expression to String literals found in the source.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
AutomaticBean.OutputStreamOptions
-
-
Constructor Summary
Constructors Constructor Description RegexpOnStringCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Integer>
getRelevantTokens()
The tokens which this check is interested in.void
setRegexp(String pRegexp)
Setter.protected void
visitToken(BinaryName pBinaryClassName, DetailAST pAst)
Called to process a token.-
Methods inherited from class com.thomasjensen.checkstyle.addons.checks.AbstractAddonsCheck
beginTree, finishTree, finishTree, getAcceptableTokens, getApiFixer, getClassDeclarationPosition, getCurrentBinaryName, getCurrentSimpleName, getDefaultTokens, getMyPackage, getRequiredTokens, leaveKnownType, leaveToken, leaveToken, visitKnownType, visitToken
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
clearViolations, destroy, getLine, getLineCodePoints, getLines, getTabWidth, getTokenNames, getViolations, init, isCommentNodesRequired, log, log, log, setFileContents, setTabWidth, setTokens
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, getConfiguration, setupChild
-
-
-
-
Method Detail
-
getRelevantTokens
public Set<Integer> getRelevantTokens()
Description copied from class:AbstractAddonsCheck
The tokens which this check is interested in. Will be added to the tokens of the base class.- Specified by:
getRelevantTokens
in classAbstractAddonsCheck
- Returns:
- the relevant tokens
-
visitToken
protected void visitToken(@Nullable BinaryName pBinaryClassName, @Nonnull DetailAST pAst)
Description copied from class:AbstractAddonsCheck
Called to process a token.- Overrides:
visitToken
in classAbstractAddonsCheck
- Parameters:
pBinaryClassName
- the currently active binary class namepAst
- the token to process
-
-