native
native copied to clipboard
Object utility methods
JNI API provides few useful methods related to class and objects equality. It would be nice to have higher-level wrappers for them working on JObject
subclasses.
-
[ ] #1033
- Alternative:
obj.isInstanceOf(ClassName.type)
- Implementation: use
isInstanceOf
from JNI.
- Alternative:
-
[ ]
IsSameObject
- should we overload==
to callIsSameObject
from JNI? (Different ref values can point to same object). -
[ ] Get class name
- This is a bit complicated, first we get
jclass
and call some methods on it: https://stackoverflow.com/questions/9265457/class-name-from-jclass-in-jni - Alternatively we can rely on dart-lang/native#711 and include
Class<T>
type.
- This is a bit complicated, first we get