KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > beans > factory > xml > ConstructorDependenciesBean


1 /*
2  * Copyright 2002-2005 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.beans.factory.xml;
18
19 import java.io.Serializable JavaDoc;
20
21 import org.springframework.beans.IndexedTestBean;
22 import org.springframework.beans.TestBean;
23
24 /**
25  * Simple bean used to check constructor dependency checking.
26  *
27  * @author Juergen Hoeller
28  * @since 09.11.2003
29  */

30 public class ConstructorDependenciesBean implements Serializable JavaDoc {
31     
32     private int age;
33     
34     private String JavaDoc 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 JavaDoc 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 JavaDoc 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 JavaDoc name) {
96         this.name = name;
97     }
98
99 }
100
Popular Tags