From d7b1604701799a773cf1eba27e5ebe56ac18947a Mon Sep 17 00:00:00 2001 From: Pete Muir Date: Wed, 25 Aug 2010 13:02:04 +0100 Subject: [PATCH] WELD-635 --- .../jboss/weld/injection/spi/InjectionContext.java | 7 +++++++ .../jboss/weld/injection/spi/InjectionServices.java | 12 +++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java b/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java index a77453d1..6a73ae5b 100644 --- a/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java +++ b/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionContext.java @@ -16,6 +16,7 @@ */ package org.jboss.weld.injection.spi; +import javax.enterprise.inject.spi.AnnotatedType; import javax.enterprise.inject.spi.InjectionTarget; import javax.inject.Inject; @@ -51,5 +52,11 @@ public interface InjectionContext * */ public InjectionTarget getInjectionTarget(); + + /** + * Get the {@link AnnotatedType} for the instance being injected + * + */ + public AnnotatedType getAnnotatedType(); } diff --git a/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java b/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java index eced21e9..79249f48 100644 --- a/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java +++ b/weld-spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java @@ -24,14 +24,20 @@ * * This service may be used to provide EE-style injection. * + * The container must respect any modifications made to type via the + * container lifecycle events. Container lifecycle events may alter the + * annotations placed on the type, it's members, and the formal parameters of + * it's members. {@link InjectionContext#getAnnotatedType()} gives access to the + * modified state of the type. + * * {@link InjectionServices} is a per-BeanDeploymentArchive service. * - * @author pmuir - * + * @author Pete Muir + * */ public interface InjectionServices extends Service { - + /** * Callback for injection. *