org.objectweb.jorm.comp.generator.lib
Class BindingGenerator
java.lang.Object
|
+--org.objectweb.jorm.comp.generator.lib.ObjectGenerator
|
+--org.objectweb.jorm.comp.generator.lib.BindingGenerator
- All Implemented Interfaces:
- Generator, Loggable
- public class BindingGenerator
- extends ObjectGenerator
This class is a generator of XXXBinding objects. It is generic either the
mapper type. This generator use the velocity tools. The used template is
Binding.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. |
| "bindingTools" |
The reference to current instance of BindingGenerator. |
| "cparam" |
The reference to a CompilerParameter instance. This instance
describes the user compilation parameter. |
As a XXXBinding class is specific to a mapper, the Binding.vm template uses
externals macros which must be defined as an external template library in
the velocity tools.
|
Field Summary |
protected MOP |
bmop
The mapper specialization |
|
Constructor Summary |
BindingGenerator(MOP _bmop)
This constrcutor permits to specify which BindingMOP must be used |
|
Method Summary |
void |
generate(MetaObject pod,
org.objectweb.util.io.api.TargetHolder holder,
CompilerParameter cp)
This method generates a XPBinding file corresponding to the pod
parameter in the directory parameter |
void |
setBindingMOP(MOP _bmop)
This sette method permits to specify which BindingMOP must be used |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bmop
protected MOP bmop
- The mapper specialization
BindingGenerator
public BindingGenerator(MOP _bmop)
throws java.lang.Exception
- This constrcutor permits to specify which BindingMOP must be used
setBindingMOP
public void setBindingMOP(MOP _bmop)
- This sette method permits to specify which BindingMOP must be used
generate
public void generate(MetaObject pod,
org.objectweb.util.io.api.TargetHolder holder,
CompilerParameter cp)
throws java.lang.Exception
- This method generates a XPBinding file corresponding to the pod
parameter in the directory parameter
- Overrides:
generate in class ObjectGenerator
- Parameters:
pod - the meta object interfaceholder - The target holder which allows to create filescp - This parameter permits to reach the compilation parameters