private final class FreshValueGenerator.FreshInvocationHandler extends AbstractInvocationHandler
| Modifier and Type | Field and Description |
|---|---|
private int |
identity |
private java.lang.Class<?> |
interfaceType |
| Constructor and Description |
|---|
FreshInvocationHandler(java.lang.Class<?> 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(). |
java.lang.String |
toString()
By default delegates to
Object.toString(). |
invokeprivate final int identity
private final java.lang.Class<?> 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 AbstractInvocationHandlerpublic 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 AbstractInvocationHandler