PT - Plugin type of the SingletonPlugins being managed.public abstract class AbstractSingletonService<PT extends SingletonPlugin> extends AbstractPTService<PT> implements SingletonService<PT>
SingletonServices.| Constructor and Description |
|---|
AbstractSingletonService() |
| Modifier and Type | Method and Description |
|---|---|
<P extends PT> |
create(Class<P> pluginClass)
Creates an instance of the given plugin class.
|
protected List<? extends PT> |
filterInstances(List<PT> list)
Allows subclasses to exclude instances.
|
<P extends PT> |
getInstance(Class<P> pluginClass)
Gets the singleton plugin instance of the given class.
|
List<PT> |
getInstances()
Gets the list of plugin instances.
|
void |
initialize()
Performs any needed initialization when the service is first loaded.
|
getPlugins, getPluginServicedispose, getContext, registerEventHandlers, setContext, toStringcompareTo, getInfo, getPriority, setInfo, setPrioritycontextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPlugins, getPluginService, getPluginTyperegisterEventHandlerscontext, getContext, setContextgetPriority, setPrioritycompareTogetInfo, setInfodisposepublic List<PT> getInstances()
SingletonServicegetInstances in interface SingletonService<PT extends SingletonPlugin>public <P extends PT> P getInstance(Class<P> pluginClass)
SingletonServicegetInstance in interface SingletonService<PT extends SingletonPlugin>public <P extends PT> P create(Class<P> pluginClass)
PTServicecreate in interface PTService<PT extends SingletonPlugin>create in class AbstractPTService<PT extends SingletonPlugin>public void initialize()
Service
NB: This method is not intended to be called directly. It is called by
the service framework itself (specifically by the ServiceHelper)
when initializing the service. It should not be called a second time.
initialize in interface Serviceinitialize in class AbstractServiceCopyright © 2009–2016 SciJava. All rights reserved.