Class JNIConfig

java.lang.Object
org.graalvm.nativebridge.JNIConfig

public final class JNIConfig extends Object
A configuration used by the NativeIsolate and classes generated by the native bridge processor.
See Also:
  • Method Details

    • lookupMarshaller

      @SafeVarargs public final <T> BinaryMarshaller<T> lookupMarshaller(Class<T> type, Class<? extends Annotation>... annotationTypes)
      Looks up BinaryMarshaller for the type and annotationTypes. The method first tries to find a marshaller registered for the type and some annotation from annotationTypes. If no such marshaller exists, it tries to find a marshaller registered just for the type. If there is no such a marshaller it throws the UnsupportedOperationException.
      Parameters:
      type - the parameter or return type.
      annotationTypes - parameter or method annotation types.
      Throws:
      UnsupportedOperationException - if there is no registered marshaller for the type.
    • lookupMarshaller

      @SafeVarargs public final <T> BinaryMarshaller<T> lookupMarshaller(TypeLiteral<T> parameterizedType, Class<? extends Annotation>... annotationTypes)
      Looks up BinaryMarshaller for the parameterizedType and annotationTypes. The method first tries to find a marshaller registered for the parameterizedType and some annotation from annotationTypes. If no such marshaller exists, it tries to find a marshaller registered just for the parameterizedType. If there is no such a marshaller it throws the UnsupportedOperationException.
      Parameters:
      parameterizedType - the parameter or return type.
      annotationTypes - parameter or method annotation types.
      Throws:
      UnsupportedOperationException - if there is no registered marshaller for the parameterizedType.
    • newBuilder

      public static JNIConfig.Builder newBuilder()