org.objectweb.jorm.generator.lib
Class CommonGenerator

java.lang.Object
  extended byTypeHelper
      extended byorg.objectweb.jorm.generator.lib.CommonHelper
          extended byorg.objectweb.jorm.generator.lib.CommonJVMHelper
              extended byorg.objectweb.jorm.generator.lib.CommonGenerator
All Implemented Interfaces:
Loggable
Direct Known Subclasses:
AbstractMappingGenerator, AccessorGenerator, BinderGenerator, BindingGenerator, FPNCGenerator, KFPNCGenerator, MappingGenerator, PNameGenerator, PNameGetterGenerator, SerializableGenerator, StateGenerator

public abstract class CommonGenerator
extends CommonJVMHelper
implements Loggable

This class contains the common elements for generating jorm objects (mapping, binding, accessors).

See Also:
Serialized Form

Field Summary
static java.lang.String GEN_TEMPLATE_DIR
           
protected  Logger logger
          The logger instance which logs the traces of the generator.
protected  LoggerFactory loggerFactory
          The logger factory instance which permits to fetch Logger instance.
static java.lang.String MAPPER_TEMPLATE_DIR
          The base directory where to find velocity template.
protected  Template template
          The main velocity template for the generator
protected  VelocityEngine velocityEngine
           
 
Fields inherited from class org.objectweb.jorm.generator.lib.CommonHelper
debug, PN_GET_TYPES
 
Constructor Summary
CommonGenerator()
           
 
Method Summary
 Logger getLogger()
          Returns a logger to an component that wants to log things.
 LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 java.lang.String[][] getTemplateLibraries()
           
 void setLogger(Logger l)
          Assigns a logger to an component that wants to log things.
 void setLoggerFactory(LoggerFactory lf)
          Assigns a logger factory that allows the creation of new loggers.
 void setVelocityEngine(VelocityEngine ve)
           
 
Methods inherited from class org.objectweb.jorm.generator.lib.CommonJVMHelper
any2I, getConstructorFieldsPncParam, getJVMClassName, getJVMClassName, getJVMClassName, getJVMType, getJVMType, loadNull, write, writeJavaClass
 
Methods inherited from class org.objectweb.jorm.generator.lib.CommonHelper
buildPemList, canBeNullValue, comparePE, containsCharArrayField, containsCompositeName, containsFieldWhichCanBeNull, containsGenClassRef, containsReference, containsSerializedField, debug, getCNPackageName, getCoderName, getCompositeNameDefEntries, getCompositeReferences, getCTDeclaration, getFQNOfCompositeName, getInheritedClasses, getPaGetMethod, getPaSetMethod, getPemPos, getPNameDecodeFunction, getPNameEncodeFunction, getPNameGetterGetFunction, getPNGTypes, getPrimitiveElement, getPrimitiveElement, getProjectionField, getPType, getPTypeBigDecimal, getPTypeBigInteger, getPTypeBoolean, getPTypeByte, getPTypeByteArray, getPTypeChar, getPTypeCharArray, getPTypeDate, getPTypeDouble, getPTypeFloat, getPTypeInt, getPTypeLong, getPTypeOboolean, getPTypeObyte, getPTypeOchar, getPTypeOdouble, getPTypeOfloat, getPTypeOint, getPTypeOlong, getPTypeOshort, getPTypeReference, getPTypeSerialized, getPTypeShort, getPTypeSpaceFieldName, getPTypeString, getRefNameDef, getTupleDecoding, getTupleDecoding, getTupleGetter, isCharArrayType, isClass, isClassRef, isCompositeName, isFieldName, isGenClassRef, isHiddenField, isNull, isPrimitiveElement, isReference, isSerializedField, isSerializedType, isValidString, log, not, upperFL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPER_TEMPLATE_DIR

public static final java.lang.String MAPPER_TEMPLATE_DIR
The base directory where to find velocity template.

See Also:
Constant Field Values

GEN_TEMPLATE_DIR

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

logger

protected Logger logger
The logger instance which logs the traces of the generator.


loggerFactory

protected LoggerFactory loggerFactory
The logger factory instance which permits to fetch Logger instance.


velocityEngine

protected VelocityEngine velocityEngine

template

protected Template template
The main velocity template for the generator

Constructor Detail

CommonGenerator

public CommonGenerator()
Method Detail

setLoggerFactory

public void setLoggerFactory(LoggerFactory lf)
Description copied from interface: Loggable
Assigns a logger factory that allows the creation of new loggers.

Specified by:
setLoggerFactory in interface Loggable
Overrides:
setLoggerFactory in class CommonHelper

setLogger

public void setLogger(Logger l)
Description copied from interface: Loggable
Assigns a logger to an component that wants to log things.

Specified by:
setLogger in interface Loggable
Overrides:
setLogger in class CommonHelper

getLogger

public Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.

Specified by:
getLogger in interface Loggable
Overrides:
getLogger in class CommonHelper

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.

Specified by:
getLoggerFactory in interface Loggable
Overrides:
getLoggerFactory in class CommonHelper

setVelocityEngine

public void setVelocityEngine(VelocityEngine ve)

getTemplateLibraries

public java.lang.String[][] getTemplateLibraries()