Interface WordPointer
- All Superinterfaces:
org.graalvm.word.ComparableWord, org.graalvm.word.PointerBase, org.graalvm.word.WordBase
public interface WordPointer
extends org.graalvm.word.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 TypeMethodDescriptionaddressOf(int index) Computes the address of the array element with the specified index, treating the pointer as an array of the C type.addressOf(org.graalvm.word.SignedWord index) Computes the address of the array element with the specified index, treating the pointer as an array of the C type.<T extends org.graalvm.word.WordBase>
Tread()Reads the value at the pointer address.<T extends org.graalvm.word.WordBase>
Tread(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 org.graalvm.word.WordBase>
Tread(org.graalvm.word.SignedWord index) Reads the value of the array element with the specified index, treating the pointer as an array of the C type.voidwrite(int index, org.graalvm.word.WordBase value) Writes the value of the array element with the specified index, treating the pointer as an array of the C type.voidwrite(org.graalvm.word.SignedWord index, org.graalvm.word.WordBase value) Writes the value of the array element with the specified index, treating the pointer as an array of the C type.voidwrite(org.graalvm.word.WordBase value) Writes the value at the pointer address.Methods inherited from interface org.graalvm.word.ComparableWord
equal, notEqualMethods inherited from interface org.graalvm.word.PointerBase
isNonNull, isNullMethods inherited from interface org.graalvm.word.WordBase
equals, rawValue
-
Method Details
-
read
<T extends org.graalvm.word.WordBase> T read()Reads the value at the pointer address.- Since:
- 19.0
-
read
<T extends org.graalvm.word.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 org.graalvm.word.WordBase> T read(org.graalvm.word.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(org.graalvm.word.WordBase value) Writes the value at the pointer address.- Since:
- 19.0
-
write
void write(int index, org.graalvm.word.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(org.graalvm.word.SignedWord index, org.graalvm.word.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
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
Computes the address of the array element with the specified index, treating the pointer as an array of the C type.- Since:
- 19.0
-