getting Class from ClassObjectReference
I have been trying to do get an object from a VM using JDI. What I am trying to do is this:
Get all classes using vm.allClasses().
This retuns a list of ReferenceTypes.
Now, using ReferenceType.classObject() I get a "ClassObjectReference".
But where do we go from here. How do I get the actual objects. If you read the description of ClassObjectReference, it says "An instance of java.lang.Class from the target VM". If this is so, then ClassObjectReference must be an extension of "Class". Unfortunately that is no the case.
Is this approach correct. Or should we go through the Thread way, using vm.allThreads() followed by getiing the Stack Frame and then searching for the object ?
Please Comment ?

