Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Person {
- String name;
- ContactInfo contactInfo = new ContactInfo();
- //getters, setters, etc.
- }
- public class ContactInfo {
- String phone;
- Address homeAddress = new Address();
- }
- public static Person getInstanceForContactInfoForm() {
- ContactInfo contactInfo = ContactInfo.getInstanceForContactInfoForm();
- Person person = new Person(contactInfo);
- // set whatever other properties you need for Person
- // just enough to 1-render the form and 2-avoid any exceptions
- return person;
- }
Add Comment
Please, Sign In to add comment