public class Plugins
extends java.lang.Object
| Constructor and Description |
|---|
Plugins(java.io.File pluginRoot)
Creates a new instance of Plugins
|
| Modifier and Type | Method and Description |
|---|---|
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.)
|
public Plugins(java.io.File pluginRoot)
throws java.io.IOException
pluginRoot - The root od the directory tree to scan for Jars
containing plugins.java.io.IOExceptionpublic 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.