PT
- Plugin type of the SingletonPlugin
s being managed.public abstract class AbstractSingletonService<PT extends SingletonPlugin> extends AbstractPTService<PT> implements SingletonService<PT>
SingletonService
s.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, getPluginService
dispose, getContext, registerEventHandlers, setContext, toString
compareTo, getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getPlugins, getPluginService, getPluginType
registerEventHandlers
context, getContext, setContext
getPriority, setPriority
compareTo
getInfo, setInfo
dispose
public List<PT> getInstances()
SingletonService
getInstances
in interface SingletonService<PT extends SingletonPlugin>
public <P extends PT> P getInstance(Class<P> pluginClass)
SingletonService
getInstance
in interface SingletonService<PT extends SingletonPlugin>
public <P extends PT> P create(Class<P> pluginClass)
PTService
create
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 Service
initialize
in class AbstractService
Copyright © 2009–2015 SciJava. All rights reserved.