org.acm.seguin.pmd.symboltable
Class GlobalScope
java.lang.Object
org.acm.seguin.pmd.symboltable.AbstractScope
org.acm.seguin.pmd.symboltable.GlobalScope
- All Implemented Interfaces:
- net.sourceforge.jrefactory.ast.Scope
public class GlobalScope
- extends AbstractScope
- implements Scope
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sourceforge.jrefactory.ast.Scope |
getParent, setParent |
GlobalScope
public GlobalScope()
getEnclosingClassScope
public ClassScope getEnclosingClassScope()
- Description copied from interface:
Scope
- 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.
- Overrides:
getEnclosingClassScope
in class AbstractScope
addDeclaration
public void addDeclaration(MethodNameDeclaration decl)
- Description copied from interface:
Scope
- Add a method declaration to this scope
- Overrides:
addDeclaration
in class AbstractScope
getUnusedVariableDeclarations
public java.util.Map getUnusedVariableDeclarations()
addDeclaration
public void addDeclaration(VariableNameDeclaration decl)
- Description copied from interface:
Scope
- Add a variable declaration to this scope
- Overrides:
addDeclaration
in class AbstractScope
contains
public boolean contains(NameOccurrence occ)
- Description copied from interface:
Scope
- Tests whether or not a NameOccurrence is directly contained in the scope
Note that if this search is just in this scope - it doesn't go diving into any
contained scopes.
- Overrides:
contains
in class AbstractScope
addVariableNameOccurrence
public NameDeclaration addVariableNameOccurrence(NameOccurrence occ)
- Description copied from interface:
Scope
- Adds a NameOccurrence to this scope - only call this after getting
a true back from contains()
- Overrides:
addVariableNameOccurrence
in class AbstractScope
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
findVariableHere
protected NameDeclaration findVariableHere(NameOccurrence occ)
- Specified by:
findVariableHere
in class AbstractScope