Top Description Methods
org.graalvm.nativebridge

public @Interface ReceiverMethod

extends Annotation
Annotations
@Retention:CLASS
@Target:METHOD
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

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();

Method Summary

Modifier and TypeMethod and Description
public String
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

valueback to summary
public String value()