callNonvirtualObjectMethod
fun JObject.callNonvirtualObjectMethod(clazz: JClass, methodId: JMethodID, args: JArguments): JObject?(source)
Invokes an instance (nonstatic) method on a Java object, according to the specified class and method ID. The methodId argument must be obtained by calling methodId on the class clazz.
Unlike callObjectMethod which invokes the method based on the class or interface of the object, this method invokes the method based on the class, designated by the clazz parameter, from which the method ID is obtained.
The method ID must be obtained from the real class of the object or from one of its supertypes.
callNonvirtual<type>Method routines are the mechanism for invoking "default interface methods" introduced in Java
You should use this function only if the Java method you are calling returns Object values.
Return
the result of calling the Java method.
Throws
Exceptions raised during the execution of the Java method.