KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > dd > Inject


1 /*
2  * JBoss, the OpenSource J2EE webOS
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.dd;
8
9 import java.util.ArrayList JavaDoc;
10 import java.util.List JavaDoc;
11
12 import org.jboss.logging.Logger;
13
14 /**
15  * Represents an <inject> element of the ejb-jar.xml deployment descriptor
16  * for the 1.4 schema
17  *
18  * @version <tt>$Revision: 1.2.2.1 $</tt>
19  * @author <a HREF="mailto:bdecoste@jboss.com">William DeCoste</a>
20  */

21 public class Inject
22 {
23    private static final Logger log = Logger.getLogger(Inject.class);
24    
25    private List JavaDoc methods = new ArrayList JavaDoc();
26    private String JavaDoc jndiName;
27    
28    public String JavaDoc getJndiName()
29    {
30       return jndiName;
31    }
32    
33    public void setJndiName(String JavaDoc jndiName)
34    {
35       this.jndiName = jndiName;
36    }
37
38    public List JavaDoc getMethods()
39    {
40       return methods;
41    }
42
43    public void addMethod(Method method)
44    {
45       methods.add(method);
46    }
47
48    public String JavaDoc toString()
49    {
50       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
51       sb.append("[");
52       sb.append("jndiName=").append(jndiName);
53       sb.append("]");
54       return sb.toString();
55    }
56 }
57
Popular Tags