Package jnr.ffi.provider
Class ParameterFlags
java.lang.Object
jnr.ffi.provider.ParameterFlags
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intWhen allocating memory for the parameter, allocate a persistent memory blockstatic final intContents of the parameter memory will be copied from from java to native memorystatic final intThe contents of the java array should have a zero byte appendedstatic final intContents of the parameter memory will be copied from native memory back to javastatic final intThe java array memory should be pinned by the JVM during the function callstatic final intWhen allocating memory for the parameter, a temporary memory block can be used -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisDirect(int flags) static booleanisFlag(Annotation annotation) Checks if the annotation is a recognised parameter flag.static booleanisIn(int flags) static booleanisNulTerminate(int flags) static booleanisOut(int flags) static booleanisPinned(int flags) static booleanisTransient(int flags) static intparse(Annotation annotation) static intparse(Annotation[] annotations) static intparse(Collection<Annotation> annotations)
-
Field Details
-
OUT
public static final int OUTContents of the parameter memory will be copied from native memory back to java- See Also:
-
IN
public static final int INContents of the parameter memory will be copied from from java to native memory- See Also:
-
PINNED
public static final int PINNEDThe java array memory should be pinned by the JVM during the function call- See Also:
-
NULTERMINATE
public static final int NULTERMINATEThe contents of the java array should have a zero byte appended- See Also:
-
TRANSIENT
public static final int TRANSIENTWhen allocating memory for the parameter, a temporary memory block can be used- See Also:
-
DIRECT
public static final int DIRECTWhen allocating memory for the parameter, allocate a persistent memory block- See Also:
-
-
Method Details
-
parse
-
parse
-
parse
-
isFlag
Checks if the annotation is a recognised parameter flag.- Parameters:
annotation- the annotation to check.- Returns:
trueif the annotation is a parameter flag
-
isPinned
public static boolean isPinned(int flags) -
isTransient
public static boolean isTransient(int flags) -
isDirect
public static boolean isDirect(int flags) -
isNulTerminate
public static boolean isNulTerminate(int flags) -
isOut
public static boolean isOut(int flags) -
isIn
public static boolean isIn(int flags)
-