org.objectweb.jonathan.libs.kernel
Class TreeContextFactory.TreeContext

java.lang.Object
  extended byorg.objectweb.jonathan.libs.kernel.JComponent
      extended byorg.objectweb.jonathan.libs.kernel.JContextFactory.JContext
          extended byorg.objectweb.jonathan.libs.kernel.TreeContextFactory.TreeContext
All Implemented Interfaces:
Component, Context, Forkable
Direct Known Subclasses:
JConfigurationFactory.JConfiguration
Enclosing class:
TreeContextFactory

protected class TreeContextFactory.TreeContext
extends JContextFactory.JContext


Nested Class Summary
 
Nested classes inherited from class org.objectweb.jonathan.libs.kernel.JContextFactory.JContext
JContextFactory.JContext.InnerEnumeration
 
Nested classes inherited from class org.objectweb.jonathan.apis.kernel.Context
Context.NO_VALUE
 
Field Summary
protected  Element self_element
          element representing the current context.
 
Fields inherited from class org.objectweb.jonathan.libs.kernel.JContextFactory.JContext
enclosing_context, id
 
Fields inherited from class org.objectweb.jonathan.libs.kernel.JComponent
int_value, reference, type, value
 
Fields inherited from interface org.objectweb.jonathan.apis.kernel.Context
NO_VALUE
 
Constructor Summary
protected TreeContextFactory.TreeContext()
          Constructs a new TreeContext instance.
protected TreeContextFactory.TreeContext(Context _context)
           
 
Method Summary
protected  Element addLocalElement(JContextFactory.ContextElement _element, boolean _check_types)
          Adds an Element to the Context if no other exists with the same name.
 Component duplicate()
           
 Name getAbsoluteName()
           
protected  Element getElement(java.lang.String _name, boolean _local)
          Returns the element identified by name, or null if none exists.
protected  JContextFactory.ContextElement newContextElement(Context _container)
          Creates a new empty context element.
protected  void recycle()
           
 java.lang.String toString()
           
 
Methods inherited from class org.objectweb.jonathan.libs.kernel.JContextFactory.JContext
acquire, addElement, addElement, addElement, addElement, addElement, addElement, addOrGetContext, addOrGetContext, addOrGetLocalContext, finalize, getComponent, getElement, getElement, getElements, getFactoryValue, getIntValue, getIntValue, getScope, getValue, handleScopeElement, internalFork, newComponent, newComponent, newContextElement, release, reset, setScope
 
Methods inherited from class org.objectweb.jonathan.libs.kernel.JComponent
fork, getComponent, getFactoryValue, getIntValue, getReference, getType, getValue, getValue, setReference
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.objectweb.jonathan.apis.kernel.Component
fork, getComponent, getFactoryValue, getIntValue, getReference, getType, getValue, getValue, setReference
 

Field Detail

self_element

protected Element self_element
element representing the current context. Initialized by the constructors.

Constructor Detail

TreeContextFactory.TreeContext

protected TreeContextFactory.TreeContext()
Constructs a new TreeContext instance.


TreeContextFactory.TreeContext

protected TreeContextFactory.TreeContext(Context _context)
Method Detail

toString

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

getAbsoluteName

public Name getAbsoluteName()

recycle

protected void recycle()
Overrides:
recycle in class JContextFactory.JContext

getElement

protected Element getElement(java.lang.String _name,
                             boolean _local)
Returns the element identified by name, or null if none exists.

Overrides:
getElement in class JContextFactory.JContext
Parameters:
_name - a local name;
_local - if true, don't search the enclosing context.
Returns:
the element identified by name, or null if none exists.

addLocalElement

protected Element addLocalElement(JContextFactory.ContextElement _element,
                                  boolean _check_types)
                           throws JonathanException
Adds an Element to the Context if no other exists with the same name.

must be called in a synchronized context

Overrides:
addLocalElement in class JContextFactory.JContext
Parameters:
_check_types - indicates whether types should be checked.
Returns:
the Element already present in the Context with the same name, null if none existed.
Throws:
JonathanException - if something wrong occurs.

duplicate

public Component duplicate()
Overrides:
duplicate in class JContextFactory.JContext

newContextElement

protected JContextFactory.ContextElement newContextElement(Context _container)
Description copied from class: JContextFactory.JContext
Creates a new empty context element.

Overrides:
newContextElement in class JContextFactory.JContext
Returns:
a new context element.