geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1430024 - in /geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi: Bean.java BeanAttributes.java BeanManager.java CDI.java CDIProvider.java Decorator.java
Date Mon, 07 Jan 2013 21:34:24 GMT
Author: struberg
Date: Mon Jan  7 21:34:24 2013
New Revision: 1430024

URL: http://svn.apache.org/viewvc?rev=1430024&view=rev
Log:
GERONIMO-6182 add BeanAttributes and some JavaDoc

Added:
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanAttributes.java
Modified:
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Bean.java
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanManager.java
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDIProvider.java
    geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Decorator.java

Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Bean.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Bean.java?rev=1430024&r1=1430023&r2=1430024&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Bean.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Bean.java
Mon Jan  7 21:34:24 2013
@@ -18,12 +18,10 @@
  */
 package javax.enterprise.inject.spi;
 
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
 import java.util.Set;
-
 import javax.enterprise.context.spi.Contextual;
 
+
 /**
  * Reprensts bean instances that are contextual
  * and injectable by the container.
@@ -32,49 +30,8 @@ import javax.enterprise.context.spi.Cont
  *
  * @param <T> bean representation type
  */
-public interface Bean<T> extends Contextual<T>
+public interface Bean<T> extends Contextual<T>, BeanAttributes<T>
 {
-    /**
-     * Returns api types of a bean.
-     * 
-     * @return api types of a bean
-     */
-    public abstract Set<Type> getTypes();
-
-    /**
-     * Returns qualifiers of a bean.
-     * 
-     * @return qualifiers of a bean
-     */
-    public abstract Set<Annotation> getQualifiers();    
-    
-    /**
-     * Returns scope of a bean.
-     * 
-     * @return scope
-     */
-    public abstract Class<? extends Annotation> getScope();
-
-    /**
-     * Returns name of a bean.
-     * 
-     * @return name of a bean
-     */
-    public abstract String getName();
-
-    /**
-     * If bean is nullable return true, false
-     * otherwise. 
-     * 
-     * <p>
-     * Nullable means that if producer
-     * bean api type is primitive, its nullable property
-     * will be false.
-     * </p>
-     * 
-     * @return true if bean is nullable.
-     */
-    public abstract boolean isNullable();
 
     /**
      * Returns all injection points of this bean.
@@ -89,19 +46,5 @@ public interface Bean<T> extends Context
      * @return class of bean that it represents
      */
     public abstract Class<?> getBeanClass();
-    
-    /**
-     * Returns bean stereotypes.
-     * 
-     * @return bean stereotypes
-     */
-    public Set<Class<? extends Annotation>> getStereotypes();
-    
-    /**
-     * Returns true if declares as policy
-     * 
-     * @return true if declares as policy
-     */
-    public boolean isAlternative();
 
 }

Added: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanAttributes.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanAttributes.java?rev=1430024&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanAttributes.java
(added)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanAttributes.java
Mon Jan  7 21:34:24 2013
@@ -0,0 +1,70 @@
+package javax.enterprise.inject.spi;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+
+/**
+ * Defines the mutable parts of the {@link Bean} interface.
+ *
+ * @since 1.1‚
+ */
+public interface BeanAttributes<T> {
+    /**
+     * Returns api types of a bean.
+     *
+     * @return api types of a bean
+     */
+    public abstract Set<Type> getTypes();
+
+    /**
+     * Returns qualifiers of a bean.
+     *
+     * @return qualifiers of a bean
+     */
+    public abstract Set<Annotation> getQualifiers();
+
+    /**
+     * Returns scope of a bean.
+     *
+     * @return scope
+     */
+    public abstract Class<? extends Annotation> getScope();
+
+    /**
+     * Returns name of a bean.
+     *
+     * @return name of a bean
+     */
+    public abstract String getName();
+
+    /**
+     * If bean is nullable return true, false
+     * otherwise.
+     *
+     * <p>
+     * Nullable means that if producer
+     * bean api type is primitive, its nullable property
+     * will be false.
+     * </p>
+     *
+     * @return true if bean is nullable.
+     */
+    public abstract boolean isNullable();
+
+
+    /**
+     * Returns bean stereotypes.
+     *
+     * @return bean stereotypes
+     */
+    public Set<Class<? extends Annotation>> getStereotypes();
+
+    /**
+     * Returns true if declares as policy
+     *
+     * @return true if declares as policy
+     */
+    public boolean isAlternative();
+}

Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanManager.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanManager.java?rev=1430024&r1=1430023&r2=1430024&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanManager.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeanManager.java
Mon Jan  7 21:34:24 2013
@@ -97,7 +97,7 @@ public interface BeanManager
     public Set<Bean<?>> getBeans(Type beanType, Annotation... qualifiers);
         
     /**
-     * Returns set of beans with given name.
+     * Returns set of beans with given Expression Language name.
      * 
      * @param name name of the bean
      * @return set of beans with given name

Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDI.java?rev=1430024&r1=1430023&r2=1430024&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDI.java
Mon Jan  7 21:34:24 2013
@@ -14,6 +14,7 @@ import javax.enterprise.inject.Instance;
  * </p>
  *
  *
+ * @since 1.1
  */
 public abstract class CDI<T> implements Instance<T>
 {

Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDIProvider.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDIProvider.java?rev=1430024&r1=1430023&r2=1430024&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDIProvider.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/CDIProvider.java
Mon Jan  7 21:34:24 2013
@@ -4,6 +4,8 @@ package javax.enterprise.inject.spi;
  * <p>Pluggable mechanism to resolve the CDI instance.</p>
  * <p>A container or an application can set this with
  * {@link CDI#setCDIProvider(CDIProvider)}</p>
+ *
+ * @since 1.1
  */
 public interface CDIProvider
 {

Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Decorator.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Decorator.java?rev=1430024&r1=1430023&r2=1430024&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Decorator.java
(original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/Decorator.java
Mon Jan  7 21:34:24 2013
@@ -22,13 +22,27 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Type;
 import java.util.Set;
 
+/**
+ * Decorator Bean.
+ */
 public interface Decorator<T> extends Bean<T>
 {
 
+    /**
+     * All the interfaces and classes in the type hierarchy of the
+     * class annotated with &#064;{@link javax.decorator.Decorator}.
+     * @return the decorated types of the decorator.
+     */
     public abstract Set<Type> getDecoratedTypes();
-    
+
+    /**
+     * @return the Type of the &#064;{@link javax.decorator.Delegate} injection point.
+     */
     public abstract Type getDelegateType();
 
+    /**
+     * @return the Qualifiers of the &#064;{@link javax.decorator.Delegate} injection
point.
+     */
     public abstract Set<Annotation> getDelegateQualifiers();
 
 }



Mime
View raw message