Interface Mapper
- All Known Implementing Classes:
ByteArrayMapper,ByteMapper,CallbackMapper,CharArrayMapper,CharMapper,DoubleArrayMapper,DoubleMapper,FloatArrayMapper,FloatMapper,IntArrayMapper,IntMapper,LongArrayMapper,LongMapper,ShortArrayMapper,ShortMapper,StringMapper,StructMapper
public interface Mapper
类型的映射 允许外部函数修改其值
如果仅用来读取 请考虑直接使用基本类型
因为目前 java 的基本类型无法用于泛型 所以 fromMemorySegment 返回 Object
- Version:
- 0.0.1
- Author:
- scx567888
-
Method Summary
Modifier and TypeMethodDescriptionvoidfromMemorySegment(MemorySegment memorySegment) 从 MemorySegment (内存段) 设置值toMemorySegment(Arena arena) 将内部数据转换为 MemorySegment (内存段)
-
Method Details
-
toMemorySegment
将内部数据转换为 MemorySegment (内存段)- Parameters:
arena- 作用域- Returns:
- MemorySegment
-
fromMemorySegment
从 MemorySegment (内存段) 设置值- Parameters:
memorySegment- a
-