com.cedarsoft.serialization.generator.common.output.serializer
Class AbstractNamespaceBasedGenerator

java.lang.Object
  extended by com.cedarsoft.serialization.generator.common.output.GeneratorBase<T>
      extended by com.cedarsoft.serialization.generator.common.output.serializer.AbstractGenerator<XmlDecisionCallback>
          extended by com.cedarsoft.serialization.generator.common.output.serializer.AbstractNamespaceBasedGenerator
Direct Known Subclasses:
AbstractXmlGenerator

public abstract class AbstractNamespaceBasedGenerator
extends AbstractGenerator<XmlDecisionCallback>

Author:
Johannes Schneider (js@cedarsoft.com)

Field Summary
static String METHOD_NAME_FROM
           
static String METHOD_NAME_TO
           
static String METHOD_SUPER
           
static com.cedarsoft.version.Version VERSION
          The version the serializer supports
 
Fields inherited from class com.cedarsoft.serialization.generator.common.output.serializer.AbstractGenerator
METHOD_NAME_DESERIALIZE, METHOD_NAME_DESERIALIZE_FROM, METHOD_NAME_SERIALIZE, PARAM_NAME_FORMAT_VERSION, PARAM_NAME_SERIALIZE_TO, SERIALIZER_CLASS_NAME_SUFFIX, VAR_NAME_OBJECT
 
Fields inherited from class com.cedarsoft.serialization.generator.common.output.GeneratorBase
codeGenerator, codeModel
 
Constructor Summary
protected AbstractNamespaceBasedGenerator(com.cedarsoft.codegen.CodeGenerator codeGenerator)
           
 
Method Summary
protected  com.sun.codemodel.JInvocation createDefaultVersionRangeInvocation(com.cedarsoft.version.Version from, com.cedarsoft.version.Version to)
          Creates the default version range invocation
protected  String getNamespace(String domainObjectType)
          Returns the namespace that is used for the serialized documents
 
Methods inherited from class com.cedarsoft.serialization.generator.common.output.serializer.AbstractGenerator
addDelegatingSerializerToConstructor, appendDeserializeStatement, appendSerializeStatement, constructDeserializedObject, createConstructor, createDeserializeMethodStub, createDeserializeWrapper, createSerializeMethodStub, createSerializerClassName, createSerializerExtendsExpression, fillDeSerializationMethods, finishConstructor, generateSerializer, getExceptionType, getSerializeFromType, getSerializerRefFor, getSerializeToType
 
Methods inherited from class com.cedarsoft.serialization.generator.common.output.GeneratorBase
getCodeGenerator, getCodeModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

@Nonnull
public static final com.cedarsoft.version.Version VERSION
The version the serializer supports


METHOD_NAME_FROM

public static final String METHOD_NAME_FROM
See Also:
Constant Field Values

METHOD_NAME_TO

public static final String METHOD_NAME_TO
See Also:
Constant Field Values

METHOD_SUPER

public static final String METHOD_SUPER
See Also:
Constant Field Values
Constructor Detail

AbstractNamespaceBasedGenerator

protected AbstractNamespaceBasedGenerator(@Nonnull
                                          com.cedarsoft.codegen.CodeGenerator codeGenerator)
Method Detail

getNamespace

@Nonnull
protected String getNamespace(@Nonnull
                                      String domainObjectType)
Returns the namespace that is used for the serialized documents

Parameters:
domainObjectType - the domain object type
Returns:
the namespace

createDefaultVersionRangeInvocation

@Nonnull
protected com.sun.codemodel.JInvocation createDefaultVersionRangeInvocation(@Nonnull
                                                                                    com.cedarsoft.version.Version from,
                                                                                    @Nonnull
                                                                                    com.cedarsoft.version.Version to)
Creates the default version range invocation

Parameters:
from - the from version
to - the to version
Returns:
the invocation creating the version range


Copyright © 2012 cedarsoft GmbH. All Rights Reserved.