Package org.fusesource.hawtjni.runtime
Enum ArgFlag
- java.lang.Object
-
- java.lang.Enum<ArgFlag>
-
- org.fusesource.hawtjni.runtime.ArgFlag
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BY_VALUE
Indicate that a structure parameter should be passed by value instead of by reference.CRITICAL
Indicate that GetPrimitiveArrayCritical() should be used instead of Get<PrimitiveType>ArrayElements() when transferring array of primitives from/to C.CS_OBJECT
Indicate that the native parameter is a C# managed object.INIT
Indicate that the associated C local variable for a native method parameter should be initialized with zeros.NO_IN
Indicate that a native method parameter is an out only variable.NO_OUT
Indicate that a native method parameter is an in only variable.POINTER_ARG
Indicate that the parameter is a pointer.SENTINEL
Indicate that the parameter of a native method is the sentinel (last parameter of a variable argument C function).UNICODE
Indicate that GetStringChars()should be used instead of GetStringUTFChars() to get the characters of a java.lang.String passed as a parameter to native methods.
-
Constructor Summary
Constructors Modifier Constructor Description private
ArgFlag()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArgFlag
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ArgFlag[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NO_IN
public static final ArgFlag NO_IN
Indicate that a native method parameter is an out only variable. This only makes sense if the parameter is a structure or an array of primitives. It is an optimization to avoid copying the java memory to C memory on the way in.
-
NO_OUT
public static final ArgFlag NO_OUT
Indicate that a native method parameter is an in only variable. This only makes sense if the parameter is a structure or an array of primitives. It is an optimization to avoid copying the C memory from java memory on the way out.
-
CRITICAL
public static final ArgFlag CRITICAL
Indicate that GetPrimitiveArrayCritical() should be used instead of Get<PrimitiveType>ArrayElements() when transferring array of primitives from/to C. This is an optimization to avoid copying memory and must be used carefully. It is ok to be used in MoveMemory() and memmove() natives.
-
INIT
public static final ArgFlag INIT
Indicate that the associated C local variable for a native method parameter should be initialized with zeros.
-
POINTER_ARG
public static final ArgFlag POINTER_ARG
Indicate that the parameter is a pointer.
-
BY_VALUE
public static final ArgFlag BY_VALUE
Indicate that a structure parameter should be passed by value instead of by reference. This dereferences the parameter by prepending *. The parameter must not be NULL.
-
UNICODE
public static final ArgFlag UNICODE
Indicate that GetStringChars()should be used instead of GetStringUTFChars() to get the characters of a java.lang.String passed as a parameter to native methods.
-
SENTINEL
public static final ArgFlag SENTINEL
Indicate that the parameter of a native method is the sentinel (last parameter of a variable argument C function). The generated code is always the literal NULL. Some compilers expect the sentinel to be the literal NULL and output a warning if otherwise.
-
CS_OBJECT
public static final ArgFlag CS_OBJECT
Indicate that the native parameter is a C# managed object.
-
-
Method Detail
-
values
public static ArgFlag[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ArgFlag c : ArgFlag.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ArgFlag valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
-