@Override protected void callSuperConstructor( @Nonnull SerializerModel serializerModel, @Nonnull StringBuilder constructorBuilder) { constructorBuilder .append("){") .append("super(\"") .append(createType(serializerModel.getClassToSerializeQualifiedName())) .append("\", \"http://cedarsoft.com/serialization/") .append(serializerModel.getClassToSerializeQualifiedName()) .append("\"") .append(", com.cedarsoft.version.VersionRange.from(1,0,0).to());"); }
@Override protected void appendDeserializeFieldStatements( @Nonnull SerializerModel serializerModel, @Nonnull StringBuilder methodBody) { for (FieldToSerialize field : serializerModel.getFieldToSerializeEntries()) { // nextTag( deserializeFrom, ELEMENT ); methodBody .append("nextTag( deserializeFrom, ") .append(field.getPropertyConstantName()) .append(" );"); // Declare the field methodBody .append(field.getFieldType().getCanonicalText()) .append(" ") .append(field.getFieldName()) .append("="); // Deserialize methodBody .append("deserialize(") .append(field.getFieldTypeBoxed()) .append(".class") .append(", formatVersion, deserializeFrom") .append(");"); } }