class文件结构

模数
小版本
大版本
常量个数
多个常量
access_flag
this_class
super_class
interface_count
interface_infos
field_count
field_infos
method_count
method_infos
attribute_count
attribute_infos

field_info/method_info:
access_flag
name
descriptor
attribute_count
attribute_infos

attribute_info:
attribute_name
attribute_length
attribute_content

code_attribute:
name
length
max_stack
max_locals
code_length
code[]
exception_table_length
exception_info[]
attribute_count
attribute_infos

LineNumberTable_attribute:
name
length
LineNumberTable_length
LineNumberTable_info[]

lineNumberTable_info:
start_pc
line_number

LocalVariableTable_attribute:
name
length
LocalVariableTable_length
LocalVariableTable_info[]

LocalVariableTable_info:
start_pc
length
name
descriptor
index

exception_attribute:
name
length
exception_table_length
exception_info[]

你可能感兴趣的:(jvm,class文件结构)