org.objectweb.jorm.comp.generator.lib
Class PNameGenerator
java.lang.Object
|
+--org.objectweb.jorm.comp.generator.lib.ObjectGenerator
|
+--org.objectweb.jorm.comp.generator.lib.PNameGenerator
- All Implemented Interfaces:
- Generator, Loggable
- public class PNameGenerator
- extends ObjectGenerator
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
PNameGenerator
public PNameGenerator()
generate
public void generate(MetaObject pod,
org.objectweb.util.io.api.TargetHolder holder,
CompilerParameter cp)
throws java.lang.Exception
- This method generates a XAccessor file corresponding to the pod
parameter in the directory parameter
- Overrides:
generate in class ObjectGenerator
- Parameters:
pod - the meta object interfaceth - The target holder which allows to create filescp - This parameter permits to reach the compilation parameters
getCnHashCode
public java.lang.String getCnHashCode(CompositeName cn)
throws PException
- It compute the hashcode method for a composite pname.
getCnEquals
public java.lang.String getCnEquals(CompositeName cn)
- It compute the equality test for the equals method for pname.
getPNameNullTest
public java.lang.String getPNameNullTest(CompositeName cn)
throws PException
- It compute the test used to know if a pname is null.
getPNameNullValue
public java.lang.String getPNameNullValue(CompositeName cn,
java.lang.String pncVal)
throws PException
- It compute the constructor parameter used to instanciate a null pname.
getNullValue
public java.lang.String getNullValue(CompositeName cn,
ScalarField f)
throws PException