Package org.int4.dirk.extensions.proxy
Class ByteBuddyProxyStrategy.Interceptor
- java.lang.Object
-
- org.int4.dirk.extensions.proxy.ByteBuddyProxyStrategy.Interceptor
-
- Enclosing class:
- ByteBuddyProxyStrategy
public static class ByteBuddyProxyStrategy.Interceptor extends java.lang.ObjectInterceptor class to call the underlying delegate object when the proxy is accessed.This class is public in order for the proxy to be able to call it from the package it was created in.
-
-
Constructor Summary
Constructors Constructor Description Interceptor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Objectintercept(java.lang.reflect.Method method, java.lang.Object[] args, ProxyStrategy.InstanceSupplier<?> instanceSupplier)Intercepts a proxied method.
-
-
-
Method Detail
-
intercept
@RuntimeType public static java.lang.Object intercept(@Origin java.lang.reflect.Method method, @AllArguments java.lang.Object[] args, @FieldValue("__instanceSupplier__") ProxyStrategy.InstanceSupplier<?> instanceSupplier) throws java.lang.ThrowableIntercepts a proxied method.- Parameters:
method- the proxiedMethod, cannot benullargs- the arguments with which the method was called, cannot benullinstanceSupplier- anProxyStrategy.InstanceSupplierto supply the underlying object which was proxied, cannot benull- Returns:
- the result of the proxied method, can be
null - Throws:
java.lang.Throwable- when the proxied method threw an exception
-
-