Cytoscape 3.0.1 API

org.cytoscape.work
Class AbstractTunableInterceptor<T extends TunableHandler>

java.lang.Object
  extended by org.cytoscape.work.AbstractTunableInterceptor<T>
Type Parameters:
T - The generic type of this AbstractTunableInterceptor.

public abstract class AbstractTunableInterceptor<T extends TunableHandler>
extends Object

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 Tunable and another method for returning the appropriate TunableHandlers for the field for method.
This class provides methods for adding and removing TunableHandlerFactory OSGi services where the TunableHandlers 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.

Field Summary
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 Summary
AbstractTunableInterceptor()
          Creates a new AbstractTunableInterceptor object.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlerMap

protected final Map<Object,List<T extends TunableHandler>> handlerMap
Store the Handlers.


titleProviderMap

protected final Map<Object,Method> titleProviderMap
Store the title-returning methods.


tunableHandlerFactories

protected final List<TunableHandlerFactory<T extends TunableHandler>> tunableHandlerFactories
A list of TunableHandlerFactory services that have been registered.

Constructor Detail

AbstractTunableInterceptor

public AbstractTunableInterceptor()
Creates a new AbstractTunableInterceptor object.

Method Detail

getHandlers

public final List<T> getHandlers(Object o)
Returns a list of TunableHandler objects that have been found to process the fields and methods annotated with Tunable.

Parameters:
o - The object whose fields and methods will be searched for Tunable annotations.
Returns:
The list that contains all the TunableHandler objects that have been found to process the fields and methods annotated with Tunable.

hasTunables

public boolean hasTunables(Object o)
Tests an object to see if any of its fields or method have Tunable annotations.

Parameters:
o - The object whose fields and methods should be evaluated for Tunable annotations.
Returns:
true if "o" has fields or methods annotated with Tunable otherwise false.

addTunableHandlerFactory

public void addTunableHandlerFactory(TunableHandlerFactory<T> thf,
                                     Map properties)
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

public void removeTunableHandlerFactory(TunableHandlerFactory<T> thf,
                                        Map properties)
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.

Cytoscape 3.0.1 API

Copyright 2011 Cytoscape Consortium. All rights reserved.