What is Klass
& KlassKlass
in JVM Hotspot Implementation?
As far as I understood from the article Presenting the Perm Generation, Klass
is the internal representation of a Java class (let's say A
) & it will hold the basic information about the structure of the class including the bytecode. It will be stored as an object itself. Every object of the class A will have a pointer to the internal representation Klass
present in PermGen
KlassKlass is the internal representation of the Klass
class itself. Why does KlassKlass
is needed? What extra information is it storing?
Also, a KlassKlass's
Klass
pointer points to itself, I didn't understand it either.