at.dms.kjc
Class CCompilationUnit

java.lang.Object
  extended by at.dms.kjc.CCompilationUnit
All Implemented Interfaces:
DeepCloneable, Serializable

public class CCompilationUnit
extends Object
implements Serializable, DeepCloneable

This class represents a compilation unit

See Also:
Serialized Form

Constructor Summary
CCompilationUnit(String packageName, JClassImport[] importedClasses, JPackageImport[] importedPackages, Hashtable<String,CClassType> loadedClasses)
          Construct a compilation unit context.
 
Method Summary
 Object deepClone()
          Returns a deep clone of this object.
protected  void deepCloneInto(CCompilationUnit other)
          Clones all fields of this into
 CClassType lookupClass(CClass caller, String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CCompilationUnit

public CCompilationUnit(String packageName,
                        JClassImport[] importedClasses,
                        JPackageImport[] importedPackages,
                        Hashtable<String,CClassType> loadedClasses)
Construct a compilation unit context.

Method Detail

lookupClass

public CClassType lookupClass(CClass caller,
                              String name)
                       throws UnpositionedError
Parameters:
caller - the class of the caller
Returns:
a class according to imports or null if error occur
Throws:
UnpositionedError - this error will be positioned soon

deepClone

public Object deepClone()
Returns a deep clone of this object.

Specified by:
deepClone in interface DeepCloneable

deepCloneInto

protected void deepCloneInto(CCompilationUnit other)
Clones all fields of this into
other