[webbeans-commits] Webbeans SVN: r880 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Sun Jan 11 13:07:56 EST 2009
Author: dallen6
Date: 2009-01-11 13:07:55 -0500 (Sun, 11 Jan 2009)
New Revision: 880
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java
Log:
Added new accessor for the current injection point.
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java 2009-01-11 15:22:47 UTC (rev 879)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java 2009-01-11 18:07:55 UTC (rev 880)
@@ -127,6 +127,35 @@
return new InjectionPointImpl(getPreviousInjectionMember(), getPreviousBean(), getPreviousInstance());
}
+ /**
+ * Returns the injection point metadata for the injection point currently
+ * being injected.
+ *
+ * @return current injection point metadata object
+ */
+ public InjectionPoint getCurrentInjectionPoint()
+ {
+ return new InjectionPointImpl(getCurrentInjectionMember(), getCurrentBean(), getCurrentInstance());
+ }
+
+ protected Bean<?> getCurrentBean()
+ {
+ return beans.peek();
+ }
+
+ protected Object getCurrentInstance()
+ {
+ return beanInstances.peek();
+ }
+
+ protected AnnotatedMember<?, ? extends Member> getCurrentInjectionMember()
+ {
+ if (injectionPoints.size() > 0)
+ return injectionPoints.peek();
+ else
+ return null;
+ }
+
protected Bean<?> getPreviousBean()
{
Bean<?> currentBean = beans.pop();
More information about the weld-commits
mailing list