at.dms.kjc
Class CTopLevel
java.lang.Object
|
+--at.dms.util.Utils
|
+--at.dms.kjc.CTopLevel
- public final class CTopLevel
- extends Utils
This class implements the conceptual directory structure for .class files.
Method Summary |
static boolean |
addSourceClass(CClass cl)
Adds a source class to the set of all loaded classes. |
static void |
endSession(Compiler compiler)
Ends session. |
static boolean |
hasClassFile(java.lang.String name)
Returns whether a class file that contain the named class named can
be found. |
static void |
initSession(Compiler compiler)
Removes all source classes. |
static CClass |
loadClass(java.lang.String fqName,
InnerClassInfo innerInfo)
Loads class definition from .class file. |
static CClass |
reloadClass(CClass clazz)
Reloads the specified class if this class has been defined during a
previous compilation session. |
Methods inherited from class at.dms.util.Utils |
assert, assert, fail, fail, hasFlag, hasMoreThanOneFlag, hasOtherFlags, splitQualifiedName, splitQualifiedName, vectorToArray, vectorToIntArray |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CTopLevel
public CTopLevel()
loadClass
public static CClass loadClass(java.lang.String fqName,
InnerClassInfo innerInfo)
- Loads class definition from .class file.
- Parameters:
fqName
- The fully qualified name of the class.innerInfo
- An InnerClassInfo object providing more information about the class
to load. If null
, a class at package level will be
loaded. An InnerClassInfo object contains the original name and
modifiers from the source code of an inner class, because these
are not the ones the are present in the class file, since the
JVM doesn't know about inner classes.
reloadClass
public static CClass reloadClass(CClass clazz)
- Reloads the specified class if this class has been defined during a
previous compilation session.
addSourceClass
public static boolean addSourceClass(CClass cl)
- Adds a source class to the set of all loaded classes.
- Parameters:
CClass
- A class to add (must be a CSourceClass).- Returns:
- false if name exists for source class as source class in an other file.
hasClassFile
public static boolean hasClassFile(java.lang.String name)
- Returns whether a class file that contain the named class named can
be found.
- Parameters:
name
- The name of the class file.- Returns:
- Whether a class file that contain the named class named can be found.
initSession
public static void initSession(Compiler compiler)
- Removes all source classes.
endSession
public static void endSession(Compiler compiler)
- Ends session.