Package com.helger.commons.lang.proxy
Class LoggingInvocationHandler
java.lang.Object
com.helger.commons.lang.proxy.LoggingInvocationHandler
- All Implemented Interfaces:
InvocationHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic <T> Tstatic <T> Tproxying(Class<? extends T> aInterfaceClass, T aActualTarget, Function<? super T, ? extends InvocationHandler> aFactory) setProxyReturnValues(boolean bProxyReturnValues)
-
Field Details
-
DEFAULT_PROXY_RETURN_VALUES
public static final boolean DEFAULT_PROXY_RETURN_VALUES- See Also:
-
-
Constructor Details
-
LoggingInvocationHandler
-
-
Method Details
-
isProxyReturnValues
public boolean isProxyReturnValues()- Returns:
trueif return values are returned as proxied object (the default) orfalseif the proxied return values are returned "as-is".
-
setProxyReturnValues
- Parameters:
bProxyReturnValues-trueto enable automatic proxying of return values (if the declared return type is an interface; activated by default) orfalseto disable this feature.- Returns:
- this for chaining
-
invoke
@Nullable public Object invoke(@Nonnull Object aProxy, @Nonnull Method aMethod, @Nonnull Object[] aArgs) throws Throwable - Specified by:
invokein interfaceInvocationHandler- Throws:
Throwable
-
proxying
-
proxying
-