org.objectweb.jonathan.libs.kernel
Class JContextFactory.ContextElement

java.lang.Object
  |
  +--org.objectweb.jonathan.libs.kernel.JContextFactory.ContextElement
All Implemented Interfaces:
Element
Enclosing class:
JContextFactory

protected static class JContextFactory.ContextElement
extends Object
implements Element

Class of the context elements used by JContextFactory.


Field Summary
protected  int int_value
          the integer value
protected  String name
          the name
protected  Class type
          the type
protected  Object value
          the object reference value
 
Constructor Summary
protected JContextFactory.ContextElement()
          Constructs a new context element.
 
Method Summary
 boolean checkType()
           
 int getIntValue()
          Returns the value of the target element, if its class is an integer class.
 String getName()
          Returns the (local) name of the element, in the context it belongs to.
 Class getType()
          Returns the type of the target element, as a Class.
 Object getValue()
          Returns the value of the target element, if its type is an object reference type.
protected  void reset()
          Resets the element, setting all object reference members to null, and possibly recycling the element in a pool.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
the name

type

protected Class type
the type

value

protected Object value
the object reference value

int_value

protected int int_value
the integer value
Constructor Detail

JContextFactory.ContextElement

protected JContextFactory.ContextElement()
Constructs a new context element.
Method Detail

getType

public Class getType()
Description copied from interface: Element
Returns the type of the target element, as a Class.
Specified by:
getType in interface Element
Following copied from interface: org.objectweb.jonathan.apis.kernel.Element
Returns:
the type of the target element, as a Class.

getValue

public Object getValue()
Description copied from interface: Element
Returns the value of the target element, if its type is an object reference type.

If the target element is of an integral type, NO_VALUE} is returned.

Specified by:
getValue in interface Element
Following copied from interface: org.objectweb.jonathan.apis.kernel.Element
Returns:
the value of the target element.

getIntValue

public int getIntValue()
Description copied from interface: Element
Returns the value of the target element, if its class is an integer class.

If the target element has an object reference type, Integer.MAX_VALUE is returned.

Specified by:
getIntValue in interface Element
Following copied from interface: org.objectweb.jonathan.apis.kernel.Element
Returns:
the value of the target element.

getName

public String getName()
Description copied from interface: Element
Returns the (local) name of the element, in the context it belongs to.
Specified by:
getName in interface Element
Following copied from interface: org.objectweb.jonathan.apis.kernel.Element
Returns:
the (local) name of the element, in the context it belongs to.

checkType

public boolean checkType()

toString

public String toString()
Overrides:
toString in class Object

reset

protected void reset()
Resets the element, setting all object reference members to null, and possibly recycling the element in a pool.