public class LoggingInvocationHandler extends Object implements InvocationHandler
| Modifier and Type | Field and Description |
|---|---|
static boolean |
DEFAULT_PROXY_RETURN_VALUES |
| Constructor and Description |
|---|
LoggingInvocationHandler(Object aActualTarget) |
| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(Object aProxy,
Method aMethod,
Object[] aArgs) |
boolean |
isProxyReturnValues() |
static <T> T |
proxying(Class<? extends T> aInterfaceClass,
T aActualTarget) |
static <T> T |
proxying(Class<? extends T> aInterfaceClass,
T aActualTarget,
Function<? super T,? extends InvocationHandler> aFactory) |
LoggingInvocationHandler |
setProxyReturnValues(boolean bProxyReturnValues) |
public static final boolean DEFAULT_PROXY_RETURN_VALUES
public boolean isProxyReturnValues()
true if return values are returned as proxied object
(the default) or false if the proxied return values
are returned "as-is".@Nonnull public LoggingInvocationHandler setProxyReturnValues(boolean bProxyReturnValues)
bProxyReturnValues - true to enable automatic proxying of return values (if
the declared return type is an interface; activated by default) or
false to disable this feature.@Nullable public Object invoke(@Nonnull Object aProxy, @Nonnull Method aMethod, @Nonnull Object[] aArgs) throws Throwable
invoke in interface InvocationHandlerThrowable@Nonnull public static <T> T proxying(@Nonnull Class<? extends T> aInterfaceClass, @Nonnull T aActualTarget)
Copyright © 2014–2017 Philip Helger. All rights reserved.