dpt.symbtab
Class HasImports
java.lang.Object
|
+--dpt.symbtab.Definition
|
+--dpt.symbtab.ScopedDef
|
+--dpt.symbtab.HasImports
- Direct Known Subclasses:
- ClassDef
- abstract class HasImports
- extends ScopedDef
An abstract class representing a symbol that can import packages.
Fields inherited from class dpt.symbtab.Definition |
definition,
name,
parentScope,
references,
ST_CL,
ST_FU,
ST_FU_EXT,
ST_IF,
ST_IMPL,
ST_IMPORT,
ST_PAC,
ST_SUB,
ST_SUPER,
ST_VAR |
Constructor Summary |
(package private) |
HasImports(java.lang.String name,
Occurrence occ,
ScopedDef parentScope)
Constructor to set up an object that can have imports |
Method Summary |
(package private) void |
closeImports(SymbolTable symbolTable)
Tell the symbol table that we are done with our imports |
(package private) java.util.Vector |
getImports()
Write information about the imported classes/packages to report |
(package private) boolean |
isTopLevel()
Ask if this is a toplevel class or not
This is true if the parentScope is a package |
(package private) void |
openImports(SymbolTable symbolTable)
Tell the symbol table that we need to import some classes |
(package private) void |
reportImports(IndentingPrintWriter out)
Write information about the imported classes/packages to report |
(package private) void |
resolveTypes(SymbolTable symbolTable)
Resolve any referenced symbols |
(package private) void |
setImports(JavaHashtable imports)
Set the list of imported classes/packages |
Methods inherited from class dpt.symbtab.Definition |
addReference,
ExtractClass,
ExtractClass,
ExtractName,
ExtractPackage,
ExtractPackage,
getDef,
GetItem,
GetItems,
GetLocation,
getName,
getOccurrence,
getParentScope,
getQualifiedName,
GetReferences,
isSuperClassOf,
listReferences,
lookup,
report,
setParentScope,
toString |
Methods inherited from class java.lang.Object |
,
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
imports
private JavaHashtable imports
- A table of all packages imported by this symbol
HasImports
HasImports(java.lang.String name,
Occurrence occ,
ScopedDef parentScope)
- Constructor to set up an object that can have imports
closeImports
void closeImports(SymbolTable symbolTable)
- Tell the symbol table that we are done with our imports
isTopLevel
boolean isTopLevel()
- Ask if this is a toplevel class or not
This is true if the parentScope is a package
openImports
void openImports(SymbolTable symbolTable)
- Tell the symbol table that we need to import some classes
reportImports
void reportImports(IndentingPrintWriter out)
- Write information about the imported classes/packages to report
getImports
java.util.Vector getImports()
- Write information about the imported classes/packages to report
resolveTypes
void resolveTypes(SymbolTable symbolTable)
- Resolve any referenced symbols
- Overrides:
- resolveTypes in class ScopedDef
setImports
void setImports(JavaHashtable imports)
- Set the list of imported classes/packages