javafx-doclet

16:37:02.069 INFO  jd.cli.Main - Decompiling javafx-doclet.jar
package com.javafx.tools.doclets;

import com.sun.javadoc.Tag;

public abstract interface Taglet
{
  public abstract boolean inField();
  
  public abstract boolean inConstructor();
  
  public abstract boolean inMethod();
  
  public abstract boolean inOverview();
  
  public abstract boolean inPackage();
  
  public abstract boolean inType();
  
  public abstract boolean isInlineTag();
  
  public abstract String getName();
  
  public abstract String toString(Tag paramTag);
  
  public abstract String toString(Tag[] paramArrayOfTag);
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.Taglet
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.formats.html.markup.RawHtml;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.util.DocletConstants;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.ExecutableMemberDoc;
import com.sun.javadoc.MemberDoc;
import com.sun.javadoc.MethodDoc;
import com.sun.javadoc.Parameter;
import com.sun.javadoc.ProgramElementDoc;
import com.sun.javadoc.Type;

public abstract class AbstractExecutableMemberWriter
  extends AbstractMemberWriter
{
  public AbstractExecutableMemberWriter(SubWriterHolderWriter writer, ClassDoc classdoc)
  {
    super(writer, classdoc);
  }
  
  public AbstractExecutableMemberWriter(SubWriterHolderWriter writer)
  {
    super(writer);
  }
  
  protected int addTypeParameters(ExecutableMemberDoc member, Content htmltree)
  {
    LinkInfoImpl linkInfo = new LinkInfoImpl(32, member, false);
    
    String typeParameters = writer.getTypeParameterLinks(linkInfo);
    if (displayLength > 0)
    {
      Content linkContent = new RawHtml(typeParameters);
      htmltree.addContent(linkContent);
      htmltree.addContent(writer.getSpace());
      writer.displayLength += displayLength + 1;
    }
    return displayLength;
  }
  
  protected Content getDeprecatedLink(ProgramElementDoc member)
  {
    ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
    return writer.getDocLink(3, emd, emd.qualifiedName() + emd.flatSignature());
  }
  
  protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, Content tdSummary)
  {
    ExecutableMemberDoc emd = (ExecutableMemberDoc)member;
    String name = emd.name();
    Content strong = HtmlTree.STRONG(new RawHtml(writer.getDocLink(context, cd, emd, name, false)));
    
    Content code = HtmlTree.CODE(strong);
    writer.displayLength = name.length();
    addParameters(emd, false, code);
    tdSummary.addContent(code);
  }
  
  protected void addInheritedSummaryLink(ClassDoc cd, ProgramElementDoc member, Content linksTree)
  {
    linksTree.addContent(new RawHtml(writer.getDocLink(3, cd, (MemberDoc)member, member.name(), false)));
  }
  
  protected void addParam(ExecutableMemberDoc member, Parameter param, boolean isVarArg, Content tree)
  {
    if (param.type() != null)
    {
      Content link = new RawHtml(writer.getLink(new LinkInfoImpl(18, param.type(), isVarArg)));
      
      tree.addContent(link);
    }
    if (param.name().length() > 0)
    {
      tree.addContent(writer.getSpace());
      tree.addContent(param.name());
    }
  }
  
  protected void addParameters(ExecutableMemberDoc member, Content htmltree)
  {
    addParameters(member, true, htmltree);
  }
  
  protected void addParameters(ExecutableMemberDoc member, boolean includeAnnotations, Content htmltree)
  {
    htmltree.addContent("(");
    Parameter[] params = member.parameters();
    String indent = makeSpace(writer.displayLength);
    if (configurationlinksource) {
      indent = indent + makeSpace(member.name().length());
    }
    for (int paramstart = 0; paramstart < params.length; paramstart++)
    {
      Parameter param = params[paramstart];
      if (!param.name().startsWith("this$"))
      {
        if (includeAnnotations)
        {
          boolean foundAnnotations = writer.addAnnotationInfo(indent.length(), member, param, htmltree);
          if (foundAnnotations)
          {
            htmltree.addContent(DocletConstants.NL);
            htmltree.addContent(indent);
          }
        }
        addParam(member, param, (paramstart == params.length - 1) && (member.isVarArgs()), htmltree);
        
        break;
      }
    }
    for (int i = paramstart + 1; i < params.length; i++)
    {
      htmltree.addContent(",");
      htmltree.addContent(DocletConstants.NL);
      htmltree.addContent(indent);
      if (includeAnnotations)
      {
        boolean foundAnnotations = writer.addAnnotationInfo(indent.length(), member, params[i], htmltree);
        if (foundAnnotations)
        {
          htmltree.addContent(DocletConstants.NL);
          htmltree.addContent(indent);
        }
      }
      addParam(member, params[i], (i == params.length - 1) && (member.isVarArgs()), htmltree);
    }
    htmltree.addContent(")");
  }
  
  protected void addExceptions(ExecutableMemberDoc member, Content htmltree)
  {
    Type[] exceptions = member.thrownExceptionTypes();
    if (exceptions.length > 0)
    {
      LinkInfoImpl memberTypeParam = new LinkInfoImpl(3, member, false);
      
      int retlen = getReturnTypeLength(member);
      writer.getTypeParameterLinks(memberTypeParam);
      retlen += (displayLength == 0 ? 0 : displayLength + 1);
      
      String indent = makeSpace(modifierString(member).length() + member.name().length() + retlen - 4);
      
      htmltree.addContent(DocletConstants.NL);
      htmltree.addContent(indent);
      htmltree.addContent("throws ");
      indent = indent + "       ";
      Content link = new RawHtml(writer.getLink(new LinkInfoImpl(3, exceptions[0])));
      
      htmltree.addContent(link);
      for (int i = 1; i < exceptions.length; i++)
      {
        htmltree.addContent(",");
        htmltree.addContent(DocletConstants.NL);
        htmltree.addContent(indent);
        Content exceptionLink = new RawHtml(writer.getLink(new LinkInfoImpl(3, exceptions[i])));
        
        htmltree.addContent(exceptionLink);
      }
    }
  }
  
  protected int getReturnTypeLength(ExecutableMemberDoc member)
  {
    if ((member instanceof MethodDoc))
    {
      MethodDoc method = (MethodDoc)member;
      Type rettype = method.returnType();
      if (rettype.isPrimitive()) {
        return rettype.typeName().length() + rettype.dimension().length();
      }
      LinkInfoImpl linkInfo = new LinkInfoImpl(3, rettype);
      
      writer.getLink(linkInfo);
      return displayLength;
    }
    return -1;
  }
  
  protected ClassDoc implementsMethodInIntfac(MethodDoc method, ClassDoc[] intfacs)
  {
    for (int i = 0; i < intfacs.length; i++)
    {
      MethodDoc[] methods = intfacs[i].methods();
      if (methods.length > 0) {
        for (int j = 0; j < methods.length; j++) {
          if ((methods[j].name().equals(method.name())) && (methods[j].signature().equals(method.signature()))) {
            return intfacs[i];
          }
        }
      }
    }
    return null;
  }
  
  protected String getErasureAnchor(ExecutableMemberDoc emd)
  {
    StringBuffer buf = new StringBuffer(emd.name() + "(");
    Parameter[] params = emd.parameters();
    boolean foundTypeVariable = false;
    for (int i = 0; i < params.length; i++)
    {
      if (i > 0) {
        buf.append(",");
      }
      Type t = params[i].type();
      foundTypeVariable = (foundTypeVariable) || (t.asTypeVariable() != null);
      buf.append(t.isPrimitive() ? t.typeName() : t.asClassDoc().qualifiedName());
      
      buf.append(t.dimension());
    }
    buf.append(")");
    return foundTypeVariable ? buf.toString() : null;
  }
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.formats.html.AbstractExecutableMemberWriter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlConstants;
import com.javafx.tools.doclets.formats.html.markup.HtmlStyle;
import com.javafx.tools.doclets.formats.html.markup.HtmlTag;
import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.formats.html.markup.RawHtml;
import com.javafx.tools.doclets.formats.html.markup.StringContent;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.util.IndexBuilder;
import com.javafx.tools.doclets.internal.toolkit.util.Util;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.Doc;
import com.sun.javadoc.ExecutableMemberDoc;
import com.sun.javadoc.MemberDoc;
import com.sun.javadoc.PackageDoc;
import com.sun.javadoc.ProgramElementDoc;
import com.sun.javadoc.Tag;
import java.io.IOException;
import java.util.List;

public class AbstractIndexWriter
  extends HtmlDocletWriter
{
  protected IndexBuilder indexbuilder;
  
  protected AbstractIndexWriter(ConfigurationImpl configuration, String path, String filename, String relpath, IndexBuilder indexbuilder)
    throws IOException
  {
    super(configuration, path, filename, relpath);
    this.indexbuilder = indexbuilder;
  }
  
  protected AbstractIndexWriter(ConfigurationImpl configuration, String filename, IndexBuilder indexbuilder)
    throws IOException
  {
    super(configuration, filename);
    this.indexbuilder = indexbuilder;
  }
  
  protected Content getNavLinkIndex()
  {
    Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, indexLabel);
    return li;
  }
  
  protected void addContents(Character unicode, List<? extends Doc> memberlist, Content contentTree)
  {
    contentTree.addContent(getMarkerAnchor("_" + unicode + "_"));
    Content headContent = new StringContent(unicode.toString());
    Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false, HtmlStyle.title, headContent);
    
    contentTree.addContent(heading);
    int memberListSize = memberlist.size();
    if (memberListSize > 0)
    {
      Content dl = new HtmlTree(HtmlTag.DL);
      for (int i = 0; i < memberListSize; i++)
      {
        Doc element = (Doc)memberlist.get(i);
        if ((element instanceof MemberDoc)) {
          addDescription((MemberDoc)element, dl);
        } else if ((element instanceof ClassDoc)) {
          addDescription((ClassDoc)element, dl);
        } else if ((element instanceof PackageDoc)) {
          addDescription((PackageDoc)element, dl);
        }
      }
      contentTree.addContent(dl);
    }
  }
  
  protected void addDescription(PackageDoc pkg, Content dlTree)
  {
    Content link = getPackageLink(pkg, new StringContent(Util.getPackageName(pkg)));
    Content dt = HtmlTree.DT(link);
    dt.addContent(" - ");
    dt.addContent(getResource("doclet.package"));
    dt.addContent(" " + pkg.name());
    dlTree.addContent(dt);
    Content dd = new HtmlTree(HtmlTag.DD);
    addSummaryComment(pkg, dd);
    dlTree.addContent(dd);
  }
  
  protected void addDescription(ClassDoc cd, Content dlTree)
  {
    Content link = new RawHtml(getLink(new LinkInfoImpl(5, cd, true)));
    
    Content dt = HtmlTree.DT(link);
    dt.addContent(" - ");
    addClassInfo(cd, dt);
    dlTree.addContent(dt);
    Content dd = new HtmlTree(HtmlTag.DD);
    addComment(cd, dd);
    dlTree.addContent(dd);
  }
  
  protected void addClassInfo(ClassDoc cd, Content contentTree)
  {
    contentTree.addContent(getResource("doclet.in", Util.getTypeName(configuration, cd, false), getPackageLinkString(cd.containingPackage(), Util.getPackageName(cd.containingPackage()), false)));
  }
  
  protected void addDescription(MemberDoc member, Content dlTree)
  {
    String name = (member instanceof ExecutableMemberDoc) ? member.name() + ((ExecutableMemberDoc)member).flatSignature() : member.name();
    if ((name.indexOf("<") != -1) || (name.indexOf(">") != -1)) {
      name = Util.escapeHtmlChars(name);
    }
    Content span = HtmlTree.SPAN(HtmlStyle.strong, getDocLink(5, member, name));
    
    Content dt = HtmlTree.DT(span);
    dt.addContent(" - ");
    addMemberDesc(member, dt);
    dlTree.addContent(dt);
    Content dd = new HtmlTree(HtmlTag.DD);
    addComment(member, dd);
    dlTree.addContent(dd);
  }
  
  protected void addComment(ProgramElementDoc element, Content contentTree)
  {
    Content span = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
    HtmlTree div = new HtmlTree(HtmlTag.DIV);
    div.addStyle(HtmlStyle.block);
    if (Util.isDeprecated(element))
    {
      div.addContent(span);
      Tag[] tags;
      if ((tags = element.tags("deprecated")).length > 0) {
        addInlineDeprecatedComment(element, tags[0], div);
      }
      contentTree.addContent(div);
    }
    else
    {
      ClassDoc cont = element.containingClass();
      while (cont != null)
      {
        if (Util.isDeprecated(cont))
        {
          div.addContent(span);
          contentTree.addContent(div);
          break;
        }
        cont = cont.containingClass();
      }
      addSummaryComment(element, contentTree);
    }
  }
  
  protected void addMemberDesc(MemberDoc member, Content contentTree)
  {
    ClassDoc containing = member.containingClass();
    String classdesc = Util.getTypeName(configuration, containing, true) + " ";
    if (member.isField())
    {
      if (member.isStatic()) {
        contentTree.addContent(getResource("doclet.Static_variable_in", classdesc));
      } else {
        contentTree.addContent(getResource("doclet.Variable_in", classdesc));
      }
    }
    else if (member.isConstructor()) {
      contentTree.addContent(getResource("doclet.Constructor_for", classdesc));
    } else if (member.isMethod()) {
      if (member.isStatic()) {
        contentTree.addContent(getResource("doclet.Static_method_in", classdesc));
      } else {
        contentTree.addContent(getResource("doclet.Method_in", classdesc));
      }
    }
    addPreQualifiedClassLink(5, containing, false, contentTree);
  }
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.formats.html.AbstractIndexWriter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlConstants;
import com.javafx.tools.doclets.formats.html.markup.HtmlStyle;
import com.javafx.tools.doclets.formats.html.markup.HtmlTag;
import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.formats.html.markup.RawHtml;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.taglets.DeprecatedTaglet;
import com.javafx.tools.doclets.internal.toolkit.util.MessageRetriever;
import com.javafx.tools.doclets.internal.toolkit.util.Util;
import com.javafx.tools.doclets.internal.toolkit.util.VisibleMemberMap;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.ConstructorDoc;
import com.sun.javadoc.Doc;
import com.sun.javadoc.ExecutableMemberDoc;
import com.sun.javadoc.FieldDoc;
import com.sun.javadoc.MemberDoc;
import com.sun.javadoc.MethodDoc;
import com.sun.javadoc.ProgramElementDoc;
import com.sun.javadoc.SourcePosition;
import com.sun.javadoc.Tag;
import com.sun.javadoc.Type;
import java.lang.reflect.Modifier;
import java.util.Iterator;
import java.util.List;

public abstract class AbstractMemberWriter
{
  protected boolean printedSummaryHeader = false;
  protected final SubWriterHolderWriter writer;
  protected final ClassDoc classdoc;
  public final boolean nodepr;
  
  public AbstractMemberWriter(SubWriterHolderWriter writer, ClassDoc classdoc)
  {
    this.writer = writer;
    nodepr = configurationnodeprecated;
    this.classdoc = classdoc;
  }
  
  public AbstractMemberWriter(SubWriterHolderWriter writer)
  {
    this(writer, null);
  }
  
  public abstract void addSummaryLabel(Content paramContent);
  
  public abstract String getTableSummary();
  
  public abstract String getCaption();
  
  public abstract String[] getSummaryTableHeader(ProgramElementDoc paramProgramElementDoc);
  
  public abstract void addInheritedSummaryLabel(ClassDoc paramClassDoc, Content paramContent);
  
  public abstract void addSummaryAnchor(ClassDoc paramClassDoc, Content paramContent);
  
  public abstract void addInheritedSummaryAnchor(ClassDoc paramClassDoc, Content paramContent);
  
  protected abstract void addSummaryType(ProgramElementDoc paramProgramElementDoc, Content paramContent);
  
  protected void addSummaryLink(ClassDoc cd, ProgramElementDoc member, Content tdSummary)
  {
    addSummaryLink(3, cd, member, tdSummary);
  }
  
  protected abstract void addSummaryLink(int paramInt, ClassDoc paramClassDoc, ProgramElementDoc paramProgramElementDoc, Content paramContent);
  
  protected abstract void addInheritedSummaryLink(ClassDoc paramClassDoc, ProgramElementDoc paramProgramElementDoc, Content paramContent);
  
  protected abstract Content getDeprecatedLink(ProgramElementDoc paramProgramElementDoc);
  
  protected abstract Content getNavSummaryLink(ClassDoc paramClassDoc, boolean paramBoolean);
  
  protected abstract void addNavDetailLink(boolean paramBoolean, Content paramContent);
  
  protected void print(String str)
  {
    writer.print(str);
    writer.displayLength += str.length();
  }
  
  protected void print(char ch)
  {
    writer.print(ch);
    writer.displayLength += 1;
  }
  
  protected void strong(String str)
  {
    writer.strong(str);
    writer.displayLength += str.length();
  }
  
  protected void addName(String name, Content htmltree)
  {
    htmltree.addContent(name);
    writer.displayLength += name.length();
  }
  
  protected String modifierString(MemberDoc member)
  {
    int ms = member.modifierSpecifier();
    int no = 288;
    return Modifier.toString(ms & (no ^ 0xFFFFFFFF));
  }
  
  protected String typeString(MemberDoc member)
  {
    String type = "";
    if ((member instanceof MethodDoc)) {
      type = ((MethodDoc)member).returnType().toString();
    } else if ((member instanceof FieldDoc)) {
      type = ((FieldDoc)member).type().toString();
    }
    return type;
  }
  
  protected void addModifiers(MemberDoc member, Content htmltree)
  {
    String mod = modifierString(member);
    if (((member.isField()) || (member.isMethod())) && ((writer instanceof ClassWriterImpl)) && (((ClassWriterImpl)writer).getClassDoc().isInterface())) {
      mod = Util.replaceText(mod, "public", "").trim();
    }
    if (mod.length() > 0)
    {
      htmltree.addContent(mod);
      htmltree.addContent(writer.getSpace());
    }
  }
  
  protected String makeSpace(int len)
  {
    if (len <= 0) {
      return "";
    }
    StringBuffer sb = new StringBuffer(len);
    for (int i = 0; i < len; i++) {
      sb.append(' ');
    }
    return sb.toString();
  }
  
  protected void addModifierAndType(ProgramElementDoc member, Type type, Content tdSummaryType)
  {
    HtmlTree code = new HtmlTree(HtmlTag.CODE);
    addModifier(member, code);
    if (type == null)
    {
      if (member.isClass()) {
        code.addContent("class");
      } else {
        code.addContent("interface");
      }
      code.addContent(writer.getSpace());
    }
    else if (((member instanceof ExecutableMemberDoc)) && (((ExecutableMemberDoc)member).typeParameters().length > 0))
    {
      int displayLength = ((AbstractExecutableMemberWriter)this).addTypeParameters((ExecutableMemberDoc)member, code);
      if (displayLength > 10) {
        code.addContent(new HtmlTree(HtmlTag.BR));
      }
      code.addContent(new RawHtml(writer.getLink(new LinkInfoImpl(17, type))));
    }
    else
    {
      code.addContent(new RawHtml(writer.getLink(new LinkInfoImpl(17, type))));
    }
    tdSummaryType.addContent(code);
  }
  
