org.objectweb.jonathan.apis.kernel
Interface Element

All Known Subinterfaces:
TreeElement
All Known Implementing Classes:
JContextFactory.ContextElement, JElement, JTreeElement

public interface Element

The Element interface represents an element in a context.


Method Summary
 Component getComponent()
          Returns the component contained in the target element.
 Component getContainer()
          Returns the context containing the target element, if any, null otherwise.
 int getIntValue()
          Returns the value of the target element, if its class is an integer class.
 java.lang.String getName()
          Returns the (local) name of the element, in the context it belongs to.
 java.lang.Class getType()
          Returns the type of the target element, as a Class.
 java.lang.Object getValue()
          Returns the value of the target element, if its type is an object reference type.
 

Method Detail

getName

java.lang.String getName()
Returns the (local) name of the element, in the context it belongs to.

Returns:
the (local) name of the element, in the context it belongs to.

getComponent

Component getComponent()
Returns the component contained in the target element.

Returns:
the component contained in the target element.

getType

java.lang.Class getType()
Returns the type of the target element, as a Class.

Returns:
the type of the target element, as a Class.

getValue

java.lang.Object getValue()
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.

Returns:
the value of the target element.

getIntValue

int getIntValue()
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.

Returns:
the value of the target element.

getContainer

Component getContainer()
Returns the context containing the target element, if any, null otherwise.

Returns:
the context containing the target element, if any, null otherwise.