Say I'm debugging a program and I see a variable (A custom class object) in the variable pane. Is there a way to quickly convert that variable to a code which would create that instance at a later point in time?
Eg:
class person{
private List<Address> address;
private String name;
private int age;
..constructors, getters and setters
}
class Email{
private String StreetNo;
private String StreetName;
private String City;
private String State;
private String zip;
..constructors, getters and setters
}
Say in the variable pane (while eclipse debug) I handle an instance of Person object. How to (Is here a way to) quickly convert that instance into code like
Person test1 = new Person (...); input for this constructor should be from the debug session.
Display pane only can print this objet, how do I convert that object value into a constructor code (using reflection, possible?)