jellyj.parser
Class JellyJImportManager


public class JellyJImportManager


Field Summary
 (package private) Vectorclasspath_d
          Vector keeping the directories and zip or jar file paths.
 (package private) final static StringDEFAULT_IMPORT
          The name of the default qualified import.
 (package private) final static StringJAVA_ROOT
          Root class in Java.
 (package private) HashtableloadedClasses_d
          Hashtable to keep track of already loaded class files.
 (package private) HashtablenotFoundClasses_d
          Hashtable to keep track of class names, that definitely don't exist as fully qualified names.
 (package private) VectorqualifiedImports_d
          Vector holding all qualified imports.
 (package private) HashtableseenClasses_d
          Hashtable to keep track of class names, that exist, and that are not ambiguous.
 (package private) SymbolTablesymbolTable_d
          Reference to the parser's symboltable.

Constructor Summary
JellyJImportManager(SymbolTable symbol)
          Constructor taking the parser's symbol table as parameter.

Method Summary
 voidaddQualifiedImport(String qimport)
          The list of starred imports is maintained by the ImportManager.
 voidaddQualifiedImport(Symbol qimport)
           
 Stringcanonicalize(String s)
           
 Stringdecanonicalize(String s)
           
 booleanexistsClass(Symbol trueSymbol)
          Convenience method using symbols instead of String
 booleanexistsClass(String trueName)
          Checks whether fully qualified class represented by truename exists in directories or zip/jar files defined in CLASSPATH
 StringfullyQualifyName(String simple)
          Returns the fully qualified name of simple name provided that such a class exists in the packages defined by the starred imports (without ambiguity).
 SymbolfullyQualifyName(Symbol simple)
           
 booleanreadClassFile(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

Field Detail

classpath_d

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

DEFAULT_IMPORT

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

JAVA_ROOT

final static String JAVA_ROOT
Root class in Java.

loadedClasses_d

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

notFoundClasses_d

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

qualifiedImports_d

Vector qualifiedImports_d
Vector holding all qualified imports.

seenClasses_d

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

symbolTable_d

SymbolTable symbolTable_d
Reference to the parser's symboltable.
Constructor Detail

JellyJImportManager

public JellyJImportManager(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.
Method Detail

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.

addQualifiedImport

public void addQualifiedImport(Symbol qimport)

canonicalize

public String canonicalize(String s)

decanonicalize

public String decanonicalize(String s)

existsClass

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

existsClass

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

fullyQualifyName

public String fullyQualifyName(String simple)
throws java.lang.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.
throw Exception If multiple occurrences of simple_name were found.

fullyQualifyName

public Symbol fullyQualifyName(Symbol simple)
throws java.lang.Exception

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

Association Links

to Class java.lang.String

The name of the default qualified import.

to Class java.lang.String

Root class in Java.

to Class java.util.Vector

Vector keeping the directories and zip or jar file paths.

to Class jellyj.util.SymbolTable

Reference to the parser's symboltable.

to Class java.util.Hashtable

Hashtable to keep track of already loaded class files.

to Class java.util.Hashtable

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

to Class java.util.Hashtable

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

to Class java.util.Vector

Vector holding all qualified imports.