Package org.scijava.object
Interface ObjectService
-
- All Superinterfaces:
Comparable<Prioritized>,Contextual,Disposable,HasPluginInfo,Identifiable,Initializable,Locatable,Logged,Prioritized,RichPlugin,SciJavaPlugin,SciJavaService,Service,Versioned
- All Known Implementing Classes:
DefaultObjectService
public interface ObjectService extends SciJavaService
Interface for object management service.- Author:
- Curtis Rueden
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidaddObject(Object obj)Registers an object with the object service.default voidaddObject(Object obj, String name)Registers a named object with the object service.default EventServiceeventService()default EventServicegetEventService()Deprecated.UseeventService()instead.NamedObjectIndex<Object>getIndex()Gets the index of available objects.default StringgetName(Object obj)Gets the name belonging to a given object.default <T> List<T>getObjects(Class<T> type)Gets a list of all registered objects compatible with the given type.default voidremoveObject(Object obj)Deregisters an object with the object service.-
Methods inherited from interface org.scijava.Contextual
context, getContext, setContext
-
Methods inherited from interface org.scijava.Disposable
dispose
-
Methods inherited from interface org.scijava.plugin.HasPluginInfo
getInfo, setInfo
-
Methods inherited from interface org.scijava.Locatable
getLocation
-
Methods inherited from interface org.scijava.Prioritized
compareTo, getPriority, setPriority
-
Methods inherited from interface org.scijava.plugin.RichPlugin
getIdentifier, log
-
Methods inherited from interface org.scijava.service.Service
initialize, registerEventHandlers
-
Methods inherited from interface org.scijava.Versioned
getVersion
-
-
-
-
Method Detail
-
eventService
default EventService eventService()
-
getIndex
NamedObjectIndex<Object> getIndex()
Gets the index of available objects.
-
getObjects
default <T> List<T> getObjects(Class<T> type)
Gets a list of all registered objects compatible with the given type.
-
getName
default String getName(Object obj)
Gets the name belonging to a given object.If no explicit name was provided at registration time, the name will be derived from
Named.getName()if the object implementsNamed, or from theObject.toString()otherwise. It is guaranteed that this method will not returnnull.
-
addObject
default void addObject(Object obj)
Registers an object with the object service.
-
addObject
default void addObject(Object obj, String name)
Registers a named object with the object service.
-
removeObject
default void removeObject(Object obj)
Deregisters an object with the object service.
-
getEventService
@Deprecated default EventService getEventService()
Deprecated.UseeventService()instead.
-
-