public interface ObjectService extends SciJavaService
Modifier and Type | Method and Description |
---|---|
default void |
addObject(Object obj)
Registers an object with the object service.
|
default void |
addObject(Object obj,
String name)
Registers a named object with the object service.
|
default EventService |
eventService() |
default EventService |
getEventService()
Deprecated.
Use
eventService() instead. |
NamedObjectIndex<Object> |
getIndex()
Gets the index of available objects.
|
default String |
getName(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 void |
removeObject(Object obj)
Deregisters an object with the object service.
|
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
default EventService eventService()
NamedObjectIndex<Object> getIndex()
default <T> List<T> getObjects(Class<T> type)
default String getName(Object obj)
If no explicit name was provided at registration time, the name will be
derived from Named.getName()
if the object implements
Named
, or from the Object.toString()
otherwise. It is
guaranteed that this method will not return null
.
default void addObject(Object obj)
default void addObject(Object obj, String name)
default void removeObject(Object obj)
@Deprecated default EventService getEventService()
eventService()
instead.Copyright © 2015–2022 SciJava. All rights reserved.