protected abstract JMethod createConstructor( @NotNull JDefinedClass serializerClass, @NotNull DomainObjectDescriptor domainObjectDescriptor );
@NotNull
protected JMethod createSerializeMethodStub( @NotNull JType domainType, @NotNull 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( getExceptionType() );