org.scijava.convert
Class AbstractConvertService

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.AbstractSingletonService<PT>
                      extended by org.scijava.plugin.AbstractHandlerService<ConversionRequest,Converter<?,?>>
                          extended by org.scijava.convert.AbstractConvertService
All Implemented Interfaces:
Comparable<Prioritized>, Contextual, ConvertService, Disposable, HandlerService<ConversionRequest,Converter<?,?>>, HasPluginInfo, PTService<Converter<?,?>>, RichPlugin, SciJavaPlugin, SingletonService<Converter<?,?>>, TypedService<ConversionRequest,Converter<?,?>>, Prioritized, Service, Typed<ConversionRequest>
Direct Known Subclasses:
DefaultConvertService

public abstract class AbstractConvertService
extends AbstractHandlerService<ConversionRequest,Converter<?,?>>
implements ConvertService

Abstract superclass for ConvertService implementations. Sets this service as the active delegate service in ConversionUtils.

Author:
Mark Hiner

Constructor Summary
AbstractConvertService()
           
 
Method Summary
 Object convert(ConversionRequest request)
           
<T> T
convert(Object src, Class<T> dest)
           
 Object convert(Object src, Type dest)
           
 void initialize()
          Performs any needed initialization when the service is first loaded.
 
Methods inherited from class org.scijava.plugin.AbstractHandlerService
getHandler, supports
 
Methods inherited from class org.scijava.plugin.AbstractSingletonService
filterInstances, getInstance, getInstances
 
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.convert.ConvertService
getCompatibleInputs, getHandler, getHandler, getHandler, getHandler, supports, supports, supports, supports
 
Methods inherited from interface org.scijava.plugin.HandlerService
getHandler, getInstances, supports
 
Methods inherited from interface org.scijava.plugin.SingletonService
getInstance
 
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

AbstractConvertService

public AbstractConvertService()
Method Detail

convert

public Object convert(Object src,
                      Type dest)
Specified by:
convert in interface ConvertService
See Also:
Converter.convert(Object, Type)

convert

public <T> T convert(Object src,
                     Class<T> dest)
Specified by:
convert in interface ConvertService
See Also:
Converter.convert(Object, Class)

convert

public Object convert(ConversionRequest request)
Specified by:
convert in interface ConvertService
See Also:
Converter.convert(ConversionRequest)

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 AbstractSingletonService<Converter<?,?>>


Copyright © 2009–2014 SciJava. All rights reserved.