Class PanamaTable
java.lang.Object
ai.tegmentum.wasmtime4j.panama.PanamaTable
- All Implemented Interfaces:
ai.tegmentum.wasmtime4j.WasmTable
Panama FFI implementation of WebAssembly Table.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the table and releases resources.voidcopy(int dst, int src, int count) voidcopy(int dst, ai.tegmentum.wasmtime4j.WasmTable src, int srcIndex, int count) voidcopy(long dstIndex, ai.tegmentum.wasmtime4j.WasmTable srcTable, long srcIndex, long length) Copies elements from another table to this table.voiddropElementSegment(int elementSegmentIndex) voidvoidFills a region of this table with the specified value.get(int index) ai.tegmentum.wasmtime4j.WasmValueTypeintGets the native table pointer.intgetSize()ai.tegmentum.wasmtime4j.type.TableTypeai.tegmentum.wasmtime4j.WasmValueTypegetType()intintvoidinit(int destIndex, int elementSegmentIndex, int srcIndex, int count) voidbooleanMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.tegmentum.wasmtime4j.WasmTable
copy64, fill64, get64, getSize64, grow64, init64, set64, size
-
Method Details
-
getSize
public int getSize()- Specified by:
getSizein interfaceai.tegmentum.wasmtime4j.WasmTable
-
getType
public ai.tegmentum.wasmtime4j.WasmValueType getType()- Specified by:
getTypein interfaceai.tegmentum.wasmtime4j.WasmTable
-
getTableType
public ai.tegmentum.wasmtime4j.type.TableType getTableType()- Specified by:
getTableTypein interfaceai.tegmentum.wasmtime4j.WasmTable
-
grow
- Specified by:
growin interfaceai.tegmentum.wasmtime4j.WasmTable
-
getMaxSize
public int getMaxSize()- Specified by:
getMaxSizein interfaceai.tegmentum.wasmtime4j.WasmTable
-
get
- Specified by:
getin interfaceai.tegmentum.wasmtime4j.WasmTable
-
set
- Specified by:
setin interfaceai.tegmentum.wasmtime4j.WasmTable
-
getElementType
public ai.tegmentum.wasmtime4j.WasmValueType getElementType()- Specified by:
getElementTypein interfaceai.tegmentum.wasmtime4j.WasmTable
-
fill
- Specified by:
fillin interfaceai.tegmentum.wasmtime4j.WasmTable
-
fill
public void fill(long dstIndex, Object value, long length) throws ai.tegmentum.wasmtime4j.exception.WasmException Fills a region of this table with the specified value.- Parameters:
dstIndex- the starting index in this tablevalue- the value to fill withlength- the number of elements to fill- Throws:
ai.tegmentum.wasmtime4j.exception.WasmException- if the operation fails or indices are out of bounds
-
copy
public void copy(int dst, int src, int count) - Specified by:
copyin interfaceai.tegmentum.wasmtime4j.WasmTable
-
copy
public void copy(int dst, ai.tegmentum.wasmtime4j.WasmTable src, int srcIndex, int count) - Specified by:
copyin interfaceai.tegmentum.wasmtime4j.WasmTable
-
copy
public void copy(long dstIndex, ai.tegmentum.wasmtime4j.WasmTable srcTable, long srcIndex, long length) throws ai.tegmentum.wasmtime4j.exception.WasmException Copies elements from another table to this table.- Parameters:
dstIndex- the starting index in this tablesrcTable- the source table to copy fromsrcIndex- the starting index in the source tablelength- the number of elements to copy- Throws:
ai.tegmentum.wasmtime4j.exception.WasmException- if the operation fails or indices are out of bounds
-
init
public void init(int destIndex, int elementSegmentIndex, int srcIndex, int count) - Specified by:
initin interfaceai.tegmentum.wasmtime4j.WasmTable
-
dropElementSegment
public void dropElementSegment(int elementSegmentIndex) - Specified by:
dropElementSegmentin interfaceai.tegmentum.wasmtime4j.WasmTable
-
close
public void close()Closes the table and releases resources. -
getNativeTable
-
growAsync
public int growAsync(int elements, Object initValue) throws ai.tegmentum.wasmtime4j.exception.WasmException - Specified by:
growAsyncin interfaceai.tegmentum.wasmtime4j.WasmTable- Throws:
ai.tegmentum.wasmtime4j.exception.WasmException
-
supports64BitAddressing
public boolean supports64BitAddressing()- Specified by:
supports64BitAddressingin interfaceai.tegmentum.wasmtime4j.WasmTable
-