org.objectweb.jonathan.libs.kernel

Class TreeContextFactory.TreeContext

Enclosing Class:
TreeContextFactory
Implemented Interfaces:
Component, Context, Forkable
Known Direct Subclasses:
JConfigurationFactory.JConfiguration

protected class TreeContextFactory.TreeContext
extends JContextFactory.JContext

Nested Class Summary

Nested classes/interfaces inherited from class org.objectweb.jonathan.libs.kernel.JContextFactory.JContext

JContextFactory.JContext.InnerEnumeration

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

TreeContext()
Constructs a new TreeContext instance.
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(String _name, boolean _local)
Returns the element identified by name, or null if none exists.
protected JContextFactory.ContextElement
newContextElement(Context _container)
protected void
recycle()
String
toString()

Methods inherited from class org.objectweb.jonathan.libs.kernel.JContextFactory.JContext

acquire, addElement, addElement, addElement, addElement, addElement, addElement, addLocalElement, addOrGetContext, addOrGetContext, addOrGetLocalContext, duplicate, finalize, getComponent, getElement, getElement, getElement, getElements, getFactoryValue, getIntValue, getIntValue, getScope, getValue, handleScopeElement, internalFork, newComponent, newComponent, newContextElement, newContextElement, recycle, release, reset, setScope, toString

Methods inherited from class org.objectweb.jonathan.libs.kernel.JComponent

duplicate, fork, getComponent, getElement, getFactoryValue, getIntValue, getReference, getType, getValue, getValue, internalFork, reset, setReference, toString

Field Details

self_element

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

Constructor Details

TreeContext

protected TreeContext()
Constructs a new TreeContext instance.


TreeContext

protected TreeContext(Context _context)

Method Details

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 interface 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 interface JContextFactory.JContext


getAbsoluteName

public Name getAbsoluteName()


getElement

protected Element getElement(String _name,
                             boolean _local)
Returns the element identified by name, or null if none exists.
Overrides:
getElement in interface JContextFactory.JContext

Parameters:

Returns:
the element identified by name, or null if none exists.


newContextElement

protected JContextFactory.ContextElement newContextElement(Context _container)
Overrides:
newContextElement in interface JContextFactory.JContext


recycle

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


toString

public String toString()
Overrides:
toString in interface JContextFactory.JContext