public class SourceFileScope extends AbstractJavaScope
Constructor and Description |
---|
SourceFileScope() |
SourceFileScope(String packageImage) |
Modifier and Type | Method and Description |
---|---|
void |
addDeclaration(NameDeclaration declaration)
Adds a new declaration to this scope.
|
protected NameDeclaration |
findVariableHere(JavaNameOccurrence occ) |
Map<ClassNameDeclaration,List<NameOccurrence>> |
getClassDeclarations()
Convenience method that casts the declarations to
ClassNameDeclaration s. |
String |
getPackageName() |
String |
toString() |
checkForDuplicatedNameDeclaration, contains, glomNames
addNameOccurrence, getDeclarations, getDeclarations, getEnclosingScope, getParent, setParent
public SourceFileScope()
public SourceFileScope(String packageImage)
public String getPackageName()
public void addDeclaration(NameDeclaration declaration)
Scope.contains(NameOccurrence)
and Scope.addNameOccurrence(NameOccurrence)
can
be used correctly.addDeclaration
in interface Scope
addDeclaration
in class AbstractJavaScope
declaration
- the declaration to addIllegalArgumentException
- if declaration is not a ClassNameDeclaration
public Map<ClassNameDeclaration,List<NameOccurrence>> getClassDeclarations()
ClassNameDeclaration
s.AbstractScope.getDeclarations()
protected NameDeclaration findVariableHere(JavaNameOccurrence occ)
findVariableHere
in class AbstractJavaScope
Copyright © 2002–2014 InfoEther. All rights reserved.