Package jnr.ffi

Class Struct.EnumField<E>

    • Field Detail

      • enumClass

        protected final java.lang.Class<E> enumClass
    • Constructor Detail

      • EnumField

        public EnumField​(NativeType type,
                         java.lang.Class<E> enumClass)
        Constructs a new Enum field.
        Parameters:
        type - the native type of the enum.
        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.
      • toString

        public final java.lang.String toString()
        Returns a string representation of this field.
        Overrides:
        toString in class Struct.NumberField
        Returns:
        a string representation of this field.