Package jnr.ffi.provider
Class ParameterFlags
- java.lang.Object
-
- jnr.ffi.provider.ParameterFlags
-
public final class ParameterFlags extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intDIRECTWhen allocating memory for the parameter, allocate a persistent memory blockstatic intINContents of the parameter memory will be copied from from java to native memorystatic intNULTERMINATEThe contents of the java array should have a zero byte appendedstatic intOUTContents of the parameter memory will be copied from native memory back to javastatic intPINNEDThe java array memory should be pinned by the JVM during the function callstatic intTRANSIENTWhen allocating memory for the parameter, a temporary memory block can be used
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static 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 Detail
-
OUT
public static final int OUT
Contents of the parameter memory will be copied from native memory back to java- See Also:
- Constant Field Values
-
IN
public static final int IN
Contents of the parameter memory will be copied from from java to native memory- See Also:
- Constant Field Values
-
PINNED
public static final int PINNED
The java array memory should be pinned by the JVM during the function call- See Also:
- Constant Field Values
-
NULTERMINATE
public static final int NULTERMINATE
The contents of the java array should have a zero byte appended- See Also:
- Constant Field Values
-
TRANSIENT
public static final int TRANSIENT
When allocating memory for the parameter, a temporary memory block can be used- See Also:
- Constant Field Values
-
DIRECT
public static final int DIRECT
When allocating memory for the parameter, allocate a persistent memory block- See Also:
- Constant Field Values
-
-
Method Detail
-
parse
public static int parse(Annotation annotation)
-
parse
public static int parse(Annotation[] annotations)
-
parse
public static int parse(Collection<Annotation> annotations)
-
isFlag
public static boolean isFlag(Annotation annotation)
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)
-
-