Class PanamaValidation
java.lang.Object
ai.tegmentum.wasmtime4j.panama.util.PanamaValidation
Panama-specific validation methods that extend the base
Validation utility.
This class contains only validation methods that require Panama Foreign Function API types
(e.g., MemorySegment). For all other validation needs, use Validation directly.
- Since:
- 1.0.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidrequireValidHandle(MemorySegment handle, String handleName) Validates that a native memory segment handle is valid (not null and notMemorySegment.NULL).
-
Method Details
-
requireValidHandle
Validates that a native memory segment handle is valid (not null and notMemorySegment.NULL).- Parameters:
handle- the memory segment handle to validatehandleName- the handle name for error messages- Throws:
IllegalArgumentException- if the handle is null or equalsMemorySegment.NULL
-