public class SourceFileScope extends AbstractJavaScope
Constructor and Description |
---|
SourceFileScope() |
SourceFileScope(String packageImage) |
Modifier and Type | Method and Description |
---|---|
void |
addDeclaration(NameDeclaration declaration) |
void |
configureImports(ClassLoader classLoader,
List<ASTImportDeclaration> imports)
Configures the type resolution for the symbol table.
|
protected NameDeclaration |
findVariableHere(JavaNameOccurrence occ) |
Map<ClassNameDeclaration,List<NameOccurrence>> |
getClassDeclarations()
Convenience method that casts the declarations to
ClassNameDeclaration s. |
String |
getPackageName() |
Class<?> |
resolveType(String name)
Tries to resolve a class by name.
|
String |
toString() |
checkForDuplicatedNameDeclaration, contains, glomNames
addNameOccurrence, getDeclarations, getDeclarations, getEnclosingScope, getParent, setParent
public SourceFileScope()
public SourceFileScope(String packageImage)
public void configureImports(ClassLoader classLoader, List<ASTImportDeclaration> imports)
classLoader
- the class loader to use to find additional classesimports
- the import declarationspublic Class<?> resolveType(String name)
name
- the name of the classnull
if no class could be foundpublic String getPackageName()
public void addDeclaration(NameDeclaration declaration)
addDeclaration
in interface Scope
addDeclaration
in class AbstractJavaScope
IllegalArgumentException
- 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.