net.groboclown.util.jplugin.v2.util
Class PluginStore
java.lang.Object
|
+--net.groboclown.util.jplugin.v2.util.PluginStore
- public class PluginStore
- extends Object
Stores all known classes which are subclassed from a given set of
base classes. It may only be created from a given URLLoader instance.
You should optimize your use of this object by only instantiating one
per application, for it is time consuming to create one of these.
- See Also:
PluginLoader
Constructor Summary |
PluginStore(URL[] urls,
Class[] baseClasses)
Loads all the classes which are a subclass of the given base
classes, from the given list of URLs. |
Method Summary |
Class[] |
getPluginClasses(Class baseClass)
Retrieves all the concrete public subclasses found for the given
baseclass. |
private void |
loadClasses(URL[] urls,
Class[] baseClasses)
Load the classes from the currently known list of URLs. |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
basesToClasses
private HashMap basesToClasses
PluginStore
public PluginStore(URL[] urls,
Class[] baseClasses)
- Loads all the classes which are a subclass of the given base
classes, from the given list of URLs.
getPluginClasses
public Class[] getPluginClasses(Class baseClass)
- Retrieves all the concrete public subclasses found for the given
baseclass.
- Returns:
- null if the given baseClass was not registered
at construction time, or the list of Classes found.
loadClasses
private void loadClasses(URL[] urls,
Class[] baseClasses)
- Load the classes from the currently known list of URLs.
After this call,
Written under the LGPL