org.jboss.webbeans.context
Class DependentContext

java.lang.Object
  extended by org.jboss.webbeans.context.AbstractContext
      extended by org.jboss.webbeans.context.DependentContext
All Implemented Interfaces:
Context

public class DependentContext
extends AbstractContext

The dependent context

Author:
Nicklas Karlsson

Field Summary
static DependentContext INSTANCE
           
 
Constructor Summary
DependentContext()
          Constructor
 
Method Summary
 void clearCurrentInjectionInstance(java.lang.Object instance)
          Clears the current injection instance.
<T> T
get(Contextual<T> contextual)
           
<T> T
get(Contextual<T> contextual, CreationalContext<T> creationalContext)
          Overridden method always creating a new instance
 void setActive(boolean active)
          Set the context active, internal API for WBRI
 void setCurrentInjectionInstance(java.lang.Object instance)
          Sets the current injection instance.
 java.lang.String toString()
           
 
Methods inherited from class org.jboss.webbeans.context.AbstractContext
getActive, getScopeType, isActive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INSTANCE

public static DependentContext INSTANCE
Constructor Detail

DependentContext

public DependentContext()
Constructor

Method Detail

get

public <T> T get(Contextual<T> contextual,
                 CreationalContext<T> creationalContext)
Overridden method always creating a new instance

Parameters:
contextual - The bean to create
create - Should a new one be created

get

public <T> T get(Contextual<T> contextual)

toString

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

setActive

public void setActive(boolean active)
Description copied from class: AbstractContext
Set the context active, internal API for WBRI

Overrides:
setActive in class AbstractContext
Parameters:
active - The new state

setCurrentInjectionInstance

public void setCurrentInjectionInstance(java.lang.Object instance)
Sets the current injection instance. If there is already an instance registered, nothing is done.

Parameters:
instance - The current injection instance to register dependent objects under

clearCurrentInjectionInstance

public void clearCurrentInjectionInstance(java.lang.Object instance)
Clears the current injection instance. Can only be done by passing in the instance of the current instance.

Parameters:
instance - The instance to free


Copyright © 2008-2009. All Rights Reserved.