Package spin.off

Class ListenerSpinOver

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void evaluate​(Invocation invocation)
      Evaluate the given invocation.
      protected boolean isListener​(java.lang.Class type)
      Test if the given class is a listener subinterface.
      protected boolean isListenerAdditionOrRemoval​(java.lang.reflect.Method method)
      Test if the given method is a listener addition or removal.
      protected java.lang.Object spinOver​(java.lang.Object object)
      Spin-over the given object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ListenerSpinOver

        public ListenerSpinOver()
        Constructor.
      • ListenerSpinOver

        public ListenerSpinOver​(Evaluator evaluator)
        Constructor.
        Parameters:
        evaluator - the evaluator to wrap
    • Method Detail

      • evaluate

        public void evaluate​(Invocation invocation)
                      throws java.lang.Throwable
        Description copied from class: Evaluator
        Evaluate the given invocation.
        Specified by:
        evaluate in class Evaluator
        Parameters:
        invocation - invocation to evaluate
        Throws:
        java.lang.Throwable
      • isListenerAdditionOrRemoval

        protected boolean isListenerAdditionOrRemoval​(java.lang.reflect.Method method)
        Test if the given method is a listener addition or removal. For this the methods name must obey the name pattern (add|remove).*Listener.
        Parameters:
        method - method to test
        Returns:
        true if method obeys the name pattern of listener addition or removal
      • isListener

        protected boolean isListener​(java.lang.Class type)
        Test if the given class is a listener subinterface.
        Parameters:
        type - class to test
        Returns:
        true if the class is an sub-interface of java.util.EventListener
      • spinOver

        protected java.lang.Object spinOver​(java.lang.Object object)
        Spin-over the given object.
        Parameters:
        object - object to spin-over
        Returns:
        Spin proxy