public class RegexpSinglelineJavaCheck extends AbstractCheck
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
format
The format of the regular expression to match.
|
private boolean |
ignoreCase
Whether to ignore case when matching.
|
private boolean |
ignoreComments
Suppress comments.
|
private int |
maximum
The maximum number of matches required per file.
|
private java.lang.String |
message
The message to report for a match.
|
private int |
minimum
The minimum number of matches required per file.
|
Constructor and Description |
---|
RegexpSinglelineJavaCheck() |
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST rootAST)
Called before the starting to process a tree.
|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
void |
setFormat(java.lang.String format)
Set the format of the regular expression to match.
|
void |
setIgnoreCase(boolean ignoreCase)
Set whether to ignore case when matching.
|
void |
setIgnoreComments(boolean ignore)
Set whether to ignore comments when matching.
|
void |
setMaximum(int maximum)
Set the maximum number of matches required per file.
|
void |
setMessage(java.lang.String message)
Set the message to report for a match.
|
void |
setMinimum(int minimum)
Set the minimum number of matches required per file.
|
destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, 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
private java.lang.String format
private java.lang.String message
private int minimum
private int maximum
private boolean ignoreCase
private boolean ignoreComments
public int[] getDefaultTokens()
AbstractCheck
getDefaultTokens
in class AbstractCheck
TokenTypes
public int[] getAcceptableTokens()
AbstractCheck
getAcceptableTokens
in class AbstractCheck
TokenTypes
public int[] getRequiredTokens()
AbstractCheck
getRequiredTokens
in class AbstractCheck
TokenTypes
public void beginTree(DetailAST rootAST)
AbstractCheck
beginTree
in class AbstractCheck
rootAST
- the root of the treepublic void setFormat(java.lang.String format)
format
- the format of the regular expression to match.public void setMessage(java.lang.String message)
message
- the message to report for a match.public void setMinimum(int minimum)
minimum
- the minimum number of matches required per file.public void setMaximum(int maximum)
maximum
- the maximum number of matches required per file.public void setIgnoreCase(boolean ignoreCase)
ignoreCase
- whether to ignore case when matching.public void setIgnoreComments(boolean ignore)
ignore
- whether to ignore comments when matching.