---00 07:name_index=#7----->#7 = Utf8 <init>,可以看出该方法为构造函数
---00 08:descriptor_index=#8------>#8 = Utf8 ()V
---00 01:attributes_count=1,所以紧随其后就是attribute_info部分,根据官方文档,其结构如下:
Code_attribute { u2 attribute_name_index; u4 attribute_length; u2 max_stack; u2 max_locals; u4 code_length; u1 code[code_length]; u2 exception_table_length; { u2 start_pc; u2 end_pc; u2 handler_pc; u2 catch_type; } exception_table[exception_table_length]; u2 attributes_count; attribute_info attributes[attributes_count]; }
00 09 00 00 00 1D 00 01 00 01 00 00 00 05 //非指令部分
---00 09:attribute_name_index=#9---------->#9 = Utf8 Code
---00 00 00 1D:attribute_length=29,所以整个属性表的长度为29+6=35,见官方文档说明:The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
---00 01:max_stack=1
---00 01:max_locals=1
---00 00 00 05:code_length=5
紧接着就是方法1的指令部分:
2A B7 00 01 B1
---2A:aload_0 ,
---B7 00 01 ->invokespecial #1,调用超类构造方法
---B1--->return
方法1的Exception:
00 00:方法没有throw异常
方法1的attribute count:
00 01://方法1最后有一个属性块,其结构如下:
LineNumberTable_attribute { u2 attribute_name_index; u4 attribute_length; u2 line_number_table_length; { u2 start_pc; u2 line_number; } line_number_table[line_number_table_length]; }