|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.metainfo.lib.BasicMetaObject
org.objectweb.jorm.metainfo.lib.BasicGenClassRef
BasicGenClassRef defines a reference to a generic class which is class field. This object is created by the GenClass object to define its fields.
Field Summary |
Fields inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject |
debug, logger, loggerFactory, parent |
Constructor Summary | |
BasicGenClassRef(java.lang.String genClassName,
java.lang.String name,
MetaObject parent)
Builds a new BasicGenClassRef object. |
Method Summary | |
void |
addIndexField(java.lang.String indexFieldName)
|
int |
compareTo(java.lang.Object o)
|
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. |
ScalarField |
createIndexField(java.lang.String indexFieldName,
PType type,
int size,
int scale)
Returns a new ScalarField 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). |
NameDef |
createRefNameDef()
Creates a new NameDef object for the current reference class object. |
protected java.util.Collection |
getChildren()
|
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 an iterator over the hiddenfield of the refgenclass definition. |
java.util.Collection |
getIdNameDef()
Returns an iterator on existing NameDef of GenClassRef object. |
NameDef |
getIdNameDef(java.lang.String name)
Returns a NameDef object. |
ScalarField |
getIndexField()
Returns the ScalarField object corresponding to the index field. |
java.util.Collection |
getIndexFields()
Allows to know all the existing index field for the current generic class. |
java.lang.String |
getName()
Returns the name of the current typed element. |
PrimitiveElement |
getPrimitiveElement()
Returns the PrimitiveElement object which defines the current GenClassRef object. |
java.util.Collection |
getRefNameDef()
Returns an iterator on existing NameDef for the current Class. |
NameDef |
getRefNameDef(java.lang.String name)
Returns a NameDef object. |
PType |
getType()
Allows to know the type of the field. |
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 class org.objectweb.jorm.metainfo.lib.BasicMetaObject |
getLogger, getLoggerFactory, getManager, getParent, setLogger, setLoggerFactory, setLoggingOnChild, 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 |
public BasicGenClassRef(java.lang.String genClassName, java.lang.String name, MetaObject parent)
genClassName
- the name of the generic class referencename
- the string representation of the generic class
field nameparent
- the parent of the current objectMethod Detail |
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public PrimitiveElement createPrimitiveElement(PType type, int size, int scale)
createPrimitiveElement
in interface GenClassRef
type
- is the PType of the primitive element which will be created
public ScalarField createIndexField(java.lang.String indexFieldName, PType type, int size, int scale)
indexFieldName
- the name of the index fieldtype
- the type of the index field
public ScalarField getIndexField()
public ClassRef createClassRef(Class clazz)
createClassRef
in interface GenClassRef
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)
createGenClassRef
in interface GenClassRef
genClassRefName
- the name of the generic class used to create a
new GenClassRef object
public PrimitiveElement getPrimitiveElement()
getPrimitiveElement
in interface GenClassRef
public TypedElement removeTypedElement(java.lang.String fieldName)
GenClassRef
removeTypedElement
in interface GenClassRef
fieldName
- is the name of the field to be removed
public ClassRef getClassRef()
getClassRef
in interface GenClassRef
public GenClassRef getGenClassRef()
getGenClassRef
in interface GenClassRef
public boolean isPrimitive()
isPrimitive
in interface GenClassRef
public boolean isClassRef()
isClassRef
in interface GenClassRef
public boolean isGenClassRef()
isGenClassRef
in interface GenClassRef
public NameDef createIdNameDef()
createIdNameDef
in interface GenClassRef
public java.util.Collection getIdNameDef()
getIdNameDef
in interface GenClassRef
public ScalarField createHiddenField(java.lang.String fieldName, PType type, int size, int scale)
createHiddenField
in interface GenClassRef
public java.util.Collection getHiddenFields()
getHiddenFields
in interface GenClassRef
public ScalarField getHiddenField(java.lang.String fieldName)
getHiddenField
in interface GenClassRef
public java.lang.String getGenClassName()
getGenClassName
in interface GenClassRef
public java.lang.String getGenClassId()
GenClassRef
getGenClassId
in interface GenClassRef
public NameDef createRefNameDef()
createRefNameDef
in interface Reference
public NameDef getRefNameDef(java.lang.String name)
getRefNameDef
in interface Reference
name
- the name of the namedef.
public NameDef getIdNameDef(java.lang.String name)
getIdNameDef
in interface GenClassRef
name
- the name of the namedef.
public java.util.Collection getRefNameDef()
getRefNameDef
in interface Reference
public void addIndexField(java.lang.String indexFieldName)
addIndexField
in interface GenClassRef
indexFieldName
- the name of the index fieldpublic java.util.Collection getIndexFields()
getIndexFields
in interface GenClassRef
protected java.util.Collection getChildren()
getChildren
in class BasicMetaObject
public java.lang.String getName()
getName
in interface TypedElement
public PType getType()
getType
in interface TypedElement
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |