org.apache.webbeans.inject
Class AbstractInjectable

java.lang.Object
  extended by org.apache.webbeans.inject.AbstractInjectable
All Implemented Interfaces:
Injectable
Direct Known Subclasses:
InjectableConstructor, InjectableField, InjectableMethods

public abstract class AbstractInjectable
extends Object
implements Injectable

Abstract implementation of the Injectable contract.

Do actual injection via inject(InjectionPoint)

See Also:
InjectableField, InjectableConstructor, InjectableMethods

Field Summary
static ThreadLocal<List<DependentCreationalContext<Object>>> dependentInstanceOfProducerMethods
           
protected  Member injectionMember
          Field, method or constructor injection
protected  OwbBean<?> injectionOwnerBean
          Owner bean of the injection point
protected  javax.enterprise.context.spi.CreationalContext<?> injectionOwnerCreationalContext
          Creational context instance that is passed to bean's create
static ThreadLocal<Object> instanceUnderInjection
           
 
Constructor Summary
protected AbstractInjectable(OwbBean<?> injectionOwnerBean, javax.enterprise.context.spi.CreationalContext<?> injectionOwnerCreationalContext)
          Creates a new injectable.
 
Method Summary
protected  List<javax.enterprise.inject.spi.InjectionPoint> getInjectedPoints(Member member)
          Returns injection points related with given member type of the bean.
 OwbBean<?> getInjectionOwnerComponent()
          Gets the component.
<T> Object
inject(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
          Gets the injected bean instance in its scoped context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.webbeans.inject.Injectable
doInjection
 

Field Detail

injectionOwnerBean

protected OwbBean<?> injectionOwnerBean
Owner bean of the injection point


injectionOwnerCreationalContext

protected javax.enterprise.context.spi.CreationalContext<?> injectionOwnerCreationalContext
Creational context instance that is passed to bean's create


injectionMember

protected Member injectionMember
Field, method or constructor injection


instanceUnderInjection

public static ThreadLocal<Object> instanceUnderInjection

dependentInstanceOfProducerMethods

public static ThreadLocal<List<DependentCreationalContext<Object>>> dependentInstanceOfProducerMethods
Constructor Detail

AbstractInjectable

protected AbstractInjectable(OwbBean<?> injectionOwnerBean,
                             javax.enterprise.context.spi.CreationalContext<?> injectionOwnerCreationalContext)
Creates a new injectable.

Parameters:
injectionOwnerBean - owner bean
injectionOwnerCreationalContext - creational context instance
Method Detail

inject

public <T> Object inject(javax.enterprise.inject.spi.InjectionPoint injectionPoint)
Gets the injected bean instance in its scoped context.

Parameters:
injectionPoint - injection point definition
Returns:
current bean instance in the resolved bean scope

getInjectedPoints

protected List<javax.enterprise.inject.spi.InjectionPoint> getInjectedPoints(Member member)
Returns injection points related with given member type of the bean.

Parameters:
member - java member
Returns:
injection points related with given member type

getInjectionOwnerComponent

public OwbBean<?> getInjectionOwnerComponent()
Gets the component.

Returns:
the component


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.