Beispiel #1
0
 private void printInput() {
   MethodParameter inputParameter = method.getInputParameter();
   if (inputParameter == null) return;
   open("dt");
   around("b", "Input:");
   close("dt");
   if (inputParameter.isWrapped()) {
     open("dd");
     String typeName = inputParameter.getWrappedType();
     JaxType returnType = null;
     try {
       returnType = Utils.parseType(typeName, method.getJavaDoc().containingClass(), doclet);
     } catch (InvalidJaxTypeException e) {
       doclet.warn("Invalid @returnWrapped type: " + typeName);
       e.printStackTrace();
     }
     if (returnType != null) printOutputType(returnType);
     else around("tt", escape(typeName));
   } else {
     open("dd");
     Type returnType = inputParameter.getType();
     printOutputType(returnType);
   }
   String doc = inputParameter.getDoc();
   if (!Utils.isEmptyOrNull(doc)) {
     print(" - ");
     print(doc);
   }
   close("dd");
 }
Beispiel #2
0
  private void printOutput() {
    open("dt");
    around("b", "Output:");
    close("dt");

    MethodOutput output = method.getOutput();

    if (output.isOutputWrapped()) {
      for (int i = 0; i < output.getOutputWrappedCount(); i++) {
        open("dd");
        String typeName = output.getWrappedOutputType(i);
        JaxType returnType = null;
        try {
          returnType = Utils.parseType(typeName, method.getJavaDoc().containingClass(), doclet);
        } catch (InvalidJaxTypeException e) {
          doclet.warn("Invalid @returnWrapped type: " + typeName);
          e.printStackTrace();
        }
        if (returnType != null) printOutputType(returnType);
        else around("tt", escape(typeName));
        if (output.getOutputDoc(i) != null) {
          print(" - ");
          print(output.getOutputDoc(i));
        }
        close("dd");
      }
    } else {
      open("dd");
      Type returnType = output.getOutputType();
      printOutputType(returnType);
      if (output.getOutputDoc() != null) {
        print(" - ");
        print(output.getOutputDoc());
      }
      close("dd");
    }
  }