Implement this interface to add support for handling new native types. Adding
Mapped(MyMapper.class)to a native method or one of its argument, respectively, will tell NatJ to use the mapper implementation whenever it has to convert the return or argument value between Java and native side. When converting to Java NatJ will use the implementation’s
toJava(long, JavaObjectConstructionInfo)method to convert native value to a Java one. Reasonably, the
toNative(Object, NativeObjectConstructionInfo)method will be used for the other direction.
NativeObjectConstructionInfo.datafields are not used by NatJ and free to use for anything.