Class PanamaGlobal
java.lang.Object
ai.tegmentum.wasmtime4j.panama.PanamaGlobal
- All Implemented Interfaces:
ai.tegmentum.wasmtime4j.WasmGlobal,AutoCloseable
public final class PanamaGlobal
extends Object
implements ai.tegmentum.wasmtime4j.WasmGlobal, AutoCloseable
Panama FFI implementation of WebAssembly Global with native handle support.
- Since:
- 1.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionPanamaGlobal(ai.tegmentum.wasmtime4j.WasmValueType type, boolean mutable, ai.tegmentum.wasmtime4j.WasmValue initialValue, PanamaStore store) Creates a new Panama global with a native handle. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()ai.tegmentum.wasmtime4j.WasmValueget()ai.tegmentum.wasmtime4j.type.GlobalTypeGets the native global pointer.ai.tegmentum.wasmtime4j.WasmValueTypegetType()booleanisClosed()Checks if the global has been closed.booleanvoidset(ai.tegmentum.wasmtime4j.WasmValue value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.tegmentum.wasmtime4j.WasmGlobal
getValue
-
Constructor Details
-
PanamaGlobal
public PanamaGlobal(ai.tegmentum.wasmtime4j.WasmValueType type, boolean mutable, ai.tegmentum.wasmtime4j.WasmValue initialValue, PanamaStore store) Creates a new Panama global with a native handle.- Parameters:
type- the value type of this globalmutable- whether this global is mutableinitialValue- the initial valuestore- the store context
-
-
Method Details
-
get
public ai.tegmentum.wasmtime4j.WasmValue get()- Specified by:
getin interfaceai.tegmentum.wasmtime4j.WasmGlobal
-
set
public void set(ai.tegmentum.wasmtime4j.WasmValue value) - Specified by:
setin interfaceai.tegmentum.wasmtime4j.WasmGlobal
-
getType
public ai.tegmentum.wasmtime4j.WasmValueType getType()- Specified by:
getTypein interfaceai.tegmentum.wasmtime4j.WasmGlobal
-
isMutable
public boolean isMutable()- Specified by:
isMutablein interfaceai.tegmentum.wasmtime4j.WasmGlobal
-
getGlobalType
public ai.tegmentum.wasmtime4j.type.GlobalType getGlobalType()- Specified by:
getGlobalTypein interfaceai.tegmentum.wasmtime4j.WasmGlobal
-
getNativeGlobal
Gets the native global pointer.- Returns:
- native global memory segment
-
isClosed
public boolean isClosed()Checks if the global has been closed.- Returns:
- true if closed, false otherwise
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-