Annotation Interface WrapMethod
Allows you to wrap a whole method. To wrap individual operations within a method, including method calls, see
@WrapOperation.
Your handler method receives the target method's arguments and an Operation representing the method
being wrapped.
You should return the same type as the wrapped method does:
Whenprivate (static) ReturnType handler(<params of the original method>,Operation<ReturnType> original)
calling the original, you must pass everything before the original in your handler's
parameters. You can optionally pass different values to change what the original uses.
This chains when used by multiple people, unlike
@Overwrite.
If you never use the original then you risk other people's changes being silently ignored.
NOTE: While this injector in general does not support Sugar, it does have special support for using
@Share to share values between wrappers and the target method.
See the wiki article for more info.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
method
String[] method
-
-
-
remap
boolean remap- Default:
- true
-
require
int require- Default:
- -1
-
expect
int expect- Default:
- 1
-
allow
int allow- Default:
- -1
-