net.sourceforge.pmd.symboltable
Class ClassScope
java.lang.Object
|
+--net.sourceforge.pmd.symboltable.AbstractScope
|
+--net.sourceforge.pmd.symboltable.ClassScope
- All Implemented Interfaces:
- Scope
- public class ClassScope
- extends AbstractScope
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)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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
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
getClassName
public java.lang.String getClassName()
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
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
Copyright © 2002-2003 Project Ultra*Log @ DARPA. All Rights Reserved.