Class AbstractTunableInterceptor<T extends TunableHandler>

  • 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.

    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>

    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.
    • 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.