Breaking Change (#981):
JObject.reference
now returns a JReference
instead of Pointer<Void>
.
.fromRef
constructors are now called .fromReference
and they take a JReference
instead of Pointer<Void>
.
JObject
reflective field retrieving and method calling methods are removed. Use JClass
API instead.
The following Jni.accessors
methods have been removed:
getClassOf
getMethodIDOf
getStaticMethodIDOf
getFieldIDOf
getStaticFieldIDOf
newObjectWithArgs
callMethodWithArgs
callStaticMethodWithArgs
Instead use the JClass
API.
Jni.findJClass
is replaced with JClass.forName(String name)
JClass
has been refactored. Instead of directly calling methods, getting and setting fields, use JClass.instanceMethodId
, JClass.staticMethodId
, JClass.constructorId
, JClass.instanceFieldId
, and JClass.staticFieldId
to first get access to the member.
Renamed JObject.getClass()
to JObject.jClass
.
Removed Jni.deleteAllRefs
.
Breaking Change (#548): Converted various Exception
s into Error
s:
UseAfterReleaseException
-> UseAfterReleaseError
DoubleReleaseException
-> DoubleReleaseError
SpawnException
-> JniError
(It's now a sealed class
)JNullException
-> JNullError
InvalidCallTypeException
-> InvalidCallTypeError
HelperNotFoundException
-> HelperNotFoundError
JvmExistsException
-> JniVmExistsError
NoJvmInstanceException
-> NoJvmInstanceError
Breaking Change: Removed InvalidJStringException
.
Breaking Change: JType
is now sealed
.
Breaking Change: Primitive types and their type classes are now final
.
Breaking Change: JArray.filled
now uses the generated type class of the fill
object and not its Java runtime type.
JObject
s now check the types using instanceof
in debug mode when using castTo
.
get(Static)MethodID
and get(Static)FieldID
could access null and throw.JBuffer
and JByteBuffer
classes as default classes for java.nio.Buffer
and java.nio.ByteBuffer
respectively.final
.addAll
, removeAll
and retainAll
in JSet
would run their respective operation twice.JList.insertAll
would not throw the potentially thrown Java exception.delete*
to release*
.PortProxy
and related methods used for interface implementation.java.lang.Character
.jint
, jshort
, ...java.util.Set
, java.util.Map
, java.util.List
and the numeric types like java.lang.Integer
, java.lang.Boolean
, ... are now included in package:jni
.superCount
and superType
getters used for type inference.PortContinuation
used for suspend fun
in Kotlin.dartjni
now depends on dart_api_dl.h
..clang-format
to pub.JniX
turned into JX
for a more terse code.