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, glomNames
getDeclarations, getDeclarations, getEnclosingScope, getParent, setParent
public 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)
Scope
NameOccurrence
to this scope - only call this after getting
a true back from Scope.contains(NameOccurrence)
.addNameOccurrence
in interface Scope
addNameOccurrence
in class AbstractScope
NameDeclaration
s 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 AbstractJavaScope
Copyright © 2002–2017 InfoEther. All rights reserved.