[webbeans-commits] Webbeans SVN: r854 - tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Fri Jan 9 07:59:14 EST 2009


Author: pete.muir at jboss.org
Date: 2009-01-09 07:59:14 -0500 (Fri, 09 Jan 2009)
New Revision: 854

Modified:
   tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java
Log:
Tweak API, javadoc

Modified: tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java
===================================================================
--- tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java	2009-01-09 12:51:09 UTC (rev 853)
+++ tck/trunk/api/src/main/java/org/jboss/webbeans/tck/api/Beans.java	2009-01-09 12:59:14 UTC (rev 854)
@@ -3,15 +3,56 @@
 import java.lang.reflect.Method;
 
 import javax.webbeans.manager.Bean;
-import javax.webbeans.manager.Manager;
 
 /**
  * Provides Bean related operations.
  *  
  * @author Shane Bryzak
+ * @author Pete Muir
  */
 public interface Beans
 {
-   <T> Bean<T> createSimpleBean(Class<T> clazz, Manager manager);
-   <T> Bean<T> getProducerMethodBean(Method method, Bean<T> clazz, Manager manager);
+   
+   /**
+    * Create a new simple bean from the given class
+    * 
+    * @param <T>
+    *           The type of the bean
+    * @param clazz
+    *           the class to create the bean
+    * @return the created bean
+    */
+   public <T> Bean<T> createSimpleBean(Class<T> clazz);
+   
+   /**
+    * Create a new enterprise bean from the given class. The given class should
+    * represent an EJB declared using annotions of XML.
+    * 
+    * @param <T>
+    *           The type of the bean
+    * @param clazz
+    *           the class to create the bean
+    * @return the created bean
+    */
+   public <T> Bean<T> createEnterpriseBean(Class<T> clazz);
+   
+   /**
+    * Create a new producer method bean from the given method. The simple or
+    * enterprise bean on which the method is declared is provided.
+    * 
+    * The declaringBean is a simple or enterprise bean that has been created by
+    * calling {@link #createSimpleBean(Class)} or
+    * {@link #createEnterpriseBean(Class)}.
+    * 
+    * @param <T>
+    *           the type of the bean
+    * @param method
+    *           the producer method
+    * @param declaringBean
+    *           the simple or enterprise bean which declares this producer
+    *           method
+    * @return the producer bean
+    */
+   public <T> Bean<T> createProducerMethodBean(Method method, Bean<T> declaringBean);
+   
 }




More information about the weld-commits mailing list