Class VarInt
java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.harfbuzz.VarInt
- All Implemented Interfaces:
Proxy
-
Constructor Summary
ConstructorsConstructorDescriptionVarInt()Allocate a new VarInt.VarInt(int u32, int i32, short[] u16, short[] i16, byte[] u8, byte[] i8) Allocate a new VarInt with the fields set to the provided values.Allocate a new VarInt with the fields set to the provided values.Allocate a new VarInt.VarInt(MemorySegment address) Create a VarInt proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionstatic MemoryLayoutThe memory layout of the native struct.@Nullable short @Nullable []readI16()Read the value of the fieldi16.intreadI32()Read the value of the fieldi32.@Nullable byte @Nullable []readI8()Read the value of the fieldi8.@Nullable short @Nullable []readU16()Read the value of the fieldu16.intreadU32()Read the value of the fieldu32.@Nullable byte @Nullable []readU8()Read the value of the fieldu8.voidWrite a value in the fieldi16.voidwriteI32(int i32) Write a value in the fieldi32.voidWrite a value in the fieldi8.voidWrite a value in the fieldu16.voidwriteU32(int u32) Write a value in the fieldu32.voidWrite a value in the fieldu8.Methods inherited from class ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
VarInt
Create a VarInt proxy instance for the provided memory address.- Parameters:
address- the memory address of the native object
-
VarInt
Allocate a new VarInt.- Parameters:
arena- to control the memory allocation scope
-
VarInt
public VarInt()Allocate a new VarInt. The memory is allocated withArena.ofAuto(). -
VarInt
Allocate a new VarInt with the fields set to the provided values.- Parameters:
u32- value for the fieldu32i32- value for the fieldi32u16- value for the fieldu16i16- value for the fieldi16u8- value for the fieldu8i8- value for the fieldi8arena- to control the memory allocation scope
-
VarInt
public VarInt(int u32, int i32, short[] u16, short[] i16, byte[] u8, byte[] i8) Allocate a new VarInt with the fields set to the provided values. The memory is allocated withArena.ofAuto().- Parameters:
u32- value for the fieldu32i32- value for the fieldi32u16- value for the fieldu16i16- value for the fieldi16u8- value for the fieldu8i8- value for the fieldi8
-
-
Method Details
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readU32
public int readU32()Read the value of the fieldu32.- Returns:
- The value of the field
u32
-
writeU32
public void writeU32(int u32) Write a value in the fieldu32.- Parameters:
u32- The new value for the fieldu32
-
readI32
public int readI32()Read the value of the fieldi32.- Returns:
- The value of the field
i32
-
writeI32
public void writeI32(int i32) Write a value in the fieldi32.- Parameters:
i32- The new value for the fieldi32
-
readU16
public @Nullable short @Nullable [] readU16()Read the value of the fieldu16.- Returns:
- The value of the field
u16
-
writeU16
Write a value in the fieldu16.- Parameters:
u16- The new value for the fieldu16
-
readI16
public @Nullable short @Nullable [] readI16()Read the value of the fieldi16.- Returns:
- The value of the field
i16
-
writeI16
Write a value in the fieldi16.- Parameters:
i16- The new value for the fieldi16
-
readU8
public @Nullable byte @Nullable [] readU8()Read the value of the fieldu8.- Returns:
- The value of the field
u8
-
writeU8
Write a value in the fieldu8.- Parameters:
u8- The new value for the fieldu8
-
readI8
public @Nullable byte @Nullable [] readI8()Read the value of the fieldi8.- Returns:
- The value of the field
i8
-
writeI8
Write a value in the fieldi8.- Parameters:
i8- The new value for the fieldi8
-