net.sourceforge.pmd.symboltable
Class GlobalScope
java.lang.Object
net.sourceforge.pmd.symboltable.AbstractScope
net.sourceforge.pmd.symboltable.GlobalScope
- All Implemented Interfaces:
- 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 |
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.
- Specified by:
getEnclosingClassScope
in interface Scope
- Overrides:
getEnclosingClassScope
in class AbstractScope
addDeclaration
public void addDeclaration(MethodNameDeclaration decl)
- Description copied from interface:
Scope
- Add a method declaration to this scope
- Specified by:
addDeclaration
in interface 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
- Specified by:
addDeclaration
in interface 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.
- Specified by:
contains
in interface Scope
- 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()
- Specified by:
addVariableNameOccurrence
in interface Scope
- Overrides:
addVariableNameOccurrence
in class AbstractScope
toString
public java.lang.String toString()
findVariableHere
protected NameDeclaration findVariableHere(NameOccurrence occ)
- Specified by:
findVariableHere
in class AbstractScope
Copyright © 2002-2004 Project Ultra*Log @ DARPA. All Rights Reserved.