|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.java.games.util.plugins.Plugins
This is the application interface to the Plugin system. One Plugins object should be created for each plug-in directory tree root. On creation the Plugins object will scan its assigned directory tree and examine all Jar files in that tree to see if they qualify as Plug-ins. The Plugin classes may then be retrived from the Plugins object by calling the appropriate get function (see below). If a plugin requires a native code library, that library must be present in the same directory as the plugin Jar file UNLESS the property "net.java.games.util.plugins.nolocalnative" is set. In that case it will fall abck to the VM or environment's default way of finding native libraries. (This is n ecessary for Java Web Start apps.)
Constructor Summary | |
Plugins(java.io.File pluginRoot)
Creates a new instance of Plugins |
Method Summary | |
java.lang.Class[] |
get()
This method returns all the Plugins found in the directory passed in at object creation time or any of its sub-directories. |
java.lang.Class[] |
getExtends(java.lang.Class superclass)
This method returns a sub-list of all the found Plugin classes that extend the passed in Class (either directly or through inheritance.) |
java.lang.Class[] |
getImplementsAll(java.lang.Class[] interfaces)
This method returns a sub-list of all the found Plugin classes that implement all of the passed in set of Interfaces (either directly or through inheritance.) |
java.lang.Class[] |
getImplementsAny(java.lang.Class[] interfaces)
This method returns a sub-list of all the found Plugin classes that implement any of the passed in set of Interfaces (either directly or through inheritance.) |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Plugins(java.io.File pluginRoot) throws java.io.IOException
pluginRoot
- The root od the directory tree to scan for Jars
containing plugins.Method Detail |
public java.lang.Class[] get()
public java.lang.Class[] getImplementsAny(java.lang.Class[] interfaces)
interfaces
- A set of interfaces to match against the interfaces
implemented by the plugin classes.
public java.lang.Class[] getImplementsAll(java.lang.Class[] interfaces)
interfaces
- A set of interfaces to match against the interfaces
implemented by the plugin classes.
public java.lang.Class[] getExtends(java.lang.Class superclass)
superclass
- The class to match.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |