T
- The generic type of this AbstractTunableInterceptor.public abstract class AbstractTunableInterceptor<T extends TunableHandler> extends Object
Tunable
and another method for returning the
appropriate TunableHandler
s for the field for method.
TunableHandlerFactory
OSGi services where the TunableHandler
s generated by the factory are of
type T.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>
Modifier and Type | Field and Description |
---|---|
protected Map<Object,List<T>> |
handlerMap
Store the Handlers.
|
protected Map<Object,Method> |
titleProviderMap
Store the title-returning methods.
|
protected List<TunableHandlerFactory<T>> |
tunableHandlerFactories
A list of TunableHandlerFactory services that have been registered.
|
Constructor and Description |
---|
AbstractTunableInterceptor()
Creates a new AbstractTunableInterceptor object.
|
Modifier and Type | Method and Description |
---|---|
void |
addTunableHandlerFactory(TunableHandlerFactory<T> thf,
Map properties)
Allows TunableHandlerFactory services to be added to the list of factories used
to process Tunables.
|
List<T> |
getHandlers(Object o)
Returns a list of
TunableHandler objects that have been found to process
the fields and methods annotated with Tunable . |
boolean |
hasTunables(Object o)
Tests an object to see if any of its fields or method have
Tunable annotations. |
void |
removeTunableHandlerFactory(TunableHandlerFactory<T> thf,
Map properties)
Allows TunableHandlerFactory services to be removed from the list of factories used
to process Tunables.
|
protected final Map<Object,List<T extends TunableHandler>> handlerMap
protected final Map<Object,Method> titleProviderMap
protected final List<TunableHandlerFactory<T extends TunableHandler>> tunableHandlerFactories
public AbstractTunableInterceptor()
public final List<T> getHandlers(Object o)
TunableHandler
objects that have been found to process
the fields and methods annotated with Tunable
.o
- The object whose fields and methods will be searched for Tunable
annotations.TunableHandler
objects that have been
found to process the fields and methods annotated with Tunable
.public boolean hasTunables(Object o)
Tunable
annotations.public void addTunableHandlerFactory(TunableHandlerFactory<T> thf, Map properties)
thf
- The factory to be added.properties
- OSGi service metadata. May be null.public void removeTunableHandlerFactory(TunableHandlerFactory<T> thf, Map properties)
thf
- The factory to be removed.properties
- OSGi service metadata. May be null.Copyright 2011-2015 Cytoscape Consortium. All rights reserved.