docs: @Override
      public String getCode() {
          
          if (fields == null) {
              fields = fetchFieldInfos();
          }
          
          StringBuilder code = new StringBuilder();
  
          String className = getClassName();
          genPackageCode(code);
          genImportCode(code);
  
          // define class code
          code.append("public class " + className + " implements com.baidu.bjf.remoting.protobuf.Codec");
          code.append("<").append(ClassHelper.getInternalName(cls.getCanonicalName())).append("> {" + LINE_BREAK);
  
          // define Descriptor field
          String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());
          code.append("private ").append(descriptorClsName).append(" descriptor").append(JAVA_LINE_BREAK);
  
          code.append(getEncodeMethodCode());
          code.append(getDecodeMethodCode());
          code.append(getSizeMethodCode());
          code.append(getWriteToMethodCode());
          code.append(getReadFromMethodCode());
          code.append(getGetDescriptorMethodCode());
          code.append("}");
  
          return code.toString();
      }