net.sourceforge.pmd.lang.java.symboltable
Class ClassScope
java.lang.Object
net.sourceforge.pmd.lang.symboltable.AbstractScope
net.sourceforge.pmd.lang.java.symboltable.AbstractJavaScope
net.sourceforge.pmd.lang.java.symboltable.ClassScope
- All Implemented Interfaces:
- Scope
public class ClassScope
- extends AbstractJavaScope
This scope represents one Java class. It can have variable declarations,
method declarations and inner class declarations.
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(String className)
|
ClassScope
public ClassScope(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
setIsEnum
public void setIsEnum(boolean isEnum)
getClassDeclarations
public Map<ClassNameDeclaration,List<NameOccurrence>> getClassDeclarations()
getMethodDeclarations
public Map<MethodNameDeclaration,List<NameOccurrence>> getMethodDeclarations()
getVariableDeclarations
public Map<VariableNameDeclaration,List<NameOccurrence>> getVariableDeclarations()
addNameOccurrence
public NameDeclaration addNameOccurrence(NameOccurrence occurrence)
- Specified by:
addNameOccurrence
in interface Scope
- Overrides:
addNameOccurrence
in class AbstractScope
getClassName
public String getClassName()
findVariableHere
protected NameDeclaration findVariableHere(JavaNameOccurrence occurrence)
- Specified by:
findVariableHere
in class AbstractJavaScope
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2002-2016 InfoEther. All Rights Reserved.