methodId
fun JClass.methodId(name: CValuesRef<ByteVar>, sig: CValuesRef<ByteVar>): JMethodID?(source)
Returns the method ID for an instance (nonstatic) method of a class or interface. The method may be defined in one of the this@GetMethodID’s supertypes and inherited by this@GetMethodID. The method is determined by its name and signature.
methodId causes an uninitialized class to be initialized.
To get the method ID of a constructor, supply "<init>" as the method name and void (V) as the return type.
Return
a method ID, or null if the specified method cannot be found.
Parameters
@GetMethodID a Java class object.
the method name in the null-terminated modified UTF-8.
the method signaturein in the null-terminated modified UTF-8. Use String.modifiedUtf8 to get it, or if you are sure that your string doesn't have illegal characters you may use optimized String.utf8.
Throws
if the specified method cannot be found.
if the class initializer fails due to an exception.
if the system runs out of memory.
inline fun JClass.methodId(name: String, sig: String): JMethodID(source)
Alias for JClass.methodId which accepts the method name and sig as Kotlin Strings.
Throws instead of returning null if the method cannot be found.