クラスのリンク処理は以下の契機で開始される.
(初期化前にはリンクされている必要があるため, 念のため常にリンク処理が呼び出される)
その他
(develop オプションである EagerInitialization が true になっている場合にのみ実行 (デフォルト false))
(HotSpot の起動時処理) (See: here for details) -> Threads::create_vm() -> init_globals() -> universe_post_init() -> instanceKlass::link_class() -> (See: here for details) -> instanceKlass::link_class_or_fail() -> instanceKlass::link_class_impl() -> (See: here for details)
(See: here for details) -> instanceKlass::initialize() -> instanceKlass::initialize_impl() -> instanceKlass::link_class() -> (See: here for details)
(See: here for details) -> JVM_GetClassDeclaredFields() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> JVM_GetClassDeclaredMethods() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> JVM_GetClassDeclaredConstructors() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> Reflection::reflect_field() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> Reflection::reflect_fields() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> Reflection::reflect_method() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> Reflection::reflect_methods() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> Reflection::reflect_constructor() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> Reflection::reflect_constructors() -> instanceKlass::link_class() -> (See: here for details)
(See: here for details) -> VM_RedefineClasses::load_new_class_versions() -> instanceKlass::link_class() -> (See: here for details)
MethodHandles::resolve_MemberName() -> instanceKlass::link_class() -> (See: here for details) MethodHandles::init_DirectMethodHandle() -> instanceKlass::link_class() -> (See: here for details)
(See: here for details) -> GenCollectedHeap::preload_and_dump() -> instanceKlass::link_class() -> (See: here for details) (See: here for details) -> LinkClassesClosure::do_object() -> instanceKlass::link_class() -> (See: here for details)
(See: here for details) -> instanceKlass::eager_initialize() -> instanceKlass::eager_initialize_impl() @ hotspot/src/share/vm/oops/instanceKlass.cpp -> instanceKlass::link_class_impl() -> (See: here for details)
This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.