public class ImportControlCheck extends AbstractCheck implements ExternalResourceHolder
AutomaticBean.OutputStreamOptions
Modifier and Type | Field and Description |
---|---|
static String |
MSG_DISALLOWED
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_MISSING_FILE
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_UNKNOWN_PKG
A key is pointing to the warning message text in "messages.properties"
file.
|
Constructor and Description |
---|
ImportControlCheck() |
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.
|
Set<String> |
getExternalResourceLocations()
Returns a set of external configuration resource locations which are used by the module.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
void |
setFile(URI uri)
Set the name for the file containing the import control
configuration.
|
void |
setPath(Pattern pattern)
Set the file path pattern that this check applies to.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public static final String MSG_MISSING_FILE
public static final String MSG_UNKNOWN_PKG
public static final String MSG_DISALLOWED
public ImportControlCheck()
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 visitToken(DetailAST ast)
AbstractCheck
visitToken
in class AbstractCheck
ast
- the token to processpublic Set<String> getExternalResourceLocations()
ExternalResourceHolder
NullPointerException
in Checker
.
Such behaviour will signal that your module (check or filter) is designed incorrectly.
It make sense to return an empty set from 'getExternalResourceLocations()'
only for composite modules like TreeWalker
.getExternalResourceLocations
in interface ExternalResourceHolder
public void setFile(URI uri)
uri
- the uri of the file to load.IllegalArgumentException
- on error loading the file.Copyright © 2001–2018. All rights reserved.