net.sourceforge.pmd.symboltable
public class ClassScope extends AbstractScope
Field Summary | |
---|---|
protected Map<ClassNameDeclaration,List<NameOccurrence>> | classNames |
protected Map<MethodNameDeclaration,List<NameOccurrence>> | methodNames |
protected Map<VariableNameDeclaration,List<NameOccurrence>> | variableNames |
Constructor Summary | |
---|---|
ClassScope(String className) | |
ClassScope()
This is only for anonymous inner classes
FIXME - should have name like Foo$1, not Anonymous$1
to get this working right, the parent scope needs
to be passed in when instantiating a ClassScope |
Method Summary | |
---|---|
void | addDeclaration(VariableNameDeclaration variableDecl) |
void | addDeclaration(MethodNameDeclaration decl) |
void | addDeclaration(ClassNameDeclaration decl) |
NameDeclaration | addVariableNameOccurrence(NameOccurrence occurrence) |
protected NameDeclaration | findVariableHere(NameOccurrence occurrence) |
Map<ClassNameDeclaration,List<NameOccurrence>> | getClassDeclarations() |
String | getClassName() |
ClassScope | getEnclosingClassScope() |
Map<MethodNameDeclaration,List<NameOccurrence>> | getMethodDeclarations() |
Map<VariableNameDeclaration,List<NameOccurrence>> | getVariableDeclarations() |
String | toString() |