org.objectweb.jorm.comp.generator.lib
Class BinderGenerator

java.lang.Object
  |
  +--org.objectweb.jorm.comp.generator.lib.ObjectGenerator
        |
        +--org.objectweb.jorm.comp.generator.lib.BinderGenerator
All Implemented Interfaces:
Generator, Loggable

public class BinderGenerator
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:
KeyValue
"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.


Field Summary
 CommonHelper helper
           
 
Fields inherited from class org.objectweb.jorm.comp.generator.lib.ObjectGenerator
logger, loggerFactory, TEMPLATE_DIR
 
Constructor Summary
BinderGenerator()
           
 
Method Summary
 boolean containsObject(CompositeName cn)
           
 boolean containsPrimitive(CompositeName cn)
           
 void generate(MetaObject pod, org.objectweb.util.io.api.TargetHolder holder, CompilerParameter cp)
          This method generates a XAccessor file corresponding to the pod parameter in the directory parameter
 java.lang.String getCoderGetter(PType t)
           
 java.lang.String getCoderName(PType t)
           
 java.lang.String getCoderSetter(PType t)
           
 java.lang.String getCTDeclaration(PType t)
           
 java.lang.String getPNameFromGenericPNG(CompositeName cn, java.lang.String pngVar, java.lang.String ctxVar)
           
 java.lang.String getPNameFromSpecificPNG(CompositeName cn, java.lang.String pngVar, java.lang.String ctxVar)
           
 
Methods inherited from class org.objectweb.jorm.comp.generator.lib.ObjectGenerator
getLogger, getLoggerFactory, initVelocity, setLogger, setLoggerFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

helper

public CommonHelper helper
Constructor Detail

BinderGenerator

public BinderGenerator()
Method Detail

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 interface
th - The target holder which allows to create files
cp - This parameter permits to reach the compilation parameters

containsObject

public boolean containsObject(CompositeName cn)
                       throws PException

containsPrimitive

public boolean containsPrimitive(CompositeName cn)
                          throws PException

getPNameFromSpecificPNG

public java.lang.String getPNameFromSpecificPNG(CompositeName cn,
                                                java.lang.String pngVar,
                                                java.lang.String ctxVar)
                                         throws PException

getPNameFromGenericPNG

public java.lang.String getPNameFromGenericPNG(CompositeName cn,
                                               java.lang.String pngVar,
                                               java.lang.String ctxVar)
                                        throws 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)