|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.ClassFile.Loader
public abstract class Loader
Class file loader. Looks through CLASSPATH to find resources. Understands .jar and .zip files. Platform-independent (hopefully).
Field Summary | |
---|---|
static HCodeFactory |
systemCodeFactory
System code factory: this code factory will return bytecode representations for classes loaded via the system linker. |
static Linker |
systemLinker
System-linker: the class names resolved by this linker are always immutable and identical to those on disk. |
static boolean |
VERBOSE
|
Constructor Summary | |
---|---|
Loader()
|
Method Summary | |
---|---|
static Iterator |
classpaths()
Iterate over the components of the system CLASSPATH. |
static String |
classToResource(String classname)
Translate a class name into a corresponding resource name. |
static InputStream |
getResourceAsStream(String name)
Open an InputStream on a resource found somewhere
in the CLASSPATH. |
static Iterator |
listClasses(String packagename)
Returns an iterator of Strings naming the available classes in the given package which are on the classpath. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean VERBOSE
public static final Linker systemLinker
public static final HCodeFactory systemCodeFactory
Constructor Detail |
---|
public Loader()
Method Detail |
---|
public static final Iterator classpaths()
String
naming one segment of the
CLASSPATH.
public static String classToResource(String classname)
classname
- The class name to translate.public static InputStream getResourceAsStream(String name)
InputStream
on a resource found somewhere
in the CLASSPATH.
name
- The filename of the resource to locate.public static Iterator listClasses(String packagename)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |