Package com.sun.javadoc

Examples of com.sun.javadoc.Doc


        // anti recursion flag.
        this.isCheckStarted = true;
       
        // get the state object and the target of this proxy
        PublishedApiDoclet pad = (PublishedApiDoclet) getHDPStateUserObject();
        Doc doc = (Doc)this.getInvocationTarget();
       
        // determinate, if the target is to be included in the
        // documentation: Include it, if either
        //
        this.isIncluded = pad.isIgnoreJavadocIsIncluded() // the global flag says so
          || doc.isIncluded()  // the javadoc framework says so
          || // the "forceInclude"-tag of the target says so
             tagPriority(doc,pad.getForceIncludeTag(),pad.getForceIncludeFilterPat()) > 0;

          // if we already know, that the target is not to be included,
          // we are ready.
        if (! this.isIncluded)
          return false;

        // check the current target node and its parent nodes.
        this.isIncluded = this.calcInclusionPriority(false) >= 0 ;
       
        // if the default is "exclude", check, if the
        // inclusion of just this target node is required,
        // because one of the child elements is included
        if (! this.isIncluded) {
          boolean inclusionRequired = false;
          if (doc instanceof PackageDoc) {
            // nested nodes are classes, therefore check, if the
            // package contains any classes to be documented
            PackageDoc pd = (PackageDoc) dynamicProxyInstance();
            inclusionRequired = pd.allClasses().length > 0;
          } else if (doc instanceof ClassDoc) {
            // nested nodes are constructors, methods or fields.
            ClassDoc cd = (ClassDoc) dynamicProxyInstance();
            inclusionRequired =
              cd.constructors().length > 0 ||
              cd.methods().length > 0 ||
              cd.fields().length > 0 ||
              cd.enumConstants().length > 0;
            if (! inclusionRequired && cd instanceof AnnotationTypeDoc) {
              AnnotationTypeDoc atd = (AnnotationTypeDoc) cd;
              inclusionRequired = atd.elements().length > 0;
            }
          }
          if (inclusionRequired) {
            debug("detected required inclusion of: "+doc.toString());
            this.isIncluded = true;
          }
        }         
        return this.isIncluded;
      } finally {
View Full Code Here


     */
    private int calcInclusionPriority(boolean iscallFromChild) {
      if (this.inclusionPriorityValid)
        return iscallFromChild ? this.childInclusionPriority : this.inclusionPriority;
      try {
        Doc doc = (Doc) dynamicProxyInstance();
        PublishedApiDoclet pad = (PublishedApiDoclet) getHDPStateUserObject();
        int includePriority = tagPriority(doc,pad.getIncludeTag(),pad.getIncludeFilterPat());
        int excludePriority = tagPriority(doc,pad.getExcludeTag(),pad.getExcludeFilterPat());
        int excludeChildsPriority = tagPriority(doc,pad.getExcludeChildsTag(),pad.getExcludeChildsFilterPat());
        if (excludePriority > excludeChildsPriority) {
          // the exclude childs priority must be at least as high
          // as the exclude priority, because we do not want childs
          // to be included, and the local node included
          excludeChildsPriority = excludePriority;
        }
       
        int parentPriority = (pad.isDefaultIsExclude()?-1:1)*
            pad.getDefaultPriority();
        // ---- ask the parent, if possible ----
         
        Doc doc2 = null; // holds the parent
        // get the parent
        if (doc instanceof ProgramElementDoc) {
          ProgramElementDoc member = (ProgramElementDoc) doc;
          doc2 = member.containingClass();
          if (doc2 == null) {
View Full Code Here

        return (Doc[]) getHDPProxy(array, expect);
      }
      Class<?> componentType = expect.getComponentType();
      List<Doc> list = new ArrayList<Doc>(array.length);
      for (int i = 0; i < array.length; i++) {
        Doc entry = (Doc) getHDPProxy(array[i], componentType);
        if (entry != null && ! entry.isIncluded()){
          //debug("Array Excluding: "+entry.getClass().getName()+ " " + entry);
          continue;
        }
        list.add(entry);
      }
View Full Code Here

    public Object invoke(Object proxy, Method method, Object[] args)
  throws Throwable {
      String methodName = method.getName();
      if (target instanceof Doc) {
  if (methodName.equals("isIncluded")) {
    Doc doc = (Doc) target;
    return !exclude(doc) && doc.isIncluded();
  }
  if (target instanceof RootDoc) {
    if (methodName.equals("classes")) {
      return filter(((RootDoc) target).classes(), ClassDoc.class);
    } else if (methodName.equals("specifiedClasses")) {
View Full Code Here

    public Object invoke(Object proxy, Method method, Object[] args)
  throws Throwable {
      String methodName = method.getName();
      if (target instanceof Doc) {
  if (methodName.equals("isIncluded")) {
    Doc doc = (Doc) target;
    return !exclude(doc) && doc.isIncluded();
  }
  if (target instanceof RootDoc) {
    if (methodName.equals("classes")) {
      return filter(((RootDoc) target).classes(), ClassDoc.class);
    } else if (methodName.equals("specifiedClasses")) {
View Full Code Here

        open("tt");
        around("a href='#" + httpMethod + "'", httpMethod + " " + Utils.getDisplayURL(this, resource, method));
        close("tt");
        close("td");
        open("td");
        Doc javaDoc = method.getJavaDoc();
        if (javaDoc != null && javaDoc.firstSentenceTags() != null)
          writer.printSummaryComment(javaDoc);
        close("td");
        close("tr");
      }
    }
View Full Code Here

      } else
        around("a href='" + path + "/index.html'", path);
      close("td");
      open("td");
      Doc javaDoc = subResource.getJavaDoc();
      if (javaDoc != null && javaDoc.firstSentenceTags() != null)
        writer.printSummaryComment(javaDoc);
      close("td");
      close("tr");
    }
    close("tbody");
View Full Code Here

      print("/");
    else
      print(buf.toString());
    close("h2");
    open("div class='doc-comment'");
    Doc javaDoc = this.resource.getJavaDoc();
    if (javaDoc != null && javaDoc.tags() != null) {
      writer.printInlineComment(javaDoc);
    }
    close("div");
    do {
      boolean needsPathHeading = true;
View Full Code Here

    open("a href='" + path + "/index.html'");
    around("tt", Utils.getDisplayURL(this, resource, method));
    close("a");
    close("td");
    open("td");
    Doc javaDoc = method.getJavaDoc();
    if (javaDoc != null && javaDoc.firstSentenceTags() != null)
      writer.printSummaryComment(javaDoc);
    close("td");
    close("tr");
  }
View Full Code Here

    open("a href='" + path + "/index.html'");
    around("tt", Utils.getAbsolutePath(this, resource));
    close("a");
    close("td");
    open("td");
    Doc javaDoc = resource.getJavaDoc();
    if (javaDoc != null && javaDoc.firstSentenceTags() != null)
      writer.printSummaryComment(javaDoc);
    close("td");
    open("td");
    boolean first = true;
    for (ResourceMethod method : resource.getMethods()) {
View Full Code Here

TOP

Related Classes of com.sun.javadoc.Doc

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.