Package jnr.ffi

Class Struct.PointerField

Direct Known Subclasses:
Struct.Pointer, Struct.StructRef
Enclosing class:
Struct

public abstract class Struct.PointerField extends Struct.NumberField
  • Constructor Details

    • PointerField

      public PointerField()
      Creates a new Address field.
    • PointerField

      public PointerField(Struct.Offset offset)
  • Method Details

    • getPointer

      protected final Pointer getPointer()
      Gets the Pointer value from the native memory.
      Returns:
      a Pointer.
    • size

      public final int size()
      Gets the size of a Pointer in bits
      Returns:
      the size of the Pointer
    • set

      public final void set(Pointer value)
      Puts a Address value into the native memory.
      Parameters:
      value - the value to write.
    • set

      public void set(Number value)
      Description copied from class: Struct.NumberField
      Sets the field to a new value.
      Specified by:
      set in class Struct.NumberField
      Parameters:
      value - The new value.
    • intValue

      public int intValue()
      Returns an integer representation of this Pointer.
      Specified by:
      intValue in class Struct.NumberField
      Returns:
      an integer value for this Pointer.
    • longValue

      public long longValue()
      Returns an long representation of this Pointer.
      Overrides:
      longValue in class Struct.NumberField
      Returns:
      an long value for this Pointer.
    • toString

      public String toString()
      Returns a string representation of this Pointer.
      Overrides:
      toString in class Struct.NumberField
      Returns:
      a string representation of this Pointer.