|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.plugin.PluginRegistry
public class PluginRegistry
This is a global registry for Schmant plugins. The
TaskPackage
registers its Plugin
objects with
this registry when it is enabled. For instance, plugins are used by the
EclipseWorkspace
to interpret different
project types.
Plugins are registered under names that are set by the plugin consumer. See the different plugin consumer's documentation. Several plugins may be registered under the same name.
Plugin
objects are immutable.
Plugin
,
TaskPackageManager
Constructor Summary | |
---|---|
PluginRegistry()
|
Method Summary | |
---|---|
static PluginRegistry |
get()
Get the plugin registry. |
List<Plugin> |
getPlugins(String name)
Get all plugins registered under the given name. |
static PluginRegistry |
init()
This is called by Launcher to setup the plugin
registry. |
void |
registerPlugin(String name,
Plugin p)
Register a plugin. |
static void |
tearDown(PluginRegistry previousReg)
This is called by Launcher to tear down the plugin
registry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PluginRegistry()
Method Detail |
---|
public static PluginRegistry init()
Launcher
to setup the plugin
registry.
Launcher
will keep it and return it when it
calls tearDown(PluginRegistry)
.tearDown(PluginRegistry)
public static void tearDown(PluginRegistry previousReg)
Launcher
to tear down the plugin
registry. This prevents Launcher
from leaking thread
local variables to the code that calls it.
previousReg
- If init()
returned a plugin registry, it is
passed in as this parameter. If not, this is set to null
.init()
public static PluginRegistry get() throws IllegalStateException
IllegalStateException
- If this class has not yet been initialized
by Launcher
.public void registerPlugin(String name, Plugin p)
name
- The name of the plugin type.p
- The plugin.public List<Plugin> getPlugins(String name)
name
- The name of the plugin type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |