org.objectweb.speedo.generation.generator.proxy
Class ProxyGenerator

java.lang.Object
  extended byorg.objectweb.speedo.generation.lib.AbstractGeneratorComponent
      extended byorg.objectweb.speedo.generation.generator.lib.AbstractVelocityGenerator
          extended byorg.objectweb.speedo.generation.generator.proxy.ProxyGenerator
All Implemented Interfaces:
GeneratorComponent, VelocityGenerator

public class ProxyGenerator
extends AbstractVelocityGenerator

This class is used to generate the file proxy. This file will represent the persistent instance.

Author:
F. Dhumeaux

Nested Class Summary
 class ProxyGenerator.Const
           
 class ProxyGenerator.Field
           
 
Field Summary
static java.lang.String[][] GC_IMPL
           
static java.lang.String GC_IMPL_PREFIX
           
static java.lang.String LOGGER_NAME
           
 java.lang.Class[][] PRIMITIVE_TYPES
           
static java.lang.String TEMPLATE_NAME
           
 
Fields inherited from class org.objectweb.speedo.generation.generator.lib.AbstractVelocityGenerator
fs, TEMPLATE_DIR, templateFN, ve
 
Fields inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
debug, logger, scp
 
Constructor Summary
ProxyGenerator()
           
 
Method Summary
 void generate(SpeedoClass sClass, java.lang.String fileName)
          This method generates the new file.
 NameDef getElemNameDef(GenClassRef gcr, java.lang.Class clazz)
           
 java.lang.String getPNameGetter(PType type)
           
 NameDef getRefNameDef(GenClassRef gcr, java.lang.Class clazz)
           
 boolean init()
           
 
Methods inherited from class org.objectweb.speedo.generation.generator.lib.AbstractVelocityGenerator
getExternalsTemplate, getVelocityEngine, isClassicalType, isContainerIdField, process, setVelocityEngine
 
Methods inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
getLogger, getSpeedoCompilerParameter, setSpeedoCompilerParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.speedo.generation.api.GeneratorComponent
getSpeedoCompilerParameter, setSpeedoCompilerParameter
 

Field Detail

LOGGER_NAME

public static final java.lang.String LOGGER_NAME
See Also:
Constant Field Values

TEMPLATE_NAME

public static final java.lang.String TEMPLATE_NAME
See Also:
Constant Field Values

GC_IMPL_PREFIX

public static final java.lang.String GC_IMPL_PREFIX
See Also:
Constant Field Values

GC_IMPL

public static final java.lang.String[][] GC_IMPL

PRIMITIVE_TYPES

public final java.lang.Class[][] PRIMITIVE_TYPES
Constructor Detail

ProxyGenerator

public ProxyGenerator()
Method Detail

init

public boolean init()
             throws SpeedoException
Specified by:
init in interface GeneratorComponent
Specified by:
init in class AbstractVelocityGenerator
Throws:
SpeedoException

generate

public void generate(SpeedoClass sClass,
                     java.lang.String fileName)
              throws SpeedoException
This method generates the new file.

Specified by:
generate in interface VelocityGenerator
Specified by:
generate in class AbstractVelocityGenerator
Parameters:
sClass - is the SpeedoClass
fileName - name of the new file.
Throws:
SpeedoGenerationException - if there is a problem during writing the new file.
SpeedoException

getRefNameDef

public NameDef getRefNameDef(GenClassRef gcr,
                             java.lang.Class clazz)
                      throws SpeedoException
Throws:
SpeedoException

getElemNameDef

public NameDef getElemNameDef(GenClassRef gcr,
                              java.lang.Class clazz)
                       throws SpeedoException
Throws:
SpeedoException

getPNameGetter

public java.lang.String getPNameGetter(PType type)