com.caucho.config.inject
Class CreationalContextImpl<T>

java.lang.Object
  extended by com.caucho.config.inject.CreationalContextImpl<T>
All Implemented Interfaces:
CreationalContext<T>
Direct Known Subclasses:
DependentCreationalContext, OwnerCreationalContext

@Module
public class CreationalContextImpl<T>
extends java.lang.Object
implements CreationalContext<T>

Stack of partially constructed beans.


Field Summary
static java.lang.Object NULL
           
 
Constructor Summary
protected CreationalContextImpl(Contextual<T> bean, CreationalContextImpl<?> parent)
           
 
Method Summary
 void clearTarget()
           
static
<X> X
find(CreationalContextImpl<?> ptr, Contextual<X> bean)
           
static
<X> X
findAny(CreationalContextImpl<?> ptr, java.lang.Class<X> type)
           
static
<X> X
findAny(CreationalContextImpl<?> ptr, Contextual<X> bean)
           
static java.lang.Object findByName(CreationalContextImpl<?> ptr, java.lang.String name)
           
 InjectionPoint findInjectionPoint()
           
static
<X> X
findWithNull(CreationalContextImpl<?> ptr, Contextual<X> bean)
           
<X> X
get(Contextual<X> bean)
           
<X> X
getAny(Contextual<X> bean)
          Find any bean, for disposers.
 Contextual<T> getBean()
           
 java.lang.Object getDelegate()
           
protected  InjectionPoint getInjectionPoint()
           
protected  DependentCreationalContext<?> getNext()
           
protected  OwnerCreationalContext<?> getOwner()
           
 java.lang.Object getParentValue()
           
 T getValue()
           
protected  boolean isTop()
           
 void push(T value)
          Pushes an incomplete instance into the creational context.
 void release()
          Destroys all dependent objects.
 void setInjectionPoint(InjectionPoint ip)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NULL

public static final java.lang.Object NULL
Constructor Detail

CreationalContextImpl

protected CreationalContextImpl(Contextual<T> bean,
                                CreationalContextImpl<?> parent)
Method Detail

isTop

protected boolean isTop()

getBean

public Contextual<T> getBean()

getOwner

protected OwnerCreationalContext<?> getOwner()

getNext

protected DependentCreationalContext<?> getNext()

getInjectionPoint

protected InjectionPoint getInjectionPoint()

setInjectionPoint

public void setInjectionPoint(InjectionPoint ip)

getValue

public T getValue()

getParentValue

public java.lang.Object getParentValue()

get

public <X> X get(Contextual<X> bean)

find

public static <X> X find(CreationalContextImpl<?> ptr,
                         Contextual<X> bean)

findWithNull

public static <X> X findWithNull(CreationalContextImpl<?> ptr,
                                 Contextual<X> bean)

getAny

public <X> X getAny(Contextual<X> bean)
Find any bean, for disposers.


findAny

public static <X> X findAny(CreationalContextImpl<?> ptr,
                            Contextual<X> bean)

findAny

public static <X> X findAny(CreationalContextImpl<?> ptr,
                            java.lang.Class<X> type)

findByName

public static java.lang.Object findByName(CreationalContextImpl<?> ptr,
                                          java.lang.String name)

findInjectionPoint

public InjectionPoint findInjectionPoint()

getDelegate

public java.lang.Object getDelegate()

push

public void push(T value)
Description copied from interface: CreationalContext
Pushes an incomplete instance into the creational context.

Specified by:
push in interface CreationalContext<T>

clearTarget

@Module
public void clearTarget()

release

public void release()
Description copied from interface: CreationalContext
Destroys all dependent objects.

Specified by:
release in interface CreationalContext<T>

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object