|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
IClassInspector | Extracts the class instance based on the class name. |
IFileInspector | Examines a given file or URL, and adds it to the correct list based on its attributes. |
ILocationSearcher | Searches for all file types using the given base URL |
Class Summary | |
BaseClassInspector | Extracts the class instance based on the class name. |
ClassAttributes | Maintains a list attributes and a collection of values that each attribute may contain. |
ClassAttributes.NoCaseStr | A Non-case sensitive string |
ClassAttributes.ValueSet | A collection of values |
ClassCollection | Maintains all the discovered classes, attributes, and all other data associated with plugins. |
ClassFileInspector | Examines a given file or URL, and adds it to the correct list based on its attributes. |
ClassWrapper | Maintains all the information discovered about the given class. |
FileIdentifiers | Searches for all file types using the given base URL |
FileSearcher | Examines a given file or URL, and adds it to the correct list based on its attributes. |
JarFileInspector | Examines a given Jar, and adds it to the correct list based on its attributes. |
ManifestFileInspector | Examines a given Jar, and adds it to the correct list based on its attributes. |
NetSearcher | Examines a given URL, and gives it directly to the File Inspectors. |
PluginLoader | Entry-point for loading plugins. |
URLAnalyzer | Examines the given URLs in all known ways. |
URLClassInspector | Extracts the class instance based on the class name. |
The jplugin package allows for easy use of "plugins" into your application.
A plugin is a collection of code which can be bound to at run-time, allowing for a more dynamic application. This is useful for allowing easy upgrades, and addition of new functionality.
PluginLoader pl = new PluginLoader( new URL( "file:"+baseDir ) );
pl.findPlugins();By default, this will load all manifest files ("*.MF"), class files ("*.class"), and all those files contained in Jar files ("*.jar" or "*.zip"). You may add to this list by adding
IFileInspector
s to the plugin.
Once you find the plugins, you can no longer add URLs or finder classes. The findPlugins() method may only be invoked once per PluginLoader instance.
ClassWrapper cw[] = pl.getPlugins( BasePluginSuperclass.class ); cw = pl.getPlugins( "bean", "true" ); cw = pl.getPlugins( "aPlugin" );where in the first example, the classes are found based on a base-class (returns all classes which are assignment compatible with the given class), the second returns all classes which have an attribute name "bean" and its corresponding value is "true" (case insensitive for both). The last example returns all classes which have the attribute "aPlugin", without caring for the corresponding value.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |