Package org.coliper.ibean.proxy.handler
Class StatelessExtensionHandler
- java.lang.Object
-
- org.coliper.ibean.proxy.handler.StatelessExtensionHandler
-
- All Implemented Interfaces:
ExtensionHandler
- Direct Known Subclasses:
CloneableHandler,CompletableHandler,GsonSupportHandler,Jackson2SupportHandler,NullSafeHandler
public abstract class StatelessExtensionHandler extends Object implements ExtensionHandler
Abstract base class forExtensionHandlerimplementations that do not have to maintain their own state. Concrete implementations can choose with of the default implementations ofhandleExtendedInterfaceCall(IBeanContext, IBeanFieldAccess, Object, Method, Object[]),ExtensionHandler.interceptGetterCall(IBeanContext, IBeanFieldMetaInfo, Object, Object)andExtensionHandler.interceptSetterCall(IBeanContext, IBeanFieldMetaInfo, Object, Object)to override.
-
-
Constructor Summary
Constructors Constructor Description StatelessExtensionHandler()
-
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
-
-
-
-
Method Detail
-
handleExtendedInterfaceCall
public Object handleExtendedInterfaceCall(IBeanContext<?> context, IBeanFieldAccess bean, Object proxyInstance, Method method, Object[] params) throws Throwable
This default implementation always throws aUnsupportedOperationException. Should be always overridden in case the extension interface contains its own methods.- Specified by:
handleExtendedInterfaceCallin interfaceExtensionHandler- 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[])
-
-