package com.github.sergejsamsonow.codegenerator.pojo.renderer;

import com.github.sergejsamsonow.codegenerator.api.CodeFormat;
import com.github.sergejsamsonow.codegenerator.api.MethodCodeWriter;
import com.github.sergejsamsonow.codegenerator.pojo.model.PojoBean;
import com.github.sergejsamsonow.codegenerator.pojo.model.PojoProperty;

public class Setter extends AbstractPropertyRenderer<PojoProperty, PojoBean> {

    public Setter(CodeFormat format) {
        super(format);
    }

    @Override
    protected void writePropertyCode(PojoProperty property) {
        String type = property.getDeclarationType();
        String field = property.getFieldName();
        String setter = property.getSetterName();
        MethodCodeWriter writer = getMethodCodeWriter();
        writer.start("public void %s(%s %s) {", setter, type, field);
        writer.code("this.%s = %s;", field, field);
        writer.end();
    }
}

@@ -671,22 +671,20 @@
  String 
-setter
+name
  = prope
@@ -729,22 +729,22 @@
 eWriter 
-writer
+method
  = getMe
@@ -769,22 +769,22 @@
         
-writer
+method
 .start(%22
@@ -813,14 +813,12 @@
 %7B%22, 
-setter
+name
 , ty
@@ -837,22 +837,22 @@
         
-writer
+method
 .code(%22t
@@ -893,14 +893,14 @@
     
-writer
+method
 .end

Implement example producer Small refactoring