Package org.cytoscape.work
Class AbstractTunableInterceptor<T extends TunableHandler>
java.lang.Object
org.cytoscape.work.AbstractTunableInterceptor<T>
- Type Parameters:
T
- The generic type of this AbstractTunableInterceptor.
An abstract base class for TunableRecorder and TunableMutator implementations.
This class provides a method for checking whether a field or method has been
annotated with
This class provides methods for adding and removing
Tunable
and another method for returning the
appropriate TunableHandler
s for the field for method.
This class provides methods for adding and removing
TunableHandlerFactory
OSGi services where the TunableHandler
s generated by the factory are of
type T.Cytoscape Backwards Compatibility (Abstract Class): This class is abstract and meant to be extended by users. This means that we may add methods for minor version updates. Methods will only be removed for major version updates.
Module: work-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>work-api</artifactId> </dependency>
-
Field Summary
Modifier and TypeFieldDescriptionStore the Handlers.Store the title-returning methods.protected List<TunableHandlerFactory<T>>
A list of TunableHandlerFactory services that have been registered. -
Constructor Summary
ConstructorDescriptionCreates a new AbstractTunableInterceptor object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addTunableHandlerFactory(TunableHandlerFactory<T> thf, Map properties)
Allows TunableHandlerFactory services to be added to the list of factories used to process Tunables.getHandlers(Object o)
Returns a list ofTunableHandler
objects that have been found to process the fields and methods annotated withTunable
.boolean
hasTunables(Object o)
Tests an object to see if any of its fields or method haveTunable
annotations.void
removeTunableHandlerFactory(TunableHandlerFactory<T> thf, Map properties)
Allows TunableHandlerFactory services to be removed from the list of factories used to process Tunables.
-
Field Details
-
handlerMap
Store the Handlers. -
titleProviderMap
Store the title-returning methods. -
tunableHandlerFactories
A list of TunableHandlerFactory services that have been registered.
-
-
Constructor Details
-
AbstractTunableInterceptor
public AbstractTunableInterceptor()Creates a new AbstractTunableInterceptor object.
-
-
Method Details
-
getHandlers
Returns a list ofTunableHandler
objects that have been found to process the fields and methods annotated withTunable
.- Parameters:
o
- The object whose fields and methods will be searched forTunable
annotations.- Returns:
- The list that contains all the
TunableHandler
objects that have been found to process the fields and methods annotated withTunable
.
-
hasTunables
Tests an object to see if any of its fields or method haveTunable
annotations. -
addTunableHandlerFactory
Allows TunableHandlerFactory services to be added to the list of factories used to process Tunables.- Parameters:
thf
- The factory to be added.properties
- OSGi service metadata. May be null.
-
removeTunableHandlerFactory
Allows TunableHandlerFactory services to be removed from the list of factories used to process Tunables.- Parameters:
thf
- The factory to be removed.properties
- OSGi service metadata. May be null.
-