docs: public String toCode() {
          StringBuilder code = new StringBuilder();
          // package
          if (!StringUtils.isEmpty(pkg)) {
              code.append("package ").append(pkg).append(JAVA_LINE_BREAK);
          }
                 
          // import
          for (String importClass : imports) {
              code.append("import ").append(importClass).append(JAVA_LINE_BREAK);
          }
          
          // define class
          code.append(scope).append(" class ").append(className);
          if (!interfaces.isEmpty()) {
              code.append(" implements ");
              Iterator<String> iter = interfaces.iterator();
              while (iter.hasNext()) {
                  code.append(iter.next());
                  if (iter.hasNext()) {
                      code.append(SENTENCE_COMMA);
                  }
              }
          }
          
          if (!extendClasses.isEmpty()) {
              code.append(" extends ");
              Iterator<String> iter = extendClasses.iterator();
              while (iter.hasNext()) {
                  code.append(iter.next());
                  if (iter.hasNext()) {
                      code.append(SENTENCE_COMMA);
                  }
              }
          }
          // begin class
          code.append("{").append(LINE_BREAK);
          
          // generate fields
          for (FieldCode field : fields.values()) {
              code.append(CODE_FORMAT).append(field.toCode()).append(JAVA_LINE_BREAK);
          }
          
          // generate methods
          for (MethodCode mc : methods) {
              code.append(CODE_FORMAT).append(mc.toCode()).append(LINE_BREAK);
          }
          
          // end class
          code.append("}");
          
          return code.toString();
      }