[weld-commits] Weld SVN: r4244 - api/trunk/cdi/src/main/java/javax/enterprise/inject.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Fri Oct 23 17:04:15 EDT 2009


Author: gavin.king at jboss.com
Date: 2009-10-23 17:04:15 -0400 (Fri, 23 Oct 2009)
New Revision: 4244

Modified:
   api/trunk/cdi/src/main/java/javax/enterprise/inject/Typed.java
Log:
javadoc for @Typed

Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/Typed.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/Typed.java	2009-10-23 21:03:29 UTC (rev 4243)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/Typed.java	2009-10-23 21:04:15 UTC (rev 4244)
@@ -27,10 +27,27 @@
 import java.lang.annotation.Target;
 
 /**
- * Allows the bean types of a bean to be explicitly specified by the user,
- * instead of using the transitive closure of the type hierarchy
+ * <p>Restricts the bean types of a bean. May be applied to
+ * a bean class or producer method or field.</p>
  * 
+ * <pre>
+ * &#064;Typed(Shop.class)
+ * public class BookShop
+ *       extends Business
+ *       implements Shop&lt;Book&gt; { 
+ *    ... 
+ * }
+ * </pre>
+ * 
+ * <p>When a {@link javax.enterprise.inject.Typed &#064;Typed} 
+ * annotation is specified, only the types whose classes are 
+ * explicitly listed using the 
+ * {@link javax.enterprise.inject.Typed#value() value} member 
+ * are bean types of the bean.</p>
+ * 
  * @author Pete Muir
+ * @author Gavin King
+ * 
  */
 
 @Target( { FIELD, METHOD, TYPE })
@@ -38,7 +55,14 @@
 @Documented
 public @interface Typed
 {
-
+   /**
+    * <p>Selects the bean types of the bean. Every class must 
+    * correspond to a type in the unrestricted set of bean 
+    * types of a bean.</p>
+    * 
+    * @return the classes corresponding to the bean types of 
+    * the bean
+    */
    Class<?>[] value() default {};
 
 }



More information about the weld-commits mailing list