org.objectweb.jorm.generator.lib
Class SerializableGenerator

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
                  extended byorg.objectweb.jorm.generator.lib.SerializableGenerator
All Implemented Interfaces:
Loggable

public class SerializableGenerator
extends CommonGenerator

This class generates a XXXSeriazable class for each persistent class. This generator is based on ASM.

Author:
yoann (initial version with velocity), S.Chassande-Barrioz (Migrate to ASM)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jorm.generator.lib.CommonGenerator
GEN_TEMPLATE_DIR, logger, loggerFactory, MAPPER_TEMPLATE_DIR, template, velocityEngine
 
Fields inherited from class org.objectweb.jorm.generator.lib.CommonHelper
debug, PN_GET_TYPES
 
Constructor Summary
SerializableGenerator()
           
 
Method Summary
 void generate(Class co, TargetHolder holder, JormCompilerParameter cp)
          This method generates a XSerializableData file corresponding to the pod parameter in the directory parameter.
 
Methods inherited from class org.objectweb.jorm.generator.lib.CommonGenerator
getLogger, getLoggerFactory, getTemplateLibraries, setLogger, setLoggerFactory, setVelocityEngine
 
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
 

Constructor Detail

SerializableGenerator

public SerializableGenerator()
Method Detail

generate

public void generate(Class co,
                     TargetHolder holder,
                     JormCompilerParameter cp)
              throws PException
This method generates a XSerializableData file corresponding to the pod parameter in the directory parameter.

Parameters:
co - The meta object interface.
holder - The target holder which allows to create files.
cp - This parameter permits to reach the compilation parameters.
Throws:
PException