Package org.jruby.ext.ffi
Enum NativeType
- All Implemented Interfaces:
Serializable,Comparable<NativeType>,java.lang.constant.Constable
Native types
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA C long typeAn immutable string.A C unsigned long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal intintValue()static NativeTypeReturns the enum constant of this type with the specified name.static final NativeTypevalueOf(IRubyObject type) Returns the enum constant of this type with the specified name.static NativeType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
VOID
-
BOOL
-
CHAR
-
UCHAR
-
SHORT
-
USHORT
-
INT
-
UINT
-
LONG_LONG
-
ULONG_LONG
-
LONG
A C long type -
ULONG
A C unsigned long -
FLOAT
-
DOUBLE
-
LONGDOUBLE
-
POINTER
-
BUFFER_IN
-
BUFFER_OUT
-
BUFFER_INOUT
-
CHAR_ARRAY
-
STRING
An immutable string. Nul terminated, but only copies in to the native function -
TRANSIENT_STRING
-
VARARGS
-
ARRAY
-
STRUCT
-
MAPPED
-
-
Constructor Details
-
NativeType
private NativeType()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
intValue
public final int intValue() -
valueOf
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:
type- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-