Class OptionEntry

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class OptionEntry extends ProxyInstance
  • Constructor Details

    • OptionEntry

      public OptionEntry(MemorySegment address)
      Create a OptionEntry proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • OptionEntry

      public OptionEntry(Arena arena)
      Allocate a new OptionEntry.
      Parameters:
      arena - to control the memory allocation scope
    • OptionEntry

      public OptionEntry()
      Allocate a new OptionEntry. The memory is allocated with Arena.ofAuto().
    • OptionEntry

      public OptionEntry(String longName, byte shortName, int flags, OptionArg arg, MemorySegment argData, String description, String argDescription, Arena arena)
      Allocate a new OptionEntry with the fields set to the provided values.
      Parameters:
      longName - value for the field longName
      shortName - value for the field shortName
      flags - value for the field flags
      arg - value for the field arg
      argData - value for the field argData
      description - value for the field description
      argDescription - value for the field argDescription
      arena - to control the memory allocation scope
    • OptionEntry

      public OptionEntry(String longName, byte shortName, int flags, OptionArg arg, MemorySegment argData, String description, String argDescription)
      Allocate a new OptionEntry with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      longName - value for the field longName
      shortName - value for the field shortName
      flags - value for the field flags
      arg - value for the field arg
      argData - value for the field argData
      description - value for the field description
      argDescription - value for the field argDescription
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readLongName

      public String readLongName()
      Read the value of the field long_name.
      Returns:
      The value of the field long_name
    • writeLongName

      public void writeLongName(String longName, Arena _arena)
      Write a value in the field long_name.
      Parameters:
      longName - The new value for the field long_name
      _arena - to control the memory allocation scope
    • readShortName

      public byte readShortName()
      Read the value of the field short_name.
      Returns:
      The value of the field short_name
    • writeShortName

      public void writeShortName(byte shortName)
      Write a value in the field short_name.
      Parameters:
      shortName - The new value for the field short_name
    • readFlags

      public int readFlags()
      Read the value of the field flags.
      Returns:
      The value of the field flags
    • writeFlags

      public void writeFlags(int flags)
      Write a value in the field flags.
      Parameters:
      flags - The new value for the field flags
    • readArg

      public OptionArg readArg()
      Read the value of the field arg.
      Returns:
      The value of the field arg
    • writeArg

      public void writeArg(OptionArg arg)
      Write a value in the field arg.
      Parameters:
      arg - The new value for the field arg
    • readArgData

      public MemorySegment readArgData()
      Read the value of the field arg_data.
      Returns:
      The value of the field arg_data
    • writeArgData

      public void writeArgData(MemorySegment argData)
      Write a value in the field arg_data.
      Parameters:
      argData - The new value for the field arg_data
    • readDescription

      public String readDescription()
      Read the value of the field description.
      Returns:
      The value of the field description
    • writeDescription

      public void writeDescription(String description, Arena _arena)
      Write a value in the field description.
      Parameters:
      description - The new value for the field description
      _arena - to control the memory allocation scope
    • readArgDescription

      public String readArgDescription()
      Read the value of the field arg_description.
      Returns:
      The value of the field arg_description
    • writeArgDescription

      public void writeArgDescription(String argDescription, Arena _arena)
      Write a value in the field arg_description.
      Parameters:
      argDescription - The new value for the field arg_description
      _arena - to control the memory allocation scope