Interface GroovyInterceptor.Invoker

Enclosing class:
GroovyInterceptor

public static interface GroovyInterceptor.Invoker
Represents the next interceptor in the chain. As GroovyInterceptor, you intercept by doing one of the following:
  • Pass on to the next interceptor by calling one of the call() method, possibly modifying the arguments and return values, intercepting an exception, etc.
  • Throws an exception to block the call.
  • Return some value without calling the next interceptor.
The signature of the call method is as follows:
receiver
The object whose method/property is accessed. For constructor invocations and static calls, this is Class. If the receiver is null, all the interceptors will be skipped.
method
The name of the method/property/attribute. Otherwise pass in null.
args
Arguments of the method call, index of the array access, and/or values to be set. Multiple override of the call method is provided to avoid the implicit object array creation, but otherwise they behave the same way.