1 16 17 package org.springframework.beans.factory.xml; 18 19 import java.io.Serializable ; 20 21 import org.springframework.beans.IndexedTestBean; 22 import org.springframework.beans.TestBean; 23 24 30 public class ConstructorDependenciesBean implements Serializable { 31 32 private int age; 33 34 private String name; 35 36 private TestBean spouse1; 37 38 private TestBean spouse2; 39 40 private IndexedTestBean other; 41 42 public ConstructorDependenciesBean(int age) { 43 this.age = age; 44 } 45 46 public ConstructorDependenciesBean(String name) { 47 this.name = name; 48 } 49 50 public ConstructorDependenciesBean(TestBean spouse1) { 51 this.spouse1 = spouse1; 52 } 53 54 public ConstructorDependenciesBean(TestBean spouse1, TestBean spouse2) { 55 this.spouse1 = spouse1; 56 this.spouse2 = spouse2; 57 } 58 59 public ConstructorDependenciesBean(TestBean spouse1, TestBean spouse2, int age) { 60 this.spouse1 = spouse1; 61 this.spouse2 = spouse2; 62 this.age = age; 63 } 64 65 public ConstructorDependenciesBean(TestBean spouse1, TestBean spouse2, IndexedTestBean other) { 66 this.spouse1 = spouse1; 67 this.spouse2 = spouse2; 68 this.other = other; 69 } 70 71 public int getAge() { 72 return age; 73 } 74 75 public String getName() { 76 return name; 77 } 78 79 public TestBean getSpouse1() { 80 return spouse1; 81 } 82 83 public TestBean getSpouse2() { 84 return spouse2; 85 } 86 87 public IndexedTestBean getOther() { 88 return other; 89 } 90 91 public void setAge(int age) { 92 this.age = age; 93 } 94 95 public void setName(String name) { 96 this.name = name; 97 } 98 99 } 100 | Popular Tags |