public class ListenerSpinOver extends Evaluator
SpinOffEvaluator
if their corresponding parameter types are
subinterfaces of java.util.EventListener
. Spin.setDefaultOffEvaluator(new ListenerSpinOver());
Constructor and Description |
---|
ListenerSpinOver()
Constructor.
|
ListenerSpinOver(Evaluator evaluator)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate(Invocation invocation)
Evaluate the given invocation.
|
protected boolean |
isListener(Class type)
Test if the given class is a listener subinterface.
|
protected boolean |
isListenerAdditionOrRemoval(Method method)
Test if the given method is a listener addition or removal.
|
protected Object |
spinOver(Object object)
Spin-over the given object.
|
public ListenerSpinOver()
public ListenerSpinOver(Evaluator evaluator)
evaluator
- the evaluator to wrappublic void evaluate(Invocation invocation) throws Throwable
Evaluator
protected boolean isListenerAdditionOrRemoval(Method method)
(add|remove).*Listener
.method
- method to testtrue
if method obeys the name pattern of listener
addition or removalprotected boolean isListener(Class type)
type
- class to testtrue
if the class is an sub-interface of
java.util.EventListener
Copyright © 2017. All rights reserved.