native icon indicating copy to clipboard operation
native copied to clipboard

Object utility methods

Open mahesh-hegde opened this issue 1 year ago • 1 comments

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.
  • [ ] IsSameObject - should we overload == to call IsSameObject 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.

mahesh-hegde avatar Apr 30 '23 03:04 mahesh-hegde