Package com.sun.javadoc

Examples of com.sun.javadoc.ExecutableMemberDoc


//        });
        ArrayList<String> signatures = new ArrayList<String>();
        boolean hasMethods = false;
        int id = 0;
        for (int i = 0; i < constructorsMethods.length; i++) {
            ExecutableMemberDoc method = constructorsMethods[i];
            String name = method.name();
            if (skipMethod(method)) {
                continue;
            }
            if (!hasMethods) {
                writer.println("<table class=\"block\"><tr onclick=\"return allDetails()\"><th colspan=\"2\">Methods</th></tr>");
                hasMethods = true;
            }
            String type = getTypeName(method.isStatic(), false, getReturnType(method));
            writer.println("<tr id=\"__"+id+"\" onclick=\"return on("+ id +")\">");
            writer.println("<td class=\"return\">" + type + "</td><td class=\"method\">");
            Parameter[] params = method.parameters();
            StringBuilder buff = new StringBuilder();
            StringBuilder buffSignature = new StringBuilder(name);
            buff.append('(');
            for (int j = 0; j < params.length; j++) {
                if (j > 0) {
                    buff.append(", ");
                }
                buffSignature.append('_');
                Parameter param = params[j];
                boolean isVarArgs = method.isVarArgs() && j == params.length - 1;
                String typeName = getTypeName(false, isVarArgs, param.type());
                buff.append(typeName);
                buffSignature.append(StringUtils.replaceAll(typeName, "[]", "-"));
                buff.append(' ');
                buff.append(param.name());
            }
            buff.append(')');
            if (isDeprecated(method)) {
                name = "<span class=\"deprecated\">" + name + "</span>";
            }
            String signature = buffSignature.toString();
            while (signatures.size() < i) {
                signatures.add(null);
            }
            signatures.add(i, signature);
            writer.println("<a id=\"" + signature + "\" href=\"#" + signature + "\">" + name + "</a>" + buff.toString());
            String firstSentence = getFirstSentence(method.firstSentenceTags());
            if (firstSentence != null) {
                writer.println("<div class=\"methodText\">" + formatText(firstSentence) + "</div>");
            }
            writer.println("</td></tr>");
            writer.println("<tr onclick=\"return off("+ id +")\" class=\"detail\" id=\"_"+id+"\">");
View Full Code Here


  private String createMemberList(Collection<ExecutableMemberDoc> members) {
    StringBuffer buffer = new StringBuffer();
    Iterator<ExecutableMemberDoc> iter = members.iterator();
    while (iter.hasNext()) {
      ExecutableMemberDoc member = iter.next();
      buffer.append(escapeWikiWords(member.name() + member.flatSignature()));
      if (iter.hasNext()) {
        buffer.append(", ");
      }
    }
    return buffer.toString();
View Full Code Here

      jreLink += pkg.replace('.', '/') + "/";
      jreLink += clazz;
      jreLink += ".html";
    } else if (doc instanceof ExecutableMemberDoc) {
      ExecutableMemberDoc execMemberDoc = (ExecutableMemberDoc) doc;
      String pkg = enclosing.containingPackage().name();
      if (!pkg.startsWith("java.")) {
        return;
      }
      String clazz = enclosing.name();
      String method = execMemberDoc.name();
      String sig = execMemberDoc.signature();

      jreLink += pkg.replace('.', '/') + "/";
      jreLink += clazz;
      jreLink += ".html";
      jreLink += "#";
View Full Code Here

  private String createMemberList(Collection<ExecutableMemberDoc> members) {
    StringBuffer buffer = new StringBuffer();
    Iterator<ExecutableMemberDoc> iter = members.iterator();
    while (iter.hasNext()) {
      ExecutableMemberDoc member = iter.next();
      buffer.append(member.name() + member.flatSignature());
      if (iter.hasNext()) {
        buffer.append(", ");
      }
    }
    return buffer.toString();
View Full Code Here

   * @return the found texts
   */
  public static List<String> getFeatures(Doc doc, boolean includingTag, boolean asLink){
    String linkPrefix = null;
    if (asLink){
      ExecutableMemberDoc memberDoc = null;
      ClassDoc classDoc = null;
      PackageDoc packageDoc = null;
      if (doc instanceof ExecutableMemberDoc){
        memberDoc = (ExecutableMemberDoc) doc;
        classDoc = memberDoc.containingClass();
        packageDoc = classDoc.containingPackage();
      }
      if (doc instanceof ClassDoc){
        classDoc = (ClassDoc) doc;
        packageDoc = classDoc.containingPackage();
      }

      if (packageDoc != null){
        linkPrefix = "{@linkplain " + packageDoc.name() + "." + classDoc.name();
        if (memberDoc != null)
          linkPrefix += "#" + memberDoc.name() +memberDoc.flatSignature() + " ";
      }
    }
    List<String> result = TextBoostUtils.getTextBetween(doc.commentText(),
        INLINE_FEATURE, INLINE_FEATURE_END, includingTag, linkPrefix,
        null);
View Full Code Here

TOP

Related Classes of com.sun.javadoc.ExecutableMemberDoc

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.