junc.cim
Class ClassImportManager

java.lang.Object
  |
  +--junc.cim.ClassImportManager

public class ClassImportManager
extends java.lang.Object

Describe class ClassImportManager here.

Version:
1.0
Author:
Diwaker Gupta

Constructor Summary
ClassImportManager(junc.symtab.SymbolTable symbolTable)
          Creates a new ClassImportManager instance.
 
Method Summary
 void addQualifiedImport(java.lang.String qimport)
          The list of starred imports is maintained by the ClassImportManager.
 void addQualifiedImport(junc.symtab.Symbol qimport)
          Describe addQualifiedImport method here.
 java.lang.String canonicalize(java.lang.String s)
          Describe canonicalize method here.
 java.lang.String decanonicalize(java.lang.String s)
          Describe decanonicalize method here.
 boolean existsClass(java.lang.String trueName)
          Checks whether fully qualified class represented by truename exists in directories or zip/jar files defined in CLASSPATH
 boolean existsClass(junc.symtab.Symbol trueSymbol)
          Convenience method using symbols instead of String
 java.lang.String fullyQualifyName(java.lang.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).
 junc.symtab.Symbol fullyQualifyName(junc.symtab.Symbol simple)
          Describe fullyQualifyName method here.
 boolean readClassFile(junc.symtab.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassImportManager

public ClassImportManager(junc.symtab.SymbolTable symbolTable)
Creates a new ClassImportManager instance.

Parameters:
symbolTable - a SymbolTable value
Method Detail

addQualifiedImport

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

Parameters:
qimport - a String value

addQualifiedImport

public void addQualifiedImport(junc.symtab.Symbol qimport)
Describe addQualifiedImport method here.

Parameters:
qimport - a Symbol value

fullyQualifyName

public java.lang.String fullyQualifyName(java.lang.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.
java.lang.Exception

fullyQualifyName

public junc.symtab.Symbol fullyQualifyName(junc.symtab.Symbol simple)
                                    throws java.lang.Exception
Describe fullyQualifyName method here.

Parameters:
simple - a Symbol value
Returns:
a Symbol value
Throws:
java.lang.Exception - if an error occurs

existsClass

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


existsClass

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


readClassFile

public boolean readClassFile(junc.symtab.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


canonicalize

public java.lang.String canonicalize(java.lang.String s)
Describe canonicalize method here.

Parameters:
s - a String value
Returns:
a String value

decanonicalize

public java.lang.String decanonicalize(java.lang.String s)
Describe decanonicalize method here.

Parameters:
s - a String value
Returns:
a String value