当前位置:网站首页>Detailed explanation of findloadedclass
Detailed explanation of findloadedclass
2022-07-03 05:55:00 【Sloppy wandering swordsman】
problem
AClassLoader Of parent by BClassLoader,BClassLoader Of parent by CClassLoader, When AClassLoader call loadClass() Load class , And finally by CClassLoader Loaded classes , Who loaded it ? follow-up AClassLoader When loading the same class again , Whether it can be directly from AClassLoader Of findLoadedClass0() Find the class in and return , Or is it another parental assignment, and finally from CClassLoader Of findLoadedClass0() Find the class in and return ?
SystemDictonary
JVM There's a data structure called SystemDictonary, This structure is mainly used to retrieve the class information we often say , In fact, it is private native final Class<?> findLoadedClass0(String name) The logic of the method
The corresponding structure of these class information is klass, Yes SystemDictonary The understanding of the , You can think of it as a Hashtable
key It's a class loader object + The name of the class ,value It's pointing klass The address of
When any of our class loaders loads classes normally , It's going to come to this SystemDictonary To find the , See if there's one like this klass Can return , If there is, go back to it , Otherwise, it will create a new one and put it into the structure
Initial classloader / Define class loader
In the above class loading problem ,AClassLoader When loading a class, it will delegate to BClassLoader To load the ,BClassLoader When loading a class, it will delegate to CClassLoader To load the , When AClassLoader call loadClass() Load class , And finally by CClassLoader load , Then we call CClassLoader For this class Define class loader ,AClassLoader and BClassLoader For this class Initial classloader
In the process ,AClassLoader、BClassLoader and CClassLoader Will be in SystemDictonary Generate records
Then follow up C The child loader of (AClassLoader and BClassLoader) When loading the same class , You can be in findLoadedClass0() Found this class in , There is no need to entrust upward
边栏推荐
- Life is a process of continuous learning
- 1. 两数之和
- ansible防火墙firewalld设置
- MySQL startup error: several solutions to the server quit without updating PID file
- [teacher Zhao Yuqiang] kubernetes' probe
- JS implements the problem of closing the current child window and refreshing the parent window
- [teacher Zhao Yuqiang] MySQL flashback
- Crontab command usage
- Understand one-way hash function
- NG Textarea-auto-resize
猜你喜欢
![[teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb](/img/cc/5509b62756dddc6e5d4facbc6a7c5f.jpg)
[teacher Zhao Yuqiang] calculate aggregation using MapReduce in mongodb

Maximum likelihood estimation, divergence, cross entropy

Today, many CTOs were killed because they didn't achieve business
![[branch and cycle] | | super long detailed explanation + code analysis + a trick game](/img/aa/543d4f0dcbcd664be963579af77ec9.jpg)
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
![[teacher Zhao Yuqiang] redis's slow query log](/img/a7/2140744ebad9f1dc0a609254cc618e.jpg)
[teacher Zhao Yuqiang] redis's slow query log

pytorch DataLoader实现miniBatch(未完成)

Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)

中职网络子网划分例题解析

JDBC connection database steps

Understand the first prediction stage of yolov1
随机推荐
[teacher Zhao Yuqiang] use Oracle's tracking file
为什么网站打开速度慢?
2022.7.2day594
[function explanation (Part 1)] | | knowledge sorting + code analysis + graphic interpretation
【一起上水硕系列】Day 7 内容+Day8
Altaro requirements for starting from backup on Hyper-V
Capacity expansion mechanism of map
Yum is too slow to bear? That's because you didn't do it
中职网络子网划分例题解析
2022.6.30DAY591
Complete set of C language file operation functions (super detailed)
1. 两数之和
Loss function in pytorch multi classification
[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history
How to use source insight
[teacher Zhao Yuqiang] Flink's dataset operator
Code generator - single table query crud - generator
[set theory] relational closure (relational closure related theorem)
88. Merge two ordered arrays
How to set up altaro offsite server for replication