method方法

class文件中的method的数据结构
       名称                              类型                   数量
1.    access_flags                       2B                     1
2.    name_index                         2B                     1
3.    descriptor_index                   2B                     1 
4.    attributes_count                   2B                     1
5.    attributes[attributes_count]       attribute_info         1 

method_info中的attribute_info 的数据结构:
     名称                           类型                   数量
1.   attribute_name_index            2B                     1
2.   attribute_length                4B                     1
3.   max_stack                       2B                     1 
4.   max_locals                      2B                     1
5.   code_length                     4B                     1
6.   code                            1B                     code_length
7.   exception_table_length          2B                     1
8.   exception_table                 exception_info         exception_table_length
9.   attribute_count                 2B                     1
10.  attributes                      attribute_info         attribute_count

(10) attribute_info的数据结构                 类型          数量
1.   attribute_name_index LineNumberTable     2B             1
2.   attribute_length                         4B             1
3.   line_number_table_length                 2B             1
4.   line_number_table_info                   2B             line_number_table_length

(104)line_number_table_info的数据结构
1.   start_pc                                 2B             1
2.   line_number                              2B             1


(30) exception_info的数据结构                 类型           数量
1.   start_pc                                 2B              1
2.   end_pc                                   2B              1
3.   handler_pc                               2B              1
4.   catch_type                               2B              1

(60)code
 javap -c ClassFileName  然后与指令集对照

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值