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>
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> WrapperPlugin<D> 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>>
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.
Typically, this will be the case when data.getClass()
is assignable
to the type associated with the object (i.e., the one returned by
Typed.getType()
). But individual implementations may have other
requirements beyond class assignability.
- Specified by:
supports
in interface Typed<DT>
Copyright © 2009–2014 SciJava. All rights reserved.