java.lang.Object类结构解析

图形工具

java.lang.Object类结构解析_第1张图片
Object.class

工具:Classpy

相关代码

java.lang.Object类结构解析_第2张图片
debug
java.lang.Object类结构解析_第3张图片
watch

对比图形工具中的值,与value中的值一致

主要函数

instanceKlassHandle ClassFileParser::parseClassFile(Symbol* name,
                                                    Handle class_loader,
                                                    Handle protection_domain,
                                                    KlassHandle host_klass,
                                                    GrowableArray* cp_patches,
                                                    TempNewSymbol& parsed_name,
                                                    bool verify,
                                                    TRAPS) {

    // Constant pool
    constantPoolHandle cp = parse_constant_pool(class_loader, CHECK_(nullHandle));

    // Fields (offsets are filled in later)
    FieldAllocationCount fac;
    objArrayHandle fields_annotations;
    typeArrayHandle fields = parse_fields(class_name, cp, access_flags.is_interface(), &fac, &fields_annotations,
                                          &java_fields_count,
                                          CHECK_(nullHandle));

    // Methods
    objArrayHandle methods = parse_methods(cp, access_flags.is_interface(),
                                           &promoted_flags,
                                           &has_final_method,
                                           &methods_annotations_oop,
                                           &methods_parameter_annotations_oop,
                                           &methods_default_annotations_oop,
                                           CHECK_(nullHandle));
}

你可能感兴趣的:(java.lang.Object类结构解析)