Skip to content

Commit

Permalink
Added new accessor for the current injection point.
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@880 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
drallen committed Jan 11, 2009
1 parent 935323a commit 189176f
Showing 1 changed file with 29 additions and 0 deletions.
Expand Up @@ -127,6 +127,35 @@ public InjectionPoint getPreviousInjectionPoint()
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();
Expand Down

0 comments on commit 189176f

Please sign in to comment.