当前位置:网站首页>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
边栏推荐
- "C and pointer" - Chapter 13 function pointer 1: callback function 2 (combined with template to simplify code)
- MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)
- Txt document download save as solution
- JDBC connection database steps
- [escape character] [full of dry goods] super detailed explanation + code illustration!
- [written examination question analysis] | | get [sizeof and strlen] [pointer and array] graphic explanation + code analysis
- Sophomore dilemma (resumption)
- 期末复习DAY8
- 88. 合并两个有序数组
- Linux登录MySQL出现ERROR 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)
猜你喜欢

MySQL 5.7.32-winx64 installation tutorial (support installing multiple MySQL services on one host)

How to set up altaro offsite server for replication

Communication - how to be a good listener?
![[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

QT read write excel -- qxlsx insert chart 5

Qt读写Excel--QXlsx插入图表5

Altaro virtual machine replication failed: "unsupported file type vmgs"

Redhat7 system root user password cracking
![[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

Apache+PHP+MySQL环境搭建超详细!!!
随机推荐
[teacher Zhao Yuqiang] redis's slow query log
Pytorch builds the simplest version of neural network
Altaro virtual machine replication failed: "unsupported file type vmgs"
"C and pointer" - Chapter 13 function of function pointer 1 - callback function 1
Analysis of the example of network subnet division in secondary vocational school
Beaucoup de CTO ont été tués aujourd'hui parce qu'il n'a pas fait d'affaires
[together Shangshui Shuo series] day 7 content +day8
How to use source insight
NG Textarea-auto-resize
2022.7.2 simulation match
How to create your own repository for software packages on Debian
[advanced pointer (2)] | [function pointer, function pointer array, callback function] key analysis + code explanation
Apache+php+mysql environment construction is super detailed!!!
Mapbox tasting value cloud animation
How does win7 solve the problem that telnet is not an internal or external command
Maximum likelihood estimation, divergence, cross entropy
CAD插件的安裝和自動加載dll、arx
今天很多 CTO 都是被干掉的,因为他没有成就业务
Final review (Day5)
There is no one of the necessary magic skills PXE for old drivers to install!!!