KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.springframework.beans.ITestBean;
20
21 /**
22  * Bean testing the ability to use both lookup method overrides
23  * and constructor injection.
24  * There is also a property ("setterString") to be set via
25  * Setter Injection.
26  *
27  * @author Rod Johnson
28  */

29 public abstract class ConstructorInjectedOverrides {
30     
31     private ITestBean tb;
32     
33     private String JavaDoc setterString;
34     
35     public ConstructorInjectedOverrides(ITestBean tb) {
36         this.tb = tb;
37     }
38     
39     public ITestBean getTestBean() {
40         return this.tb;
41     }
42
43     
44     protected abstract FactoryMethods createFactoryMethods();
45
46     /**
47      * @return Returns the setterString.
48      */

49     public String JavaDoc getSetterString() {
50         return setterString;
51     }
52     /**
53      * @param setterString The setterString to set.
54      */

55     public void setSetterString(String JavaDoc setterString) {
56         this.setterString = setterString;
57     }
58 }
59
Popular Tags