Edit: You can't do this. You can't reinitialize this
or overwrite an instance globally by reconstructing it.
You need to keep a reference to the existing class A instance. When creating an instance of class B, make it accept class A in the constructor and pass this
. The same when creating class C. Now if you have proper getters, you can, in C, call this.getB().getA().performSomeUpdate()
whre performSomeUpdate
updates the A instance to new parameters by setting fields.