javassist
public class LoaderClassPath extends Object implements ClassPath
It is used for obtaining a class file from the given
class loader by getResourceAsStream().
The LoaderClassPath refers to the class loader through
WeakReference. If the class loader is garbage collected,
the other search pathes are examined.
The given class loader must have both getResourceAsStream()
and getResource().
See Also: insertClassPath appendClassPath ClassClassPath
| Constructor Summary | |
|---|---|
| LoaderClassPath(ClassLoader cl)
Creates a search path representing a class loader. | |
| Method Summary | |
|---|---|
| void | close()
Closes this class path. |
| URL | find(String classname)
Obtains the URL of the specified class file.
|
| InputStream | openClassfile(String classname)
Obtains a class file from the class loader.
|
| String | toString() |
getResource(String)
on the class loader.
Returns: null if the class file could not be found.
getResourceAsStream(String)
on the class loader.