Package org.coliper.ibean.proxy.handler
Class CloneableHandler
- java.lang.Object
-
- org.coliper.ibean.proxy.handler.StatelessExtensionHandler
-
- org.coliper.ibean.proxy.handler.CloneableHandler
-
- All Implemented Interfaces:
ExtensionHandler
public class CloneableHandler extends StatelessExtensionHandler
ExtensionHandlerimplementation for bean extension interfaceCloneableBean.
-
-
Field Summary
Fields Modifier and Type Field Description static ExtensionSupportSUPPORTExtensionSupportrelated to this handler supposed to be used when configuring extension handlers inIBeanFactorys, for example inProxyIBeanFactory.Builder.withInterfaceSupport(ExtensionSupport).
-
Constructor Summary
Constructors Constructor Description CloneableHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjecthandleExtendedInterfaceCall(IBeanContext<?> context, IBeanFieldAccess bean, Object proxyInstance, Method method, Object[] params)This default implementation always throws aUnsupportedOperationException.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.coliper.ibean.proxy.ExtensionHandler
interceptGetterCall, interceptSetterCall, onInitStateful
-
-
-
-
Field Detail
-
SUPPORT
public static final ExtensionSupport SUPPORT
ExtensionSupportrelated to this handler supposed to be used when configuring extension handlers inIBeanFactorys, for example inProxyIBeanFactory.Builder.withInterfaceSupport(ExtensionSupport).
-
-
Method Detail
-
handleExtendedInterfaceCall
public Object handleExtendedInterfaceCall(IBeanContext<?> context, IBeanFieldAccess bean, Object proxyInstance, Method method, Object[] params) throws Throwable
Description copied from class:StatelessExtensionHandlerThis default implementation always throws aUnsupportedOperationException. Should be always overridden in case the extension interface contains its own methods.- Specified by:
handleExtendedInterfaceCallin interfaceExtensionHandler- Overrides:
handleExtendedInterfaceCallin classStatelessExtensionHandler- Parameters:
context- provides meta information about the beanbean- allows this method to read or change field values of the IBeanproxyInstance- the IBean instance object (seeInvocationHandler.invoke(Object, Method, Object[])for more details)method- theMethodof the extension interface that was called on the IBean (seeInvocationHandler.invoke(Object, Method, Object[])for more details)params- the parameters passed to the extension method call (seeInvocationHandler.invoke(Object, Method, Object[])for more details)- Returns:
- an object that matches to the return type of the extension
method; return
nullif the return type isvoid. (seeInvocationHandler.invoke(Object, Method, Object[])for more details) - Throws:
Throwable- can be anyError,RuntimeExceptionor checked exception that is definied in the signature of the extension method. (seeInvocationHandler.invoke(Object, Method, Object[])for more details)- See Also:
ExtensionHandler.handleExtendedInterfaceCall(IBeanContext, IBeanFieldAccess, Object, Method, Object[])
-
-