|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
net.sourceforge.jsxe.JARClassLoader
A class loader implementation that loads classes from JAR files. Also manages getting files from plugin JARs. It is used to load jsXe's plugins.
Field Summary | |
static String |
PLUGIN_AUTHOR
The manifest property that specifies the plugin Author |
static String |
PLUGIN_CLASS
The manifest property that specifies the plugin class Note: This property is required |
static String |
PLUGIN_DESCRIPTION
The manifest property that specifies the plugin description |
static String |
PLUGIN_HUMAN_READABLE_NAME
The manifest property that specifies a human readable name for the plugin Note: This property is required |
static String |
PLUGIN_NAME
The manifest property that specifies the plugin name. |
static String |
PLUGIN_RELEASE_DATE
The manifest property that specifies the plugin URL |
static String |
PLUGIN_URL
The manifest property that specifies the plugin URL |
static String |
PLUGIN_VERSION
The manifest property that specifies the plugin version Note: This property is required |
Constructor Summary | |
JARClassLoader()
|
Method Summary | |
ArrayList |
addDirectory(String path)
Adds all jar files in a directory to the search path for the class loader. |
void |
addJarFile(File file)
Adds a jar file to the search path for the class loader and loads the jar as a plugin |
void |
addJarFile(String path)
Adds a jar file to the search path for the class loader and loads the jar as a plugin. |
protected Class |
findClass(String name)
Finds a class by looking for it on the jar files in the search path. |
protected URL |
findResource(String name)
Finds the first resource matching the name in the jar files specified in the search path. |
protected Enumeration |
findResources(String name)
Finds all resources matching the name in the jar files specified in the search path. |
ActionPlugin |
getActionPlugin(String name)
Gets an action plugin by name. |
ArrayList |
getActionPluginNames()
Returns an ArrayList object containing the names of the all installed action plugins that are not view plugins. |
ArrayList |
getActionPlugins()
Gets all action plugins that are not view plugins. |
ArrayList |
getAllPluginNames()
Gets a list of all the names of the loaded plugins. |
ArrayList |
getAllPlugins()
Gets all plugins. |
ActionPlugin |
getPlugin(String name)
Gets the plugin with the given name. |
String |
getPluginProperty(ActionPlugin plugin,
String key)
Gets a property for the given plugin. |
String |
getPluginProperty(String name,
String key)
Gets a property for the plugin with the given name. |
URL |
getPluginResource(String name)
Finds the first resource matching the name in the jar files specified in the search path. |
Enumeration |
getPluginResources(String name)
Finds all resources matching the name in the jar files specified in the search path. |
ViewPlugin |
getViewPlugin(String name)
Gets the view plugin with the given name |
ArrayList |
getViewPluginNames()
Gets the names of all loaded view plugins |
ArrayList |
getViewPlugins()
Gets all view plugins. |
ArrayList |
startPlugins()
Starts all the plugins from their respective jar files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PLUGIN_NAME
public static final String PLUGIN_CLASS
public static final String PLUGIN_VERSION
public static final String PLUGIN_HUMAN_READABLE_NAME
public static final String PLUGIN_AUTHOR
public static final String PLUGIN_RELEASE_DATE
public static final String PLUGIN_URL
public static final String PLUGIN_DESCRIPTION
Constructor Detail |
public JARClassLoader()
Method Detail |
protected Class findClass(String name) throws ClassNotFoundException
addJarFile(String)
,
addJarFile(File)
, and addDirectory(String)
methods.
name
- the class name
ClassNotFoundException
protected Enumeration findResources(String name) throws IOException
addJarFile(String)
, addJarFile(File)
, and
addDirectory(String)
methods.
name
- the name of the resources to find
IOException
protected URL findResource(String name)
addJarFile(String)
, addJarFile(File)
, and
addDirectory(String)
methods.
name
- the name of the resources to findpublic Enumeration getPluginResources(String name) throws IOException
addJarFile(String)
, addJarFile(File)
, and
addDirectory(String)
methods.
name
- the name of the resources to find
IOException
public URL getPluginResource(String name)
addJarFile(String)
, addJarFile(File)
, and
addDirectory(String)
methods.
name
- the name of the resources to findpublic void addJarFile(String path) throws FileNotFoundException, IOException
path
- the path to the jar file
FileNotFoundException
IOException
public void addJarFile(File file) throws FileNotFoundException, IOException
file
- the file to add
FileNotFoundException
IOException
public ArrayList addDirectory(String path)
path
- the path for the directory containing jar files
public ArrayList getAllPluginNames()
public ArrayList getAllPlugins()
public ArrayList getViewPluginNames()
public ArrayList getViewPlugins()
public ViewPlugin getViewPlugin(String name)
public ArrayList getActionPluginNames()
public ArrayList getActionPlugins()
public ActionPlugin getActionPlugin(String name)
name
- the name of the ActionPlugin you want to retrieve.
public ActionPlugin getPlugin(String name)
public ArrayList startPlugins()
public String getPluginProperty(String name, String key)
public String getPluginProperty(ActionPlugin plugin, String key)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |