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 java.lang.Object
implements GeneratorDecorator


Constructor Summary
NotNullDecorator(java.lang.Class<? extends java.lang.annotation.Annotation> notNullAnnotationType)
           
 
Method Summary
protected  void annotateParamsWithNotNull(com.sun.codemodel.JMethod method)
           
 void decorateConstant(com.cedarsoft.codegen.CodeGenerator codeGenerator, com.sun.codemodel.JFieldVar constant)
           
 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
                        java.lang.Class<? extends java.lang.annotation.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)
Specified by:
decorateConstant in interface com.cedarsoft.codegen.Decorator

annotateParamsWithNotNull

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


Copyright © 2010 cedarsoft GmbH. All Rights Reserved.