File tree Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Expand file tree Collapse file tree 1 file changed +32
-3
lines changed Original file line number Diff line number Diff line change
1
+ <!-- TOC -->
2
+
3
+ - [ 类文件结构] ( #类文件结构 )
4
+ - [ 一 概述] ( #一-概述 )
5
+ - [ 二 Class 文件结构总结] ( #二-class-文件结构总结 )
6
+ - [ 2.1 魔数] ( #21-魔数 )
7
+ - [ 2.2 Class 文件版本] ( #22-class-文件版本 )
8
+ - [ 2.3 常量池] ( #23-常量池 )
9
+ - [ 2.4 访问标志] ( #24-访问标志 )
10
+ - [ 2.5 当前类索引,父类索引与接口索引集合] ( #25-当前类索引父类索引与接口索引集合 )
11
+ - [ 2.6 字段表集合] ( #26-字段表集合 )
12
+ - [ 2.7 方法表集合] ( #27-方法表集合 )
13
+ - [ 2.8 属性表集合] ( #28-属性表集合 )
14
+ - [ 参考] ( #参考 )
15
+
16
+ <!-- /TOC -->
17
+
18
+ > 公众号JavaGuide 后台回复关键字“1”,免费获取Java工程师必备学习资源。
19
+
1
20
# 类文件结构
2
21
3
22
## 一 概述
@@ -157,7 +176,7 @@ public class Employee {
157
176
158
177
![ ] (http://pqrlmrv7w.bkt.clouddn.com/img/2019-4/字段的 access_flags 的取值.png)
159
178
160
- ### 方法表集合
179
+ ### 2.7 方法表集合
161
180
162
181
``` java
163
182
u2 methods_count;// Class 文件的方法的数量
@@ -178,7 +197,7 @@ Class 文件存储格式中对方法的描述与对字段的描述几乎采用
178
197
179
198
注意:因为` volatile ` 修饰符和` transient ` 修饰符不可以修饰方法,所以方法表的访问标志中没有这两个对应的标志,但是增加了` synchronized ` 、` native ` 、` abstract ` 等关键字修饰方法,所以也就多了这些关键字对应的标志。
180
199
181
- ### 属性表集合
200
+ ### 2.8 属性表集合
182
201
183
202
``` java
184
203
u2 attributes_count;// 此类的属性表中的属性数
@@ -192,4 +211,14 @@ Class 文件存储格式中对方法的描述与对字段的描述几乎采用
192
211
- < https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html >
193
212
- < https://coolshell.cn/articles/9229.html >
194
213
- < https://blog.csdn.net/luanlouis/article/details/39960815 >
195
- - 《实战 Java 虚拟机》
214
+ - 《实战 Java 虚拟机》
215
+
216
+ ### 公众号
217
+
218
+ 如果大家想要实时关注我更新的文章以及分享的干货的话,可以关注我的公众号。
219
+
220
+ ** 《Java面试突击》:** 由本文档衍生的专为面试而生的《Java面试突击》V2.0 PDF 版本[ 公众号] ( #公众号 ) 后台回复 ** "Java面试突击"** 即可免费领取!
221
+
222
+ ** Java工程师必备学习资源:** 一些Java工程师常用学习资源[ 公众号] ( #公众号 ) 后台回复关键字 ** “1”** 即可免费无套路获取。
223
+
224
+ ![ 我的公众号] ( https://user-gold-cdn.xitu.io/2018/11/28/167598cd2e17b8ec?w=258&h=258&f=jpeg&s=27334 )
You can’t perform that action at this time.
0 commit comments