Package jnr.ffi

Class StructLayout.Enum8<E extends Enum<E>>

    • Constructor Detail

      • Enum8

        public Enum8​(Class<E> enumClass)
        Creates a new 8 bit enum field.
        Parameters:
        enumClass - the class of the Enum.
      • Enum8

        public Enum8​(Class<E> enumClass,
                     StructLayout.Offset offset)
        Creates a new 8 bit enum field.
        Parameters:
        enumClass - the class of the Enum.
        offset - the offset of the enum field.
    • Method Detail

      • set

        public final void set​(Pointer ptr,
                              E value)
        Sets the native integer value using a java Enum value.
        Parameters:
        ptr - The pointer to the field.
        value - the java Enum value.
      • intValue

        public final int intValue​(Pointer ptr)
        Returns an integer representation of this enum field.
        Specified by:
        intValue in class StructLayout.NumberField
        Parameters:
        ptr - The pointer to the field.
        Returns:
        an integer value for this enum field.