I want to access some of the private members of a class which has its constructor defined as private. How do I create the PrivateObject for such class so that I can access its private members ?
I tried something like this but I cannot instantiate the class "MyClass1" so I am not able to instantite the PrivateObject.
MyClass1 myClass = new MyClass1(); //gives compilation error
PrivateObject po = new PrivateObject(myClass); //gives compilation error
Is there any workaround for this ?