|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Provides methods which all scopes must implement
See JLS 6.3 for a description of scopes
Method Summary | |
void |
addDeclaration(ClassNameDeclaration decl)
Add a class declaration to this scope |
void |
addDeclaration(MethodNameDeclaration decl)
Add a method declaration to this scope |
void |
addDeclaration(VariableNameDeclaration decl)
Add a variable declaration to this scope |
NameDeclaration |
addVariableNameOccurrence(NameOccurrence occ)
Adds a NameOccurrence to this scope - only call this after getting a true back from contains() |
boolean |
contains(NameOccurrence occ)
Tests whether or not a NameOccurrence is directly contained in the scope Note that if this search is just in this scope - it doesn't go diving into any contained scopes. |
java.util.Map |
getClassDeclarations()
Returns a Map (VariableNameDeclaration->List(NameOccurrence,NameOccurrence)) of declarations that exist at this scope |
ClassScope |
getEnclosingClassScope()
Goes searching up the tree for this scope's enclosing ClassScope This is handy if you're buried down in a LocalScope and need to hop up to the ClassScope to find a method name. |
Scope |
getParent()
Retrieves this scope's parent |
java.util.Map |
getVariableDeclarations()
Returns a Map (VariableNameDeclaration->List(NameOccurrence,NameOccurrence)) of declarations that exist at this scope |
void |
setParent(Scope parent)
Points this scope to its parent |
Method Detail |
public java.util.Map getVariableDeclarations()
public java.util.Map getClassDeclarations()
public void addDeclaration(ClassNameDeclaration decl)
public void addDeclaration(VariableNameDeclaration decl)
public void addDeclaration(MethodNameDeclaration decl)
public boolean contains(NameOccurrence occ)
public NameDeclaration addVariableNameOccurrence(NameOccurrence occ)
public void setParent(Scope parent)
public Scope getParent()
public ClassScope getEnclosingClassScope()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |