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