org.objectweb.jorm.metainfo.api

Interface GenClass

All Superinterfaces:
MetaObject, 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(String indexFieldName, PType type)
Returns a new PrimitiveElement object, created with its name and its type (PType).
PrimitiveElement
getIndexField(String indexfieldname)
Returns the PrimitiveElement corresponding to its name.
int
getIndexFieldNumber()
Returns the number of index fields for the current generic class.
String
getName()
Allows to know the name of the current generic class object.
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 Details

createIndexField

public PrimitiveElement createIndexField(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(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.


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


getName

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

Returns:
the string representation of the generic class name


iterateIndexField

public 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.