public class PluginLoader
extends java.lang.ClassLoader
ClassLoader
is that we can use
those native, protected method of it. Those method can provide many
powerful functionality.
BUG/TO DO: Still don't know how to deal with Jarred class file.
if classes are jarred, the program can no longer list
all the files in the directory thus can't load classes.Constructor and Description |
---|
PluginLoader() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class |
loadAClass(java.lang.String className)
Load a single class as specified by the parameter.
|
static java.util.Hashtable |
loadDirectory(java.lang.String packDir)
Load the classes in a directory .plugins.*
Example of usage: loadDirectory("edu.ucla.loni.LOVE.plugin.colormap");
|
static void |
main(java.lang.String[] args)
Test program
|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public static java.util.Hashtable loadDirectory(java.lang.String packDir)
packDir
- The directory to be loadedpublic static java.lang.Class loadAClass(java.lang.String className)
className
- Name of the class, including package name.public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception