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().
Class files in a named module are private to that module. This method cannot obtain class files in named modules.
ClassPool#insertClassPath(ClassPath), ClassPool#appendClassPath(ClassPath), ClassClassPath
| Modifier and Type | Field and Description |
|---|---|
| private Reference |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public URL | Returns: null if the class file could not be found.a fully-qualified class name. classname)Implements javassist. Obtains the URL of the specified class file. |
| public InputStream | openClassfile(String
a fully-qualified class name classname)Implements javassist. Obtains a class file from the class loader. |
| public String |
| clref | back to summary |
|---|---|
| private Reference<ClassLoader> clref | |
| LoaderClassPath | back to summary |
|---|---|
| public LoaderClassPath(ClassLoader cl) Creates a search path representing a class loader. | |
| find | back to summary |
|---|---|
| public URL find(String classname) Implements javassist. Obtains the URL of the specified class file.
This method calls
| |
| openClassfile | back to summary |
|---|---|
| public InputStream openClassfile(String classname) throws NotFoundException Implements javassist. Obtains a class file from the class loader.
This method calls
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |