Exemple #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");
 }
Exemple #2
0
 private void printParameters(Map<String, MethodParameter> parameters, String header) {
   if (parameters.isEmpty()) return;
   open("dt");
   around("b", header + " parameters:");
   close("dt");
   for (MethodParameter param : parameters.values()) {
     open("dd");
     around("b", param.getName());
     String doc = param.getDoc();
     if (!Utils.isEmptyOrNull(doc)) print(" - " + param.getDoc());
     close("dd");
   }
 }
Exemple #3
0
 private void printAPIParameter(String name, MethodParameter param, boolean hasOne) {
   if (hasOne) {
     print(",");
     tag("br");
     print("&nbsp;&nbsp;");
   }
   hasOne = true;
   print("'" + name + "': ");
   Tag[] tags = param.getFirstSentenceTags();
   if (tags != null && tags.length > 0) {
     open("span class='comment'");
     print("/* ");
     writer.printSummaryComment(param.getParameterDoc(), tags);
     print(" */");
     close("span");
   } else print("…");
 }