01: /**
02: *
03: * Licensed to the Apache Software Foundation (ASF) under one or more
04: * contributor license agreements. See the NOTICE file distributed with
05: * this work for additional information regarding copyright ownership.
06: * The ASF licenses this file to You under the Apache License, Version 2.0
07: * (the "License"); you may not use this file except in compliance with
08: * the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */package org.apache.openejb.jee;
18:
19: import javax.xml.bind.annotation.XmlAccessType;
20: import javax.xml.bind.annotation.XmlAccessorType;
21: import javax.xml.bind.annotation.XmlElement;
22: import javax.xml.bind.annotation.XmlType;
23:
24: /**
25: * An injection target specifies a class and a name within
26: * that class into which a resource should be injected.
27: * <p/>
28: * The injection target class specifies the fully qualified
29: * class name that is the target of the injection. The
30: * Java EE specifications describe which classes can be an
31: * injection target.
32: * <p/>
33: * The injection target name specifies the target within
34: * the specified class. The target is first looked for as a
35: * JavaBeans property name. If not found, the target is
36: * looked for as a field name.
37: * <p/>
38: * The specified resource will be injected into the target
39: * during initialization of the class by either calling the
40: * set method for the target property or by setting a value
41: * into the named field.
42: */
43: @XmlAccessorType(XmlAccessType.FIELD)
44: @XmlType(name="injection-targetType",propOrder={"injectionTargetClass","injectionTargetName"})
45: public class InjectionTarget {
46:
47: @XmlElement(name="injection-target-class",required=true)
48: protected String injectionTargetClass;
49: @XmlElement(name="injection-target-name",required=true)
50: protected String injectionTargetName;
51:
52: public InjectionTarget() {
53: }
54:
55: public InjectionTarget(String injectionTargetClass,
56: String injectionTargetName) {
57: this .injectionTargetClass = injectionTargetClass;
58: this .injectionTargetName = injectionTargetName;
59: }
60:
61: public String getInjectionTargetClass() {
62: return injectionTargetClass;
63: }
64:
65: public void setInjectionTargetClass(String value) {
66: this .injectionTargetClass = value;
67: }
68:
69: public String getInjectionTargetName() {
70: return injectionTargetName;
71: }
72:
73: public void setInjectionTargetName(String value) {
74: this.injectionTargetName = value;
75: }
76:
77: }
|