当前位置:网站首页>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
边栏推荐
- Source insight operation manual installation trial
- redis 无法远程连接问题。
- Using the ethtool command by example
- Why is the website slow to open?
- There is no one of the necessary magic skills PXE for old drivers to install!!!
- 理解 期望(均值/估计值)和方差
- Final review (Day7)
- Installation of CAD plug-ins and automatic loading of DLL and ARX
- EMD distance - example of use
- CAD插件的安装和自动加载dll、arx
猜你喜欢
![[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history](/img/18/f91d3d21a39743231d01f2e4015ef8.jpg)
[teacher Zhao Yuqiang] the most detailed introduction to PostgreSQL architecture in history
![Together, Shangshui Shuo series] day 9](/img/39/c1ba1bac82b0ed110f36423263ffd0.png)
Together, Shangshui Shuo series] day 9

QT read write excel -- qxlsx insert chart 5

Apache+PHP+MySQL环境搭建超详细!!!

Understand the first prediction stage of yolov1
![[written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis](/img/c6/8847218fa43c87e3eb51c021961eb7.jpg)
[written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis

JDBC connection database steps

Redhat7 system root user password cracking

Solve the 1251 client does not support authentication protocol error of Navicat for MySQL connection MySQL 8.0.11

Error 1045 (28000) occurs when Linux logs in MySQL: access denied for user 'root' @ 'localhost' (using password: yes)
随机推荐
Redis encountered noauth authentication required
Complete set of C language file operation functions (super detailed)
Communication - how to be a good listener?
【无标题】
Redhat7 system root user password cracking
伯努利分布,二项分布和泊松分布以及最大似然之间的关系(未完成)
[explain in depth the creation and destruction of function stack frames] | detailed analysis + graphic analysis
Final review (day3)
[branch and cycle] | | super long detailed explanation + code analysis + a trick game
[teacher Zhao Yuqiang] kubernetes' probe
一起上水硕系列】Day 9
期末复习(DAY6)
Mapbox tasting value cloud animation
[teacher Zhao Yuqiang] index in mongodb (Part 2)
Personal outlook | looking forward to the future from Xiaobai's self analysis and future planning
Final review (Day7)
1. Sum of two numbers
MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
[video of Teacher Zhao Yuqiang's speech on wot] redis high performance cache and persistence
CAD插件的安裝和自動加載dll、arx