docs: private String getSizeMethodCode() {
          StringBuilder code = new StringBuilder();
          Set<Integer> orders = new HashSet<Integer>();
          // encode method
          code.append("public int size(").append(ClassHelper.getInternalName(cls.getCanonicalName()));
          code.append(" t) throws IOException {").append(LINE_BREAK);
          code.append("int size = 0").append(JAVA_LINE_BREAK);
          for (FieldInfo field : fields) {
  
              boolean isList = field.isList();
  
              // check type
              if (!isList) {
                  checkType(field.getFieldType(), field.getField());
              }
  
              if (orders.contains(field.getOrder())) {
                  throw new IllegalArgumentException("Field order '" + field.getOrder() + "' on field"
                          + field.getField().getName() + " already exsit.");
              }
              // define field
              code.append(CodedConstant.getMappedTypeDefined(field.getOrder(), field.getFieldType(),
                      getAccessByField("t", field.getField(), cls), isList, field.isMap()));
              // compute size
              code.append("if (!CodedConstant.isNull(").append(getAccessByField("t", field.getField(), cls)).append("))")
                      .append("{").append(LINE_BREAK);
              code.append("size += ");
              code.append(CodedConstant.getMappedTypeSize(field, field.getOrder(), field.getFieldType(), isList,
                      field.isMap(), debug, outputPath));
              code.append("}").append(LINE_BREAK);
              if (field.isRequired()) {
                  code.append(CodedConstant.getRequiredCheck(field.getOrder(), field.getField()));
              }
          }
  
          code.append("return size").append(JAVA_LINE_BREAK);
          code.append("}").append(LINE_BREAK);
  
          return code.toString();
      }