Package io.immutables.common
Class ProxyHandler
java.lang.Object
io.immutables.common.ProxyHandler
- All Implemented Interfaces:
InvocationHandler
Base abstract class for non-value interface proxies.
Non-value here means that equality is based on the object identity.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final ObjectUse this method in subclasses if you want to delegate call to a target instance.final booleanAlways delegates toObject.equals(Object)protected abstract ObjecthandleInterfaceMethod(Object proxy, Method method, Object[] arguments) Override to handle relevant methods.final inthashCode()Always delegates toObject.hashCode()final Objectstatic booleanstatic booleanisHashCode(Method method) static booleanisToString(Method method) protected Object
-
Constructor Details
-
ProxyHandler
public ProxyHandler()
-
-
Method Details
-
handleInterfaceMethod
protected abstract Object handleInterfaceMethod(Object proxy, Method method, Object[] arguments) throws Throwable Override to handle relevant methods.- Throws:
Throwable
-
invoke
- Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
delegate
Use this method in subclasses if you want to delegate call to a target instance. This does reflective call and unwrap exceptions.- Throws:
Throwable
-
toString
-
equals
Always delegates toObject.equals(Object) -
hashCode
public final int hashCode()Always delegates toObject.hashCode() -
isToString
-
isEquals
-
isHashCode
-