Package com.lunatech.doclets.jax.jaxrs.model

Examples of com.lunatech.doclets.jax.jaxrs.model.MethodParameter


    }
    print(type.dimension());
  }

  private void printInput(PojoTypes types) {
    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, types);
      else
        around("tt", escape(typeName));
    } else {
      open("dd");
      Type returnType = inputParameter.getType();
      printOutputType(returnType, types);
    }
    String doc = inputParameter.getDoc();
    if (!Utils.isEmptyOrNull(doc)) {
      print(" - ");
      print(doc);
    }
    close("dd");
View Full Code Here


    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");
View Full Code Here

    List<MethodParameter> headerParameters = method.getHeaderParameters();
    if (!headerParameters.isEmpty()) {
      print("\n");
      Iterator<MethodParameter> params = headerParameters.iterator();
      while(params.hasNext()) {
        MethodParameter parameter = params.next();
        print(parameter.getName());
        print(": …");
        if (params.hasNext()) {
          print("\n");
        }
      }
    }
    List<MethodParameter> cookieParameters = method.getCookieParameters();
    if (!cookieParameters.isEmpty()) {
      print("\n");
      Iterator<MethodParameter> params = headerParameters.iterator();
      while (params.hasNext()) {
        MethodParameter parameter = params.next();
        print("Cookie: ");
        print(parameter.getName());
        print(": …");
        if (params.hasNext()) {
          print("\n");
        }
      }
    }

    if (!method.getFormParameters().isEmpty()) {
      boolean first = true;
      for (MethodParameter parameter : method.getFormParameters()) {
        if(first) {
          print("\n");
        } else {
          print("&amp;");
        }
        print(parameter.getName());
        print("=…");
        first = false;
      }
    }
    close("pre");
View Full Code Here

TOP

Related Classes of com.lunatech.doclets.jax.jaxrs.model.MethodParameter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.