KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb > EJBsImpl


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

7 package org.jboss.ejb;
8
9 import java.util.ArrayList JavaDoc;
10 import java.util.List JavaDoc;
11
12 import javax.annotation.EJB;
13
14 /**
15  * // *
16  *
17  * @author <a HREF="mailto:bill@jboss.org">William DeCoste</a>
18  * @version $Revision: 1.1.2.3 $
19  */

20 public class EJBsImpl implements javax.annotation.EJBs
21 {
22    private List JavaDoc ejbs = new ArrayList JavaDoc();
23    
24    public EJBsImpl()
25    {
26    }
27    
28    public EJB[] value()
29    {
30       return (EJB[])ejbs.toArray(new EJBImpl[ejbs.size()]);
31    }
32    
33    public void addEjb(EJB ejb)
34    {
35       ejbs.add(ejb);
36    }
37    
38    public Class JavaDoc annotationType()
39    {
40       return javax.annotation.EJBs.class;
41    }
42    
43    public String JavaDoc toString()
44    {
45       StringBuffer JavaDoc sb = new StringBuffer JavaDoc(100);
46       sb.append("[");
47       sb.append("ejbs=").append(ejbs);
48       sb.append("]");
49       return sb.toString();
50    }
51 }
52
Popular Tags