edu.mit.ai.psg.jevaES
Class Package
java.lang.Object
|
+--edu.mit.ai.psg.jevaES.Package
- public class Package
- extends Object
- implements IPackage
Internal representation of packages, for name lookups.
|
Field Summary |
static boolean |
loadVerbosely
For verbose class loading: if true, print progress & exceptions to
System.err |
loadVerbosely
public static boolean loadVerbosely
- For verbose class loading: if true, print progress & exceptions to
System.err
Package
public Package(String fullName,
IEnv rootEnv)
setEnv
protected void setEnv(IEnv fromEnv,
IEnv toEnv)
getFullName
public String getFullName()
- Specified by:
- getFullName in interface IPackage
getSimpleName
public String getSimpleName()
- Specified by:
- getSimpleName in interface IPackage
getIPackage
public IPackage getIPackage(String simplePackageName,
boolean suppressPackageNameCheck)
throws IllegalArgumentException
- get subpackage with this name. Create package if not found
- Specified by:
- getIPackage in interface IPackage
- Tags copied from interface: IPackage
- Throws:
- IllegalArgumentException - if name not found in classpath
getClass
public Class getClass(String simpleClassName,
boolean cacheFailures)
- look up class name. If not found, attempt to find by
loading its compilation unit using env.
[For JevaES we just do b.]
a. if java file exists and is newer than class file,
do first pass on java file to obtain its type names.
Throws ParseException, if can't parse file, or VerifyingException
if there's a type error scanning class definitions.
b. if class file exists and newer than java file (or no java file)
load class file, then obtain signature through reflection.
if cacheFailures is true, remember failure and don't look for
files again for the same name.
- Specified by:
- getClass in interface IPackage
toString
public String toString()
- Overrides:
- toString in class Object