|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A GenClassRef is an interface which describes method to define a class field which can be a reference to a generic class. A GenClassRef object is composed by a PrimitiveElement (a primitive type), or a ClassRef (a reference to a Class), or an another GenClassRef (a reference to a generic class. A recursion is defined when a GenClassRef object is composed by an other GenClassRef object. A final object of the recursion is a PrimitiveElement or a ClassRef objects.
Method Summary | |
void |
addIndexField(java.lang.String indexFieldName)
|
ClassRef |
createClassRef(Class clazz)
Creates a new ClassRef object, and attach it to the current GenClassRef This method must be used when the recursion is finished (we are on final object which is a ClassRef). |
GenClassRef |
createGenClassRef(java.lang.String genClassRefName)
Creates a new GenClassRef object. |
ScalarField |
createHiddenField(java.lang.String fieldName,
PType type,
int size,
int scale)
Create a new hidden field for the refgenclass. |
NameDef |
createIdNameDef()
Creates a new NameDef object for the new GenClassRef object. |
PrimitiveElement |
createPrimitiveElement(PType type,
int size,
int scale)
Creates a new PrimitiveElement object, and attach it to the current GenClassRef This method must be used when the recursion is finished (we are on final object which is a PrimitiveElement). |
ClassRef |
getClassRef()
Returns the ClassRef object which defines the current GenClassRef object. |
java.lang.String |
getGenClassId()
Returns the id of the GenClass object. |
java.lang.String |
getGenClassName()
Returns the name of the GenClass object. |
GenClassRef |
getGenClassRef()
Returns the GenClassRef object which defines the current GenClassRef object. |
ScalarField |
getHiddenField(java.lang.String fieldName)
retrieve an hiddenfield from its name. |
java.util.Collection |
getHiddenFields()
return the collection of the hiddenfield of the refgenclass definition. |
java.util.Collection |
getIdNameDef()
Returns an iterator on existing NameDef of GenClassRef object. |
NameDef |
getIdNameDef(java.lang.String projectName)
Returns a NameDef object. |
java.util.Collection |
getIndexFields()
Allows to know all the existing index field for the current generic class. |
PrimitiveElement |
getPrimitiveElement()
Returns the PrimitiveElement object which defines the current GenClassRef object. |
boolean |
isClassRef()
Allows to know if the current object is a reference to a Class or not. |
boolean |
isGenClassRef()
Allows to know if the current object is a reference to a generic class or not. |
boolean |
isPrimitive()
Allows to know if the current object is primitive or not (final and "basic"). |
TypedElement |
removeTypedElement(java.lang.String fieldName)
Removes the primitive element. |
Methods inherited from interface org.objectweb.jorm.metainfo.api.Reference |
createRefNameDef, getRefNameDef, getRefNameDef |
Methods inherited from interface org.objectweb.jorm.metainfo.api.TypedElement |
getName, getType |
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject |
getParent, setParent |
Method Detail |
public PrimitiveElement createPrimitiveElement(PType type, int size, int scale)
type
- is the PType of the primitive element which will be created
public ClassRef createClassRef(Class clazz)
clazz
- the reference to the Class object which defines the
current GenClassRef object. This object is the final
object of the recursion.
public GenClassRef createGenClassRef(java.lang.String genClassRefName)
genClassRefName
- the name of the generic class used to create a
new GenClassRef object
public PrimitiveElement getPrimitiveElement()
public TypedElement removeTypedElement(java.lang.String fieldName)
fieldName
- is the name of the field to be removed
public ClassRef getClassRef()
public GenClassRef getGenClassRef()
public boolean isPrimitive()
public boolean isClassRef()
public boolean isGenClassRef()
public NameDef createIdNameDef()
public java.util.Collection getIdNameDef()
public NameDef getIdNameDef(java.lang.String projectName)
projectName
- the name of the project.
public java.lang.String getGenClassName()
public java.lang.String getGenClassId()
public ScalarField createHiddenField(java.lang.String fieldName, PType type, int size, int scale)
public java.util.Collection getHiddenFields()
public ScalarField getHiddenField(java.lang.String fieldName)
public void addIndexField(java.lang.String indexFieldName)
indexFieldName
- the name of the index fieldpublic java.util.Collection getIndexFields()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |