|
|||||||||||
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.BasicClass
BasicClass is an implementation of the Class interface defined in the meta information system. This object is defined by a list of fields, a name, a list of mapping.
Constructor Summary | |
BasicClass(java.lang.String className,
MetaObject parent)
Builds a new Class object. |
Method Summary | |
void |
addAllInheritedClass(java.util.Map table)
Constructs an Map with inherited class |
void |
addClassProject(java.lang.String projectName,
ClassProject classProject)
Adds a ClassProject object. |
Extension |
addInheritedClass(Class class_)
Adds a new inherited class to the list of the inherited classes for the current class object. |
ClassProject |
createClassProject(java.lang.String projectName)
Creates a new ClassProject object. |
ClassRef |
createClassRef(java.lang.String fieldName,
Class class_)
Allows to obtain a new ClassRef from a field name an its class. |
GenClassRef |
createGenClassRef(java.lang.String fieldName,
java.lang.String genName)
Allows to obtain a new GenClassRef from a field name an its generic class. |
ScalarField |
createHiddenField(java.lang.String fieldName,
PType type,
int size)
Creates a new scalar field and adds it to the list of hidden fields. |
NameDef |
createNameDef()
Creates a new NameDef object for the current Class object. |
PrimitiveElement |
createPrimitiveElement(java.lang.String fieldName,
PType type,
int size)
Allows to obtain a new PrimitiveElement from a class field name an its type. |
java.util.Collection |
getAllFields()
|
java.util.Collection |
getAllHiddenFields()
|
ClassProject |
getClassProject(java.lang.String projectName)
Returns a ClassProject object. |
java.util.Collection |
getClassProjects()
Returns a collection of ClassProject objects. |
Extension |
getExtension(java.lang.String fqcn)
Returns an Extension object. |
java.util.Collection |
getExtensions()
Returns a collection of Extension objects. |
int |
getFieldRefNumber()
Returns the number of fields which are references to classes. |
java.lang.String |
getFileName()
Allows to retrieve the file name of this class MO. |
java.lang.String |
getFQName()
Gets the fully qualified name (including the package name) associated with this class. |
ScalarField |
getHiddenField(java.lang.String fieldName)
retrieve an hiddenfield from its name. |
int |
getInheritedClassNumber()
Returns the number of inherited classes for the current Class object. |
Logger |
getLogger()
Returns a logger to an component that wants to log things. |
LoggerFactory |
getLoggerFactory()
Returns a logger factory that allows the creation of new loggers. |
java.lang.String |
getName()
Allows to know the name of the current class object. |
NameDef |
getNameDef(java.lang.String name)
Returns a NameDef object. |
TypedElement |
getTypedElement(java.lang.String fieldName)
Allows to obtain an existing Field. |
boolean |
isAbstract()
Allows to know if the current class is an abstract class or not. |
boolean |
isInherited()
Tests if this class is inherited by another one. |
java.util.Iterator |
iterateAllField()
Returns an iterator on existing class fields + fields from super classes. |
java.util.Iterator |
iterateAllHiddenField()
Provides an iterator over the all the hiddenfield of the class including inherited fields. |
java.util.Iterator |
iterateClassProjects()
return an iterator over the ClassProject objects. |
java.util.Iterator |
iterateExtension()
Allows us to obtain all the Extension objects from the current class object. |
java.util.Iterator |
iterateField()
Returns an iterator on existing class fields. |
java.util.Iterator |
iterateHiddenField()
return an iterator over the hiddenfield of the class definition. |
java.util.Iterator |
iterateInheritedClass()
Allows us to obtain all the inherited classes from the current class object. |
java.util.Iterator |
iterateNameDef()
Returns an iterator on existing NameDef for the current Class. |
protected java.util.List |
listField()
returns an ArrayList which contains the current fields. |
ClassProject |
removeClassProject(java.lang.String projectname)
Removes a ClassProject instance. |
TypedElement |
removeTypedElement(java.lang.String fieldName)
Removes a typed element. |
void |
setAbstract(boolean isAbstract)
|
void |
setFileName(java.lang.String filename)
Allows to assign the file name of this class MO. |
void |
setInherited()
Specifies that this class is inherited by another one within the set of compiled ones. |
void |
setLogger(Logger logger)
Defines a logger object. |
void |
setLoggerFactory(LoggerFactory loggerFactory)
Defines the logger factory to obtain new logger. |
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 |
public BasicClass(java.lang.String className, MetaObject parent)
className
- the name of the current classparent
- the parent of the current objectMethod Detail |
public java.lang.String getFileName()
getFileName
in interface Class
public void setFileName(java.lang.String filename)
setFileName
in interface Class
filename
- The file name.public boolean isAbstract()
isAbstract
in interface Class
public void setAbstract(boolean isAbstract)
setAbstract
in interface Class
public java.lang.String getName()
getName
in interface Class
public java.lang.String getFQName()
Class
getFQName
in interface Class
public TypedElement getTypedElement(java.lang.String fieldName)
getTypedElement
in interface Class
fieldName
- the name of the class field
public TypedElement removeTypedElement(java.lang.String fieldName)
removeTypedElement
in interface Class
fieldName
- is the name of the field to be removed
public NameDef createNameDef()
createNameDef
in interface Class
public NameDef getNameDef(java.lang.String name)
getNameDef
in interface Class
name
- the name of a NameDef object.
public java.util.Iterator iterateNameDef()
iterateNameDef
in interface Class
public PrimitiveElement createPrimitiveElement(java.lang.String fieldName, PType type, int size)
createPrimitiveElement
in interface Class
fieldName
- the name of the primitive fieldtype
- the PType of the primitive field
public ScalarField createHiddenField(java.lang.String fieldName, PType type, int size)
createHiddenField
in interface Class
fieldName
- the name of the field to createtype
- the type of the field to create
public ClassRef createClassRef(java.lang.String fieldName, Class class_)
createClassRef
in interface Class
fieldName
- the name of the fieldclass_
- the string representation of the class which represents
the reference of the field
public GenClassRef createGenClassRef(java.lang.String fieldName, java.lang.String genName)
createGenClassRef
in interface Class
fieldName
- the name of the fieldgenName
- the GenClass object which represents the reference of
the field
public java.util.Iterator iterateField()
iterateField
in interface Class
protected java.util.List listField()
public java.util.Iterator iterateAllField()
iterateAllField
in interface Class
public java.util.Collection getAllFields()
public java.util.Iterator iterateAllHiddenField()
iterateAllHiddenField
in interface Class
public java.util.Collection getAllHiddenFields()
public java.util.Iterator iterateHiddenField()
iterateHiddenField
in interface Class
public ScalarField getHiddenField(java.lang.String fieldName)
getHiddenField
in interface Class
fieldName
- the name of the hiddenfield.
public java.util.Iterator iterateInheritedClass()
iterateInheritedClass
in interface Class
public java.util.Iterator iterateExtension()
iterateExtension
in interface Class
public java.util.Collection getExtensions()
getExtensions
in interface Class
public Extension getExtension(java.lang.String fqcn)
getExtension
in interface Class
fqcn
- a full qualified class name.
public Extension addInheritedClass(Class class_)
addInheritedClass
in interface Class
class_
- the inherited class to add to inherited classes list
public int getInheritedClassNumber()
getInheritedClassNumber
in interface Class
public void addAllInheritedClass(java.util.Map table)
addAllInheritedClass
in interface Class
table
- the hashtable to buildpublic int getFieldRefNumber()
getFieldRefNumber
in interface Class
public void setInherited()
setInherited
in interface Class
public boolean isInherited()
isInherited
in interface Class
public ClassProject getClassProject(java.lang.String projectName)
getClassProject
in interface Class
projectName
- a project name.
public java.util.Collection getClassProjects()
getClassProjects
in interface Class
public java.util.Iterator iterateClassProjects()
public void addClassProject(java.lang.String projectName, ClassProject classProject)
addClassProject
in interface Class
projectName
- a project name,
classProject a ClassProject object.public ClassProject createClassProject(java.lang.String projectName)
createClassProject
in interface Class
projectName
- the name of the project.
public ClassProject removeClassProject(java.lang.String projectname)
removeClassProject
in interface Class
projectname
- is the name of removed ClassProject
public void setLogger(Logger logger)
setLogger
in interface Loggable
logger
- the logger objectpublic void setLoggerFactory(LoggerFactory loggerFactory)
setLoggerFactory
in interface Loggable
loggerFactory
- the LoggerFactory object to obtain a logger objectpublic Logger getLogger()
Loggable
getLogger
in interface Loggable
public LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory
in interface Loggable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |