public class Plugins extends Object
Constructor and Description |
---|
Plugins(File pluginRoot)
Creates a new instance of Plugins
|
Modifier and Type | Method and Description |
---|---|
Class[] |
get()
This method returns all the Plugins found in the
directory passed in at object creation time or any of its
sub-directories.
|
Class[] |
getExtends(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.)
|
Class[] |
getImplementsAll(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.)
|
Class[] |
getImplementsAny(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(File pluginRoot) throws IOException
pluginRoot
- The root od the directory tree to scan for Jars
containing plugins.IOException
public Class[] get()
public Class[] getImplementsAny(Class[] interfaces)
interfaces
- A set of interfaces to match against the interfaces
implemented by the plugin classes.public Class[] getImplementsAll(Class[] interfaces)
interfaces
- A set of interfaces to match against the interfaces
implemented by the plugin classes.public Class[] getExtends(Class superclass)
superclass
- The class to match.Copyright © 2016. All rights reserved.