Java 类com.sun.javadoc.MemberDoc 实例源码

项目:exportdoclet    文件:ExportRenderer.java   
/**
 * Renders a package documentation to an AsciiDoc file.
 *
 * @param doc the package documentation object
 */
private void renderPackage(PackageDoc doc){
    try {
        PrintWriter writer = getWriter(doc, "package-info");
        writer.println(doc.name());
        if (doc.position() != null) {
            outputText(doc.name(), doc.getRawCommentText(), writer);
        }
        if (doc instanceof AnnotationTypeDoc) {
            for (MemberDoc member : ((AnnotationTypeDoc) doc).elements()) {
                outputText(member.name(), member.getRawCommentText(), writer);
            }
        }
        writer.flush();
    } catch (FileNotFoundException e) {
        e.printStackTrace();
    }
}
项目:markdown-doclet    文件:TodoTagRenderer.java   
/**
 * Render the tag.
 *
 * @todo TODOs can also be used in member docs ...
 *
 * @param tag       The tag to render.
 * @param target    The target {@link StringBuilder}.
 * @todo ... or even parameter docs -- which is a little strange, actually. ;)
 * @param doclet    The doclet.
 */
@Override
public void render(Tag tag, StringBuilder target, MarkdownDoclet doclet) {
    Counter counter;
    if ( tag.holder() instanceof MemberDoc ) {
        counter = getCounter(((MemberDoc)tag.holder()).containingClass());
    }
    else {
        counter = getCounter(tag.holder());
    }
    target.append("<div class=\"todo\">");
    target.append("<div class=\"todoTitle\"><span class=\"todoTitle\">")
            .append(doclet.getOptions().getTodoTitle())
            .append("</span><span class=\"todoCounter\">#")
            .append(counter.next())
            .append("</span></div>");
    target.append("<div class=\"todoText\">");
    target.append(doclet.toHtml(tag.text().trim()));
    target.append("</div></div>");
}
项目:javify    文件:HtmlRepairer.java   
public HtmlRepairer(DocErrorReporter warningReporter,
                    boolean noWarn, boolean noEmailWarn,
                    ClassDoc contextClass, MemberDoc contextMember,
                    boolean throwAwayLeadingPara) {
   this.warningReporter = warningReporter;
   this.noWarn = noWarn;
   this.noEmailWarn = noEmailWarn;
   this.contextClass = contextClass;
   this.contextMember = contextMember;
   this.throwAwayLeadingPara = throwAwayLeadingPara;
}
项目:jvm-stm    文件:HtmlRepairer.java   
public HtmlRepairer(DocErrorReporter warningReporter, 
      boolean noWarn, boolean noEmailWarn,
      ClassDoc contextClass, MemberDoc contextMember,
                    boolean throwAwayLeadingPara) {
   this.warningReporter = warningReporter;
   this.noWarn = noWarn;
   this.noEmailWarn = noEmailWarn;
   this.contextClass = contextClass;
   this.contextMember = contextMember;
   this.throwAwayLeadingPara = throwAwayLeadingPara;
}
项目:JamVM-PH    文件:HtmlRepairer.java   
public HtmlRepairer(DocErrorReporter warningReporter, 
      boolean noWarn, boolean noEmailWarn,
      ClassDoc contextClass, MemberDoc contextMember,
                    boolean throwAwayLeadingPara) {
   this.warningReporter = warningReporter;
   this.noWarn = noWarn;
   this.noEmailWarn = noEmailWarn;
   this.contextClass = contextClass;
   this.contextMember = contextMember;
   this.throwAwayLeadingPara = throwAwayLeadingPara;
}
项目:doclava    文件:Doclava.java   
/**
 * Returns true if the given element is hidden.
 */
private static boolean isHidden(Doc doc) {
  // Methods, fields, constructors.
  if (doc instanceof MemberDoc) {
    return hasHideAnnotation(doc);
  }

  // Classes, interfaces, enums, annotation types.
  if (doc instanceof ClassDoc) {
    ClassDoc classDoc = (ClassDoc) doc;

    // Check the containing package.
    if (hasHideAnnotation(classDoc.containingPackage())) {
      return true;
    }

    // Check the class doc and containing class docs if this is a
    // nested class.
    ClassDoc current = classDoc;
    do {
      if (hasHideAnnotation(current)) {
        return true;
      }

      current = current.containingClass();
    } while (current != null);
  }

  return false;
}
项目:classpath    文件:HtmlRepairer.java   
public HtmlRepairer(DocErrorReporter warningReporter,
                    boolean noWarn, boolean noEmailWarn,
                    ClassDoc contextClass, MemberDoc contextMember,
                    boolean throwAwayLeadingPara) {
   this.warningReporter = warningReporter;
   this.noWarn = noWarn;
   this.noEmailWarn = noEmailWarn;
   this.contextClass = contextClass;
   this.contextMember = contextMember;
   this.throwAwayLeadingPara = throwAwayLeadingPara;
}
项目:javadoc-json-doclet    文件:JsonDoclet.java   
/**
 * @return a JSON stub for the given MemberDoc
 */
protected JSONObject processMemberDocStub(MemberDoc memberDoc) {
    return processProgramElementDocStub(memberDoc);
}
项目:javadoc-json-doclet    文件:JsonDoclet.java   
/**
 * @return the full JSON for the given MemberDoc
 */
protected JSONObject processMemberDoc(MemberDoc memberDoc) {

    if (memberDoc == null) {
        return null;
    }

    JSONObject retMe = processProgramElementDoc(memberDoc);

    retMe.put("isSynthetic", memberDoc.isSynthetic());

    return retMe;
}
项目:markdown-doclet    文件:MarkdownDoclet.java   
/**
 * Process the member documentation.
 *
 * @param doc    The member documentation.
 */
protected void processMember(MemberDoc doc) {
    defaultProcess(doc, true);
}