Class TokenValue

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class TokenValue extends ProxyInstance
A union holding the value of the token.
  • Constructor Details

    • TokenValue

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

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

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

      public TokenValue(MemorySegment vSymbol, String vIdentifier, int vBinary, int vOctal, int vInt, long vInt64, double vFloat, int vHex, String vString, String vComment, byte vChar, int vError, Arena arena)
      Allocate a new TokenValue with the fields set to the provided values.
      Parameters:
      vSymbol - value for the field vSymbol
      vIdentifier - value for the field vIdentifier
      vBinary - value for the field vBinary
      vOctal - value for the field vOctal
      vInt - value for the field vInt
      vInt64 - value for the field vInt64
      vFloat - value for the field vFloat
      vHex - value for the field vHex
      vString - value for the field vString
      vComment - value for the field vComment
      vChar - value for the field vChar
      vError - value for the field vError
      arena - to control the memory allocation scope
    • TokenValue

      public TokenValue(MemorySegment vSymbol, String vIdentifier, int vBinary, int vOctal, int vInt, long vInt64, double vFloat, int vHex, String vString, String vComment, byte vChar, int vError)
      Allocate a new TokenValue with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      vSymbol - value for the field vSymbol
      vIdentifier - value for the field vIdentifier
      vBinary - value for the field vBinary
      vOctal - value for the field vOctal
      vInt - value for the field vInt
      vInt64 - value for the field vInt64
      vFloat - value for the field vFloat
      vHex - value for the field vHex
      vString - value for the field vString
      vComment - value for the field vComment
      vChar - value for the field vChar
      vError - value for the field vError
  • Method Details

    • getMemoryLayout

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

      public MemorySegment readVSymbol()
      Read the value of the field v_symbol.
      Returns:
      The value of the field v_symbol
    • writeVSymbol

      public void writeVSymbol(MemorySegment vSymbol)
      Write a value in the field v_symbol.
      Parameters:
      vSymbol - The new value for the field v_symbol
    • readVIdentifier

      public String readVIdentifier()
      Read the value of the field v_identifier.
      Returns:
      The value of the field v_identifier
    • writeVIdentifier

      public void writeVIdentifier(String vIdentifier, Arena _arena)
      Write a value in the field v_identifier.
      Parameters:
      vIdentifier - The new value for the field v_identifier
      _arena - to control the memory allocation scope
    • readVBinary

      public int readVBinary()
      Read the value of the field v_binary.
      Returns:
      The value of the field v_binary
    • writeVBinary

      public void writeVBinary(int vBinary)
      Write a value in the field v_binary.
      Parameters:
      vBinary - The new value for the field v_binary
    • readVOctal

      public int readVOctal()
      Read the value of the field v_octal.
      Returns:
      The value of the field v_octal
    • writeVOctal

      public void writeVOctal(int vOctal)
      Write a value in the field v_octal.
      Parameters:
      vOctal - The new value for the field v_octal
    • readVInt

      public int readVInt()
      Read the value of the field v_int.
      Returns:
      The value of the field v_int
    • writeVInt

      public void writeVInt(int vInt)
      Write a value in the field v_int.
      Parameters:
      vInt - The new value for the field v_int
    • readVInt64

      public long readVInt64()
      Read the value of the field v_int64.
      Returns:
      The value of the field v_int64
    • writeVInt64

      public void writeVInt64(long vInt64)
      Write a value in the field v_int64.
      Parameters:
      vInt64 - The new value for the field v_int64
    • readVFloat

      public double readVFloat()
      Read the value of the field v_float.
      Returns:
      The value of the field v_float
    • writeVFloat

      public void writeVFloat(double vFloat)
      Write a value in the field v_float.
      Parameters:
      vFloat - The new value for the field v_float
    • readVHex

      public int readVHex()
      Read the value of the field v_hex.
      Returns:
      The value of the field v_hex
    • writeVHex

      public void writeVHex(int vHex)
      Write a value in the field v_hex.
      Parameters:
      vHex - The new value for the field v_hex
    • readVString

      public String readVString()
      Read the value of the field v_string.
      Returns:
      The value of the field v_string
    • writeVString

      public void writeVString(String vString, Arena _arena)
      Write a value in the field v_string.
      Parameters:
      vString - The new value for the field v_string
      _arena - to control the memory allocation scope
    • readVComment

      public String readVComment()
      Read the value of the field v_comment.
      Returns:
      The value of the field v_comment
    • writeVComment

      public void writeVComment(String vComment, Arena _arena)
      Write a value in the field v_comment.
      Parameters:
      vComment - The new value for the field v_comment
      _arena - to control the memory allocation scope
    • readVChar

      public byte readVChar()
      Read the value of the field v_char.
      Returns:
      The value of the field v_char
    • writeVChar

      public void writeVChar(byte vChar)
      Write a value in the field v_char.
      Parameters:
      vChar - The new value for the field v_char
    • readVError

      public int readVError()
      Read the value of the field v_error.
      Returns:
      The value of the field v_error
    • writeVError

      public void writeVError(int vError)
      Write a value in the field v_error.
      Parameters:
      vError - The new value for the field v_error