com.kenai.jaffl.struct

Class Struct.EnumField<E>

protected abstract class Struct.EnumField<E> extends Struct.NumberField

Base for all the Enum fields.

Parameters: the type of java.lang.Enum

Field Summary
protected Class<E>enumClass
Constructor Summary
EnumField(int size, Class<E> enumClass)
Constructs a new Enum field.
EnumField(int size, Struct.Offset offset, Class<E> enumClass)
Constructs a new Enum field.
EnumField(int size, int align, Class<E> enumClass)
Constructs a new Enum field.
EnumField(int size, int align, Struct.Offset offset, Class<E> enumClass)
Constructs a new Enum field.
Method Summary
abstract Eget()
Gets a java Enum value representing the native integer value.

Field Detail

enumClass

protected final Class<E> enumClass

Constructor Detail

EnumField

public EnumField(int size, Class<E> enumClass)
Constructs a new Enum field.

Parameters: size the size of the native integer. enumClass the Enum class.

EnumField

public EnumField(int size, Struct.Offset offset, Class<E> enumClass)
Constructs a new Enum field.

Parameters: size the size of the native integer. * @param offset the offset from the start of the struct memory area. enumClass the Enum class.

EnumField

public EnumField(int size, int align, Class<E> enumClass)
Constructs a new Enum field.

Parameters: size the size of the native integer. align the minimum alignment of the native integer enumClass the Enum class.

EnumField

public EnumField(int size, int align, Struct.Offset offset, Class<E> enumClass)
Constructs a new Enum field.

Parameters: size the size of the native integer. align the minimum alignment of the native integer offset the offset from the start of the struct memory area enumClass the Enum class.

Method Detail

get

public abstract E get()
Gets a java Enum value representing the native integer value.

Returns: a java Enum value.