Squiz Matrix
4.12.2
|
Public Member Functions | |
PluginClassLoader (String path) | |
URL | getResource (String name) |
InputStream | getResourceAsStream (String name) |
Class | loadClass (String className) throws ClassNotFoundException |
synchronized Class | loadClass (String className, boolean resolveIt) throws ClassNotFoundException |
Protected Member Functions | |
byte[] | loadClassBytes (String name) |
Protected Attributes | |
String | path |
Hashtable | cache = new Hashtable() |
Vector | jarFiles |
ImageJ uses this class loader to load plugins and resources from the plugins directory and immediate subdirectories. This class loader will also load classes and resources from JAR files.
The class loader searches for classes and resources in the following order:
The class loader does not recurse into subdirectories beyond the first level.
Definition at line 20 of file PluginClassLoader.java.
|
inline |
Creates a new PluginClassLoader that searches in the directory path passed as a parameter. The constructor automatically finds all JAR and ZIP files in the path and first level of subdirectories. The JAR and ZIP files are stored in a Vector for future searches.
path | the path to the plugins directory. |
Definition at line 32 of file PluginClassLoader.java.
|
inline |
Returns a resource from the path or JAR files as a URL
name | a resource name. |
Definition at line 63 of file PluginClassLoader.java.
|
inline |
Returns a resource from the path or JAR files as an InputStream
name | a resource name. |
Definition at line 144 of file PluginClassLoader.java.
|
inline |
Returns a Class from the path or JAR files. Classes are automatically resolved.
className | a class name without the .class extension. |
Definition at line 198 of file PluginClassLoader.java.
|
inline |
Returns a Class from the path or JAR files. Classes are resolved if resolveIt is true.
className | a String class name without the .class extension. resolveIt a boolean (should almost always be true) |
Definition at line 207 of file PluginClassLoader.java.
|
inlineprotected |
This does the actual work of loading the bytes from the disk. Returns an array of bytes that will be defined as a Class. This should be overloaded to have the Class Loader look in more places.
name | a class name without the .class extension. |
Definition at line 253 of file PluginClassLoader.java.