AbstractCheck
instead.@Deprecated public abstract class AbstractDeclarationCollector extends AbstractCheck
Modifier and Type | Class and Description |
---|---|
private static class |
AbstractDeclarationCollector.BlockFrame
Deprecated.
A frame initiated on entering a statement list; holds local variable
names.
|
private static class |
AbstractDeclarationCollector.ClassFrame
Deprecated.
A frame initiated at class definition; holds instance variable
names.
|
private static class |
AbstractDeclarationCollector.GlobalFrame
Deprecated.
The global frame; should hold only class names.
|
private static class |
AbstractDeclarationCollector.LexicalFrame
Deprecated.
A declaration frame.
|
private static class |
AbstractDeclarationCollector.MethodFrame
Deprecated.
A frame initiated at method definition; holds parameter names.
|
Modifier and Type | Field and Description |
---|---|
private AbstractDeclarationCollector.LexicalFrame |
current
Deprecated.
Frame for the currently processed AST.
|
private java.util.Map<DetailAST,AbstractDeclarationCollector.LexicalFrame> |
frames
Deprecated.
Tree of all the parsed frames.
|
Constructor and Description |
---|
AbstractDeclarationCollector()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
beginTree(DetailAST rootAST)
Deprecated.
Called before the starting to process a tree.
|
private static void |
collectDeclarations(java.util.Deque<AbstractDeclarationCollector.LexicalFrame> frameStack,
DetailAST ast)
Deprecated.
Parse the next AST for declarations.
|
private static void |
collectVariableDeclarations(DetailAST ast,
AbstractDeclarationCollector.LexicalFrame frame)
Deprecated.
Collect Variable Declarations.
|
private void |
endCollectingDeclarations(java.util.Queue<AbstractDeclarationCollector.LexicalFrame> frameStack,
DetailAST ast)
Deprecated.
End parsing of the AST for declarations.
|
private AbstractDeclarationCollector.LexicalFrame |
findFrame(java.lang.String name)
Deprecated.
Find frame containing declaration.
|
protected boolean |
isClassField(java.lang.String name)
Deprecated.
Check if given name is a name for class field in current environment.
|
protected boolean |
isClassMethod(java.lang.String name)
Deprecated.
Check if given name is a name for class method in current environment.
|
void |
visitToken(DetailAST ast)
Deprecated.
Called to process a token.
|
destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLine, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
private java.util.Map<DetailAST,AbstractDeclarationCollector.LexicalFrame> frames
private AbstractDeclarationCollector.LexicalFrame current
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 processprivate static void collectDeclarations(java.util.Deque<AbstractDeclarationCollector.LexicalFrame> frameStack, DetailAST ast)
frameStack
- Stack containing the FrameTree being builtast
- AST to parseprivate static void collectVariableDeclarations(DetailAST ast, AbstractDeclarationCollector.LexicalFrame frame)
ast
- variable tokenframe
- current frameprivate void endCollectingDeclarations(java.util.Queue<AbstractDeclarationCollector.LexicalFrame> frameStack, DetailAST ast)
frameStack
- Stack containing the FrameTree being builtast
- AST that was parsedprotected final boolean isClassField(java.lang.String name)
name
- a name to checkprotected final boolean isClassMethod(java.lang.String name)
name
- a name to checkprivate AbstractDeclarationCollector.LexicalFrame findFrame(java.lang.String name)
name
- name of the declaration to find