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