org.scijava.plugin
Class AbstractWrapperService<DT,PT extends WrapperPlugin<DT>>
java.lang.Object
org.scijava.AbstractContextual
org.scijava.plugin.AbstractRichPlugin
org.scijava.service.AbstractService
org.scijava.plugin.AbstractPTService<PT>
org.scijava.plugin.AbstractTypedService<DT,PT>
org.scijava.plugin.AbstractWrapperService<DT,PT>
- Type Parameters:
DT
- Base data type wrapped by the wrappers.PT
- Plugin type of the wrappers.
- All Implemented Interfaces:
- Comparable<Prioritized>, Contextual, Disposable, HasPluginInfo, PTService<PT>, RichPlugin, SciJavaPlugin, TypedService<DT,PT>, WrapperService<DT,PT>, Prioritized, Service, Typed<DT>
- Direct Known Subclasses:
- DefaultDataHandleService, DefaultWidgetService
public abstract class AbstractWrapperService<DT,PT extends WrapperPlugin<DT>>
- extends AbstractTypedService<DT,PT>
- implements WrapperService<DT,PT>
Abstract base class for WrapperService
s.
- Author:
- Curtis Rueden
Method Summary |
|
create(D data)
Creates a new plugin instance wrapping the given associated data object. |
void |
initialize()
Performs any needed initialization when the service is first loaded. |
boolean |
supports(DT data)
Gets whether this object is compatible with the given data object. |
AbstractWrapperService
public AbstractWrapperService()
create
public <D extends DT> PT create(D data)
- Description copied from interface:
WrapperService
- Creates a new plugin instance wrapping the given associated data object.
- Specified by:
create
in interface WrapperService<DT,PT extends WrapperPlugin<DT>>
- Returns:
- An appropriate plugin instance, or null if the data is not
compatible with any available plugin.
initialize
public void initialize()
- Description copied from interface:
Service
- Performs any needed initialization when the service is first loaded.
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.
- Specified by:
initialize
in interface Service
- Overrides:
initialize
in class AbstractService
supports
public boolean supports(DT data)
- Description copied from interface:
Typed
- Gets whether this object is compatible with the given data object.
By default, this method will return true
always, since the type is
known to be compatible. But individual implementations may have other
requirements beyond class assignability.
- Specified by:
supports
in interface Typed<DT>
Copyright © 2009–2015 SciJava. All rights reserved.