Examples of MethodDoc


Examples of com.sun.javadoc.MethodDoc

    private String parseMembers(ExecutableMemberDoc[] mems) {
        StringBuffer buf = new StringBuffer();
        for (ExecutableMemberDoc m : mems) {
            ParamTag[] params = m.paramTags();
            if (m instanceof MethodDoc) {
                MethodDoc md = (MethodDoc) m;
                buf.append("{anchor:").append(md.name())
                        .append(md.flatSignature()).append("}\n");
            }
            buf.append("h3. " + m.qualifiedName());
            buf.append('(');
            for (int i = 0, nump = m.parameters().length; i < nump; i++) {
                Parameter p = m.parameters()[i];
                buf.append(buildTypeLink(p.type())).append(" ")
                        .append(p.name());
                if (i < nump - 1) {
                    buf.append(", ");
                }
            }
            buf.append(")\n\n");
            String comment = parseComment(m.inlineTags());
            if (comment.length() > 0) {
                buf.append(comment).append("\n\n");
            }
            for (ParamTag p : params) {
                buf.append(
                        "* *" + p.parameterName() + "*: "
                                + p.parameterComment()).append("\n");
            }
            if (m instanceof MethodDoc) {
                MethodDoc md = (MethodDoc) m;
                buf.append("\n*Returns:* ")
                        .append(md.returnType().qualifiedTypeName())
                        .append("\n");
            }
            buf.append("\n");
        }
        return buf.toString();
View Full Code Here

Examples of com.sun.javadoc.MethodDoc

  }

  private List<String> insertJavadoc(File file,
      List<MethodDoc> methodDocs, List<String> lines) {
    for (int i = 0; i < methodDocs.size(); i++) {
      MethodDoc md = methodDocs.get(i);

      int insertLineNo;

      if (i + 1 < methodDocs.size()) {
        insertLineNo = findCommentLine(lines, md, methodDocs.get(i + 1)
            .position().line());
      } else {
        insertLineNo = findCommentLine(lines, md, m_typelines.get(file)
            .intValue());
      }

      int realInsert = insertLineNo == 0 ? md.position().line() - 1
          : insertLineNo;

      if (insertLineNo == 0) {
        lines.add(realInsert, "    */");
      }
View Full Code Here

Examples of com.sun.javadoc.MethodDoc

  }

  private List<String> insertJavadoc(File file,
      List<MethodDoc> methodDocs, List<String> lines) {
    for (int i = 0; i < methodDocs.size(); i++) {
      MethodDoc md = methodDocs.get(i);

      int insertLineNo;

      if (i + 1 < methodDocs.size()) {
        insertLineNo = findCommentLine(lines, md, methodDocs.get(i + 1)
            .position().line());
      } else {
        insertLineNo = findCommentLine(lines, md, m_typelines.get(file)
            .intValue());
      }

      int realInsert = insertLineNo == 0 ? md.position().line() - 1
          : insertLineNo;

      if (insertLineNo == 0) {
        lines.add(realInsert, "    */");
      }
View Full Code Here

Examples of org.gradle.build.docs.dsl.docbook.model.MethodDoc

            if (methods.isEmpty()) {
                throw new RuntimeException(String.format("No metadata for method '%s.%s()'. Available methods: %s", classDoc.getName(), methodName, classDoc.getClassMetaData().getDeclaredMethodNames()));
            }
            for (MethodMetaData method : methods) {
                DocComment docComment = javadocConverter.parse(method, listener);
                MethodDoc methodDoc = new MethodDoc(method, docComment.getDocbook());
                if (methodDoc.getDescription() == null) {
                    throw new RuntimeException(String.format("Docbook content for '%s %s' does not contain a description paragraph.", classDoc.getName(), method.getSignature()));
                }
                PropertyDoc property = classDoc.findProperty(methodName);
                boolean multiValued = false;
                if (property != null && method.getParameters().size() == 1 && method.getParameters().get(0).getType().getSignature().equals(Closure.class.getName())) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.