Package com.google.common.testing
Class ForwardingWrapperTester.InteractionTester<T>
java.lang.Object
com.google.common.reflect.AbstractInvocationHandler
com.google.common.testing.ForwardingWrapperTester.InteractionTester<T>
- All Implemented Interfaces:
InvocationHandler
- Enclosing class:
ForwardingWrapperTester
private static final class ForwardingWrapperTester.InteractionTester<T>
extends AbstractInvocationHandler
Tests a single interaction against a method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerprivate final Methodprivate final Object[]private final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjecthandleInvocation(Object p, Method calledMethod, Object[] args) AbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])delegates to this method upon any method invocation on the proxy instance, exceptObject.equals(java.lang.Object),Object.hashCode()andObject.toString().(package private) voidtestInteraction(Function<? super T, ? extends T> wrapperFunction) toString()By default delegates toObject.toString().Methods inherited from class com.google.common.reflect.AbstractInvocationHandler
equals, hashCode, invoke
-
Field Details
-
interfaceType
-
method
-
passedArgs
-
returnValue
-
called
-
-
Constructor Details
-
InteractionTester
-
-
Method Details
-
handleInvocation
Description copied from class:AbstractInvocationHandlerAbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])delegates to this method upon any method invocation on the proxy instance, exceptObject.equals(java.lang.Object),Object.hashCode()andObject.toString(). The result will be returned as the proxied method's return value.Unlike
AbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]),argswill never be null. When the method has no parameter, an empty array is passed in.- Specified by:
handleInvocationin classAbstractInvocationHandler- Throws:
Throwable
-
testInteraction
-
toString
Description copied from class:AbstractInvocationHandlerBy default delegates toObject.toString(). The dynamic proxies'toString()will delegate to this method. Subclasses can override this method to provide custom string representation for the proxies.- Overrides:
toStringin classAbstractInvocationHandler
-