  private void printModifier(ProgramElementDoc member)
  {
    if (member.isProtected())
    {
      print("protected ");
    }
    else if (member.isPrivate())
    {
      print("private ");
    }
    else if (!member.isPublic())
    {
      writer.printText("doclet.Package_private");
      print(" ");
    }
    if ((member.isMethod()) && (((MethodDoc)member).isAbstract())) {
      print("abstract ");
    }
    if (member.isStatic()) {
      print("static");
    }
  }
  
  private void addModifier(ProgramElementDoc member, Content code)
  {
    if (member.isProtected())
    {
      code.addContent("protected ");
    }
    else if (member.isPrivate())
    {
      code.addContent("private ");
    }
    else if (!member.isPublic())
    {
      code.addContent(configuration().getText("doclet.Package_private"));
      code.addContent(" ");
    }
    if ((member.isMethod()) && (((MethodDoc)member).isAbstract())) {
      code.addContent("abstract ");
    }
    if (member.isStatic()) {
      code.addContent("static ");
    }
  }
  
  protected void addDeprecatedInfo(ProgramElementDoc member, Content contentTree)
  {
    String output = new DeprecatedTaglet().getTagletOutput(member, writer.getTagletWriterInstance(false)).toString().trim();
    if (!output.isEmpty())
    {
      Content deprecatedContent = new RawHtml(output);
      Content div = HtmlTree.DIV(HtmlStyle.block, deprecatedContent);
      contentTree.addContent(div);
    }
  }
  
  protected void addComment(ProgramElementDoc member, Content htmltree)
  {
    if (member.inlineTags().length > 0) {
      writer.addInlineComment(member, htmltree);
    }
  }
  
  protected String name(ProgramElementDoc member)
  {
    return member.name();
  }
  
