Package jnr.ffi
Enum NativeType
- All Implemented Interfaces:
Serializable
,Comparable<NativeType>
NativeType defines the primitive types supported internally.
Usually you will not use these types directly, and should instead use the standard
types such as
Pointer
, NativeLong
, or any of the normal java
types such as int
, short
.
All other types are defined in terms of these primitive types.-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNative memory address.Double precision floating point.Single precision floating point.Signed char.Signed integer.Signed long integer.Signed long long integer.Signed short integer.Native struct typeUnsigned char.Unsigned integer.Unsigned long integer.Unsigned long long integer.Unsigned short integer.Void type. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NativeType
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
Void type. Only used for function return types. -
SCHAR
Signed char. Equivalent to a C char or signed char type. Usually 1 byte in size. -
UCHAR
Unsigned char. Equivalent to a C unsigned char type. Usually 1 byte in size -
SSHORT
Signed short integer. Equivalent to a C short or signed short type. Usually 2 bytes in size. -
USHORT
Unsigned short integer. Equivalent to a C unsigned short type. Usually 2 bytes in size. -
SINT
Signed integer. Equivalent to a C int or signed int type. Usually 4 bytes in size. -
UINT
Unsigned integer. Equivalent to a C unsigned int type. Usually 4 bytes in size. -
SLONG
Signed long integer. Equivalent to a C long or signed long type. Can be either 4 or 8 bytes in size, depending on the platform. -
ULONG
Unsigned long integer. Equivalent to a C unsigned long type. Can be either 4 or 8 bytes in size, depending on the platform. -
SLONGLONG
Signed long long integer. Equivalent to a C long long or signed long long type. Usually 8 bytes in size. -
ULONGLONG
Unsigned long long integer. Equivalent to a C unsigned long long type. Usually 8 bytes in size. -
FLOAT
Single precision floating point. Equivalent to a C float type. Usually 4 bytes in size. -
DOUBLE
Double precision floating point. Equivalent to a C double type. Usually 8 bytes in size. -
STRUCT
Native struct type -
ADDRESS
Native memory address. Equivalent to a C void* or char* pointer type. Can be either 4 or 8 bytes in size, depending on the platform.
-
-
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
-