public interface Callback<T>
| Modifier and Type | Method and Description |
|---|---|
default CallbackResult |
afterCall(T obj,
Object[] args,
Object methodResult)
Method that is called after actual method call.
|
default CallbackResult |
beforeCall(T obj,
Object[] args)
Method that is called before actual method is invoked.
|
default Class<? extends Callback<?>> |
getBaseClass()
Returns base class that will be used as callback identificator.
|
default CallbackResult beforeCall(T obj, Object[] args)
CallbackResult.newContinue()CallbackResult.newCallbackBlocker()CallbackResult.newFullBlocker(Object)CallbackResult.newFullBlocker(Object) then
method will be executed normally. In other case
CallbackResult.getResult() will be returned.obj - on whom method should be invokedargs - method argsCallbackResultdefault CallbackResult afterCall(T obj, Object[] args, Object methodResult)
CallbackResult.newContinue()CallbackResult.newCallbackBlocker()CallbackResult.newFullBlocker(Object)CallbackResult.newFullBlocker(Object) then
mehodResult will return unmodified. In other case
CallbackResult.getResult() will be returned.obj - on whom method was calledargs - method argsmethodResult - result of method invocationCallbackResultdefault Class<? extends Callback<?>> getBaseClass()
ObjectCallback.value() should contain
class that will be invokedCopyright © 2014–2015. All rights reserved.