E
- the Enum
to translate to/from.public class StructLayout.Enum8<E extends Enum<E>> extends StructLayout.EnumField<E>
enumClass, enumMapper
type
Constructor and Description |
---|
Enum8(Class<E> enumClass)
Creates a new 8 bit enum field.
|
Enum8(Class<E> enumClass,
StructLayout.Offset offset)
Creates a new 8 bit enum field.
|
Modifier and Type | Method and Description |
---|---|
int |
intValue(Pointer ptr)
Returns an integer representation of this enum field.
|
void |
set(Pointer ptr,
E value)
Sets the native integer value using a java Enum value.
|
void |
set(Pointer ptr,
Number value)
Sets the field to a new value.
|
get, toString
byteValue, doubleValue, floatValue, longValue, shortValue
enclosing, offset
public Enum8(Class<E> enumClass)
enumClass
- the class of the Enum
.public Enum8(Class<E> enumClass, StructLayout.Offset offset)
enumClass
- the class of the Enum
.offset
- the offset of the enum field.public final void set(Pointer ptr, E value)
ptr
- The pointer to the field.value
- the java Enum value.public void set(Pointer ptr, Number value)
StructLayout.NumberField
set
in class StructLayout.NumberField
ptr
- The pointer to the field.value
- The new value.public final int intValue(Pointer ptr)
intValue
in class StructLayout.NumberField
ptr
- The pointer to the field.Copyright © 2017. All rights reserved.