docs: protected String getSetToField(String target, Field field, Class<?> cls, String express, boolean isList,
              boolean isMap, boolean packed) {
          StringBuilder ret = new StringBuilder();
          if (isList || isMap) {
              ret.append("if ((").append(getAccessByField(target, field, cls)).append(") == null) {").append(LINE_BREAK);
          }
          // if field of public modifier we can access directly
          if (Modifier.isPublic(field.getModifiers())) {
              if (isList) {
                  // should initialize list
                  ret.append(target).append(ClassHelper.PACKAGE_SEPARATOR).append(field.getName())
                          .append("= new ArrayList()").append(JAVA_LINE_BREAK).append("}").append(LINE_BREAK);
                  if (express != null) {
                      if (packed) {
                          ret.append("while (input.getBytesUntilLimit() > 0) {").append(LINE_BREAK);
                      }
                      ret.append(target).append(ClassHelper.PACKAGE_SEPARATOR).append(field.getName()).append(".add(")
                              .append(express).append(")");
                      if (packed) {
                          ret.append(";}").append(LINE_BREAK);
                      }
                  }
                  return ret.toString();
              } else if (isMap) {
                  ret.append(target).append(ClassHelper.PACKAGE_SEPARATOR).append(field.getName())
                          .append("= new HashMap()").append(JAVA_LINE_BREAK).append("}").append(LINE_BREAK);
                  return ret.append(express).toString();
              }
              return target + ClassHelper.PACKAGE_SEPARATOR + field.getName() + "=" + express + LINE_BREAK;
          }
          String setter = "set" + CodedConstant.capitalize(field.getName());
          // check method exist
          try {
              cls.getMethod(setter, new Class<?>[] { field.getType() });
              if (isList) {
                  ret.append("List __list = new ArrayList()").append(JAVA_LINE_BREAK);
                  ret.append(target).append(ClassHelper.PACKAGE_SEPARATOR).append(setter).append("(__list)")
                          .append(JAVA_LINE_BREAK).append("}").append(LINE_BREAK);
  
                  if (express != null) {
                      if (packed) {
                          ret.append("while (input.getBytesUntilLimit() > 0) {").append(LINE_BREAK);
                      }
                      ret.append("(").append(getAccessByField(target, field, cls)).append(").add(").append(express)
                              .append(")");
                      if (packed) {
                          ret.append(";}").append(LINE_BREAK);
                      }
                  }
                  return ret.toString();
              } else if (isMap) {
                  ret.append("Map __map = new HashMap()").append(JAVA_LINE_BREAK);
                  ret.append(target).append(ClassHelper.PACKAGE_SEPARATOR).append(setter).append("(__map)")
                          .append(JAVA_LINE_BREAK).append("}").append(LINE_BREAK);
                  return ret + express;
              }
              return target + ClassHelper.PACKAGE_SEPARATOR + setter + "(" + express + ")\n";
          } catch (Exception e) {
              if (LOGGER.isDebugEnabled()) {
                  LOGGER.debug(e.getMessage(), e);
              }
          }
  
          if (isList) {
              ret.append("List __list = new ArrayList()").append(JAVA_LINE_BREAK);
              ret.append("FieldUtils.setField(").append(target).append(", \"").append(field.getName())
                      .append("\", __list)").append(JAVA_LINE_BREAK).append("}").append(LINE_BREAK);
              if (express != null) {
                  if (packed) {
                      ret.append("while (input.getBytesUntilLimit() > 0) {").append(LINE_BREAK);
                  }
                  ret.append("(").append(getAccessByField(target, field, cls)).append(").add(").append(express)
                          .append(")");
                  if (packed) {
                      ret.append(";}").append(LINE_BREAK);
                  }
              }
              return ret.toString();
          } else if (isMap) {
              ret.append("Map __map = new HashMap()").append(JAVA_LINE_BREAK);
              ret.append("FieldUtils.setField(").append(target).append(", \"").append(field.getName())
                      .append("\", __map)").append(JAVA_LINE_BREAK).append("}").append(LINE_BREAK);
              return ret + express;
          }
  
          // use reflection to get value
          String code = "";
          if (express != null) {
              code = "FieldUtils.setField(" + target + ", \"" + field.getName() + "\", " + express + ")" + LINE_BREAK;
          }
          return code;
      }