The
ReceiverMethod
allows you to provide a custom method implementation in the generated
type but still generate the over the boundary call. It's useful when pre-code or post-code is
needed before or after over the boundary call. The annotated method must have the same parameter
types as the receiver method.
Example showing a method
execute
with custom pre-code and post-code.
@Override
public final boolean execute() {
preCode();
boolean result = executeImpl();
postCode();
return result;
}
@ReceiverMethod("execute")
abstract boolean executeImpl();