GetMethodID,Call<type>Method(), Call<type>MethodA(), Call<type>MethodV(),CallNonvirtual<type>Method(), CallNonvirtual<type>MethodA(), CallNonvirtual<type>MethodV(),GetStaticMethodID,CallStatic<type>Method(), CallStatic<type>MethodA(), CallStatic<type>MethodV()JNI では 型やstaticか否かでメソッド呼び出し用の関数が複数種類用意されている. ただし, どの場合も最終的には JavaCalls::call() に行き着く模様.
処理用の関数のうち返値が void でないものについては, 以下のマクロを用いて定義されている. (返値が void のものについてだけは, マクロを使わずに単体で定義されている)
| Function | Macro |
|---|---|
| dynamic dispatch を伴うインスタンスメソッド呼び出し | DEFINE_CALLMETHOD() マクロ |
| dynamic dispatch を伴わないインスタンスメソッド呼び出し | DEFINE_CALLNONVIRTUALMETHOD() マクロ |
| staic メソッド呼び出し | DEFINE_CALLSTATICMETHOD() マクロ |
jni_GetMethodID() -> get_method_id() -> instanceKlass::get_jmethod_id()
jni_GetStaticMethodID() -> get_method_id() -> (同上)
DEFINE_CALLMETHOD() マクロ or jni_CallVoidMethod{,A,V}()
-> jni_invoke_nonstatic()
-> JavaCalls::call()
-> (See: here for details)
DEFINE_CALLNONVIRTUALMETHOD() マクロ or jni_CallNonvirtualVoidMethod{,A,V}()
-> jni_invoke_nonstatic()
-> (同上)
DEFINE_CALLSTATICMETHOD() マクロ or jni_CallStaticVoidMethod{,A,V}()
-> jni_invoke_static()
-> JavaCalls::call()
-> (See: here for details)
See: here for details
See: here for details
(#Under Construction)
See: here for details
(#Under Construction) See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
(#Under Construction)
(#Under Construction)
(#Under Construction)
See: here for details
(#Under Construction) See: here for details
See: here for details
See: here for details
See: here for details
(#Under Construction) See: here for details
See: here for details
See: here for details
See: here for details
See: here for details
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.