public class ClassScope extends AbstractJavaScope
| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
Set<NameDeclaration> |
addNameOccurrence(NameOccurrence occurrence)
Adds a
NameOccurrence to this scope - only call this after getting
a true back from Scope.contains(NameOccurrence). |
protected Set<NameDeclaration> |
findVariableHere(JavaNameOccurrence occurrence) |
Map<ClassNameDeclaration,List<NameOccurrence>> |
getClassDeclarations() |
String |
getClassName() |
Map<MethodNameDeclaration,List<NameOccurrence>> |
getMethodDeclarations() |
Map<VariableNameDeclaration,List<NameOccurrence>> |
getVariableDeclarations() |
void |
setIsEnum(boolean isEnum) |
String |
toString() |
addDeclaration, checkForDuplicatedNameDeclaration, contains, glomNamesgetDeclarations, getDeclarations, getEnclosingScope, getParent, setParentpublic ClassScope(String className)
public ClassScope()
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)
ScopeNameOccurrence to this scope - only call this after getting
a true back from Scope.contains(NameOccurrence).addNameOccurrence in interface ScopeaddNameOccurrence in class AbstractScopeNameDeclarations that are referenced by the given NameOccurrence,
if the NameOccurrence could be added. Otherwise an empty set is returned.public String getClassName()
protected Set<NameDeclaration> findVariableHere(JavaNameOccurrence occurrence)
findVariableHere in class AbstractJavaScopeCopyright © 2002–2016 InfoEther. All rights reserved.