public class MethodScope extends AbstractJavaScope
| Constructor and Description |
|---|
MethodScope(Node node) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDeclaration(NameDeclaration variableDecl)
Adds a new declaration to this scope.
|
NameDeclaration |
addNameOccurrence(NameOccurrence occurrence)
Adds a
NameOccurrence to this scope - only call this after getting
a true back from Scope.contains(NameOccurrence). |
NameDeclaration |
findVariableHere(JavaNameOccurrence occurrence) |
String |
getName() |
Map<VariableNameDeclaration,List<NameOccurrence>> |
getVariableDeclarations() |
String |
toString() |
checkForDuplicatedNameDeclaration, contains, glomNamesgetDeclarations, getDeclarations, getEnclosingScope, getParent, setParentpublic MethodScope(Node node)
public Map<VariableNameDeclaration,List<NameOccurrence>> getVariableDeclarations()
public 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 AbstractScopeNameDeclaration that is references by the given NameOccurrence,
if the NameOccurrence could be added. Otherwise null is returned.public void addDeclaration(NameDeclaration variableDecl)
ScopeScope.contains(NameOccurrence) and Scope.addNameOccurrence(NameOccurrence) can
be used correctly.addDeclaration in interface ScopeaddDeclaration in class AbstractJavaScopevariableDecl - the declaration to addpublic NameDeclaration findVariableHere(JavaNameOccurrence occurrence)
findVariableHere in class AbstractJavaScopepublic String getName()
Copyright © 2002-2014 InfoEther. All Rights Reserved.