org.scijava.plugin
Class AbstractWrapperService<DT,PT extends WrapperPlugin<DT>>

java.lang.Object
  extended by org.scijava.AbstractContextual
      extended by org.scijava.plugin.AbstractRichPlugin
          extended by org.scijava.service.AbstractService
              extended by org.scijava.plugin.AbstractPTService<PT>
                  extended by org.scijava.plugin.AbstractTypedService<DT,PT>
                      extended by 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 WrapperServices.

Author:
Curtis Rueden

Constructor Summary
AbstractWrapperService()
           
 
Method Summary
<D extends DT>
WrapperPlugin<D>
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.
 
Methods inherited from class org.scijava.plugin.AbstractPTService
getPlugins, getPluginService
 
Methods inherited from class org.scijava.service.AbstractService
dispose, getContext, registerEventHandlers, setContext, toString
 
Methods inherited from class org.scijava.plugin.AbstractRichPlugin
compareTo, getInfo, getPriority, setInfo, setPriority
 
Methods inherited from class org.scijava.AbstractContextual
context
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.scijava.plugin.PTService
getPlugins, getPluginService, getPluginType
 
Methods inherited from interface org.scijava.service.Service
registerEventHandlers
 
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
 
Methods inherited from interface org.scijava.Prioritized
getPriority, setPriority
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
 
Methods inherited from interface org.scijava.Disposable
dispose
 
Methods inherited from interface org.scijava.Typed
getType
 

Constructor Detail

AbstractWrapperService

public AbstractWrapperService()
Method Detail

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.