01: // Copyright 2004, 2005 The Apache Software Foundation
02: //
03: // Licensed under the Apache License, Version 2.0 (the "License");
04: // you may not use this file except in compliance with the License.
05: // You may obtain a copy of the License at
06: //
07: // http://www.apache.org/licenses/LICENSE-2.0
08: //
09: // Unless required by applicable law or agreed to in writing, software
10: // distributed under the License is distributed on an "AS IS" BASIS,
11: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12: // See the License for the specific language governing permissions and
13: // limitations under the License.
14:
15: package hivemind.test.services;
16:
17: import java.io.Serializable;
18: import java.util.List;
19: import java.util.Set;
20:
21: import org.apache.hivemind.ClassResolver;
22: import org.apache.hivemind.impl.DefaultClassResolver;
23:
24: /**
25: * Used to test autowiring of constructor parameters by the BuilderFactory.
26: *
27: * @author Knut Wannheden
28: */
29: public class ConstructorAutowireTarget {
30: private StringHolder _stringHolder;
31:
32: private ClassResolver _classResolver;
33:
34: public ConstructorAutowireTarget(StringHolder holder) {
35: this (holder, new DefaultClassResolver());
36: }
37:
38: public ConstructorAutowireTarget(StringHolder holder,
39: ClassResolver classResolver) {
40: _stringHolder = holder;
41: _classResolver = classResolver;
42: }
43:
44: public ConstructorAutowireTarget(int dummy) {
45: }
46:
47: public ConstructorAutowireTarget(Serializable dummy1,
48: Serializable dummy2, Serializable dummy3) {
49: }
50:
51: public ConstructorAutowireTarget(Comparable dummy1, List dummy2,
52: Set dummy3) {
53: }
54:
55: public StringHolder getStringHolder() {
56: return _stringHolder;
57: }
58:
59: public ClassResolver getClassResolver() {
60: return _classResolver;
61: }
62: }
|