private class DummyProxy.DummyHandler extends AbstractInvocationHandler implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private TypeToken<?> |
interfaceType |
| Constructor and Description |
|---|
DummyHandler(TypeToken<?> interfaceType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object obj)
By default delegates to
Object.equals(java.lang.Object) so instances are only equal if they are
identical. |
protected java.lang.Object |
handleInvocation(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.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,
except Object.equals(java.lang.Object), Object.hashCode() and Object.toString(). |
int |
hashCode()
By default delegates to
Object.hashCode(). |
private DummyProxy |
identity() |
java.lang.String |
toString()
By default delegates to
Object.toString(). |
private java.lang.Object |
writeReplace() |
invokeprivate final TypeToken<?> interfaceType
DummyHandler(TypeToken<?> interfaceType)
protected java.lang.Object handleInvocation(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
AbstractInvocationHandlerAbstractInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[]) delegates to this method upon any method invocation on the proxy instance,
except Object.equals(java.lang.Object), Object.hashCode() and Object.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[]), args will never be null. When the method has no parameter,
an empty array is passed in.
handleInvocation in class AbstractInvocationHandlerpublic int hashCode()
AbstractInvocationHandlerObject.hashCode(). The dynamic proxies' hashCode() will
delegate to this method. Subclasses can override this method to provide custom equality.hashCode in class AbstractInvocationHandlerpublic boolean equals(java.lang.Object obj)
AbstractInvocationHandlerObject.equals(java.lang.Object) so instances are only equal if they are
identical. proxy.equals(argument) returns true if:
proxy and argument are of the same type
InvocationHandler of argument
Subclasses can override this method to provide custom equality.
equals in class AbstractInvocationHandlerprivate DummyProxy identity()
public java.lang.String toString()
AbstractInvocationHandlerObject.toString(). The dynamic proxies' toString() will
delegate to this method. Subclasses can override this method to provide custom string
representation for the proxies.toString in class AbstractInvocationHandlerprivate java.lang.Object writeReplace()