org.objectweb.jorm.generator.lib
Class BinderGenerator
java.lang.Object
|
+--org.objectweb.jorm.generator.lib.CommonGenerator
|
+--org.objectweb.jorm.generator.lib.BinderGenerator
- All Implemented Interfaces:
- Loggable
- public class BinderGenerator
- extends CommonGenerator
This class is a generator of XXXBinder objects. It is generic either the
mapper type. This generator use the velocity tools. The used template is
Binder.vm . Associated to this template this generator builds a velocity
context which contains the following information:
Key | Value |
"compositename" | The reference to the compositename meta object |
"tools" |
The reference to the CommonHelper |
"header" |
The file name of the common template which contains the header of
the generate files. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
helper
public CommonHelper helper
BinderGenerator
public BinderGenerator()
generate
public void generate(CompositeName co,
TargetHolder holder,
JormCompilerParameter cp)
throws PException
- This method generates a XPBinder file corresponding to the co
parameter in the directory parameter.
- Parameters:
co
- The meta object interface.holder
- The target holder which allows to create files.cp
- This parameter permits to reach the compilation parameters.
PException
containsObject
public boolean containsObject(CompositeName cn)
throws PException
PException
containsPrimitive
public boolean containsPrimitive(CompositeName cn)
throws PException
PException
getNullValue
public java.lang.String getNullValue(PrimitiveElement pe)
getPNameFromSpecificPNG
public java.lang.String getPNameFromSpecificPNG(CompositeName cn,
java.lang.String pngVar,
java.lang.String ctxVar)
throws PException
PException
getPNameFromGenericPNG
public java.lang.String getPNameFromGenericPNG(CompositeName cn,
java.lang.String pngVar,
java.lang.String ctxVar)
throws PException
PException
getTestNullValues
public java.lang.String getTestNullValues(CompositeName cn,
boolean generic,
java.lang.String ctx)
throws PException
PException
getCoderSetter
public java.lang.String getCoderSetter(PType t)
getCoderGetter
public java.lang.String getCoderGetter(PType t)
getCoderName
public java.lang.String getCoderName(PType t)
getCTDeclaration
public java.lang.String getCTDeclaration(PType t)