DT- Base data type
PT- Plugin type
public interface WrapperService<DT,PT extends WrapperPlugin<DT>> extends TypedService<DT,PT>
WrapperPlugins of a particular type. A
WrapperPluginis a stateful
TypedPluginwhich wraps a particular object of its associated data type. For any given data object, the service is capable of wrapping it with the most appropriate wrapper by sequentially querying each
WrapperPluginon its list for compatibility.
Note that like
WrapperService is not a service interface
defining API for a specific concrete service implementation, but rather a
more general layer in a type hierarchy intended to ease creation of services
that fit its pattern.
|Modifier and Type||Method and Description|
Creates a new plugin instance wrapping the given associated data object.
Performs any needed initialization when the service is first loaded.
Gets whether this object is compatible with the given data object.
create, getPlugins, getPluginService, getPluginType, pluginService
default void initialize()
NB: This method is not intended to be called directly. It is called by
the service framework itself (specifically by the
when initializing the service. It should not be called a second time.
default boolean supports(DT data)
By default, this method will return
true iff the data is assignable
to the associated type given by
Typed.getType(). But individual
implementations may have other requirements beyond class assignability.
Copyright © 2015–2019 SciJava. All rights reserved.