docs: @Override
      public String getCode() {
          
          if (fields == null) {
              fields = fetchFieldInfos();
          }
  
          String className = getClassName();
  
          ClassCode code = new ClassCode(ClassCode.SCOPE_PUBLIC, className);
          // to implements Codec interface
          code.addInteface(Codec.class.getName() + "<" + ClassHelper.getInternalName(cls.getCanonicalName()) + ">");
  
          // package
          code.setPkg(getPackage());
          // import classes
          genImportCode(code);
  
          // define Descriptor field
          String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());
          code.addField(ClassCode.SCOPE_DEFAULT, descriptorClsName, "descriptor", null);
  
          // define class
          code.addMethod(getEncodeMethodCode());
          code.addMethod(getDecodeMethodCode());
          code.addMethod(getSizeMethodCode());
          code.addMethod(getWriteToMethodCode());
          code.addMethod(getReadFromMethodCode());
          code.addMethod(getGetDescriptorMethodCode());
  
          return code.toCode();
      }