public class ClassScope extends AbstractScope
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 |
---|---|
void |
addDeclaration(NameDeclaration declaration)
Adds a new declaration to this scope.
|
NameDeclaration |
addNameOccurrence(NameOccurrence occ)
Adds a
NameOccurrence to this scope - only call this after getting
a true back from Scope.contains(NameOccurrence) . |
protected NameDeclaration |
findVariableHere(PLSQLNameOccurrence occurrence) |
Map<ClassNameDeclaration,List<NameOccurrence>> |
getClassDeclarations() |
String |
getClassName() |
ClassScope |
getEnclosingClassScope() |
Map<MethodNameDeclaration,List<NameOccurrence>> |
getMethodDeclarations() |
Map<VariableNameDeclaration,List<NameOccurrence>> |
getVariableDeclarations() |
String |
toString() |
contains, getDeclarations, getDeclarations, getEnclosingScope, getParent, setParent
public ClassScope(String className)
public ClassScope()
public void addDeclaration(NameDeclaration declaration)
Scope
Scope.contains(NameOccurrence)
and Scope.addNameOccurrence(NameOccurrence)
can
be used correctly.addDeclaration
in interface Scope
addDeclaration
in class AbstractScope
declaration
- the declaration to addpublic NameDeclaration addNameOccurrence(NameOccurrence occ)
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
that is references by the given NameOccurrence
,
if the NameOccurrence
could be added. Otherwise null
is returned.public Map<VariableNameDeclaration,List<NameOccurrence>> getVariableDeclarations()
public Map<MethodNameDeclaration,List<NameOccurrence>> getMethodDeclarations()
public Map<ClassNameDeclaration,List<NameOccurrence>> getClassDeclarations()
public ClassScope getEnclosingClassScope()
public String getClassName()
protected NameDeclaration findVariableHere(PLSQLNameOccurrence occurrence)
Copyright © 2002–2014 InfoEther. All rights reserved.