polyglot.types.reflect
Class ClassFileLoader

java.lang.Object
  extended by polyglot.types.reflect.ClassFileLoader

public class ClassFileLoader
extends java.lang.Object

We implement our own class loader. All this pain is so we can define the classpath on the command line.


Constructor Summary
ClassFileLoader(ExtensionInfo ext)
           
 
Method Summary
 ClassFile loadClass(java.io.File dir, java.lang.String name)
          Try to find the class name in the directory or jar or zip file dir.
 boolean packageExists(java.io.File dir, java.lang.String name)
          Return true if the package name exists under the directory or file dir.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassFileLoader

public ClassFileLoader(ExtensionInfo ext)
Method Detail

packageExists

public boolean packageExists(java.io.File dir,
                             java.lang.String name)
Return true if the package name exists under the directory or file dir.


loadClass

public ClassFile loadClass(java.io.File dir,
                           java.lang.String name)
Try to find the class name in the directory or jar or zip file dir. If the class does not exist in the specified file/directory, then null is returned.