AllocObject
,NewObject
,NewObjectV
,NewObjectA
,どの関数も, 基本的には instanceKlass::allocate_instance() でメモリを確保し, JNIHandles::make_local() で JNI Handle 化した後, jni_invoke_nonstatic() でコンストラクタを呼び出すだけ.
AllocObject() の場合はコンストラクタ呼び出しはない. これは JNI の仕様に沿った挙動.
jni_AllocObject() -> alloc_object() -> instanceKlass::check_valid_for_instantiation() -> instanceKlass::allocate_instance() -> (See: here for details) -> JNIHandles::make_local() -> (See: here for details)
jni_NewObject() -> alloc_object() -> (同上) -> JNIHandles::make_local() -> (See: here for details) -> jni_invoke_nonstatic() -> (See: here for details) -> (指定されたコンストラクタメソッド)
jni_NewObjectV() -> alloc_object() -> (同上) -> JNIHandles::make_local() -> (See: here for details) -> jni_invoke_nonstatic() -> (See: here for details) -> (指定されたコンストラクタメソッド)
jni_NewObjectA() -> alloc_object() -> (同上) -> JNIHandles::make_local() -> (See: here for details) -> jni_invoke_nonstatic() -> (See: here for details) -> (指定されたコンストラクタメソッド)
See: here for details
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.