Version: 2019.2
public static IntPtr GetMethodID (IntPtr javaClass, string methodName);
public static IntPtr GetMethodID (IntPtr javaClass, string methodName, string signature);
public static IntPtr GetMethodID (IntPtr javaClass, string methodName, string signature, bool isStatic= false);

パラメーター

javaClassJava クラスオブジェクトの Raw JNI (AndroidJNI.FindClass を呼び出すことで取得します)
methodNameName of the method as declared in Java.
signatureMethod signature (e.g. obtained by calling AndroidJNIHelper.GetSignature).
isStatic trueであれば static メソッド、falseであれば(非 static)メソッド

説明

名前とシグネチャにマッチングするメソッドのための特定の Java クラスをスキャンします。

The signature comparison is done to allow sub-/base-classes of a class types. If no signature is provided the first method with the correct name will be returned.

関連項目: AndroidJNIHelper.GetSignatureAndroidJNIHelper.GetConstructorIDAndroidJNIHelper.GetFieldID.


public static IntPtr GetMethodID (IntPtr jclass, string methodName, object[] args, bool isStatic);

パラメーター

javaClassJava クラスオブジェクトの Raw JNI (AndroidJNI.FindClass を呼び出すことで取得します)
methodNameName of the method as declared in Java.
args実行されたときにコンストラクターに渡された引数の配列
isStatic trueであれば static メソッド、falseであれば(非 static)メソッド

説明

引数を呼び出すベースとなる JNI メソッド ID を取得します。

Generic parameter represents the method return type, and the regular method assumes 'void' return type. Scans a particular Java class for a method matching a signature based on passed arguments. The signature comparison is done to allow for sub-/base-classes of the class types.


public static IntPtr GetMethodID (IntPtr jclass, string methodName, object[] args, bool isStatic);

パラメーター

javaClassJava クラスオブジェクトの Raw JNI (AndroidJNI.FindClass を呼び出すことで取得します)
methodNameName of the method as declared in Java.
args実行されたときにコンストラクターに渡された引数の配列
isStatic trueであれば static メソッド、falseであれば(非 static)メソッド

説明

引数を呼び出すベースとなる JNI メソッド ID を取得します。

Generic parameter represents the method return type, and the regular method assumes 'void' return type. Scans a particular Java class for a method matching a signature based on passed arguments. The signature comparison is done to allow for sub-/base-classes of the class types.