<Ways to guarantee a JNI type has some property va...
# forum
r
Ways to guarantee a JNI type has some property value Our codebase’s C++ library provides an image type Sf3dImage( val type: Sf3dImageType, val width: Int, val height: Int, val buffer: ByteArray, ) Sf3DImageType is an enum with a variety of values, Greyscale, RGB, RGBA etc. I’d like to provide some guarantee that a passed parameter has the expected type. i.e. instead of: fun processImage(sf3d: Sf3dImage) Some kind of annotation that can check if the passed parameter has the required image type, similar to how i image @StringRes...