org.acm.seguin.pmd.symboltable
Class ClassScope

java.lang.Object
  extended by org.acm.seguin.pmd.symboltable.AbstractScope
      extended by org.acm.seguin.pmd.symboltable.ClassScope
All Implemented Interfaces:
net.sourceforge.jrefactory.ast.Scope

public class ClassScope
extends AbstractScope


Field Summary
 
Fields inherited from class org.acm.seguin.pmd.symboltable.AbstractScope
methodNames, 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(MethodNameDeclaration decl)
          Add a method declaration to this scope
protected  NameDeclaration findVariableHere(NameOccurrence occurrence)
           
 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.lang.String toString()
           
 
Methods inherited from class org.acm.seguin.pmd.symboltable.AbstractScope
addDeclaration, addVariableNameOccurrence, contains, getParent, getVariableDeclarations, glomNames, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassScope

public ClassScope(java.lang.String className)

ClassScope

public 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 Detail

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

getClassName

public java.lang.String getClassName()

addDeclaration

public void addDeclaration(MethodNameDeclaration decl)
Description copied from interface: Scope
Add a method declaration to this scope

Overrides:
addDeclaration in class AbstractScope

findVariableHere

protected NameDeclaration findVariableHere(NameOccurrence occurrence)
Specified by:
findVariableHere in class AbstractScope

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object