u2 constant_pool_count; cp_info constant_pool[constant_pool_count-1]; u2 access_flags; u2 this_class; u2 super_class; u2 interfaces_count; u2 interfaces[interfaces_count]; u2 fields_count; field_info fields[fields_count]; u2 methods_count; method_info methods[methods_count]; u2 attributes_count; attribute_info attributes[attributes_count]; } https://docs.oracle.com/javase/ specs/jvms/se21/html/jvms-4.html ← 時間の関係で、今日はここまで
James Gosling(Java の生みの親)が決めた • 0xCAFE で始まる16進数を探して、これがいい感じだったから https://en.wikipedia.org/wiki/Java_class_file#Magic_Number CA FE BA BE 00 00 00 41 00 26 0A 00 02 00 03 07 …
u2 constant_pool_count; cp_info constant_pool[constant_pool_count-1]; u2 access_flags; u2 this_class; u2 super_class; u2 interfaces_count; u2 interfaces[interfaces_count]; u2 fields_count; field_info fields[fields_count]; u2 methods_count; method_info methods[methods_count]; u2 attributes_count; attribute_info attributes[attributes_count]; } https://docs.oracle.com/javase/ specs/jvms/se21/html/jvms-4.html ← 次の説明