  protected Content getHead(MemberDoc member)
  {
    Content memberContent = new RawHtml(member.name());
    Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, memberContent);
    return heading;
  }
  
  protected boolean isInherited(ProgramElementDoc ped)
  {
    if ((ped.isPrivate()) || ((ped.isPackagePrivate()) && (!ped.containingPackage().equals(classdoc.containingPackage())))) {
      return false;
    }
    return true;
  }
  
  protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey, String tableSummary, String[] tableHeader, Content contentTree)
  {
    if (deprmembers.size() > 0)
    {
      Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, writer.getTableCaption(configuration().getText(headingKey)));
      
      table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
      Content tbody = new HtmlTree(HtmlTag.TBODY);
      for (int i = 0; i < deprmembers.size(); i++)
      {
        ProgramElementDoc member = (ProgramElementDoc)deprmembers.get(i);
        HtmlTree td = HtmlTree.TD(HtmlStyle.colOne, getDeprecatedLink(member));
        if (member.tags("deprecated").length > 0) {
          writer.addInlineDeprecatedComment(member, member.tags("deprecated")[0], td);
        }
        HtmlTree tr = HtmlTree.TR(td);
        if (i % 2 == 0) {
          tr.addStyle(HtmlStyle.altColor);
        } else {
          tr.addStyle(HtmlStyle.rowColor);
        }
        tbody.addContent(tr);
      }
      table.addContent(tbody);
      Content li = HtmlTree.LI(HtmlStyle.blockList, table);
      Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
      contentTree.addContent(ul);
    }
  }
  
  protected void addUseInfo(List<? extends ProgramElementDoc> mems, String heading, String tableSummary, Content contentTree)
  {
    if (mems == null) {
      return;
    }
    List<? extends ProgramElementDoc> members = mems;
    boolean printedUseTableHeader = false;
    if (members.size() > 0)
    {
      Content table = HtmlTree.TABLE(0, 3, 0, tableSummary, writer.getTableCaption(heading));
      
      Content tbody = new HtmlTree(HtmlTag.TBODY);
      Iterator<? extends ProgramElementDoc> it = members.iterator();
      for (int i = 0; it.hasNext(); i++)
      {
        ProgramElementDoc pgmdoc = (ProgramElementDoc)it.next();
        ClassDoc cd = pgmdoc.containingClass();
        if (!printedUseTableHeader)
        {
          table.addContent(writer.getSummaryTableHeader(getSummaryTableHeader(pgmdoc), "col"));
          
          printedUseTableHeader = true;
        }
        HtmlTree tr = new HtmlTree(HtmlTag.TR);
        if (i % 2 == 0) {
          tr.addStyle(HtmlStyle.altColor);
        } else {
          tr.addStyle(HtmlStyle.rowColor);
        }
        HtmlTree tdFirst = new HtmlTree(HtmlTag.TD);
        tdFirst.addStyle(HtmlStyle.colFirst);
        writer.addSummaryType(this, pgmdoc, tdFirst);
        tr.addContent(tdFirst);
        HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
        tdLast.addStyle(HtmlStyle.colLast);
        if ((cd != null) && (!(pgmdoc instanceof ConstructorDoc)) && (!(pgmdoc instanceof ClassDoc)))
        {
          HtmlTree name = new HtmlTree(HtmlTag.SPAN);
          name.addStyle(HtmlStyle.strong);
          name.addContent(cd.name() + ".");
          tdLast.addContent(name);
        }
        addSummaryLink((pgmdoc instanceof ClassDoc) ? 4 : 3, cd, pgmdoc, tdLast);
        
        writer.addSummaryLinkComment(this, pgmdoc, tdLast);
        tr.addContent(tdLast);
        tbody.addContent(tr);
      }
      table.addContent(tbody);
      contentTree.addContent(table);
    }
  }
  
  protected void addNavDetailLink(List<?> members, Content liNav)
  {
    addNavDetailLink(members.size() > 0, liNav);
  }
  
  protected void addNavSummaryLink(List<?> members, VisibleMemberMap visibleMemberMap, Content liNav)
  {
    if (members.size() > 0)
    {
      liNav.addContent(getNavSummaryLink(null, true));
      return;
    }
    ClassDoc icd = classdoc.superclass();
    while (icd != null)
    {
      List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
      if (inhmembers.size() > 0)
      {
        liNav.addContent(getNavSummaryLink(icd, true));
        return;
      }
      icd = icd.superclass();
    }
    liNav.addContent(getNavSummaryLink(null, false));
  }
  
  protected void serialWarning(SourcePosition pos, String key, String a1, String a2)
  {
    if (configurationserialwarn) {
      ConfigurationImpl.getInstance().getDocletSpecificMsg().warning(pos, key, new Object[] { a1, a2 });
    }
  }
  
  public ProgramElementDoc[] eligibleMembers(ProgramElementDoc[] members)
  {
    return nodepr ? Util.excludeDeprecatedMembers(members) : members;
  }
  
  public ConfigurationImpl configuration()
  {
    return writer.configuration;
  }
  
  public void addMemberSummary(ClassDoc classDoc, ProgramElementDoc member, Tag[] firstSentenceTags, Content tableTree, int counter)
  {
    HtmlTree tdSummaryType = new HtmlTree(HtmlTag.TD);
    tdSummaryType.addStyle(HtmlStyle.colFirst);
    writer.addSummaryType(this, member, tdSummaryType);
    HtmlTree tdSummary = new HtmlTree(HtmlTag.TD);
    setSummaryColumnStyle(tdSummary);
    addSummaryLink(classDoc, member, tdSummary);
    writer.addSummaryLinkComment(this, member, firstSentenceTags, tdSummary);
    HtmlTree tr = HtmlTree.TR(tdSummaryType);
    tr.addContent(tdSummary);
    if (counter % 2 == 0) {
      tr.addStyle(HtmlStyle.altColor);
    } else {
      tr.addStyle(HtmlStyle.rowColor);
    }
    tableTree.addContent(tr);
  }
  
  public void setSummaryColumnStyle(HtmlTree tdTree)
  {
    tdTree.addStyle(HtmlStyle.colLast);
  }
  
  public void addInheritedMemberSummary(ClassDoc classDoc, ProgramElementDoc nestedClass, boolean isFirst, boolean isLast, Content linksTree)
  {
    writer.addInheritedMemberSummary(this, classDoc, nestedClass, isFirst, linksTree);
  }
  
  public Content getInheritedSummaryHeader(ClassDoc classDoc)
  {
    Content inheritedTree = writer.getMemberTreeHeader();
    writer.addInheritedSummaryHeader(this, classDoc, inheritedTree);
    return inheritedTree;
  }
  
  public Content getInheritedSummaryLinksTree()
  {
    return new HtmlTree(HtmlTag.CODE);
  }
  
  public Content getSummaryTableTree(ClassDoc classDoc)
  {
    return writer.getSummaryTableTree(this, classDoc);
  }
  
  public Content getMemberTree(Content memberTree)
  {
    return writer.getMemberTree(memberTree);
  }
  
  public Content getMemberTree(Content memberTree, boolean isLastContent)
  {
    if (isLastContent) {
      return HtmlTree.UL(HtmlStyle.blockListLast, memberTree);
    }
    return HtmlTree.UL(HtmlStyle.blockList, memberTree);
  }
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.formats.html.AbstractMemberWriter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlConstants;
import com.javafx.tools.doclets.formats.html.markup.HtmlStyle;
import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.formats.html.markup.RawHtml;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.util.MetaKeywords;
import com.sun.javadoc.PackageDoc;
import java.io.IOException;
import java.util.Arrays;

