com.cedarsoft.serialization.generator.output.serializer
Class NotNullDecorator

java.lang.Object
  extended by com.cedarsoft.serialization.generator.output.serializer.NotNullDecorator
All Implemented Interfaces:
com.cedarsoft.codegen.Decorator, GeneratorDecorator

public class NotNullDecorator
extends Object
implements GeneratorDecorator


Constructor Summary
NotNullDecorator(Class<? extends Annotation> notNullAnnotationType)
           
 
Method Summary
protected  void annotateParamsWithNotNull(com.sun.codemodel.JMethod method)
           
 void decorateConstant(com.cedarsoft.codegen.CodeGenerator<?> codeGenerator, com.sun.codemodel.JFieldVar constant)
          Decorates constants
 void decorateDeserializeMethod(com.cedarsoft.codegen.CodeGenerator<?> codeGenerator, com.sun.codemodel.JType domainType, com.sun.codemodel.JDefinedClass serializerClass, com.sun.codemodel.JMethod deserializeMethod)
          Decorates the deserialize method
 void decorateSerializeMethod(com.cedarsoft.codegen.CodeGenerator<?> codeGenerator, com.sun.codemodel.JType domainType, com.sun.codemodel.JDefinedClass serializerClass, com.sun.codemodel.JMethod serializeMethod)
          Decorates the serialize method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NotNullDecorator

public NotNullDecorator(@NotNull
                        Class<? extends Annotation> notNullAnnotationType)
Method Detail

decorateSerializeMethod

public void decorateSerializeMethod(@NotNull
                                    com.cedarsoft.codegen.CodeGenerator<?> codeGenerator,
                                    @NotNull
                                    com.sun.codemodel.JType domainType,
                                    @NotNull
                                    com.sun.codemodel.JDefinedClass serializerClass,
                                    @NotNull
                                    com.sun.codemodel.JMethod serializeMethod)
Description copied from interface: GeneratorDecorator
Decorates the serialize method

Specified by:
decorateSerializeMethod in interface GeneratorDecorator
Parameters:
codeGenerator - the code generator
domainType - the domain type
serializerClass - the serializer class
serializeMethod - the serialize method

decorateDeserializeMethod

public void decorateDeserializeMethod(@NotNull
                                      com.cedarsoft.codegen.CodeGenerator<?> codeGenerator,
                                      @NotNull
                                      com.sun.codemodel.JType domainType,
                                      @NotNull
                                      com.sun.codemodel.JDefinedClass serializerClass,
                                      @NotNull
                                      com.sun.codemodel.JMethod deserializeMethod)
Description copied from interface: GeneratorDecorator
Decorates the deserialize method

Specified by:
decorateDeserializeMethod in interface GeneratorDecorator
Parameters:
codeGenerator - the code generator
domainType - the domain type
serializerClass - the serializer class
deserializeMethod - the deserialize method

decorateConstant

public void decorateConstant(@NotNull
                             com.cedarsoft.codegen.CodeGenerator<?> codeGenerator,
                             @NotNull
                             com.sun.codemodel.JFieldVar constant)
Description copied from interface: GeneratorDecorator
Decorates constants

Specified by:
decorateConstant in interface com.cedarsoft.codegen.Decorator
Specified by:
decorateConstant in interface GeneratorDecorator
Parameters:
codeGenerator - the code generator
constant - the constant

annotateParamsWithNotNull

protected void annotateParamsWithNotNull(@NotNull
                                         com.sun.codemodel.JMethod method)


Copyright © 2010 cedarsoft GmbH. All Rights Reserved.