protected abstract JMethod createConstructor( @Nonnull JDefinedClass serializerClass, @Nonnull DomainObjectDescriptor domainObjectDescriptor );
@Nonnull
protected JMethod createSerializeMethodStub( @Nonnull JType domainType, @Nonnull JDefinedClass serializerClass ) {
JMethod serializeMethod = serializerClass.method( JMod.PUBLIC, Void.TYPE, METHOD_NAME_SERIALIZE );
serializeMethod.annotate( Override.class );
serializeMethod.param( getSerializeToType(), PARAM_NAME_SERIALIZE_TO );
serializeMethod.param( domainType, VAR_NAME_OBJECT );
JVar formatVersion = serializeMethod.param( codeGenerator.ref( Version.class ), PARAM_NAME_FORMAT_VERSION );
serializeMethod._throws( IOException.class )._throws( ( Class ) getExceptionType() );