PluginContainerpublic class PluginContainerImpl extends java.lang.Object implements PluginContainer
PluginContainerImpl is the base of the client-plugin layer,
providing the client interactability with each and every plugin.
It wraps a Plugin annotated Class.
| Constructor | Description |
|---|---|
PluginContainerImpl(java.lang.Class clazz) |
Retrieves the annotations of a
Plugin and maps them accordingly for access from the client. |
| Modifier and Type | Method | Description |
|---|---|---|
void |
activate() |
Attempts to safely invoke the
activateMethod of a plugin. |
void |
deactivate() |
Attempts to safely invoke the
deactivateMethod of a plugin. |
java.util.List<PluginContainer> |
getDependencies() |
|
PluginHelper |
getHelper() |
|
Plugin |
getInfo() |
|
java.lang.Object |
getInstance() |
|
java.util.List<PluginDependency> |
getOriginalDependencies() |
|
java.util.List<Overlay> |
getOverlays() |
|
void |
setup() |
Attempts to safely invoke the
setupMethod of a plugin. |
public Plugin getInfo()
getInfo in interface PluginContainerpublic PluginHelper getHelper()
getHelper in interface PluginContainerpublic java.util.List<PluginDependency> getOriginalDependencies()
public java.util.List<PluginContainer> getDependencies()
getDependencies in interface PluginContainerpublic java.lang.Object getInstance()
getInstance in interface PluginContainerpublic java.util.List<Overlay> getOverlays()
getOverlays in interface PluginContainerpublic void setup()
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
setupMethod of a plugin.java.lang.reflect.InvocationTargetException - if invoking the setup method failedjava.lang.IllegalAccessException - if invoking the setup method failedpublic void activate()
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
activateMethod of a plugin.java.lang.reflect.InvocationTargetException - if invoking the activate method failedjava.lang.IllegalAccessException - if invoking the activate method failedpublic void deactivate()
throws java.lang.reflect.InvocationTargetException,
java.lang.IllegalAccessException
deactivateMethod of a plugin.java.lang.reflect.InvocationTargetException - if invoking the deactivate method failedjava.lang.IllegalAccessException - if invoking the deactivate method failed