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
ClassNameDeclarations. |
String |
getPackageName() |
Class<?> |
resolveType(String name)
Tries to resolve a class by name.
|
String |
toString() |
checkForDuplicatedNameDeclaration, contains, glomNamesaddNameOccurrence, getDeclarations, getDeclarations, getEnclosingScope, getParent, setParentpublic 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 ScopeaddDeclaration in class AbstractJavaScopeIllegalArgumentException - if declaration is not a ClassNameDeclarationpublic Map<ClassNameDeclaration,List<NameOccurrence>> getClassDeclarations()
ClassNameDeclarations.AbstractScope.getDeclarations()protected NameDeclaration findVariableHere(JavaNameOccurrence occ)
findVariableHere in class AbstractJavaScopeCopyright © 2002-2014 InfoEther. All Rights Reserved.