objectField

Returns a ReadWriteProperty for Object field of the object with the specified fieldId.


context(env: JniEnv, autofreeScope: AutofreeScope)
inline fun JObject.objectField(name: CValuesRef<ByteVar>, sig: CValuesRef<ByteVar>): ReadWriteProperty<Any?, JObject?>?(source)

Returns a ReadWriteProperty for Object field of the object with the specified name and sig.

Return

a delegatable property of JObject? type or null if the specified field was not found.

Parameters

name

the static field name in the null-terminated modified UTF-8.

sig

the field signature in the null-terminated modified UTF-8. Use io.github.mimimishkin.jni.binding.modifiedUtf8 to get it, or if you are sure that your string doesn't have illegal characters you may use optimized String.utf8.

Throws

NoSuchFieldError

if the specified field cannot be found.

ExceptionInInitializerError

if the class initializer fails due to an exception.

if the system runs out of memory.


context(env: JniEnv, autofreeScope: AutofreeScope)
inline fun JObject.objectField(name: String, sig: String): ReadWriteProperty<Any?, JObject?>(source)

Returns a ReadWriteProperty for Object field of the object with the specified name and sig.

Return

a delegatable property of JObject? type.

Parameters

name

the static field name.

sig

the field signature.

Throws

NoSuchFieldError

if the specified field cannot be found.

ExceptionInInitializerError

if the class initializer fails due to an exception.

if the system runs out of memory.