mardi 3 décembre 2019

How does reflection works?

As we know, we can use Java reflection API to get runtime classes, methods, parameters, etc.

Through the package java.lang.reflect I found some native methods about reflection, I really wonder what does Java do for implementing it?

One of my conjectures was: When JVM loading a class, it will create an instance for this Class and, it can be reached when the reflection is invoked.





Aucun commentaire:

Enregistrer un commentaire