Not sure I get what you mean. java.lang.Class represents classes loaded into running JVM. PSI on the other hand is independent from loading classes. (Even for class files IDEA does not use reflective API, but uses its own class file parser). Could you please provide more details on your usecase?
I understand that. I just wanted to use a reflection library that works on the Class instance but now that i think about it with a few more hours of sleep it makes much more sense to use the PsiClass and use it's methods to get the metadata i want from the class.
Not sure I get what you mean. java.lang.Class represents classes loaded into running JVM. PSI on the other hand is independent from loading classes. (Even for class files IDEA does not use reflective API, but uses its own class file parser).
Could you please provide more details on your usecase?
I understand that.
I just wanted to use a reflection library that works on the Class instance but now that i think about it with a few more hours of sleep it makes much more sense to use the PsiClass and use it's methods to get the metadata i want from the class.
Thanks again.....
If you don't need to instantiate your class, then PsiClass instance is enough:
The PsiClass provides reflection methods like getAllMethods().
And how to get java.lang.Class instance from a PsiClass ?
If I need to create instance of this class.