Interface WordPointer

All Superinterfaces:
ComparableWord, PointerBase, WordBase

public interface WordPointer extends PointerBase
A untyped C pointer to any machine-word-sized value, e.g., a pointer to another pointer or a pointer to a UnsignedWord or SignedWord value.
Since:
19.0
  • Method Summary

    Modifier and Type
    Method
    Description
    addressOf(int index)
    Computes the address of the array element with the specified index, treating the pointer as an array of the C type.
    Computes the address of the array element with the specified index, treating the pointer as an array of the C type.
    <T extends WordBase>
    T
    Reads the value at the pointer address.
    <T extends WordBase>
    T
    read(int index)
    Reads the value of the array element with the specified index, treating the pointer as an array of the C type.
    <T extends WordBase>
    T
    Reads the value of the array element with the specified index, treating the pointer as an array of the C type.
    void
    write(int index, WordBase value)
    Writes the value of the array element with the specified index, treating the pointer as an array of the C type.
    void
    write(SignedWord index, WordBase value)
    Writes the value of the array element with the specified index, treating the pointer as an array of the C type.
    void
    write(WordBase value)
    Writes the value at the pointer address.

    Methods inherited from interface org.graalvm.word.ComparableWord

    equal, notEqual

    Methods inherited from interface org.graalvm.word.PointerBase

    isNonNull, isNull

    Methods inherited from interface org.graalvm.word.WordBase

    equals, rawValue
  • Method Details

    • read

      <T extends WordBase> T read()
      Reads the value at the pointer address.
      Since:
      19.0
    • read

      <T extends WordBase> T read(int index)
      Reads the value of the array element with the specified index, treating the pointer as an array of the C type.
      Since:
      19.0
    • read

      <T extends WordBase> T read(SignedWord index)
      Reads the value of the array element with the specified index, treating the pointer as an array of the C type.
      Since:
      19.0
    • write

      void write(WordBase value)
      Writes the value at the pointer address.
      Since:
      19.0
    • write

      void write(int index, WordBase value)
      Writes the value of the array element with the specified index, treating the pointer as an array of the C type.
      Since:
      19.0
    • write

      void write(SignedWord index, WordBase value)
      Writes the value of the array element with the specified index, treating the pointer as an array of the C type.
      Since:
      19.0
    • addressOf

      WordPointer addressOf(int index)
      Computes the address of the array element with the specified index, treating the pointer as an array of the C type.
      Since:
      19.0
    • addressOf

      WordPointer addressOf(SignedWord index)
      Computes the address of the array element with the specified index, treating the pointer as an array of the C type.
      Since:
      19.0