Class JNIConfig
java.lang.Object
org.graalvm.nativebridge.JNIConfig
A configuration used by the
NativeIsolate and classes generated by the native bridge
processor.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA builder class to constructJNIConfiginstances. -
Method Summary
Modifier and TypeMethodDescriptionfinal <T> BinaryMarshaller<T> lookupMarshaller(Class<T> type, Class<? extends Annotation>... annotationTypes) final <T> BinaryMarshaller<T> lookupMarshaller(TypeLiteral<T> parameterizedType, Class<? extends Annotation>... annotationTypes) static JNIConfig.Builder
-
Method Details
-
lookupMarshaller
@SafeVarargs public final <T> BinaryMarshaller<T> lookupMarshaller(Class<T> type, Class<? extends Annotation>... annotationTypes) Looks upBinaryMarshallerfor thetypeandannotationTypes. The method first tries to find a marshaller registered for thetypeand some annotation fromannotationTypes. If no such marshaller exists, it tries to find a marshaller registered just for thetype. If there is no such a marshaller it throws theUnsupportedOperationException.- Parameters:
type- the parameter or return type.annotationTypes- parameter or method annotation types.- Throws:
UnsupportedOperationException- if there is no registered marshaller for thetype.
-
lookupMarshaller
@SafeVarargs public final <T> BinaryMarshaller<T> lookupMarshaller(TypeLiteral<T> parameterizedType, Class<? extends Annotation>... annotationTypes) Looks upBinaryMarshallerfor theparameterizedTypeandannotationTypes. The method first tries to find a marshaller registered for theparameterizedTypeand some annotation fromannotationTypes. If no such marshaller exists, it tries to find a marshaller registered just for theparameterizedType. If there is no such a marshaller it throws theUnsupportedOperationException.- Parameters:
parameterizedType- the parameter or return type.annotationTypes- parameter or method annotation types.- Throws:
UnsupportedOperationException- if there is no registered marshaller for theparameterizedType.
-
newBuilder
-