You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by st...@apache.org on 2013/06/15 00:05:07 UTC
svn commit: r1493261 - in
/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi:
AfterBeanDiscovery.java BeforeBeanDiscovery.java InterceptionType.java
Author: struberg
Date: Fri Jun 14 22:05:07 2013
New Revision: 1493261
URL: http://svn.apache.org/r1493261
Log:
GERONIMO-6182 more cdi-1.1 changes
Modified:
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/InterceptionType.java
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java?rev=1493261&r1=1493260&r2=1493261&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/AfterBeanDiscovery.java Fri Jun 14 22:05:07 2013
@@ -56,4 +56,23 @@ public interface AfterBeanDiscovery
* @param context new context
*/
public void addContext(Context context);
-}
\ No newline at end of file
+
+ /**
+ * This will return the AnnotatedType including all changes applied by CDI Extensions.
+ *
+ * @param type
+ * @param id the id of the AnnotatedType registered by {@link BeforeBeanDiscovery#addAnnotatedType(AnnotatedType, String)}
+ * or <code>null</code> for the one scanned
+ * @param <T>
+ * @return the AnnotatedType for the given type and id.
+ */
+ public <T> AnnotatedType<T> getAnnotatedType(Class<T> type, String id);
+
+ /**
+ * Get an Iterable of all AnnotatedTypes which implement the given
+ * @param type
+ * @param <T>
+ * @return
+ */
+ public <T> Iterable<AnnotatedType<T>> getAnnotatedTypes(Class<T> type);
+}
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java?rev=1493261&r1=1493260&r2=1493261&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/BeforeBeanDiscovery.java Fri Jun 14 22:05:07 2013
@@ -35,6 +35,13 @@ public interface BeforeBeanDiscovery
* @param qualifier qualifier
*/
public void addQualifier(Class<? extends Annotation> qualifier);
+
+ /**
+ * Declare a new qualifier via the information from the given AnnotatedType.
+ * @param qualifier
+ */
+ public void addQualifier(AnnotatedType<? extends Annotation> qualifier);
+
/**
* Declares a new scope.
@@ -60,13 +67,28 @@ public interface BeforeBeanDiscovery
* @param bindingDef meta annotations
*/
public void addInterceptorBinding(Class<? extends Annotation> binding, Annotation... bindingDef);
+
+ /**
+ * Declare a new interceptor binding via the information from the given AnnotatedType.
+ * @param bindingType
+ */
+ public void addInterceptorBinding(AnnotatedType<? extends Annotation> bindingType);
/**
* Adds new annotated type.
+ * This version shall be used when adding AnnotatedTypes for classes which are
+ * not yet scanned by the CDI container.
*
* @param type annotated type
*/
public void addAnnotatedType(AnnotatedType<?> type);
-
-}
\ No newline at end of file
+ /**
+ * Adds new annotated type for classes which are not picked up by the CDI container
+ * or if you like to add multiple AnnotatedType for the same class.
+ *
+ * @param type annotated type
+ * @param id to distinguish AnnotatedTypes for the same class.
+ */
+ public void addAnnotatedType(AnnotatedType<?> type, String id);
+}
Modified: geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/InterceptionType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/InterceptionType.java?rev=1493261&r1=1493260&r2=1493261&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/InterceptionType.java (original)
+++ geronimo/specs/trunk/geronimo-jcdi_1.1_spec/src/main/java/javax/enterprise/inject/spi/InterceptionType.java Fri Jun 14 22:05:07 2013
@@ -22,8 +22,9 @@ public enum InterceptionType
{
AROUND_INVOKE,
AROUND_TIMEOUT,
+ AROUND_CONSTRUCT,
POST_CONSTRUCT,
PRE_DESTROY,
PRE_PASSIVATE,
- POST_ACTIVATE
-}
\ No newline at end of file
+ POST_ACTIVATE,
+}