public abstract class AbstractPackageIndexWriter
  extends HtmlDocletWriter
{
  protected PackageDoc[] packages;
  
  public AbstractPackageIndexWriter(ConfigurationImpl configuration, String filename)
    throws IOException
  {
    super(configuration, filename);
    relativepathNoSlash = ".";
    packages = packages;
  }
  
  protected abstract void addNavigationBarHeader(Content paramContent);
  
  protected abstract void addNavigationBarFooter(Content paramContent);
  
  protected abstract void addOverviewHeader(Content paramContent);
  
  protected abstract void addPackagesList(PackageDoc[] paramArrayOfPackageDoc, String paramString1, String paramString2, Content paramContent);
  
  protected void buildPackageIndexFile(String title, boolean includeScript)
    throws IOException
  {
    String windowOverview = configuration.getText(title);
    Content body = getBody(includeScript, getWindowTitle(windowOverview));
    addNavigationBarHeader(body);
    addOverviewHeader(body);
    addIndex(body);
    addOverview(body);
    addNavigationBarFooter(body);
    printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title, configuration.doctitle), includeScript, body);
  }
  
  protected void addOverview(Content body)
    throws IOException
  {}
  
  protected void addIndex(Content body)
  {
    addIndexContents(packages, "doclet.Package_Summary", configuration.getText("doclet.Member_Table_Summary", configuration.getText("doclet.Package_Summary"), configuration.getText("doclet.packages")), body);
  }
  
  protected void addIndexContents(PackageDoc[] packages, String text, String tableSummary, Content body)
  {
    if (packages.length > 0)
    {
      Arrays.sort(packages);
      addAllClassesLink(body);
      addPackagesList(packages, text, tableSummary, body);
    }
  }
  
  protected void addConfigurationTitle(Content body)
  {
    if (configuration.doctitle.length() > 0)
    {
      Content title = new RawHtml(configuration.doctitle);
      Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.title, title);
      
      Content div = HtmlTree.DIV(HtmlStyle.header, heading);
      body.addContent(div);
    }
  }
  
  protected Content getNavLinkContents()
  {
    Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, overviewLabel);
    return li;
  }
  
  protected void addAllClassesLink(Content body) {}
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.formats.html.AbstractPackageIndexWriter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlAttr;
import com.javafx.tools.doclets.formats.html.markup.HtmlConstants;
import com.javafx.tools.doclets.formats.html.markup.HtmlStyle;
import com.javafx.tools.doclets.formats.html.markup.HtmlTag;
import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.util.ClassTree;
import com.javafx.tools.doclets.internal.toolkit.util.DirectoryManager;
import com.javafx.tools.doclets.internal.toolkit.util.Util;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.PackageDoc;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;

public abstract class AbstractTreeWriter
  extends HtmlDocletWriter
{
  protected final ClassTree classtree;
  private static final String LI_CIRCLE = "circle";
  
  protected AbstractTreeWriter(ConfigurationImpl configuration, String filename, ClassTree classtree)
    throws IOException
  {
    super(configuration, filename);
    this.classtree = classtree;
  }
  
  protected AbstractTreeWriter(ConfigurationImpl configuration, String path, String filename, ClassTree classtree, PackageDoc pkg)
    throws IOException
  {
    super(configuration, path, filename, DirectoryManager.getRelativePath(pkg.name()));
    
    this.classtree = classtree;
  }
  
  protected void addLevelInfo(ClassDoc parent, List<ClassDoc> list, boolean isEnum, Content contentTree)
  {
    int size = list.size();
    if (size > 0)
    {
      Content ul = new HtmlTree(HtmlTag.UL);
      for (int i = 0; i < size; i++)
      {
        ClassDoc local = (ClassDoc)list.get(i);
        HtmlTree li = new HtmlTree(HtmlTag.LI);
        li.addAttr(HtmlAttr.TYPE, "circle");
        addPartialInfo(local, li);
        addExtendsImplements(parent, local, li);
        addLevelInfo(local, classtree.subs(local, isEnum), isEnum, li);
        
        ul.addContent(li);
      }
      contentTree.addContent(ul);
    }
  }
  
  protected void addTree(List<ClassDoc> list, String heading, Content div)
  {
    if (list.size() > 0)
    {
      ClassDoc firstClassDoc = (ClassDoc)list.get(0);
      Content headingContent = getResource(heading);
      div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true, headingContent));
      
      addLevelInfo(!firstClassDoc.isInterface() ? firstClassDoc : null, list, list == classtree.baseEnums(), div);
    }
  }
  
  protected void addExtendsImplements(ClassDoc parent, ClassDoc cd, Content contentTree)
  {
    ClassDoc[] interfaces = cd.interfaces();
    if (interfaces.length > (cd.isInterface() ? 1 : 0))
    {
      Arrays.sort(interfaces);
      int counter = 0;
      for (int i = 0; i < interfaces.length; i++) {
        if ((parent != interfaces[i]) && (
          (interfaces[i].isPublic()) || (Util.isLinkable(interfaces[i], configuration()))))
        {
          if (counter == 0)
          {
            if (cd.isInterface())
            {
              contentTree.addContent(" (");
              contentTree.addContent(getResource("doclet.also"));
              contentTree.addContent(" extends ");
            }
            else
            {
              contentTree.addContent(" (implements ");
            }
          }
          else {
            contentTree.addContent(", ");
          }
          addPreQualifiedClassLink(12, interfaces[i], contentTree);
          
          counter++;
        }
      }
      if (counter > 0) {
        contentTree.addContent(")");
      }
    }
  }
  
  protected void addPartialInfo(ClassDoc cd, Content contentTree)
  {
    addPreQualifiedStrongClassLink(12, cd, contentTree);
  }
  
  protected Content getNavLinkTree()
  {
    Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, treeLabel);
    return li;
  }
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.formats.html.AbstractTreeWriter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlConstants;
import com.javafx.tools.doclets.formats.html.markup.HtmlStyle;
import com.javafx.tools.doclets.formats.html.markup.HtmlTag;
import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.formats.html.markup.RawHtml;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.util.DocletAbortException;
import com.javafx.tools.doclets.internal.toolkit.util.IndexBuilder;
import com.javafx.tools.doclets.internal.toolkit.util.MessageRetriever;
import com.javafx.tools.doclets.internal.toolkit.util.Util;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.Doc;
import java.io.IOException;
import java.util.List;

