Пример #1
0
 private void printAPIExample() {
   around("b", "API Example:");
   /*
    * We are using tt instead of pre to avoid whitespace issues in the doc's
    * first sentence tags that would show up in a pre and would not in a tt.
    * This is annoying.
    */
   open("p");
   open("tt");
   print(method.getAPIFunctionName());
   print("({");
   boolean hasOne = printAPIParameters(method.getMatrixParameters(), false);
   hasOne |= printAPIParameters(method.getQueryParameters(), hasOne);
   hasOne |= printAPIParameters(method.getPathParameters(), hasOne);
   hasOne |= printAPIParameters(method.getHeaderParameters(), hasOne);
   hasOne |= printAPIParameters(method.getCookieParameters(), hasOne);
   hasOne |= printAPIParameters(method.getFormParameters(), hasOne);
   MethodParameter input = method.getInputParameter();
   if (input != null) {
     printAPIParameter("$entity", input, hasOne);
   }
   print("});");
   close("tt");
   close("p");
 }