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

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Sat Oct 24 21:57:19 EDT 2009


Author: gavin.king at jboss.com
Date: 2009-10-24 21:57:19 -0400 (Sat, 24 Oct 2009)
New Revision: 4282

Modified:
   api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java
Log:
fix, and add exceptions

Modified: api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java
===================================================================
--- api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java	2009-10-25 01:55:54 UTC (rev 4281)
+++ api/trunk/cdi/src/main/java/javax/enterprise/inject/Instance.java	2009-10-25 01:57:19 UTC (rev 4282)
@@ -107,36 +107,42 @@
 {
    
    /**
-    * <p>Obtains a child <tt>Instance</tt> for a given required type and additional 
-    * required qualifiers. If no required type is given, the required type is the 
-    * same as the parent.
+    * <p>Obtains a child <tt>Instance</tt> for the given additional 
+    * required qualifiers.</p>
     * 
     * @param qualifiers the additional required qualifiers
     * @return the child <tt>Instance</tt>
+    * @throws IllegalArgumentException if passed two instances of the 
+    * same qualifier type, or an instance of an annotation that is not 
+    * a qualifier type
     */
    public Instance<T> select(Annotation... qualifiers); 
 
    /**
-    * <p>Obtains a child <tt>Instance</tt> for a given required type and additional 
-    * required qualifiers. If no required type is given, the required type is the 
-    * same as the parent.
+    * <p>Obtains a child <tt>Instance</tt> for the given required type and 
+    * additional required qualifiers.</p>
     * 
     * @param <U> the required type
     * @param subtype a {@link java.lang.Class} representing the required type
     * @param qualifiers the additional required qualifiers
     * @return the child <tt>Instance</tt>
+    * @throws IllegalArgumentException if passed two instances of the 
+    * same qualifier type, or an instance of an annotation that is not 
+    * a qualifier type
     */
    public <U extends T> Instance<U> select(Class<U> subtype, Annotation... qualifiers); 
    
    /**
-    * <p>Obtains a child <tt>Instance</tt> for a given required type and additional 
-    * required qualifiers. If no required type is given, the required type is the 
-    * same as the parent.
+    * <p>Obtains a child <tt>Instance</tt> for the given required type and 
+    * additional required qualifiers.</p>
     * 
     * @param <U> the required type
     * @param subtype a {@link javax.enterprise.inject.TypeLiteral} representing the required type
     * @param qualifiers the additional required qualifiers
     * @return the child <tt>Instance</tt>
+    * @throws IllegalArgumentException if passed two instances of the 
+    * same qualifier type, or an instance of an annotation that is not 
+    * a qualifier type
     */
    public <U extends T> Instance<U> select(TypeLiteral<U> subtype, Annotation... qualifiers); 
    



More information about the weld-commits mailing list