org.objectweb.jorm.metainfo.lib
Class BasicTypedElement

java.lang.Object
  extended byorg.objectweb.jorm.metainfo.lib.BasicMetaObject
      extended byorg.objectweb.jorm.metainfo.lib.BasicTypedElement
All Implemented Interfaces:
java.lang.Comparable, MetaObject, java.io.Serializable, TypedElement
Direct Known Subclasses:
BasicPrimitiveElement

public class BasicTypedElement
extends BasicMetaObject
implements TypedElement, java.lang.Comparable

Implementation of TypedElement.

See Also:
Serialized Form

Constructor Summary
BasicTypedElement(java.lang.String name, PType pType, int size, MetaObject parent)
          Builds a new BasicTypedElement object.
 
Method Summary
 int compareTo(java.lang.Object o)
           
 java.lang.String getName()
          Returns the name of the current typed element.
 int getSize()
          Returns the size of the field in case of string, serialized, arrays, etc
 PType getType()
          Returns the type of the field.
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
getManager, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Constructor Detail

BasicTypedElement

public BasicTypedElement(java.lang.String name,
                         PType pType,
                         int size,
                         MetaObject parent)
Builds a new BasicTypedElement object.

Parameters:
name - the name of the primitive field, pType the type of the primitive field, parent the parent of the current object.
Method Detail

compareTo

public int compareTo(java.lang.Object o)
Specified by:
compareTo in interface java.lang.Comparable

getName

public java.lang.String getName()
Returns the name of the current typed element.

Specified by:
getName in interface TypedElement
Returns:
the string representation of the typed element

getType

public PType getType()
Returns the type of the field.

Specified by:
getType in interface TypedElement
Returns:
a PType object which defines the type of the current field

getSize

public int getSize()
Returns the size of the field in case of string, serialized, arrays, etc

Returns:
the size for this type