So I want to find out what parameters were used to create a object. How would I do that?
For example:
Example temp=new Example(1,2,3);
How do I find out what values 1,2, and 3 are, without manually saving them.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A well defined object usually hides its members behind a set of methods. If you need to discover how an object was initialized, you should add methods to its class that allow those details to be determined. And yes, this would involve at least saving these details as part of the object’s initializer.