E - the type of Enumprotected abstract class StructLayout.EnumField<E extends Enum<E>> extends StructLayout.NumberField
| Modifier and Type | Field and Description |
|---|---|
protected Class<E> |
enumClass |
protected EnumMapper |
enumMapper |
type| Constructor and Description |
|---|
EnumField(NativeType type,
Class<E> enumClass)
Constructs a new Enum field.
|
EnumField(NativeType type,
Class<E> enumClass,
StructLayout.Offset offset)
Constructs a new Enum field.
|
| Modifier and Type | Method and Description |
|---|---|
E |
get(Pointer ptr)
Gets a java Enum value representing the native integer value.
|
String |
toString(Pointer ptr)
Returns a string representation of this field.
|
byteValue, doubleValue, floatValue, intValue, longValue, set, shortValueenclosing, offsetprotected final EnumMapper enumMapper
public EnumField(NativeType type, Class<E> enumClass)
type - the native type of the enum.enumClass - the Enum class.public EnumField(NativeType type, Class<E> enumClass, StructLayout.Offset offset)
type - the native type of the enum.enumClass - the Enum class.offset - the offset.public E get(Pointer ptr)
ptr - The pointer to the field.public final String toString(Pointer ptr)
toString in class StructLayout.NumberFieldptr - The pointer to the field.Copyright © 2017. All rights reserved.