@Retention(value=RUNTIME) @Target(value=METHOD) public @interface CFunction
nativemethod that calls directly from Java to C, without following the JNI protocol. This means that there are no artificial additional parameters such as the JNI environment passed, and no marshaling or processing of arguments (such as creating handles for objects) is performed. If the method is non-static, the receiver will be ignored.
Parameter types and return types must not be Java reference types, only
primitive Java types, word types and
CEnum types are allowed. The representation of passed primitive values matches exactly
how they are specified in the Java language, for example,
int as a 32-bit signed integer
char as a 16-bit unsigned integer.
boolean is specified as a single byte that
true if non-zero, and to
false if zero. If a Word value is passed
that points to a Java object, no guarantees are taken regarding its integrity as a pointer.
The class containing the annotated method must be annotated with
Note that this annotation must not be used for native functions that use variadic arguments (varargs) because varargs calling conventions are not supported and even a declaration with a specific non-varargs signature can be incompatible with vararg target functions on some platforms.
|Modifier and Type||Optional Element and Description|
The Java-to-C thread transition code used when calling the function.
The symbol name to use to link this method.
public abstract String value
public abstract CFunction.Transition transition