|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
com.valhalla.pluginmanager.PluginLoader
This class supports the loading of custom plugins from jar files.
The main class in the Jar should be named after the jar filename
and should be in the "package" String passed to the PluginLoader package.
For example, the plugin LookAndFeel would be in a jar file called LookAndFeel.jar,
and if the package parameter was com.valhalla.jbother.plugins there would need to
be a class called com.valhalla.jbother.plugins.LookAndFeel
in the jar
file
Nested Class Summary |
Nested classes inherited from class java.lang.ClassLoader |
|
Field Summary |
Fields inherited from class java.lang.ClassLoader |
|
Method Summary | |
void |
findPlugins(java.lang.String d)
Reads in all the available plugins and the information about them |
static int |
getAPIVersion()
Gets the current plugin API version |
java.util.ArrayList |
getAvailablePlugins()
|
java.util.ArrayList |
getInstalledPlugins()
|
static PluginLoader |
getInstance()
Gets the singleton of this class |
java.util.ArrayList |
getInvalidPlugins()
|
protected java.util.Hashtable |
getLoadedClasses()
|
java.util.Hashtable |
getLoadedPlugins()
|
static PluginLoader |
getNewInstance()
|
PluginJAR |
getPlugin(java.lang.String name)
Returns the jar file for the specified plugin name |
java.io.InputStream |
getResourceAsStream(java.lang.String resource)
Gets a resource as a stream |
java.lang.Class |
loadClass(java.lang.String className,
boolean resolveIt)
Loads the Class out of the plugin file |
void |
loadPlugins()
Attempts to load the available plugins |
Methods inherited from class java.lang.ClassLoader |
clearAssertionStatus, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static PluginLoader getInstance()
public static PluginLoader getNewInstance()
public java.util.Hashtable getLoadedPlugins()
public java.util.ArrayList getAvailablePlugins()
public java.util.ArrayList getInstalledPlugins()
public java.util.ArrayList getInvalidPlugins()
public PluginJAR getPlugin(java.lang.String name)
name
- the plugin name
public static int getAPIVersion()
public void loadPlugins()
public void findPlugins(java.lang.String d)
public java.io.InputStream getResourceAsStream(java.lang.String resource)
resource
- the resource to get
protected java.util.Hashtable getLoadedClasses()
public java.lang.Class loadClass(java.lang.String className, boolean resolveIt) throws java.lang.ClassNotFoundException
className
- the class name to loadresolveIt
- true to resolve the class (load dependancies)
ClassNotFoundException
- if the class could not be found in the system or any of the plugin files
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |