|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTypeHelper
org.objectweb.jorm.generator.lib.CommonHelper
org.objectweb.jorm.generator.lib.CommonJVMHelper
org.objectweb.jorm.generator.lib.CommonGenerator
org.objectweb.jorm.generator.lib.MappingGenerator
This class is a generator of XPMapping objects. It is generic either the
mapper type. This generator use the velocity tools. The used template is
Mapping.vm . Associated to this template, this
generator builds a velocity context which contains the following
information:
Key | Value |
"class" | The reference to the Class meta object |
"tools" | The reference to the CommonHelper |
"header" | The file name of the common template which contains the header of the generate files. |
"mappingTools" | The reference to current instance of MappingGenerator. |
"cparam" | The reference to a CompilerParameter instance. This instance describes the user compilation parameter. |
Field Summary | |
protected java.util.HashMap |
mmops
The mapper generation specializations (some MOP objects) key = mapper name value = a MOP |
Fields inherited from class org.objectweb.jorm.generator.lib.CommonGenerator |
GEN_TEMPLATE_DIR, logger, loggerFactory, MAPPER_TEMPLATE_DIR, template, velocityEngine |
Fields inherited from class org.objectweb.jorm.generator.lib.CommonHelper |
debug, PN_GET_TYPES |
Constructor Summary | |
MappingGenerator(JormCompilerConfigurator jcc,
JormCompilerParameter cp)
This constrcutor permits to specify which BindingMOP must be used |
Method Summary | |
void |
generate(Class clazz,
TargetHolder holder,
JormCompilerParameter cp,
JormCompilerConfigurator jcc)
Generates java code mapping for a jorm class. |
java.lang.String |
getGenclass(int level)
This method is a generation helper. |
java.util.ArrayList |
getGenClassNames(GenClassRef gcr)
|
int |
getIndexNumber(GenClass gc)
This method calculates the number of indexes in a GenClass. |
PType |
getJavaLangPrimitive(PType pt)
|
TypedElement |
getLastElement(GenClassRef gcr)
|
java.lang.String |
getOwner(TypedElement te,
Class owner,
java.lang.String ownerName)
|
PType |
getPrimitive(PType pt)
|
java.lang.String[][] |
getTemplateLibraries()
|
java.lang.String |
ptype2CTString(PType pt)
This generation helper method retrieves the string corresponding to the codding type (short value) associated to a PType. |
java.lang.String |
ptype2String(PType pt)
This generation helper method retrieves the string corresponding to the instance of the PType. |
Methods inherited from class org.objectweb.jorm.generator.lib.CommonGenerator |
getLogger, getLoggerFactory, setLogger, setLoggerFactory, setVelocityEngine |
Methods inherited from class org.objectweb.jorm.generator.lib.CommonJVMHelper |
any2I, getConstructorFieldsPncParam, getJVMClassName, getJVMClassName, getJVMClassName, getJVMType, getJVMType, loadNull, write, writeJavaClass |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.HashMap mmops
Constructor Detail |
public MappingGenerator(JormCompilerConfigurator jcc, JormCompilerParameter cp) throws PException
Method Detail |
public java.lang.String[][] getTemplateLibraries()
getTemplateLibraries
in class CommonGenerator
public void generate(Class clazz, TargetHolder holder, JormCompilerParameter cp, JormCompilerConfigurator jcc) throws PException
clazz
- the meta object interfaceholder
- The target holder which allows to create filescp
- the compilation parametersjcc
- the compiler configurator (not used at the moment)
PException
public java.lang.String getOwner(TypedElement te, Class owner, java.lang.String ownerName)
public java.lang.String ptype2CTString(PType pt) throws PExceptionTyping
PExceptionTyping
public PType getJavaLangPrimitive(PType pt)
public PType getPrimitive(PType pt)
public java.lang.String ptype2String(PType pt) throws PExceptionTyping
PExceptionTyping
public java.lang.String getGenclass(int level)
public int getIndexNumber(GenClass gc)
public TypedElement getLastElement(GenClassRef gcr)
public java.util.ArrayList getGenClassNames(GenClassRef gcr)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |