docs: @Override
      public String getCode() {
          String pkg = getPackage();
          if (!StringUtils.isEmpty(pkg)) {
              pkg = "package " + pkg + ";";
          }
  
          // set package
          templator.setVariable("package", pkg);
  
          // add loop block for import packages
          genImportCode();
  
          // generate class
          String className = getClassName();
          templator.setVariable("className", className);
  
          // to implements Codec interface
          templator.setVariable("codecClassName", Codec.class.getName());
          templator.setVariable("targetProxyClassName", getTargetProxyClassname());
  
          // define Descriptor field
          String descriptorClsName = ClassHelper.getInternalName(Descriptor.class.getCanonicalName());
          templator.setVariable("descriptorClsName", descriptorClsName);
  
          // create methods
          initEncodeMethodTemplateVariable();
          initDecodeMethodTemplateVariable();
  
          StringBuilderWriter writer = new StringBuilderWriter();
          try {
              templator.generateOutput(writer);
          } catch (IOException e) {
              throw new RuntimeException(e.getMessage(), e);
          }
          return writer.toString();
      }