@FunctionalInterface public interface Proxy<T>
Modifier and Type | Method and Description |
---|---|
<R> R |
call(Function<T,R> body)
Call object inside this proxy.
|
default Proxy<T> |
onAfter(Consumer<T> after)
Execute a certain logic after the user supplied body is run.
|
default Proxy<T> |
onAfter(Runnable after)
Execute a certain logic after the user supplied body is run,
that does not need the proxied object.
|
default Proxy<T> |
onAround(BiConsumer<T,Runnable> around)
Execute additional logic around the call.
|
default Proxy<T> |
onBefore(Consumer<T> before)
Execute a certain logic before the user supplied body is run.
|
default Proxy<T> |
onBefore(Runnable before)
Execute a certain logic before the user supplied body is run,
that does not need the proxied object.
|
<R> R call(Function<T,R> body)
default Proxy<T> onAround(BiConsumer<T,Runnable> around)
default Proxy<T> onBefore(Consumer<T> before)
default Proxy<T> onBefore(Runnable before)
default Proxy<T> onAfter(Consumer<T> after)
Copyright © 2016. All rights reserved.