public abstract class AbstractAddonsCheck extends Check
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAddonsCheck() |
| Modifier and Type | Method and Description |
|---|---|
void |
beginTree(DetailAST pRootAst) |
void |
finishTree(DetailAST pRootAst) |
protected void |
finishTree(String pFqcn,
DetailAST pRootAst)
Called after a tree is fully processed.
|
protected DetailAST |
getClassDeclarationPosition(String pBinaryName) |
protected String |
getCurrentBinaryName()
Gets the binary name of the class currently being traversed on the AST.
|
int[] |
getDefaultTokens() |
protected String |
getMyPackage() |
abstract Set<Integer> |
getRelevantTokens()
The tokens which this check is interested in.
|
int[] |
getRequiredTokens() |
protected boolean |
isCheckStopped() |
protected void |
leaveKnownType(String pBinaryClassName,
DetailAST pAst)
Called after leaving a CLASS_DEF, INTERFACE_DEF, ANNOTATION_DEF, or ENUM_DEF token and the type's binary class
name is known.
|
void |
leaveToken(DetailAST pAst) |
protected void |
leaveToken(String pBinaryClassName,
DetailAST pAst)
Called after all the child nodes have been processed.
|
protected void |
stopChecking() |
protected void |
visitKnownType(String pBinaryClassName,
DetailAST pAst)
Called after visiting a CLASS_DEF, INTERFACE_DEF, ANNOTATION_DEF, or ENUM_DEF token and successfully
determining the type's binary class name.
|
void |
visitToken(DetailAST pAst) |
protected void |
visitToken(String pBinaryClassName,
DetailAST pAst)
Called to process a token.
|
destroy, getAcceptableTokens, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic final int[] getDefaultTokens()
getDefaultTokens in class Checkpublic abstract Set<Integer> getRelevantTokens()
public int[] getRequiredTokens()
getRequiredTokens in class Checkpublic final void finishTree(DetailAST pRootAst)
finishTree in class Checkprotected void finishTree(@Nonnull String pFqcn, @Nonnull DetailAST pRootAst)
pFqcn - the fully qualified class name of the outer classpRootAst - the root of the treeprotected void visitToken(@Nullable String pBinaryClassName, @Nonnull DetailAST pAst)
pBinaryClassName - the currently active binary class namepAst - the token to processprotected void leaveToken(@Nullable String pBinaryClassName, @Nonnull DetailAST pAst)
pBinaryClassName - the currently active binary class namepAst - the token being completedprotected void visitKnownType(@Nonnull String pBinaryClassName, @Nonnull DetailAST pAst)
visitToken(String, DetailAST) will be performed in addition to (after) this one.pBinaryClassName - the binary class name of the visited typepAst - the token to processprotected void leaveKnownType(@Nonnull String pBinaryClassName, @Nonnull DetailAST pAst)
leaveToken(String, DetailAST) will be performed in addition to (before) this one.pBinaryClassName - the binary class name of the visited typepAst - the token being completedpublic final void visitToken(DetailAST pAst)
visitToken in class Check@CheckForNull protected DetailAST getClassDeclarationPosition(@Nonnull String pBinaryName)
public final void leaveToken(DetailAST pAst)
leaveToken in class Check@CheckForNull protected String getCurrentBinaryName()
null if no CLASS_DEF or similar token has been encountered yet
(e.g. while we are still going through the import statements)protected String getMyPackage()
protected boolean isCheckStopped()
protected void stopChecking()