private static class DataObjectFactory.DtoInvocationHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Field and Description |
---|---|
private DataModelObject |
delegate
The DMO which will handle unimplemented calls of the proxy object.
|
Constructor and Description |
---|
DtoInvocationHandler(DataModelObject delegate)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
Processes a method invocation on a proxy instance and returns the result.
|
private final DataModelObject delegate
public DtoInvocationHandler(DataModelObject delegate)
delegate
- The delegate DMO.public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
proxy
- the proxy instance that the method was invoked on.method
- the Method instance corresponding to the interface method invoked on the proxy instance. The
proxy is constructed so that this method should be relayed to the delegate
instead.args
- an array of objects containing the values of the arguments passed in the method invocation
on the proxy instance, or null if interface method takes no arguments.java.lang.Throwable
- the exception to throw from the method invocation on the DMO instance.