public class ClassScope extends AbstractJavaScope
| Constructor and Description |
|---|
ClassScope(ClassNameDeclaration classNameDeclaration)
This is only for anonymous inner classes.
|
ClassScope(String className,
ClassNameDeclaration classNameDeclaration) |
| Modifier and Type | Method and Description |
|---|---|
Set<NameDeclaration> |
addNameOccurrence(NameOccurrence occurrence) |
protected Set<NameDeclaration> |
findVariableHere(JavaNameOccurrence occurrence) |
Map<ClassNameDeclaration,List<NameOccurrence>> |
getClassDeclarations() |
String |
getClassName() |
Map<MethodNameDeclaration,List<NameOccurrence>> |
getMethodDeclarations() |
Map<VariableNameDeclaration,List<NameOccurrence>> |
getVariableDeclarations() |
Class<?> |
resolveType(String name) |
void |
setIsEnum(boolean isEnum) |
String |
toString() |
addDeclaration, checkForDuplicatedNameDeclaration, contains, glomNamesgetDeclarations, getDeclarations, getEnclosingScope, getParent, setParentpublic ClassScope(String className, ClassNameDeclaration classNameDeclaration)
public ClassScope(ClassNameDeclaration classNameDeclaration)
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
classNameDeclaration - The declaration of this class, as known to the parent scope.public void setIsEnum(boolean isEnum)
public Map<ClassNameDeclaration,List<NameOccurrence>> getClassDeclarations()
public Map<MethodNameDeclaration,List<NameOccurrence>> getMethodDeclarations()
public Map<VariableNameDeclaration,List<NameOccurrence>> getVariableDeclarations()
public Set<NameDeclaration> addNameOccurrence(NameOccurrence occurrence)
addNameOccurrence in interface ScopeaddNameOccurrence in class AbstractScopepublic String getClassName()
protected Set<NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
findVariableHere in class AbstractJavaScopeCopyright © 2002–2017 PMD. All rights reserved.