public class AllClassesFrameWriter
  extends HtmlDocletWriter
{
  public static final String OUTPUT_FILE_NAME_FRAMES = "allclasses-frame.html";
  public static final String OUTPUT_FILE_NAME_NOFRAMES = "allclasses-noframe.html";
  protected IndexBuilder indexbuilder;
  final HtmlTree BR = new HtmlTree(HtmlTag.BR);
  
  public AllClassesFrameWriter(ConfigurationImpl configuration, String filename, IndexBuilder indexbuilder)
    throws IOException
  {
    super(configuration, filename);
    this.indexbuilder = indexbuilder;
  }
  
  public static void generate(ConfigurationImpl configuration, IndexBuilder indexbuilder)
  {
    String filename = "allclasses-frame.html";
    try
    {
      AllClassesFrameWriter allclassgen = new AllClassesFrameWriter(configuration, filename, indexbuilder);
      
      allclassgen.buildAllClassesFile(true);
      allclassgen.close();
      filename = "allclasses-noframe.html";
      allclassgen = new AllClassesFrameWriter(configuration, filename, indexbuilder);
      
      allclassgen.buildAllClassesFile(false);
      allclassgen.close();
    }
    catch (IOException exc)
    {
      standardmessage.error("doclet.exception_encountered", new Object[] { exc.toString(), filename });
      
      throw new DocletAbortException();
    }
  }
  
  protected void buildAllClassesFile(boolean wantFrames)
    throws IOException
  {
    String label = configuration.getText("doclet.All_Classes");
    Content body = getBody(false, getWindowTitle(label));
    Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar, allclassesLabel);
    
    body.addContent(heading);
    Content ul = new HtmlTree(HtmlTag.UL);
    
    addAllClasses(ul, wantFrames);
    Content div = HtmlTree.DIV(HtmlStyle.indexContainer, ul);
    body.addContent(div);
    printHtmlDocument(null, false, body);
  }
  
  protected void addAllClasses(Content content, boolean wantFrames)
  {
    for (int i = 0; i < indexbuilder.elements().length; i++)
    {
      Character unicode = (Character)indexbuilder.elements()[i];
      addContents(indexbuilder.getMemberList(unicode), wantFrames, content);
    }
  }
  
  protected void addContents(List<Doc> classlist, boolean wantFrames, Content content)
  {
    for (int i = 0; i < classlist.size(); i++)
    {
      ClassDoc cd = (ClassDoc)classlist.get(i);
      if (Util.isCoreClass(cd))
      {
        String label = italicsClassName(cd, false);
        Content linkContent;
        Content linkContent;
        if (wantFrames) {
          linkContent = new RawHtml(getLink(new LinkInfoImpl(1, cd, label, "classFrame")));
        } else {
          linkContent = new RawHtml(getLink(new LinkInfoImpl(cd, label)));
        }
        Content li = HtmlTree.LI(linkContent);
        content.addContent(li);
      }
    }
  }
}

/* Location:
 * Qualified Name:     com.javafx.tools.doclets.formats.html.AllClassesFrameWriter
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package com.javafx.tools.doclets.formats.html;

import com.javafx.tools.doclets.formats.html.markup.HtmlConstants;
import com.javafx.tools.doclets.formats.html.markup.HtmlTree;
import com.javafx.tools.doclets.formats.html.markup.StringContent;
import com.javafx.tools.doclets.internal.toolkit.AnnotationTypeOptionalMemberWriter;
import com.javafx.tools.doclets.internal.toolkit.Content;
import com.javafx.tools.doclets.internal.toolkit.MemberSummaryWriter;
import com.sun.javadoc.AnnotationTypeDoc;
import com.sun.javadoc.AnnotationTypeElementDoc;
import com.sun.javadoc.ClassDoc;
import com.sun.javadoc.MemberDoc;
import com.sun.javadoc.ProgramElementDoc;
import java.io.IOException;

public class AnnotationTypeOptionalMemberWriterImpl
  extends Annotati
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2017. Infinite Loop Ltd