Class PanamaTableType
java.lang.Object
ai.tegmentum.wasmtime4j.panama.type.PanamaTableType
- All Implemented Interfaces:
ai.tegmentum.wasmtime4j.type.TableType,ai.tegmentum.wasmtime4j.type.WasmType
Panama implementation of TableType interface.
This class provides type introspection capabilities for WebAssembly table types using Panama Foreign Function Interface bindings to the native Wasmtime library.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionPanamaTableType(ai.tegmentum.wasmtime4j.WasmValueType elementType, long minimum, Long maximum, boolean is64, Arena arena, MemorySegment nativeHandle) Creates a new PanamaTableType instance with 64-bit index support.PanamaTableType(ai.tegmentum.wasmtime4j.WasmValueType elementType, long minimum, Long maximum, Arena arena, MemorySegment nativeHandle) Creates a new PanamaTableType instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic PanamaTableTypefromNative(MemorySegment nativeHandle, Arena arena) Creates a PanamaTableType from native table type information.getArena()Gets the memory arena used by this table type.ai.tegmentum.wasmtime4j.WasmValueTypeai.tegmentum.wasmtime4j.type.WasmTypeKindgetKind()longGets the native handle for this table type.inthashCode()booleanis64Bit()static PanamaTableTypeCreates a PanamaTableType from type information without a native handle.toString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.tegmentum.wasmtime4j.type.TableType
getElement
-
Constructor Details
-
PanamaTableType
public PanamaTableType(ai.tegmentum.wasmtime4j.WasmValueType elementType, long minimum, Long maximum, Arena arena, MemorySegment nativeHandle) Creates a new PanamaTableType instance.- Parameters:
elementType- the element type stored in the tableminimum- the minimum number of elementsmaximum- the maximum number of elements (null if unlimited)arena- the memory arena for resource managementnativeHandle- the native handle to the table type
-
PanamaTableType
public PanamaTableType(ai.tegmentum.wasmtime4j.WasmValueType elementType, long minimum, Long maximum, boolean is64, Arena arena, MemorySegment nativeHandle) Creates a new PanamaTableType instance with 64-bit index support.- Parameters:
elementType- the element type stored in the tableminimum- the minimum number of elementsmaximum- the maximum number of elements (null if unlimited)is64- true if this table uses 64-bit indicesarena- the memory arena for resource managementnativeHandle- the native handle to the table type
-
-
Method Details
-
of
public static PanamaTableType of(ai.tegmentum.wasmtime4j.WasmValueType elementType, long minimum, Long maximum) Creates a PanamaTableType from type information without a native handle.This factory method is used when type information is parsed from JSON or other sources where a native handle is not available.
- Parameters:
elementType- the element type stored in the tableminimum- the minimum number of elementsmaximum- the maximum number of elements (null if unlimited)- Returns:
- the PanamaTableType instance
-
fromNative
Creates a PanamaTableType from native table type information.- Parameters:
nativeHandle- the native handle to the table typearena- the memory arena for resource management- Returns:
- the PanamaTableType instance
- Throws:
IllegalArgumentException- if nativeHandle is invalid
-
getElementType
public ai.tegmentum.wasmtime4j.WasmValueType getElementType()- Specified by:
getElementTypein interfaceai.tegmentum.wasmtime4j.type.TableType
-
getMinimum
public long getMinimum()- Specified by:
getMinimumin interfaceai.tegmentum.wasmtime4j.type.TableType
-
getMaximum
-
is64Bit
public boolean is64Bit()- Specified by:
is64Bitin interfaceai.tegmentum.wasmtime4j.type.TableType
-
getKind
public ai.tegmentum.wasmtime4j.type.WasmTypeKind getKind()- Specified by:
getKindin interfaceai.tegmentum.wasmtime4j.type.TableType- Specified by:
getKindin interfaceai.tegmentum.wasmtime4j.type.WasmType
-
getNativeHandle
Gets the native handle for this table type.- Returns:
- the native handle
-
getArena
-
equals
-
hashCode
-
toString
-