org.objectweb.jorm.metainfo.api
Interface GenClass

All Superinterfaces:
MetaObject, java.io.Serializable

public interface GenClass
extends MetaObject

The GenClass interface defines generic class object which are used to gather other objects.

Author:
X. Spengler

Method Summary
 PrimitiveElement createIndexField(java.lang.String indexFieldName, PType type)
          Returns a new PrimitiveElement object, created with its name and its type (PType).
 PrimitiveElement getIndexField(java.lang.String indexfieldname)
          Returns the PrimitiveElement corresponding to its name.
 int getIndexFieldNumber()
          Returns the number of index fields for the current generic class.
 java.lang.String getName()
          Allows to know the name of the current generic class object.
 java.util.Iterator iterateIndexField()
          Allows to know all the existing index field for the current generic class.
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Method Detail

getName

public java.lang.String getName()
Allows to know the name of the current generic class object.

Returns:
the string representation of the generic class name

createIndexField

public PrimitiveElement createIndexField(java.lang.String indexFieldName,
                                         PType type)
Returns a new PrimitiveElement object, created with its name and its type (PType). As the current Class is generic, the field of the class is an index field. If the field already exists, it is returned, else a new one is created.

Parameters:
indexFieldName - the name of the index field
type - the type of the index field
Returns:
a new PrimitiveField for the current generic class

getIndexField

public PrimitiveElement getIndexField(java.lang.String indexfieldname)
Returns the PrimitiveElement corresponding to its name. If no field corresponds to this name, null is returned.

Parameters:
indexfieldname - the name of the index field
Returns:
an existing index field. If the index field does not exist, null is returned.

iterateIndexField

public java.util.Iterator iterateIndexField()
Allows to know all the existing index field for the current generic class. This iterator contains PrimitiveElement objects. If no index field exists, an empty iterator is returned.

Returns:
an Iterator on index field (PrimitiveElement). If there is no index field to return, an empty iterator is returned.

getIndexFieldNumber

public int getIndexFieldNumber()
Returns the number of index fields for the current generic class.

Returns:
the integer number of the index fields for the generic class