Annotation Interface GenerateNativeToNativeBridge


@Retention(CLASS) @Target(TYPE) public @interface GenerateNativeToNativeBridge
Generates a native to native bridge. For the annotated class, the processor generates a bridge delegating calls to the object in a native image heap. Further information can be found in the native bridge tutorial.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The native bridge configuration.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    If the supplier returns true, the bridge entry points are added automatically when building a shared library.
  • Element Details

    • include

      Class<? extends BooleanSupplier> include
      If the supplier returns true, the bridge entry points are added automatically when building a shared library. This means the bridge entry points are root methods for compilation, and everything reachable from them is compiled too. The provided class must have a nullary constructor, which is used to instantiate the class. The BooleanSupplier.getAsBoolean()} function is called on the newly instantiated instance.
      Default:
      org.graalvm.nativeimage.c.function.CEntryPoint.AlwaysIncluded.class
    • jniConfig

      Class<?> jniConfig
      The native bridge configuration. The returned class must have an accessible static getInstance() method returning a JNIConfig instance. The returned JNIConfig instance is used for marshallers' lookup.