All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class espresso.parser.JavaImportManager

java.lang.Object
   |
   +----espresso.parser.JavaImportManager

public class JavaImportManager
extends Object

Variable Index

 o classpath_d
Vector keeping the directories and zip or jar file paths.
 o DEFAULT_IMPORT
The name of the default qualified import.
 o JAVA_ROOT
Root class in Java.
 o loadedClasses_d
Hashtable to keep track of already loaded class files.
 o notFoundClasses_d
Hashtable to keep track of class names, that definitely don't exist as fully qualified names.
 o qualifiedImports_d
Vector holding all qualified imports.
 o seenClasses_d
Hashtable to keep track of class names, that exist, and that are not ambiguous.
 o symbolTable_d
Reference to the parser's symboltable.

Constructor Index

 o JavaImportManager(SymbolTable)
Constructor taking the parser's symbol table as parameter.

Method Index

 o addQualifiedImport(String)
The list of starred imports is maintained by the ImportManager.
 o addQualifiedImport(Symbol)
 o cacheLoadedClassName(Symbol)
Remeber already loaded classes or interfaces
 o cacheNotFoundClassName(Symbol)
Remember names of classes that were seen unambiguously
 o cacheSeenClassName(Symbol)
Remember names of classes that were seen unambiguously
 o canonicalize(String)
 o classLoaded(Symbol)
Checks whether fully qualified class represented by trueName was already loaded
 o classNameSeen(Symbol)
Checks whether fully qualified class represented by trueName was found to uniquely exist
 o decanonicalize(String)
 o existsClass(String)
Checks whether fully qualified class represented by truename exists in directories or zip/jar files defined in CLASSPATH
 o existsClass(Symbol)
Convenience method using symbols instead of String
 o fullyQualifyName(String)
Returns the fully qualified name of simple name provided that such a class exists in the packages defined by the starred imports (without ambiguity).
 o fullyQualifyName(Symbol)
 o join(Vector, String)
 o loadClassHeader(JavaClass, boolean)
Manages storing of class or Interface data into symbol table
 o loadFields(JavaClass)
Loads all class fields into symboltable
 o loadHierarchy(TypeDeclarationNode, boolean)
Manages loading of super classes and interfaces
 o loadMethods(JavaClass)
Loads all class methods into symboltable
 o notFoundClassName(Symbol)
Checks whether fully qualified class represented by trueName was found to uniquely exist
 o printFields(Field[])
 o printMethods(Method[])
 o readClassFile(Symbol, boolean)
Manages the loading of class files by initiating loading of class header information, loading of fields and loading of methods Triggers recursive loading for super classes and interfaces
 o setInitializer(VariableDeclaratorNode, ConstantValue)
Try set the initializer field
 o setUpClassPath()
Method to break the class path property string apart into distinct entries representing either directories containing class files, or path descriptions ending with a zip or a jar file
 o split(String, char)

Variables

 o DEFAULT_IMPORT
 static final String DEFAULT_IMPORT
The name of the default qualified import.

 o JAVA_ROOT
 static final String JAVA_ROOT
Root class in Java.

 o classpath_d
 Vector classpath_d
Vector keeping the directories and zip or jar file paths.

 o symbolTable_d
 SymbolTable symbolTable_d
Reference to the parser's symboltable.

 o loadedClasses_d
 Hashtable loadedClasses_d
Hashtable to keep track of already loaded class files.

 o seenClasses_d
 Hashtable seenClasses_d
Hashtable to keep track of class names, that exist, and that are not ambiguous.

 o notFoundClasses_d
 Hashtable notFoundClasses_d
Hashtable to keep track of class names, that definitely don't exist as fully qualified names.

 o qualifiedImports_d
 Vector qualifiedImports_d
Vector holding all qualified imports.

Constructors

 o JavaImportManager
 public JavaImportManager(SymbolTable symbol)
Constructor taking the parser's symbol table as parameter. The symbol table is used by the ImportManager to insert entries of imported classes and their fields and methods.

Methods

 o setUpClassPath
 private void setUpClassPath()
Method to break the class path property string apart into distinct entries representing either directories containing class files, or path descriptions ending with a zip or a jar file

 o addQualifiedImport
 public void addQualifiedImport(String qimport)
The list of starred imports is maintained by the ImportManager. This method is used to add an import path to the list of import path to be used later to satisfy imports on demand.

 o addQualifiedImport
 public void addQualifiedImport(Symbol qimport)
 o fullyQualifyName
 public String fullyQualifyName(String simple) throws Exception
Returns the fully qualified name of simple name provided that such a class exists in the packages defined by the starred imports (without ambiguity).

Parameters:
simple - Name respresenting a class or interface.
Returns:
The fully qualified name.
 o fullyQualifyName
 public Symbol fullyQualifyName(Symbol simple) throws Exception
 o classLoaded
 private boolean classLoaded(Symbol trueSymbol)
Checks whether fully qualified class represented by trueName was already loaded

 o cacheLoadedClassName
 private void cacheLoadedClassName(Symbol trueSymbol)
Remeber already loaded classes or interfaces

 o classNameSeen
 private boolean classNameSeen(Symbol trueSymbol)
Checks whether fully qualified class represented by trueName was found to uniquely exist

 o cacheSeenClassName
 private void cacheSeenClassName(Symbol trueSymbol)
Remember names of classes that were seen unambiguously

 o notFoundClassName
 private boolean notFoundClassName(Symbol trueSymbol)
Checks whether fully qualified class represented by trueName was found to uniquely exist

 o cacheNotFoundClassName
 private void cacheNotFoundClassName(Symbol trueSymbol)
Remember names of classes that were seen unambiguously

 o existsClass
 public boolean existsClass(Symbol trueSymbol)
Convenience method using symbols instead of String

 o existsClass
 public boolean existsClass(String trueName)
Checks whether fully qualified class represented by truename exists in directories or zip/jar files defined in CLASSPATH

 o readClassFile
 public boolean readClassFile(Symbol symbol,
                              boolean loadUpToRoot)
Manages the loading of class files by initiating loading of class header information, loading of fields and loading of methods Triggers recursive loading for super classes and interfaces

 o loadHierarchy
 private void loadHierarchy(TypeDeclarationNode node,
                            boolean loadUpToRoot)
Manages loading of super classes and interfaces

 o loadClassHeader
 private void loadClassHeader(JavaClass jclass,
                              boolean loadUpToRoot)
Manages storing of class or Interface data into symbol table

 o loadFields
 private void loadFields(JavaClass jclass)
Loads all class fields into symboltable

 o setInitializer
 private void setInitializer(VariableDeclaratorNode node,
                             ConstantValue cons)
Try set the initializer field

 o loadMethods
 private void loadMethods(JavaClass jclass)
Loads all class methods into symboltable

 o printFields
 private void printFields(Field fields[])
 o printMethods
 private void printMethods(Method methods[])
 o join
 private String join(Vector v,
                     String joinString)
 o split
 private Stack split(String s,
                     char delimiter)
 o canonicalize
 public String canonicalize(String s)
 o decanonicalize
 public String decanonicalize(String s)

All Packages  Class Hierarchy  This Package  Previous  Next  Index