|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectnet.sourceforge.pmd.symboltable.AbstractScope
net.sourceforge.pmd.symboltable.ClassScope
| Field Summary | |
protected java.util.Map |
classNames
|
protected java.util.Map |
methodNames
|
protected java.util.Map |
variableNames
|
| Constructor Summary | |
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 |
|
ClassScope(java.lang.String className)
|
|
| Method Summary | |
void |
addDeclaration(ClassNameDeclaration decl)
Add a class declaration to this scope |
void |
addDeclaration(MethodNameDeclaration decl)
Add a method declaration to this scope |
void |
addDeclaration(VariableNameDeclaration variableDecl)
Add a variable declaration to this scope |
NameDeclaration |
addVariableNameOccurrence(NameOccurrence occurrence)
Adds a NameOccurrence to this scope - only call this after getting a true back from contains() |
protected NameDeclaration |
findVariableHere(NameOccurrence occurrence)
|
java.util.Map |
getClassDeclarations()
Returns a Map (VariableNameDeclaration->List(NameOccurrence,NameOccurrence)) of declarations that exist at this scope |
java.lang.String |
getClassName()
|
ClassScope |
getEnclosingClassScope()
Goes searching up the tree for this scope's enclosing ClassScope This is handy if you're buried down in a LocalScope and need to hop up to the ClassScope to find a method name. |
java.util.Map |
getMethodDeclarations()
|
java.util.Map |
getVariableDeclarations()
Returns a Map (VariableNameDeclaration->List(NameOccurrence,NameOccurrence)) of declarations that exist at this scope |
java.lang.String |
toString()
|
| Methods inherited from class net.sourceforge.pmd.symboltable.AbstractScope |
contains, getEnclosingMethodScope, getEnclosingSourceFileScope, getParent, glomNames, setParent |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Map classNames
protected java.util.Map methodNames
protected java.util.Map variableNames
| Constructor Detail |
public ClassScope(java.lang.String className)
public ClassScope()
| Method Detail |
public void addDeclaration(VariableNameDeclaration variableDecl)
Scope
public NameDeclaration addVariableNameOccurrence(NameOccurrence occurrence)
Scope
public java.util.Map getVariableDeclarations()
Scope
public java.util.Map getMethodDeclarations()
public java.util.Map getClassDeclarations()
Scope
getClassDeclarations in interface ScopegetClassDeclarations in class AbstractScopepublic ClassScope getEnclosingClassScope()
Scope
getEnclosingClassScope in interface ScopegetEnclosingClassScope in class AbstractScopepublic java.lang.String getClassName()
public void addDeclaration(MethodNameDeclaration decl)
Scope
addDeclaration in interface ScopeaddDeclaration in class AbstractScopepublic void addDeclaration(ClassNameDeclaration decl)
Scope
addDeclaration in interface ScopeaddDeclaration in class AbstractScopeprotected NameDeclaration findVariableHere(NameOccurrence occurrence)
findVariableHere in class AbstractScopepublic java.lang.String toString()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||