diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java deleted file mode 100644 --- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.tools.doclets; - -import com.sun.javadoc.*; - -/** - * The interface for a custom tag used by Doclets. A custom - * tag must implement this interface. - * - *
- * Note: This interface has been superseded by one - * in the new package {@code jdk.javadoc.doclet.taglet}. - *
- * - * To be loaded and used by - * doclets at run-time, the taglet must have a static method called - *register
that accepts a {@link java.util.Map} as an
- * argument with the following signature:
- * - * public void register(Map map) - *- * This method should add an instance of the custom taglet to the map - * with the name of the taglet as the key. If overriding a taglet, - * to avoid a name conflict, the overridden taglet must be deleted from - * the map before an instance of the new taglet is added to the map. - *
- * It is recommended that the taglet throw an exception when it fails - * to register itself. The exception that it throws is up to the user. - *
- * Here are two sample taglets:
- *
- * For more information on how to create your own Taglets, please see the
- * Taglet Overview.
- *
- * @since 1.4
- * @author Jamie Ho
- *
- * @deprecated
- * This interface has been superseded by one in the new package {@code jdk.javadoc.doclet.taglet}.
- */
-@Deprecated
-public interface Taglet {
-
- /**
- * Return true if this Taglet
- * is used in field documentation. Set to
- * false for inline tags.
- * @return true if this Taglet
- * is used in field documentation and false
- * otherwise.
- */
- public abstract boolean inField();
-
- /**
- * Return true if this Taglet
- * is used in constructor documentation. Set to
- * false for inline tags.
- * @return true if this Taglet
- * is used in constructor documentation and false
- * otherwise.
- */
- public abstract boolean inConstructor();
-
- /**
- * Return true if this Taglet
- * is used in method documentation. Set to
- * false for inline tags.
- * @return true if this Taglet
- * is used in method documentation and false
- * otherwise.
- */
- public abstract boolean inMethod();
-
- /**
- * Return true if this Taglet
- * is used in overview documentation. Set to
- * false for inline tags.
- * @return true if this Taglet
- * is used in method documentation and false
- * otherwise.
- */
- public abstract boolean inOverview();
-
- /**
- * Return true if this Taglet
- * is used in package documentation. Set to
- * false for inline tags.
- * @return true if this Taglet
- * is used in package documentation and false
- * otherwise.
- */
- public abstract boolean inPackage();
-
- /**
- * Return true if this Taglet
- * is used in type documentation (classes or
- * interfaces). Set to false for inline tags.
- * @return true if this Taglet
- * is used in type documentation and false
- * otherwise.
- */
- public abstract boolean inType();
-
- /**
- * Return true if this Taglet
- * is an inline tag. Return false otherwise.
- * @return true if this Taglet
- * is an inline tag and false otherwise.
- */
- public abstract boolean isInlineTag();
-
- /**
- * Return the name of this custom tag.
- * @return the name of this custom tag.
- */
- public abstract String getName();
-
- /**
- * Given the Tag
representation of this custom
- * tag, return its string representation, which is output
- * to the generated page.
- * @param tag the Tag
representation of this custom tag.
- * @return the string representation of this Tag
.
- */
- public abstract String toString(Tag tag);
-
- /**
- * Given an array of Tag
s representing this custom
- * tag, return its string representation, which is output
- * to the generated page. This method should
- * return null if this taglet represents an inline tag.
- * @param tags the array of Tag
s representing of this custom tag.
- * @return the string representation of this Tag
.
- */
- public abstract String toString(Tag[] tags);
-
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java
+++ /dev/null
@@ -1,310 +0,0 @@
-/*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Print method and constructor info.
- *
- *
This is NOT part of any supported API. - * If you write code that depends on this, you do so at your own risk. - * This code and its internal interfaces are subject to change or - * deletion without notice. - * - * @author Robert Field - * @author Atul M Dambalkar - * @author Bhavesh Patel (Modified) - */ -@Deprecated -public abstract class AbstractExecutableMemberWriter extends AbstractMemberWriter { - - public AbstractExecutableMemberWriter(SubWriterHolderWriter writer, - ClassDoc classdoc) { - super(writer, classdoc); - } - - public AbstractExecutableMemberWriter(SubWriterHolderWriter writer) { - super(writer); - } - - /** - * Add the type parameters for the executable member. - * - * @param member the member to write type parameters for. - * @param htmltree the content tree to which the parameters will be added. - */ - protected void addTypeParameters(ExecutableMemberDoc member, Content htmltree) { - Content typeParameters = getTypeParameters(member); - if (!typeParameters.isEmpty()) { - htmltree.addContent(typeParameters); - htmltree.addContent(writer.getSpace()); - } - } - - /** - * Get the type parameters for the executable member. - * - * @param member the member for which to get the type parameters. - * @return the type parameters. - */ - protected Content getTypeParameters(ExecutableMemberDoc member) { - LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.MEMBER_TYPE_PARAMS, member); - return writer.getTypeParameterLinks(linkInfo); - } - - /** - * {@inheritDoc} - */ - protected Content getDeprecatedLink(ProgramElementDoc member) { - ExecutableMemberDoc emd = (ExecutableMemberDoc)member; - return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, (MemberDoc) emd, - emd.qualifiedName() + emd.flatSignature()); - } - - /** - * Add the summary link for the member. - * - * @param context the id of the context where the link will be printed - * @param cd the classDoc that we should link to - * @param member the member being linked to - * @param tdSummary the content tree to which the link will be added - */ - protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member, - Content tdSummary) { - ExecutableMemberDoc emd = (ExecutableMemberDoc)member; - String name = emd.name(); - Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink, - writer.getDocLink(context, cd, (MemberDoc) emd, - name, false)); - Content code = HtmlTree.CODE(memberLink); - addParameters(emd, false, code, name.length() - 1); - tdSummary.addContent(code); - } - - /** - * Add the inherited summary link for the member. - * - * @param cd the classDoc that we should link to - * @param member the member being linked to - * @param linksTree the content tree to which the link will be added - */ - protected void addInheritedSummaryLink(ClassDoc cd, - ProgramElementDoc member, Content linksTree) { - linksTree.addContent( - writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc) member, - member.name(), false)); - } - - /** - * Add the parameter for the executable member. - * - * @param member the member to write parameter for. - * @param param the parameter that needs to be written. - * @param isVarArg true if this is a link to var arg. - * @param tree the content tree to which the parameter information will be added. - */ - protected void addParam(ExecutableMemberDoc member, Parameter param, - boolean isVarArg, Content tree) { - if (param.type() != null) { - Content link = writer.getLink(new LinkInfoImpl( - configuration, LinkInfoImpl.Kind.EXECUTABLE_MEMBER_PARAM, - param.type()).varargs(isVarArg)); - tree.addContent(link); - } - if(param.name().length() > 0) { - tree.addContent(writer.getSpace()); - tree.addContent(param.name()); - } - } - - /** - * Add the receiver annotations information. - * - * @param member the member to write receiver annotations for. - * @param rcvrType the receiver type. - * @param descList list of annotation description. - * @param tree the content tree to which the information will be added. - */ - protected void addReceiverAnnotations(ExecutableMemberDoc member, Type rcvrType, - AnnotationDesc[] descList, Content tree) { - writer.addReceiverAnnotationInfo(member, descList, tree); - tree.addContent(writer.getSpace()); - tree.addContent(rcvrType.typeName()); - LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.CLASS_SIGNATURE, rcvrType); - tree.addContent(writer.getTypeParameterLinks(linkInfo)); - tree.addContent(writer.getSpace()); - tree.addContent("this"); - } - - - /** - * Add all the parameters for the executable member. - * - * @param member the member to write parameters for. - * @param htmltree the content tree to which the parameters information will be added. - */ - protected void addParameters(ExecutableMemberDoc member, Content htmltree, int indentSize) { - addParameters(member, true, htmltree, indentSize); - } - - /** - * Add all the parameters for the executable member. - * - * @param member the member to write parameters for. - * @param includeAnnotations true if annotation information needs to be added. - * @param htmltree the content tree to which the parameters information will be added. - */ - protected void addParameters(ExecutableMemberDoc member, - boolean includeAnnotations, Content htmltree, int indentSize) { - htmltree.addContent("("); - String sep = ""; - Parameter[] params = member.parameters(); - String indent = makeSpace(indentSize + 1); - Type rcvrType = member.receiverType(); - if (includeAnnotations && rcvrType instanceof AnnotatedType) { - AnnotationDesc[] descList = rcvrType.asAnnotatedType().annotations(); - if (descList.length > 0) { - addReceiverAnnotations(member, rcvrType, descList, htmltree); - sep = "," + DocletConstants.NL + indent; - } - } - int paramstart; - for (paramstart = 0; paramstart < params.length; paramstart++) { - htmltree.addContent(sep); - 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(")"); - } - - /** - * Add exceptions for the executable member. - * - * @param member the member to write exceptions for. - * @param htmltree the content tree to which the exceptions information will be added. - */ - protected void addExceptions(ExecutableMemberDoc member, Content htmltree, int indentSize) { - Type[] exceptions = member.thrownExceptionTypes(); - if (exceptions.length > 0) { - LinkInfoImpl memberTypeParam = new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.MEMBER, member); - String indent = makeSpace(indentSize + 1 - 7); - htmltree.addContent(DocletConstants.NL); - htmltree.addContent(indent); - htmltree.addContent("throws "); - indent = makeSpace(indentSize + 1); - Content link = writer.getLink(new LinkInfoImpl(configuration, - LinkInfoImpl.Kind.MEMBER, exceptions[0])); - htmltree.addContent(link); - for(int i = 1; i < exceptions.length; i++) { - htmltree.addContent(","); - htmltree.addContent(DocletConstants.NL); - htmltree.addContent(indent); - Content exceptionLink = writer.getLink(new LinkInfoImpl( - configuration, LinkInfoImpl.Kind.MEMBER, exceptions[i])); - htmltree.addContent(exceptionLink); - } - } - } - - protected ClassDoc implementsMethodInIntfac(MethodDoc method, - ClassDoc[] intfacs) { - for (ClassDoc intf : intfacs) { - MethodDoc[] methods = intf.methods(); - if (methods.length > 0) { - for (MethodDoc md : methods) { - if (md.name().equals(method.name()) && - md.signature().equals(method.signature())) { - return intf; - } - } - } - } - return null; - } - - /** - * For backward compatibility, include an anchor using the erasures of the - * parameters. NOTE: We won't need this method anymore after we fix - * see tags so that they use the type instead of the erasure. - * - * @param emd the ExecutableMemberDoc to anchor to. - * @return the 1.4.x style anchor for the ExecutableMemberDoc. - */ - protected String getErasureAnchor(ExecutableMemberDoc emd) { - StringBuilder buf = new StringBuilder(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 ? writer.getName(buf.toString()) : null; - } -} diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java deleted file mode 100644 --- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java +++ /dev/null @@ -1,436 +0,0 @@ -/* - * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Oracle designates this - * particular file as subject to the "Classpath" exception as provided - * by Oracle in the LICENSE file that accompanied this code. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ - -package com.sun.tools.doclets.formats.html; - -import java.io.*; -import java.util.*; -import java.nio.file.*; -import java.util.zip.*; - -import com.sun.javadoc.*; -import com.sun.tools.doclets.formats.html.markup.*; -import com.sun.tools.doclets.internal.toolkit.*; -import com.sun.tools.doclets.internal.toolkit.util.*; - -/** - * Generate Index for all the Member Names with Indexing in - * Unicode Order. This class is a base class for {@link SingleIndexWriter} and - * {@link SplitIndexWriter}. It uses the functionality from - * {@link HtmlDocletWriter} to generate the Index Contents. - * - *
This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @see IndexBuilder
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class AbstractIndexWriter extends HtmlDocletWriter {
-
- /**
- * The index of all the members with unicode character.
- */
- protected IndexBuilder indexbuilder;
-
- /**
- * This constructor will be used by {@link SplitIndexWriter}. Initializes
- * path to this file and relative path from this file.
- *
- * @param configuration The current configuration
- * @param path Path to the file which is getting generated.
- * @param indexbuilder Unicode based Index from {@link IndexBuilder}
- */
- protected AbstractIndexWriter(ConfigurationImpl configuration,
- DocPath path,
- IndexBuilder indexbuilder)
- throws IOException {
- super(configuration, path);
- this.indexbuilder = indexbuilder;
- }
-
- /**
- * Get the index label for navigation bar.
- *
- * @return a content tree for the tree label
- */
- protected Content getNavLinkIndex() {
- Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, indexLabel);
- return li;
- }
-
- /**
- * Add the member information for the unicode character along with the
- * list of the members.
- *
- * @param uc Unicode for which member list information to be generated
- * @param memberlist List of members for the unicode character
- * @param contentTree the content tree to which the information will be added
- */
- protected void addContents(Character uc, List extends Doc> memberlist,
- Content contentTree) {
- addHeading(uc, contentTree);
- int memberListSize = memberlist.size();
- // Display the list only if there are elements to be displayed.
- if (memberListSize > 0) {
- Content dl = new HtmlTree(HtmlTag.DL);
- for (Doc element : memberlist) {
- addDescription(dl, element);
- }
- contentTree.addContent(dl);
- }
- }
-
- protected void addSearchContents(Character uc, List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Jamie Ho (Re-write)
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public abstract class AbstractMemberWriter {
-
- protected final ConfigurationImpl configuration;
- protected final Utils utils;
- protected final SubWriterHolderWriter writer;
- protected final ClassDoc classdoc;
- protected Map This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
-
- /**
- * A Set of Packages to be documented.
- */
- protected SortedSet This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- */
-@Deprecated
-public abstract class AbstractTreeWriter extends HtmlDocletWriter {
-
- /**
- * The class and interface tree built by using {@link ClassTree}
- */
- protected final ClassTree classtree;
-
- /**
- * Constructor initializes classtree variable. This constructor will be used
- * while generating global tree file "overview-tree.html".
- *
- * @param configuration The current configuration
- * @param filename File to be generated.
- * @param classtree Tree built by {@link ClassTree}.
- * @throws IOException
- * @throws DocletAbortException
- */
- protected AbstractTreeWriter(ConfigurationImpl configuration,
- DocPath filename, ClassTree classtree)
- throws IOException {
- super(configuration, filename);
- this.classtree = classtree;
- }
-
- /**
- * Add each level of the class tree. For each sub-class or
- * sub-interface indents the next level information.
- * Recurses itself to add subclasses info.
- *
- * @param parent the superclass or superinterface of the list
- * @param list list of the sub-classes at this level
- * @param isEnum true if we are generating a tree for enums
- * @param contentTree the content tree to which the level information will be added
- */
- protected void addLevelInfo(ClassDoc parent, Collection This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Doug Kramer
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class AllClassesFrameWriter extends HtmlDocletWriter {
-
- /**
- * Index of all the classes.
- */
- protected IndexBuilder indexbuilder;
-
- /**
- * BR tag to be used within a document tree.
- */
- final HtmlTree BR = new HtmlTree(HtmlTag.BR);
-
- /**
- * Construct AllClassesFrameWriter object. Also initializes the indexbuilder
- * variable in this class.
- * @param configuration The current configuration
- * @param filename Path to the file which is getting generated.
- * @param indexbuilder Unicode based Index from {@link IndexBuilder}
- * @throws IOException
- * @throws DocletAbortException
- */
- public AllClassesFrameWriter(ConfigurationImpl configuration,
- DocPath filename, IndexBuilder indexbuilder)
- throws IOException {
- super(configuration, filename);
- this.indexbuilder = indexbuilder;
- }
-
- /**
- * Create AllClassesFrameWriter object. Then use it to generate the
- * "allclasses-frame.html" file. Generate the file in the current or the
- * destination directory.
- *
- * @param indexbuilder IndexBuilder object for all classes index.
- * @throws DocletAbortException
- */
- public static void generate(ConfigurationImpl configuration,
- IndexBuilder indexbuilder) {
- AllClassesFrameWriter allclassgen;
- DocPath filename = DocPaths.ALLCLASSES_FRAME;
- try {
- allclassgen = new AllClassesFrameWriter(configuration,
- filename, indexbuilder);
- allclassgen.buildAllClassesFile(true);
- allclassgen.close();
- filename = DocPaths.ALLCLASSES_NOFRAME;
- allclassgen = new AllClassesFrameWriter(configuration,
- filename, indexbuilder);
- allclassgen.buildAllClassesFile(false);
- allclassgen.close();
- } catch (IOException exc) {
- configuration.standardmessage.
- error("doclet.exception_encountered",
- exc.toString(), filename);
- throw new DocletAbortException(exc);
- }
- }
-
- /**
- * Print all the classes in the file.
- * @param wantFrames True if we want frames.
- */
- 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);
- // Generate the class links and add it to the tdFont tree.
- addAllClasses(ul, wantFrames);
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
- ? HtmlTree.MAIN(HtmlStyle.indexContainer, ul)
- : HtmlTree.DIV(HtmlStyle.indexContainer, ul);
- body.addContent(htmlTree);
- printHtmlDocument(null, false, body);
- }
-
- /**
- * Use the sorted index of all the classes and add all the classes to the
- * content list.
- *
- * @param content HtmlTree content to which all classes information will be added
- * @param wantFrames True if we want frames.
- */
- 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);
- }
- }
-
- /**
- * Given a list of classes, generate links for each class or interface.
- * If the class kind is interface, print it in the italics font. Also all
- * links should target the right-hand frame. If clicked on any class name
- * in this page, appropriate class page should get opened in the right-hand
- * frame.
- *
- * @param classlist Sorted list of classes.
- * @param wantFrames True if we want frames.
- * @param content HtmlTree content to which the links will be added
- */
- protected void addContents(List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Bhavesh Patel
- */
-@Deprecated
-public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
- implements AnnotationTypeFieldWriter, MemberSummaryWriter {
-
- /**
- * Construct a new AnnotationTypeFieldWriterImpl.
- *
- * @param writer the writer that will write the output.
- * @param annotationType the AnnotationType that holds this member.
- */
- public AnnotationTypeFieldWriterImpl(SubWriterHolderWriter writer,
- AnnotationTypeDoc annotationType) {
- super(writer, annotationType);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(
- HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberTreeHeader() {
- return writer.getMemberTreeHeader();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationFieldDetailsMarker(Content memberDetails) {
- memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationDetailsTreeHeader(ClassDoc classDoc,
- Content memberDetailsTree) {
- if (!writer.printedAnnotationFieldHeading) {
- memberDetailsTree.addContent(writer.getMarkerAnchor(
- SectionName.ANNOTATION_TYPE_FIELD_DETAIL));
- Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
- writer.fieldDetailsLabel);
- memberDetailsTree.addContent(heading);
- writer.printedAnnotationFieldHeading = true;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationDocTreeHeader(MemberDoc member,
- Content annotationDetailsTree) {
- annotationDetailsTree.addContent(
- writer.getMarkerAnchor(member.name()));
- Content annotationDocTree = writer.getMemberTreeHeader();
- Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
- heading.addContent(member.name());
- annotationDocTree.addContent(heading);
- return annotationDocTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getSignature(MemberDoc member) {
- Content pre = new HtmlTree(HtmlTag.PRE);
- writer.addAnnotationInfo(member, pre);
- addModifiers(member, pre);
- Content link =
- writer.getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.MEMBER, getType(member)));
- pre.addContent(link);
- pre.addContent(writer.getSpace());
- if (configuration.linksource) {
- Content memberName = new StringContent(member.name());
- writer.addSrcLink(member, memberName, pre);
- } else {
- addName(member.name(), pre);
- }
- return pre;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDeprecated(MemberDoc member, Content annotationDocTree) {
- addDeprecatedInfo(member, annotationDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addComments(MemberDoc member, Content annotationDocTree) {
- addComment(member, annotationDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTags(MemberDoc member, Content annotationDocTree) {
- writer.addTagsInfo(member, annotationDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationDetails(Content annotationDetailsTree) {
- if (configuration.allowTag(HtmlTag.SECTION)) {
- HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
- return htmlTree;
- }
- return getMemberTree(annotationDetailsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationDoc(Content annotationDocTree,
- boolean isLastContent) {
- return getMemberTree(annotationDocTree, isLastContent);
- }
-
- /**
- * Close the writer.
- */
- public void close() throws IOException {
- writer.close();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Field_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Field_Summary"),
- configuration.getText("doclet.fields"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Fields");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Fields"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.ANNOTATION_TYPE_FIELD_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
- Content tdSummary) {
- Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
- writer.getDocLink(context, (MemberDoc) member, member.name(), false));
- Content code = HtmlTree.CODE(memberLink);
- tdSummary.addContent(code);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addInheritedSummaryLink(ClassDoc cd,
- ProgramElementDoc member, Content linksTree) {
- //Not applicable.
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
- MemberDoc m = (MemberDoc)member;
- addModifierAndType(m, getType(m), tdSummaryType);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getDeprecatedLink(ProgramElementDoc member) {
- return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
- (MemberDoc) member, ((MemberDoc)member).qualifiedName());
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- return writer.getHyperLink(
- SectionName.ANNOTATION_TYPE_FIELD_SUMMARY,
- writer.getResource("doclet.navField"));
- } else {
- return writer.getResource("doclet.navField");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- if (link) {
- liNav.addContent(writer.getHyperLink(
- SectionName.ANNOTATION_TYPE_FIELD_DETAIL,
- writer.getResource("doclet.navField")));
- } else {
- liNav.addContent(writer.getResource("doclet.navField"));
- }
- }
-
- private Type getType(MemberDoc member) {
- if (member instanceof FieldDoc) {
- return ((FieldDoc) member).type();
- } else {
- return ((MethodDoc) member).returnType();
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-
-/**
- * Writes annotation type optional member documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Jamie Ho
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class AnnotationTypeOptionalMemberWriterImpl extends
- AnnotationTypeRequiredMemberWriterImpl
- implements AnnotationTypeOptionalMemberWriter, MemberSummaryWriter {
-
- /**
- * Construct a new AnnotationTypeOptionalMemberWriterImpl.
- *
- * @param writer the writer that will write the output.
- * @param annotationType the AnnotationType that holds this member.
- */
- public AnnotationTypeOptionalMemberWriterImpl(SubWriterHolderWriter writer,
- AnnotationTypeDoc annotationType) {
- super(writer, annotationType);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(
- HtmlConstants.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDefaultValueInfo(MemberDoc member, Content annotationDocTree) {
- if (((AnnotationTypeElementDoc) member).defaultValue() != null) {
- Content dt = HtmlTree.DT(writer.getResource("doclet.Default"));
- Content dl = HtmlTree.DL(dt);
- Content dd = HtmlTree.DD(new StringContent(
- ((AnnotationTypeElementDoc) member).defaultValue().toString()));
- dl.addContent(dd);
- annotationDocTree.addContent(dl);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void close() throws IOException {
- writer.close();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Annotation_Type_Optional_Member_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Annotation_Type_Optional_Member_Summary"),
- configuration.getText("doclet.annotation_type_optional_members"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Annotation_Type_Optional_Members");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Annotation_Type_Optional_Member"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- return writer.getHyperLink(
- SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY,
- writer.getResource("doclet.navAnnotationTypeOptionalMember"));
- } else {
- return writer.getResource("doclet.navAnnotationTypeOptionalMember");
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-
-/**
- * Writes annotation type required member documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Jamie Ho
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
- implements AnnotationTypeRequiredMemberWriter, MemberSummaryWriter {
-
- /**
- * Construct a new AnnotationTypeRequiredMemberWriterImpl.
- *
- * @param writer the writer that will write the output.
- * @param annotationType the AnnotationType that holds this member.
- */
- public AnnotationTypeRequiredMemberWriterImpl(SubWriterHolderWriter writer,
- AnnotationTypeDoc annotationType) {
- super(writer, annotationType);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(
- HtmlConstants.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberTreeHeader() {
- return writer.getMemberTreeHeader();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationDetailsMarker(Content memberDetails) {
- memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_DETAILS);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationDetailsTreeHeader(ClassDoc classDoc,
- Content memberDetailsTree) {
- if (!writer.printedAnnotationHeading) {
- memberDetailsTree.addContent(writer.getMarkerAnchor(
- SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL));
- Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
- writer.annotationTypeDetailsLabel);
- memberDetailsTree.addContent(heading);
- writer.printedAnnotationHeading = true;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationDocTreeHeader(MemberDoc member,
- Content annotationDetailsTree) {
- annotationDetailsTree.addContent(
- writer.getMarkerAnchor(member.name() +
- ((ExecutableMemberDoc) member).signature()));
- Content annotationDocTree = writer.getMemberTreeHeader();
- Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
- heading.addContent(member.name());
- annotationDocTree.addContent(heading);
- return annotationDocTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getSignature(MemberDoc member) {
- Content pre = new HtmlTree(HtmlTag.PRE);
- writer.addAnnotationInfo(member, pre);
- addModifiers(member, pre);
- Content link =
- writer.getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.MEMBER, getType(member)));
- pre.addContent(link);
- pre.addContent(writer.getSpace());
- if (configuration.linksource) {
- Content memberName = new StringContent(member.name());
- writer.addSrcLink(member, memberName, pre);
- } else {
- addName(member.name(), pre);
- }
- return pre;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDeprecated(MemberDoc member, Content annotationDocTree) {
- addDeprecatedInfo(member, annotationDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addComments(MemberDoc member, Content annotationDocTree) {
- addComment(member, annotationDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTags(MemberDoc member, Content annotationDocTree) {
- writer.addTagsInfo(member, annotationDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationDetails(Content annotationDetailsTree) {
- if (configuration.allowTag(HtmlTag.SECTION)) {
- HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(annotationDetailsTree));
- return htmlTree;
- }
- return getMemberTree(annotationDetailsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationDoc(Content annotationDocTree,
- boolean isLastContent) {
- return getMemberTree(annotationDocTree, isLastContent);
- }
-
- /**
- * Close the writer.
- */
- public void close() throws IOException {
- writer.close();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Annotation_Type_Required_Member_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Annotation_Type_Required_Member_Summary"),
- configuration.getText("doclet.annotation_type_required_members"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Annotation_Type_Required_Members");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Annotation_Type_Required_Member"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
- Content tdSummary) {
- Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
- writer.getDocLink(context, (MemberDoc) member, member.name(), false));
- Content code = HtmlTree.CODE(memberLink);
- tdSummary.addContent(code);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addInheritedSummaryLink(ClassDoc cd,
- ProgramElementDoc member, Content linksTree) {
- //Not applicable.
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
- MemberDoc m = (MemberDoc)member;
- addModifierAndType(m, getType(m), tdSummaryType);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getDeprecatedLink(ProgramElementDoc member) {
- return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
- (MemberDoc) member, ((MemberDoc)member).qualifiedName());
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- return writer.getHyperLink(
- SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY,
- writer.getResource("doclet.navAnnotationTypeRequiredMember"));
- } else {
- return writer.getResource("doclet.navAnnotationTypeRequiredMember");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- if (link) {
- liNav.addContent(writer.getHyperLink(
- SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL,
- writer.getResource("doclet.navAnnotationTypeMember")));
- } else {
- liNav.addContent(writer.getResource("doclet.navAnnotationTypeMember"));
- }
- }
-
- private Type getType(MemberDoc member) {
- if (member instanceof FieldDoc) {
- return ((FieldDoc) member).type();
- } else {
- return ((MethodDoc) member).returnType();
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
+++ /dev/null
@@ -1,432 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.IOException;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.builders.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Generate the Class Information Page.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @see com.sun.javadoc.ClassDoc
- * @see java.util.Collections
- * @see java.util.List
- * @see java.util.ArrayList
- * @see java.util.HashMap
- *
- * @author Atul M Dambalkar
- * @author Robert Field
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
- implements AnnotationTypeWriter {
-
- protected AnnotationTypeDoc annotationType;
-
- protected Type prev;
-
- protected Type next;
-
- /**
- * @param annotationType the annotation type being documented.
- * @param prevType the previous class that was documented.
- * @param nextType the next class being documented.
- */
- public AnnotationTypeWriterImpl(ConfigurationImpl configuration,
- AnnotationTypeDoc annotationType, Type prevType, Type nextType)
- throws Exception {
- super(configuration, DocPath.forClass(annotationType));
- this.annotationType = annotationType;
- configuration.currentcd = annotationType.asClassDoc();
- this.prev = prevType;
- this.next = nextType;
- }
-
- /**
- * Get this package link.
- *
- * @return a content tree for the package link
- */
- protected Content getNavLinkPackage() {
- Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY,
- packageLabel);
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get the class link.
- *
- * @return a content tree for the class link
- */
- protected Content getNavLinkClass() {
- Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, classLabel);
- return li;
- }
-
- /**
- * Get the class use link.
- *
- * @return a content tree for the class use link
- */
- protected Content getNavLinkClassUse() {
- Content linkContent = getHyperLink(DocPaths.CLASS_USE.resolve(filename), useLabel);
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get link to previous class.
- *
- * @return a content tree for the previous class link
- */
- public Content getNavLinkPrevious() {
- Content li;
- if (prev != null) {
- Content prevLink = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS, prev.asClassDoc())
- .label(prevclassLabel).strong(true));
- li = HtmlTree.LI(prevLink);
- }
- else
- li = HtmlTree.LI(prevclassLabel);
- return li;
- }
-
- /**
- * Get link to next class.
- *
- * @return a content tree for the next class link
- */
- public Content getNavLinkNext() {
- Content li;
- if (next != null) {
- Content nextLink = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS, next.asClassDoc())
- .label(nextclassLabel).strong(true));
- li = HtmlTree.LI(nextLink);
- }
- else
- li = HtmlTree.LI(nextclassLabel);
- return li;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getHeader(String header) {
- String pkgname = (annotationType.containingPackage() != null)?
- annotationType.containingPackage().name(): "";
- String clname = annotationType.name();
- HtmlTree bodyTree = getBody(true, getWindowTitle(clname));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : bodyTree;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- bodyTree.addContent(htmlTree);
- }
- bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.header);
- if (pkgname.length() > 0) {
- Content pkgNameContent = new StringContent(pkgname);
- Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, pkgNameContent);
- div.addContent(pkgNameDiv);
- }
- LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_HEADER, annotationType);
- Content headerContent = new StringContent(header);
- Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true,
- HtmlStyle.title, headerContent);
- heading.addContent(getTypeParameterLinks(linkInfo));
- div.addContent(heading);
- if (configuration.allowTag(HtmlTag.MAIN)) {
- mainTree.addContent(div);
- } else {
- bodyTree.addContent(div);
- }
- return bodyTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationContentHeader() {
- return getContentHeader();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addFooter(Content contentTree) {
- contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
- Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
- ? HtmlTree.FOOTER()
- : contentTree;
- addNavLinks(false, htmlTree);
- addBottom(htmlTree);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- contentTree.addContent(htmlTree);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void printDocument(Content contentTree) throws IOException {
- printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType),
- true, contentTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationInfoTreeHeader() {
- return getMemberTreeHeader();
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getAnnotationInfo(Content annotationInfoTree) {
- return getMemberTree(HtmlStyle.description, annotationInfoTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree) {
- annotationInfoTree.addContent(new HtmlTree(HtmlTag.BR));
- Content pre = new HtmlTree(HtmlTag.PRE);
- addAnnotationInfo(annotationType, pre);
- pre.addContent(modifiers);
- LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_SIGNATURE, annotationType);
- Content annotationName = new StringContent(annotationType.name());
- Content parameterLinks = getTypeParameterLinks(linkInfo);
- if (configuration.linksource) {
- addSrcLink(annotationType, annotationName, pre);
- pre.addContent(parameterLinks);
- } else {
- Content span = HtmlTree.SPAN(HtmlStyle.memberNameLabel, annotationName);
- span.addContent(parameterLinks);
- pre.addContent(span);
- }
- annotationInfoTree.addContent(pre);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationTypeDescription(Content annotationInfoTree) {
- if(!configuration.nocomment) {
- if (annotationType.inlineTags().length > 0) {
- addInlineComment(annotationType, annotationInfoTree);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationTypeTagInfo(Content annotationInfoTree) {
- if(!configuration.nocomment) {
- addTagsInfo(annotationType, annotationInfoTree);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) {
- Content hr = new HtmlTree(HtmlTag.HR);
- annotationInfoTree.addContent(hr);
- Tag[] deprs = annotationType.tags("deprecated");
- if (utils.isDeprecated(annotationType)) {
- Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
- Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
- if (deprs.length > 0) {
- Tag[] commentTags = deprs[0].inlineTags();
- if (commentTags.length > 0) {
- div.addContent(getSpace());
- addInlineDeprecatedComment(annotationType, deprs[0], div);
- }
- }
- annotationInfoTree.addContent(div);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavLinkTree() {
- Content treeLinkContent = getHyperLink(DocPaths.PACKAGE_TREE,
- treeLabel, "", "");
- Content li = HtmlTree.LI(treeLinkContent);
- return li;
- }
-
- /**
- * Add summary details to the navigation bar.
- *
- * @param subDiv the content tree to which the summary detail links will be added
- */
- protected void addSummaryDetailLinks(Content subDiv) {
- try {
- Content div = HtmlTree.DIV(getNavSummaryLinks());
- div.addContent(getNavDetailLinks());
- subDiv.addContent(div);
- } catch (Exception e) {
- e.printStackTrace();
- throw new DocletAbortException(e);
- }
- }
-
- /**
- * Get summary links for navigation bar.
- *
- * @return the content tree for the navigation summary links
- */
- protected Content getNavSummaryLinks() throws Exception {
- Content li = HtmlTree.LI(summaryLabel);
- li.addContent(getSpace());
- Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
- MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
- configuration.getBuilderFactory().getMemberSummaryBuilder(this);
- Content liNavField = new HtmlTree(HtmlTag.LI);
- addNavSummaryLink(memberSummaryBuilder,
- "doclet.navField",
- VisibleMemberMap.ANNOTATION_TYPE_FIELDS, liNavField);
- addNavGap(liNavField);
- ulNav.addContent(liNavField);
- Content liNavReq = new HtmlTree(HtmlTag.LI);
- addNavSummaryLink(memberSummaryBuilder,
- "doclet.navAnnotationTypeRequiredMember",
- VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED, liNavReq);
- addNavGap(liNavReq);
- ulNav.addContent(liNavReq);
- Content liNavOpt = new HtmlTree(HtmlTag.LI);
- addNavSummaryLink(memberSummaryBuilder,
- "doclet.navAnnotationTypeOptionalMember",
- VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL, liNavOpt);
- ulNav.addContent(liNavOpt);
- return ulNav;
- }
-
- /**
- * Add the navigation summary link.
- *
- * @param builder builder for the member to be documented
- * @param label the label for the navigation
- * @param type type to be documented
- * @param liNav the content tree to which the navigation summary link will be added
- */
- protected void addNavSummaryLink(MemberSummaryBuilder builder,
- String label, int type, Content liNav) {
- AbstractMemberWriter writer = ((AbstractMemberWriter) builder.
- getMemberSummaryWriter(type));
- if (writer == null) {
- liNav.addContent(getResource(label));
- } else {
- liNav.addContent(writer.getNavSummaryLink(null,
- ! builder.getVisibleMemberMap(type).noVisibleMembers()));
- }
- }
-
- /**
- * Get detail links for the navigation bar.
- *
- * @return the content tree for the detail links
- */
- protected Content getNavDetailLinks() throws Exception {
- Content li = HtmlTree.LI(detailLabel);
- li.addContent(getSpace());
- Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
- MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
- configuration.getBuilderFactory().getMemberSummaryBuilder(this);
- AbstractMemberWriter writerField =
- ((AbstractMemberWriter) memberSummaryBuilder.
- getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_FIELDS));
- AbstractMemberWriter writerOptional =
- ((AbstractMemberWriter) memberSummaryBuilder.
- getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL));
- AbstractMemberWriter writerRequired =
- ((AbstractMemberWriter) memberSummaryBuilder.
- getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED));
- Content liNavField = new HtmlTree(HtmlTag.LI);
- if (writerField != null){
- writerField.addNavDetailLink(annotationType.fields().length > 0, liNavField);
- } else {
- liNavField.addContent(getResource("doclet.navField"));
- }
- addNavGap(liNavField);
- ulNav.addContent(liNavField);
- if (writerOptional != null){
- Content liNavOpt = new HtmlTree(HtmlTag.LI);
- writerOptional.addNavDetailLink(annotationType.elements().length > 0, liNavOpt);
- ulNav.addContent(liNavOpt);
- } else if (writerRequired != null){
- Content liNavReq = new HtmlTree(HtmlTag.LI);
- writerRequired.addNavDetailLink(annotationType.elements().length > 0, liNavReq);
- ulNav.addContent(liNavReq);
- } else {
- Content liNav = HtmlTree.LI(getResource("doclet.navAnnotationTypeMember"));
- ulNav.addContent(liNav);
- }
- return ulNav;
- }
-
- /**
- * Add gap between navigation bar elements.
- *
- * @param liNav the content tree to which the gap will be added
- */
- protected void addNavGap(Content liNav) {
- liNav.addContent(getSpace());
- liNav.addContent("|");
- liNav.addContent(getSpace());
- }
-
- /**
- * {@inheritDoc}
- */
- public AnnotationTypeDoc getAnnotationTypeDoc() {
- return annotationType;
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
+++ /dev/null
@@ -1,550 +0,0 @@
-/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.TreeSet;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Generate class usage information.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert G. Field
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class ClassUseWriter extends SubWriterHolderWriter {
-
- final ClassDoc classdoc;
- Set This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @see com.sun.javadoc.ClassDoc
- * @see java.util.Collections
- * @see java.util.List
- * @see java.util.ArrayList
- * @see java.util.HashMap
- *
- * @author Atul M Dambalkar
- * @author Robert Field
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class ClassWriterImpl extends SubWriterHolderWriter
- implements ClassWriter {
-
- protected final ClassDoc classDoc;
-
- protected final ClassTree classtree;
-
- protected final ClassDoc prev;
-
- protected final ClassDoc next;
-
- /**
- * @param configuration the configuration data for the doclet
- * @param classDoc the class being documented.
- * @param prevClass the previous class that was documented.
- * @param nextClass the next class being documented.
- * @param classTree the class tree for the given class.
- */
- public ClassWriterImpl (ConfigurationImpl configuration, ClassDoc classDoc,
- ClassDoc prevClass, ClassDoc nextClass, ClassTree classTree)
- throws IOException {
- super(configuration, DocPath.forClass(classDoc));
- this.classDoc = classDoc;
- configuration.currentcd = classDoc;
- this.classtree = classTree;
- this.prev = prevClass;
- this.next = nextClass;
- }
-
- /**
- * Get this package link.
- *
- * @return a content tree for the package link
- */
- protected Content getNavLinkPackage() {
- Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY,
- packageLabel);
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get the class link.
- *
- * @return a content tree for the class link
- */
- protected Content getNavLinkClass() {
- Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, classLabel);
- return li;
- }
-
- /**
- * Get the class use link.
- *
- * @return a content tree for the class use link
- */
- protected Content getNavLinkClassUse() {
- Content linkContent = getHyperLink(DocPaths.CLASS_USE.resolve(filename), useLabel);
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get link to previous class.
- *
- * @return a content tree for the previous class link
- */
- public Content getNavLinkPrevious() {
- Content li;
- if (prev != null) {
- Content prevLink = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS, prev)
- .label(prevclassLabel).strong(true));
- li = HtmlTree.LI(prevLink);
- }
- else
- li = HtmlTree.LI(prevclassLabel);
- return li;
- }
-
- /**
- * Get link to next class.
- *
- * @return a content tree for the next class link
- */
- public Content getNavLinkNext() {
- Content li;
- if (next != null) {
- Content nextLink = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS, next)
- .label(nextclassLabel).strong(true));
- li = HtmlTree.LI(nextLink);
- }
- else
- li = HtmlTree.LI(nextclassLabel);
- return li;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getHeader(String header) {
- String pkgname = (classDoc.containingPackage() != null)?
- classDoc.containingPackage().name(): "";
- String clname = classDoc.name();
- HtmlTree bodyTree = getBody(true, getWindowTitle(clname));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : bodyTree;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- bodyTree.addContent(htmlTree);
- }
- bodyTree.addContent(HtmlConstants.START_OF_CLASS_DATA);
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.header);
- if (pkgname.length() > 0) {
- Content classPackageLabel = HtmlTree.SPAN(HtmlStyle.packageLabelInClass, packageLabel);
- Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, classPackageLabel);
- pkgNameDiv.addContent(getSpace());
- Content pkgNameContent = getTargetPackageLink(classDoc.containingPackage(),
- "classFrame", new StringContent(pkgname));
- pkgNameDiv.addContent(pkgNameContent);
- div.addContent(pkgNameDiv);
- }
- LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_HEADER, classDoc);
- //Let's not link to ourselves in the header.
- linkInfo.linkToSelf = false;
- Content headerContent = new StringContent(header);
- Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING, true,
- HtmlStyle.title, headerContent);
- heading.addContent(getTypeParameterLinks(linkInfo));
- div.addContent(heading);
- if (configuration.allowTag(HtmlTag.MAIN)) {
- mainTree.addContent(div);
- } else {
- bodyTree.addContent(div);
- }
- return bodyTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getClassContentHeader() {
- return getContentHeader();
- }
-
- /**
- * {@inheritDoc}
- */
- public void addFooter(Content contentTree) {
- contentTree.addContent(HtmlConstants.END_OF_CLASS_DATA);
- Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
- ? HtmlTree.FOOTER()
- : contentTree;
- addNavLinks(false, htmlTree);
- addBottom(htmlTree);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- contentTree.addContent(htmlTree);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void printDocument(Content contentTree) throws IOException {
- printHtmlDocument(configuration.metakeywords.getMetaKeywords(classDoc),
- true, contentTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getClassInfoTreeHeader() {
- return getMemberTreeHeader();
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getClassInfo(Content classInfoTree) {
- return getMemberTree(HtmlStyle.description, classInfoTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addClassSignature(String modifiers, Content classInfoTree) {
- boolean isInterface = classDoc.isInterface();
- classInfoTree.addContent(new HtmlTree(HtmlTag.BR));
- Content pre = new HtmlTree(HtmlTag.PRE);
- addAnnotationInfo(classDoc, pre);
- pre.addContent(modifiers);
- LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_SIGNATURE, classDoc);
- //Let's not link to ourselves in the signature.
- linkInfo.linkToSelf = false;
- Content className = new StringContent(classDoc.name());
- Content parameterLinks = getTypeParameterLinks(linkInfo);
- if (configuration.linksource) {
- addSrcLink(classDoc, className, pre);
- pre.addContent(parameterLinks);
- } else {
- Content span = HtmlTree.SPAN(HtmlStyle.typeNameLabel, className);
- span.addContent(parameterLinks);
- pre.addContent(span);
- }
- if (!isInterface) {
- Type superclass = utils.getFirstVisibleSuperClass(classDoc,
- configuration);
- if (superclass != null) {
- pre.addContent(DocletConstants.NL);
- pre.addContent("extends ");
- Content link = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
- superclass));
- pre.addContent(link);
- }
- }
- Type[] implIntfacs = classDoc.interfaceTypes();
- if (implIntfacs != null && implIntfacs.length > 0) {
- int counter = 0;
- for (Type implType : implIntfacs) {
- ClassDoc classDoc = implType.asClassDoc();
- if (!(classDoc.isPublic() || utils.isLinkable(classDoc, configuration))) {
- continue;
- }
- if (counter == 0) {
- pre.addContent(DocletConstants.NL);
- pre.addContent(isInterface ? "extends " : "implements ");
- } else {
- pre.addContent(", ");
- }
- Content link = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
- implType));
- pre.addContent(link);
- counter++;
- }
- }
- classInfoTree.addContent(pre);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addClassDescription(Content classInfoTree) {
- if(!configuration.nocomment) {
- // generate documentation for the class.
- if (classDoc.inlineTags().length > 0) {
- addInlineComment(classDoc, classInfoTree);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addClassTagInfo(Content classInfoTree) {
- if(!configuration.nocomment) {
- // Print Information about all the tags here
- addTagsInfo(classDoc, classInfoTree);
- }
- }
-
- /**
- * Get the class hierarchy tree for the given class.
- *
- * @param type the class to print the hierarchy for
- * @return a content tree for class inheritence
- */
- private Content getClassInheritenceTree(Type type) {
- Type sup;
- HtmlTree classTreeUl = new HtmlTree(HtmlTag.UL);
- classTreeUl.addStyle(HtmlStyle.inheritance);
- Content liTree = null;
- do {
- sup = utils.getFirstVisibleSuperClass(
- type instanceof ClassDoc ? (ClassDoc) type : type.asClassDoc(),
- configuration);
- if (sup != null) {
- HtmlTree ul = new HtmlTree(HtmlTag.UL);
- ul.addStyle(HtmlStyle.inheritance);
- ul.addContent(getTreeForClassHelper(type));
- if (liTree != null)
- ul.addContent(liTree);
- Content li = HtmlTree.LI(ul);
- liTree = li;
- type = sup;
- }
- else
- classTreeUl.addContent(getTreeForClassHelper(type));
- }
- while (sup != null);
- if (liTree != null)
- classTreeUl.addContent(liTree);
- return classTreeUl;
- }
-
- /**
- * Get the class helper tree for the given class.
- *
- * @param type the class to print the helper for
- * @return a content tree for class helper
- */
- private Content getTreeForClassHelper(Type type) {
- Content li = new HtmlTree(HtmlTag.LI);
- if (type.equals(classDoc)) {
- Content typeParameters = getTypeParameterLinks(
- new LinkInfoImpl(configuration, LinkInfoImpl.Kind.TREE,
- classDoc));
- if (configuration.shouldExcludeQualifier(
- classDoc.containingPackage().name())) {
- li.addContent(type.asClassDoc().name());
- li.addContent(typeParameters);
- } else {
- li.addContent(type.asClassDoc().qualifiedName());
- li.addContent(typeParameters);
- }
- } else {
- Content link = getLink(new LinkInfoImpl(configuration,
- LinkInfoImpl.Kind.CLASS_TREE_PARENT, type)
- .label(configuration.getClassName(type.asClassDoc())));
- li.addContent(link);
- }
- return li;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addClassTree(Content classContentTree) {
- if (!classDoc.isClass()) {
- return;
- }
- classContentTree.addContent(getClassInheritenceTree(classDoc));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTypeParamInfo(Content classInfoTree) {
- if (classDoc.typeParamTags().length > 0) {
- Content typeParam = (new ParamTaglet()).getTagletOutput(classDoc,
- getTagletWriterInstance(false));
- Content dl = HtmlTree.DL(typeParam);
- classInfoTree.addContent(dl);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSubClassInfo(Content classInfoTree) {
- if (classDoc.isClass()) {
- if (classDoc.qualifiedName().equals("java.lang.Object") ||
- classDoc.qualifiedName().equals("org.omg.CORBA.Object")) {
- return; // Don't generate the list, too huge
- }
- SortedSet
- * Also determine the length of the command line option. For example,
- * for a option "-header" there will be a string argument associated, then the
- * the length of option "-header" is two. But for option "-nohelp" no argument
- * is needed so it's length is 1.
- *
- * Also do the error checking on the options used. For example it is illegal to
- * use "-helpfile" option when already "-nohelp" option is used.
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field.
- * @author Atul Dambalkar.
- * @author Jamie Ho
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class ConfigurationImpl extends Configuration {
-
- /**
- * The build date. Note: For now, we will use
- * a version number instead of a date.
- */
- public static final String BUILD_DATE = System.getProperty("java.version");
-
- /**
- * Argument for command line option "-header".
- */
- public String header = "";
-
- /**
- * Argument for command line option "-packagesheader".
- */
- public String packagesheader = "";
-
- /**
- * Argument for command line option "-footer".
- */
- public String footer = "";
-
- /**
- * Argument for command line option "-doctitle".
- */
- public String doctitle = "";
-
- /**
- * Argument for command line option "-windowtitle".
- */
- public String windowtitle = "";
-
- /**
- * Argument for command line option "-top".
- */
- public String top = "";
-
- /**
- * Argument for command line option "-bottom".
- */
- public String bottom = "";
-
- /**
- * Argument for command line option "-helpfile".
- */
- public String helpfile = "";
-
- /**
- * Argument for command line option "-stylesheetfile".
- */
- public String stylesheetfile = "";
-
- /**
- * Argument for command line option "-Xdocrootparent".
- */
- public String docrootparent = "";
-
- /**
- * True if command line option "-nohelp" is used. Default value is false.
- */
- public boolean nohelp = false;
-
- /**
- * True if command line option "-splitindex" is used. Default value is
- * false.
- */
- public boolean splitindex = false;
-
- /**
- * False if command line option "-noindex" is used. Default value is true.
- */
- public boolean createindex = true;
-
- /**
- * True if command line option "-use" is used. Default value is false.
- */
- public boolean classuse = false;
-
- /**
- * False if command line option "-notree" is used. Default value is true.
- */
- public boolean createtree = true;
-
- /**
- * True if command line option "-nodeprecated" is used. Default value is
- * false.
- */
- public boolean nodeprecatedlist = false;
-
- /**
- * True if command line option "-nonavbar" is used. Default value is false.
- */
- public boolean nonavbar = false;
-
- /**
- * True if command line option "-nooverview" is used. Default value is
- * false
- */
- private boolean nooverview = false;
-
- /**
- * True if command line option "-overview" is used. Default value is false.
- */
- public boolean overview = false;
-
- /**
- * This is true if option "-overview" is used or option "-overview" is not
- * used and number of packages is more than one.
- */
- public boolean createoverview = false;
-
- /**
- * This is the HTML version of the generated pages. HTML 4.01 is the default output version.
- */
- public HtmlVersion htmlVersion = HtmlVersion.HTML4;
-
- /**
- * Collected set of doclint options
- */
- public Set This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Jamie Ho
- * @author Bhavesh Patel (Modified)
- * @since 1.4
- */
-@Deprecated
-public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
- implements ConstantsSummaryWriter {
-
- /**
- * The configuration used in this run of the standard doclet.
- */
- ConfigurationImpl configuration;
-
- /**
- * The current class being documented.
- */
- private ClassDoc currentClassDoc;
-
- private final String constantsTableSummary;
-
- private final String[] constantsTableHeader;
-
- /**
- * The HTML tree for main tag.
- */
- private HtmlTree mainTree = HtmlTree.MAIN();
-
- /**
- * The HTML tree for constant values summary.
- */
- private HtmlTree summaryTree;
-
- /**
- * Construct a ConstantsSummaryWriter.
- * @param configuration the configuration used in this run
- * of the standard doclet.
- */
- public ConstantsSummaryWriterImpl(ConfigurationImpl configuration)
- throws IOException {
- super(configuration, DocPaths.CONSTANT_VALUES);
- this.configuration = configuration;
- constantsTableSummary = configuration.getText("doclet.Constants_Table_Summary",
- configuration.getText("doclet.Constants_Summary"));
- constantsTableHeader = new String[] {
- getModifierTypeHeader(),
- configuration.getText("doclet.ConstantField"),
- configuration.getText("doclet.Value")
- };
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getHeader() {
- String label = configuration.getText("doclet.Constants_Summary");
- HtmlTree bodyTree = getBody(true, getWindowTitle(label));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : bodyTree;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- bodyTree.addContent(htmlTree);
- }
- return bodyTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getContentsHeader() {
- return new HtmlTree(HtmlTag.UL);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addLinkToPackageContent(PackageDoc pkg, String parsedPackageName,
- Set This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
- implements ConstructorWriter, MemberSummaryWriter {
-
- private boolean foundNonPubConstructor = false;
-
- /**
- * Construct a new ConstructorWriterImpl.
- *
- * @param writer The writer for the class that the constructors belong to.
- * @param classDoc the class being documented.
- */
- public ConstructorWriterImpl(SubWriterHolderWriter writer,
- ClassDoc classDoc) {
- super(writer, classDoc);
- VisibleMemberMap visibleMemberMap = new VisibleMemberMap(classDoc,
- VisibleMemberMap.CONSTRUCTORS, configuration);
- List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @see java.util.List
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class DeprecatedListWriter extends SubWriterHolderWriter {
-
- private static final String[] ANCHORS = new String[] {
- "package", "interface", "class", "enum", "exception", "error",
- "annotation.type", "field", "method", "constructor", "enum.constant",
- "annotation.type.member"
- };
-
- private static final String[] HEADING_KEYS = new String[] {
- "doclet.Deprecated_Packages", "doclet.Deprecated_Interfaces",
- "doclet.Deprecated_Classes", "doclet.Deprecated_Enums",
- "doclet.Deprecated_Exceptions", "doclet.Deprecated_Errors",
- "doclet.Deprecated_Annotation_Types",
- "doclet.Deprecated_Fields",
- "doclet.Deprecated_Methods", "doclet.Deprecated_Constructors",
- "doclet.Deprecated_Enum_Constants",
- "doclet.Deprecated_Annotation_Type_Members"
- };
-
- private static final String[] SUMMARY_KEYS = new String[] {
- "doclet.deprecated_packages", "doclet.deprecated_interfaces",
- "doclet.deprecated_classes", "doclet.deprecated_enums",
- "doclet.deprecated_exceptions", "doclet.deprecated_errors",
- "doclet.deprecated_annotation_types",
- "doclet.deprecated_fields",
- "doclet.deprecated_methods", "doclet.deprecated_constructors",
- "doclet.deprecated_enum_constants",
- "doclet.deprecated_annotation_type_members"
- };
-
- private static final String[] HEADER_KEYS = new String[] {
- "doclet.Package", "doclet.Interface", "doclet.Class",
- "doclet.Enum", "doclet.Exceptions",
- "doclet.Errors",
- "doclet.AnnotationType",
- "doclet.Field",
- "doclet.Method", "doclet.Constructor",
- "doclet.Enum_Constant",
- "doclet.Annotation_Type_Member"
- };
-
- private AbstractMemberWriter[] writers;
-
- private ConfigurationImpl configuration;
-
- /**
- * Constructor.
- *
- * @param filename the file to be generated.
- */
- public DeprecatedListWriter(ConfigurationImpl configuration,
- DocPath filename) throws IOException {
- super(configuration, filename);
- this.configuration = configuration;
- NestedClassWriterImpl classW = new NestedClassWriterImpl(this);
- writers = new AbstractMemberWriter[]
- {classW, classW, classW, classW, classW, classW,
- new FieldWriterImpl(this),
- new MethodWriterImpl(this),
- new ConstructorWriterImpl(this),
- new EnumConstantWriterImpl(this),
- new AnnotationTypeOptionalMemberWriterImpl(this, null)};
- }
-
- /**
- * Get list of all the deprecated classes and members in all the Packages
- * specified on the Command Line.
- * Then instantiate DeprecatedListWriter and generate File.
- *
- * @param configuration the current configuration of the doclet.
- */
- public static void generate(ConfigurationImpl configuration) {
- DocPath filename = DocPaths.DEPRECATED_LIST;
- try {
- DeprecatedListWriter depr =
- new DeprecatedListWriter(configuration, filename);
- depr.generateDeprecatedListFile(
- new DeprecatedAPIListBuilder(configuration));
- depr.close();
- } catch (IOException exc) {
- configuration.standardmessage.error(
- "doclet.exception_encountered",
- exc.toString(), filename);
- throw new DocletAbortException(exc);
- }
- }
-
- /**
- * Generate the deprecated API list.
- *
- * @param deprapi list of deprecated API built already.
- */
- protected void generateDeprecatedListFile(DeprecatedAPIListBuilder deprapi)
- throws IOException {
- HtmlTree body = getHeader();
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
- ? HtmlTree.MAIN()
- : body;
- htmlTree.addContent(getContentsList(deprapi));
- String memberTableSummary;
- String[] memberTableHeader = new String[1];
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.contentContainer);
- for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) {
- if (deprapi.hasDocumentation(i)) {
- addAnchor(deprapi, i, div);
- memberTableSummary =
- configuration.getText("doclet.Member_Table_Summary",
- configuration.getText(HEADING_KEYS[i]),
- configuration.getText(SUMMARY_KEYS[i]));
- memberTableHeader[0] = configuration.getText("doclet.0_and_1",
- configuration.getText(HEADER_KEYS[i]),
- configuration.getText("doclet.Description"));
- // DeprecatedAPIListBuilder.PACKAGE == 0, so if i == 0, it is
- // a PackageDoc.
- if (i == DeprecatedAPIListBuilder.PACKAGE)
- addPackageDeprecatedAPI(deprapi.getList(i),
- HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
- else
- writers[i - 1].addDeprecatedAPI(deprapi.getList(i),
- HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
- }
- }
- if (configuration.allowTag(HtmlTag.MAIN)) {
- htmlTree.addContent(div);
- body.addContent(htmlTree);
- } else {
- body.addContent(div);
- }
- htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
- ? HtmlTree.FOOTER()
- : body;
- addNavLinks(false, htmlTree);
- addBottom(htmlTree);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- body.addContent(htmlTree);
- }
- printHtmlDocument(null, true, body);
- }
-
- /**
- * Add the index link.
- *
- * @param builder the deprecated list builder
- * @param type the type of list being documented
- * @param contentTree the content tree to which the index link will be added
- */
- private void addIndexLink(DeprecatedAPIListBuilder builder,
- int type, Content contentTree) {
- if (builder.hasDocumentation(type)) {
- Content li = HtmlTree.LI(getHyperLink(ANCHORS[type],
- getResource(HEADING_KEYS[type])));
- contentTree.addContent(li);
- }
- }
-
- /**
- * Get the contents list.
- *
- * @param deprapi the deprecated list builder
- * @return a content tree for the contents list
- */
- public Content getContentsList(DeprecatedAPIListBuilder deprapi) {
- Content headContent = getResource("doclet.Deprecated_API");
- Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
- HtmlStyle.title, headContent);
- Content div = HtmlTree.DIV(HtmlStyle.header, heading);
- Content headingContent = getResource("doclet.Contents");
- div.addContent(HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
- headingContent));
- Content ul = new HtmlTree(HtmlTag.UL);
- for (int i = 0; i < DeprecatedAPIListBuilder.NUM_TYPES; i++) {
- addIndexLink(deprapi, i, ul);
- }
- div.addContent(ul);
- return div;
- }
-
- /**
- * Add the anchor.
- *
- * @param builder the deprecated list builder
- * @param type the type of list being documented
- * @param htmlTree the content tree to which the anchor will be added
- */
- private void addAnchor(DeprecatedAPIListBuilder builder, int type, Content htmlTree) {
- if (builder.hasDocumentation(type)) {
- htmlTree.addContent(getMarkerAnchor(ANCHORS[type]));
- }
- }
-
- /**
- * Get the header for the deprecated API Listing.
- *
- * @return a content tree for the header
- */
- public HtmlTree getHeader() {
- String title = configuration.getText("doclet.Window_Deprecated_List");
- HtmlTree bodyTree = getBody(true, getWindowTitle(title));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : bodyTree;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- bodyTree.addContent(htmlTree);
- }
- return bodyTree;
- }
-
- /**
- * Get the deprecated label.
- *
- * @return a content tree for the deprecated label
- */
- protected Content getNavLinkDeprecated() {
- Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, deprecatedLabel);
- return li;
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
+++ /dev/null
@@ -1,305 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Writes enum constant documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Jamie Ho
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class EnumConstantWriterImpl extends AbstractMemberWriter
- implements EnumConstantWriter, MemberSummaryWriter {
-
- public EnumConstantWriterImpl(SubWriterHolderWriter writer,
- ClassDoc classdoc) {
- super(writer, classdoc);
- }
-
- public EnumConstantWriterImpl(SubWriterHolderWriter writer) {
- super(writer);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getEnumConstantsDetailsTreeHeader(ClassDoc classDoc,
- Content memberDetailsTree) {
- memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS);
- Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
- enumConstantsDetailsTree.addContent(writer.getMarkerAnchor(
- SectionName.ENUM_CONSTANT_DETAIL));
- Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
- writer.enumConstantsDetailsLabel);
- enumConstantsDetailsTree.addContent(heading);
- return enumConstantsDetailsTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getEnumConstantsTreeHeader(FieldDoc enumConstant,
- Content enumConstantsDetailsTree) {
- enumConstantsDetailsTree.addContent(
- writer.getMarkerAnchor(enumConstant.name()));
- Content enumConstantsTree = writer.getMemberTreeHeader();
- Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
- heading.addContent(enumConstant.name());
- enumConstantsTree.addContent(heading);
- return enumConstantsTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getSignature(FieldDoc enumConstant) {
- Content pre = new HtmlTree(HtmlTag.PRE);
- writer.addAnnotationInfo(enumConstant, pre);
- addModifiers(enumConstant, pre);
- Content enumConstantLink = writer.getLink(new LinkInfoImpl(
- configuration, LinkInfoImpl.Kind.MEMBER, enumConstant.type()));
- pre.addContent(enumConstantLink);
- pre.addContent(" ");
- if (configuration.linksource) {
- Content enumConstantName = new StringContent(enumConstant.name());
- writer.addSrcLink(enumConstant, enumConstantName, pre);
- } else {
- addName(enumConstant.name(), pre);
- }
- return pre;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDeprecated(FieldDoc enumConstant, Content enumConstantsTree) {
- addDeprecatedInfo(enumConstant, enumConstantsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addComments(FieldDoc enumConstant, Content enumConstantsTree) {
- addComment(enumConstant, enumConstantsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTags(FieldDoc enumConstant, Content enumConstantsTree) {
- writer.addTagsInfo(enumConstant, enumConstantsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) {
- if (configuration.allowTag(HtmlTag.SECTION)) {
- HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(enumConstantsDetailsTree));
- return htmlTree;
- }
- return getMemberTree(enumConstantsDetailsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getEnumConstants(Content enumConstantsTree,
- boolean isLastContent) {
- return getMemberTree(enumConstantsTree, isLastContent);
- }
-
- /**
- * {@inheritDoc}
- */
- public void close() throws IOException {
- writer.close();
- }
-
- public int getMemberKind() {
- return VisibleMemberMap.ENUM_CONSTANTS;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Enum_Constant_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Enum_Constant_Summary"),
- configuration.getText("doclet.enum_constants"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Enum_Constants");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Enum_Constant"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.ENUM_CONSTANT_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
- Content tdSummary) {
- Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
- writer.getDocLink(context, (MemberDoc) member, member.name(), false));
- Content code = HtmlTree.CODE(memberLink);
- tdSummary.addContent(code);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setSummaryColumnStyle(HtmlTree tdTree) {
- tdTree.addStyle(HtmlStyle.colOne);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addInheritedSummaryLink(ClassDoc cd,
- ProgramElementDoc member, Content linksTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
- //Not applicable.
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getDeprecatedLink(ProgramElementDoc member) {
- return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
- (MemberDoc) member, ((FieldDoc)member).qualifiedName());
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- if (cd == null) {
- return writer.getHyperLink(SectionName.ENUM_CONSTANT_SUMMARY,
- writer.getResource("doclet.navEnum"));
- } else {
- return writer.getHyperLink(
- SectionName.ENUM_CONSTANTS_INHERITANCE,
- configuration.getClassName(cd), writer.getResource("doclet.navEnum"));
- }
- } else {
- return writer.getResource("doclet.navEnum");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- if (link) {
- liNav.addContent(writer.getHyperLink(
- SectionName.ENUM_CONSTANT_DETAIL,
- writer.getResource("doclet.navEnum")));
- } else {
- liNav.addContent(writer.getResource("doclet.navEnum"));
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
+++ /dev/null
@@ -1,336 +0,0 @@
-/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Writes field documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Jamie Ho (rewrite)
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class FieldWriterImpl extends AbstractMemberWriter
- implements FieldWriter, MemberSummaryWriter {
-
- public FieldWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) {
- super(writer, classdoc);
- }
-
- public FieldWriterImpl(SubWriterHolderWriter writer) {
- super(writer);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(HtmlConstants.START_OF_FIELD_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getFieldDetailsTreeHeader(ClassDoc classDoc,
- Content memberDetailsTree) {
- memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS);
- Content fieldDetailsTree = writer.getMemberTreeHeader();
- fieldDetailsTree.addContent(writer.getMarkerAnchor(
- SectionName.FIELD_DETAIL));
- Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
- writer.fieldDetailsLabel);
- fieldDetailsTree.addContent(heading);
- return fieldDetailsTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getFieldDocTreeHeader(FieldDoc field,
- Content fieldDetailsTree) {
- fieldDetailsTree.addContent(
- writer.getMarkerAnchor(field.name()));
- Content fieldDocTree = writer.getMemberTreeHeader();
- Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
- heading.addContent(field.name());
- fieldDocTree.addContent(heading);
- return fieldDocTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getSignature(FieldDoc field) {
- Content pre = new HtmlTree(HtmlTag.PRE);
- writer.addAnnotationInfo(field, pre);
- addModifiers(field, pre);
- Content fieldlink = writer.getLink(new LinkInfoImpl(
- configuration, LinkInfoImpl.Kind.MEMBER, field.type()));
- pre.addContent(fieldlink);
- pre.addContent(" ");
- if (configuration.linksource) {
- Content fieldName = new StringContent(field.name());
- writer.addSrcLink(field, fieldName, pre);
- } else {
- addName(field.name(), pre);
- }
- return pre;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDeprecated(FieldDoc field, Content fieldDocTree) {
- addDeprecatedInfo(field, fieldDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addComments(FieldDoc field, Content fieldDocTree) {
- ClassDoc holder = field.containingClass();
- if (field.inlineTags().length > 0) {
- if (holder.equals(classdoc) ||
- (! (holder.isPublic() || utils.isLinkable(holder, configuration)))) {
- writer.addInlineComment(field, fieldDocTree);
- } else {
- Content link =
- writer.getDocLink(LinkInfoImpl.Kind.FIELD_DOC_COPY,
- holder, field,
- holder.isIncluded() ?
- holder.typeName() : holder.qualifiedTypeName(),
- false);
- Content codeLink = HtmlTree.CODE(link);
- Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel, holder.isClass()?
- writer.descfrmClassLabel : writer.descfrmInterfaceLabel);
- descfrmLabel.addContent(writer.getSpace());
- descfrmLabel.addContent(codeLink);
- fieldDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
- writer.addInlineComment(field, fieldDocTree);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTags(FieldDoc field, Content fieldDocTree) {
- writer.addTagsInfo(field, fieldDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getFieldDetails(Content fieldDetailsTree) {
- if (configuration.allowTag(HtmlTag.SECTION)) {
- HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(fieldDetailsTree));
- return htmlTree;
- }
- return getMemberTree(fieldDetailsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getFieldDoc(Content fieldDocTree,
- boolean isLastContent) {
- return getMemberTree(fieldDocTree, isLastContent);
- }
-
- /**
- * Close the writer.
- */
- public void close() throws IOException {
- writer.close();
- }
-
- public int getMemberKind() {
- return VisibleMemberMap.FIELDS;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Field_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Field_Summary"),
- configuration.getText("doclet.fields"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Fields");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Field"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.FIELD_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- inheritedTree.addContent(writer.getMarkerAnchor(
- SectionName.FIELDS_INHERITANCE, configuration.getClassName(cd)));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- Content classLink = writer.getPreQualifiedClassLink(
- LinkInfoImpl.Kind.MEMBER, cd, false);
- Content label = new StringContent(cd.isClass() ?
- configuration.getText("doclet.Fields_Inherited_From_Class") :
- configuration.getText("doclet.Fields_Inherited_From_Interface"));
- Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
- label);
- labelHeading.addContent(writer.getSpace());
- labelHeading.addContent(classLink);
- inheritedTree.addContent(labelHeading);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
- Content tdSummary) {
- Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
- writer.getDocLink(context, cd , (MemberDoc) member, member.name(), false));
- Content code = HtmlTree.CODE(memberLink);
- tdSummary.addContent(code);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addInheritedSummaryLink(ClassDoc cd,
- ProgramElementDoc member, Content linksTree) {
- linksTree.addContent(
- writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc)member,
- member.name(), false));
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
- FieldDoc field = (FieldDoc)member;
- addModifierAndType(field, field.type(), tdSummaryType);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getDeprecatedLink(ProgramElementDoc member) {
- return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
- (MemberDoc) member, ((FieldDoc)member).qualifiedName());
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- if (cd == null) {
- return writer.getHyperLink(
- SectionName.FIELD_SUMMARY,
- writer.getResource("doclet.navField"));
- } else {
- return writer.getHyperLink(
- SectionName.FIELDS_INHERITANCE,
- configuration.getClassName(cd), writer.getResource("doclet.navField"));
- }
- } else {
- return writer.getResource("doclet.navField");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- if (link) {
- liNav.addContent(writer.getHyperLink(
- SectionName.FIELD_DETAIL,
- writer.getResource("doclet.navField")));
- } else {
- liNav.addContent(writer.getResource("doclet.navField"));
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Generate the documentation in the Html "frame" format in the browser. The
- * generated documentation will have two or three frames depending upon the
- * number of packages on the command line. In general there will be three frames
- * in the output, a left-hand top frame will have a list of all packages with
- * links to target left-hand bottom frame. The left-hand bottom frame will have
- * the particular package contents or the all-classes list, where as the single
- * right-hand frame will have overview or package summary or class file. Also
- * take care of browsers which do not support Html frames.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- */
-@Deprecated
-public class FrameOutputWriter extends HtmlDocletWriter {
-
- /**
- * Number of packages specified on the command line.
- */
- int noOfPackages;
-
- /**
- * Constructor to construct FrameOutputWriter object.
- *
- * @param filename File to be generated.
- */
- public FrameOutputWriter(ConfigurationImpl configuration,
- DocPath filename) throws IOException {
- super(configuration, filename);
- noOfPackages = configuration.packages.size();
- }
-
- /**
- * Construct FrameOutputWriter object and then use it to generate the Html
- * file which will have the description of all the frames in the
- * documentation. The name of the generated file is "index.html" which is
- * the default first file for Html documents.
- * @throws DocletAbortException
- */
- public static void generate(ConfigurationImpl configuration) {
- FrameOutputWriter framegen;
- DocPath filename = DocPath.empty;
- try {
- filename = DocPaths.INDEX;
- framegen = new FrameOutputWriter(configuration, filename);
- framegen.generateFrameFile();
- framegen.close();
- } catch (IOException exc) {
- configuration.standardmessage.error(
- "doclet.exception_encountered",
- exc.toString(), filename);
- throw new DocletAbortException(exc);
- }
- }
-
- /**
- * Generate the constants in the "index.html" file. Print the frame details
- * as well as warning if browser is not supporting the Html frames.
- */
- protected void generateFrameFile() throws IOException {
- Content frame = getFrameDetails();
- HtmlTree body = new HtmlTree(HtmlTag.BODY);
- body.addAttr(HtmlAttr.ONLOAD, "loadFrames()");
- if (configuration.allowTag(HtmlTag.MAIN)) {
- HtmlTree main = HtmlTree.MAIN(frame);
- body.addContent(main);
- } else {
- body.addContent(frame);
- }
- if (configuration.windowtitle.length() > 0) {
- printFramesDocument(configuration.windowtitle, configuration,
- body);
- } else {
- printFramesDocument(configuration.getText("doclet.Generated_Docs_Untitled"),
- configuration, body);
- }
- }
-
- /**
- * Get the frame sizes and their contents.
- *
- * @return a content tree for the frame details
- */
- protected Content getFrameDetails() {
- HtmlTree leftContainerDiv = new HtmlTree(HtmlTag.DIV);
- HtmlTree rightContainerDiv = new HtmlTree(HtmlTag.DIV);
- leftContainerDiv.addStyle(HtmlStyle.leftContainer);
- rightContainerDiv.addStyle(HtmlStyle.rightContainer);
- if (noOfPackages <= 1) {
- addAllClassesFrameTag(leftContainerDiv);
- } else if (noOfPackages > 1) {
- addAllPackagesFrameTag(leftContainerDiv);
- addAllClassesFrameTag(leftContainerDiv);
- }
- addClassFrameTag(rightContainerDiv);
- HtmlTree mainContainer = HtmlTree.DIV(HtmlStyle.mainContainer, leftContainerDiv);
- mainContainer.addContent(rightContainerDiv);
- return mainContainer;
- }
-
- /**
- * Add the IFRAME tag for the frame that lists all packages.
- *
- * @param contentTree the content tree to which the information will be added
- */
- private void addAllPackagesFrameTag(Content contentTree) {
- HtmlTree frame = HtmlTree.IFRAME(DocPaths.OVERVIEW_FRAME.getPath(),
- "packageListFrame", configuration.getText("doclet.All_Packages"));
- HtmlTree leftTop = HtmlTree.DIV(HtmlStyle.leftTop, frame);
- contentTree.addContent(leftTop);
- }
-
- /**
- * Add the IFRAME tag for the frame that lists all classes.
- *
- * @param contentTree the content tree to which the information will be added
- */
- private void addAllClassesFrameTag(Content contentTree) {
- HtmlTree frame = HtmlTree.IFRAME(DocPaths.ALLCLASSES_FRAME.getPath(),
- "packageFrame", configuration.getText("doclet.All_classes_and_interfaces"));
- HtmlTree leftBottom = HtmlTree.DIV(HtmlStyle.leftBottom, frame);
- contentTree.addContent(leftBottom);
- }
-
- /**
- * Add the IFRAME tag for the frame that describes the class in detail.
- *
- * @param contentTree the content tree to which the information will be added
- */
- private void addClassFrameTag(Content contentTree) {
- HtmlTree frame = HtmlTree.IFRAME(configuration.topFile.getPath(), "classFrame",
- configuration.getText("doclet.Package_class_and_interface_descriptions"));
- frame.addStyle(HtmlStyle.rightIframe);
- contentTree.addContent(frame);
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
+++ /dev/null
@@ -1,443 +0,0 @@
-/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Generate the Help File for the generated API documentation. The help file
- * contents are helpful for browsing the generated documentation.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- */
-@Deprecated
-public class HelpWriter extends HtmlDocletWriter {
-
- HtmlTree mainTree = HtmlTree.MAIN();
-
- /**
- * Constructor to construct HelpWriter object.
- * @param filename File to be generated.
- */
- public HelpWriter(ConfigurationImpl configuration,
- DocPath filename) throws IOException {
- super(configuration, filename);
- }
-
- /**
- * Construct the HelpWriter object and then use it to generate the help
- * file. The name of the generated file is "help-doc.html". The help file
- * will get generated if and only if "-helpfile" and "-nohelp" is not used
- * on the command line.
- * @throws DocletAbortException
- */
- public static void generate(ConfigurationImpl configuration) {
- HelpWriter helpgen;
- DocPath filename = DocPath.empty;
- try {
- filename = DocPaths.HELP_DOC;
- helpgen = new HelpWriter(configuration, filename);
- helpgen.generateHelpFile();
- helpgen.close();
- } catch (IOException exc) {
- configuration.standardmessage.error(
- "doclet.exception_encountered",
- exc.toString(), filename);
- throw new DocletAbortException(exc);
- }
- }
-
- /**
- * Generate the help file contents.
- */
- protected void generateHelpFile() throws IOException {
- String title = configuration.getText("doclet.Window_Help_title");
- HtmlTree body = getBody(true, getWindowTitle(title));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : body;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- body.addContent(htmlTree);
- }
- addHelpFileContents(body);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- htmlTree = HtmlTree.FOOTER();
- }
- addNavLinks(false, htmlTree);
- addBottom(htmlTree);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- body.addContent(htmlTree);
- }
- printHtmlDocument(null, true, body);
- }
-
- /**
- * Add the help file contents from the resource file to the content tree. While adding the
- * help file contents it also keeps track of user options. If "-notree"
- * is used, then the "overview-tree.html" will not get added and hence
- * help information also will not get added.
- *
- * @param contentTree the content tree to which the help file contents will be added
- */
- protected void addHelpFileContents(Content contentTree) {
- Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false, HtmlStyle.title,
- getResource("doclet.Help_line_1"));
- Content div = HtmlTree.DIV(HtmlStyle.header, heading);
- Content line2 = HtmlTree.DIV(HtmlStyle.subTitle,
- getResource("doclet.Help_line_2"));
- div.addContent(line2);
- if (configuration.allowTag(HtmlTag.MAIN)) {
- mainTree.addContent(div);
- } else {
- contentTree.addContent(div);
- }
- HtmlTree htmlTree;
- HtmlTree ul = new HtmlTree(HtmlTag.UL);
- ul.addStyle(HtmlStyle.blockList);
- if (configuration.createoverview) {
- Content overviewHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Overview"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(overviewHeading)
- : HtmlTree.LI(HtmlStyle.blockList, overviewHeading);
- Content line3 = getResource("doclet.Help_line_3",
- getHyperLink(DocPaths.OVERVIEW_SUMMARY,
- configuration.getText("doclet.Overview")));
- Content overviewPara = HtmlTree.P(line3);
- htmlTree.addContent(overviewPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- }
- Content packageHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Package"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(packageHead)
- : HtmlTree.LI(HtmlStyle.blockList, packageHead);
- Content line4 = getResource("doclet.Help_line_4");
- Content packagePara = HtmlTree.P(line4);
- htmlTree.addContent(packagePara);
- HtmlTree ulPackage = new HtmlTree(HtmlTag.UL);
- ulPackage.addContent(HtmlTree.LI(
- getResource("doclet.Interfaces_Italic")));
- ulPackage.addContent(HtmlTree.LI(
- getResource("doclet.Classes")));
- ulPackage.addContent(HtmlTree.LI(
- getResource("doclet.Enums")));
- ulPackage.addContent(HtmlTree.LI(
- getResource("doclet.Exceptions")));
- ulPackage.addContent(HtmlTree.LI(
- getResource("doclet.Errors")));
- ulPackage.addContent(HtmlTree.LI(
- getResource("doclet.AnnotationTypes")));
- htmlTree.addContent(ulPackage);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- Content classHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Help_line_5"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(classHead)
- : HtmlTree.LI(HtmlStyle.blockList, classHead);
- Content line6 = getResource("doclet.Help_line_6");
- Content classPara = HtmlTree.P(line6);
- htmlTree.addContent(classPara);
- HtmlTree ul1 = new HtmlTree(HtmlTag.UL);
- ul1.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_7")));
- ul1.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_8")));
- ul1.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_9")));
- ul1.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_10")));
- ul1.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_11")));
- ul1.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_12")));
- htmlTree.addContent(ul1);
- HtmlTree ul2 = new HtmlTree(HtmlTag.UL);
- ul2.addContent(HtmlTree.LI(
- getResource("doclet.Nested_Class_Summary")));
- ul2.addContent(HtmlTree.LI(
- getResource("doclet.Field_Summary")));
- ul2.addContent(HtmlTree.LI(
- getResource("doclet.Constructor_Summary")));
- ul2.addContent(HtmlTree.LI(
- getResource("doclet.Method_Summary")));
- htmlTree.addContent(ul2);
- HtmlTree ul3 = new HtmlTree(HtmlTag.UL);
- ul3.addContent(HtmlTree.LI(
- getResource("doclet.Field_Detail")));
- ul3.addContent(HtmlTree.LI(
- getResource("doclet.Constructor_Detail")));
- ul3.addContent(HtmlTree.LI(
- getResource("doclet.Method_Detail")));
- htmlTree.addContent(ul3);
- Content line13 = getResource("doclet.Help_line_13");
- Content para = HtmlTree.P(line13);
- htmlTree.addContent(para);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- //Annotation Types
- Content aHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.AnnotationType"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(aHead)
- : HtmlTree.LI(HtmlStyle.blockList, aHead);
- Content aline1 = getResource("doclet.Help_annotation_type_line_1");
- Content aPara = HtmlTree.P(aline1);
- htmlTree.addContent(aPara);
- HtmlTree aul = new HtmlTree(HtmlTag.UL);
- aul.addContent(HtmlTree.LI(
- getResource("doclet.Help_annotation_type_line_2")));
- aul.addContent(HtmlTree.LI(
- getResource("doclet.Help_annotation_type_line_3")));
- aul.addContent(HtmlTree.LI(
- getResource("doclet.Annotation_Type_Required_Member_Summary")));
- aul.addContent(HtmlTree.LI(
- getResource("doclet.Annotation_Type_Optional_Member_Summary")));
- aul.addContent(HtmlTree.LI(
- getResource("doclet.Annotation_Type_Member_Detail")));
- htmlTree.addContent(aul);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- //Enums
- Content enumHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Enum"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(enumHead)
- : HtmlTree.LI(HtmlStyle.blockList, enumHead);
- Content eline1 = getResource("doclet.Help_enum_line_1");
- Content enumPara = HtmlTree.P(eline1);
- htmlTree.addContent(enumPara);
- HtmlTree eul = new HtmlTree(HtmlTag.UL);
- eul.addContent(HtmlTree.LI(
- getResource("doclet.Help_enum_line_2")));
- eul.addContent(HtmlTree.LI(
- getResource("doclet.Help_enum_line_3")));
- eul.addContent(HtmlTree.LI(
- getResource("doclet.Enum_Constant_Summary")));
- eul.addContent(HtmlTree.LI(
- getResource("doclet.Enum_Constant_Detail")));
- htmlTree.addContent(eul);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- if (configuration.classuse) {
- Content useHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Help_line_14"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(useHead)
- : HtmlTree.LI(HtmlStyle.blockList, useHead);
- Content line15 = getResource("doclet.Help_line_15");
- Content usePara = HtmlTree.P(line15);
- htmlTree.addContent(usePara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- }
- if (configuration.createtree) {
- Content treeHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Help_line_16"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(treeHead)
- : HtmlTree.LI(HtmlStyle.blockList, treeHead);
- Content line17 = getResource("doclet.Help_line_17_with_tree_link",
- getHyperLink(DocPaths.OVERVIEW_TREE,
- configuration.getText("doclet.Class_Hierarchy")),
- HtmlTree.CODE(new StringContent("java.lang.Object")));
- Content treePara = HtmlTree.P(line17);
- htmlTree.addContent(treePara);
- HtmlTree tul = new HtmlTree(HtmlTag.UL);
- tul.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_18")));
- tul.addContent(HtmlTree.LI(
- getResource("doclet.Help_line_19")));
- htmlTree.addContent(tul);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- }
- if (!(configuration.nodeprecatedlist ||
- configuration.nodeprecated)) {
- Content dHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Deprecated_API"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(dHead)
- : HtmlTree.LI(HtmlStyle.blockList, dHead);
- Content line20 = getResource("doclet.Help_line_20_with_deprecated_api_link",
- getHyperLink(DocPaths.DEPRECATED_LIST,
- configuration.getText("doclet.Deprecated_API")));
- Content dPara = HtmlTree.P(line20);
- htmlTree.addContent(dPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- }
- if (configuration.createindex) {
- Content indexlink;
- if (configuration.splitindex) {
- indexlink = getHyperLink(DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1)),
- configuration.getText("doclet.Index"));
- } else {
- indexlink = getHyperLink(DocPaths.INDEX_ALL,
- configuration.getText("doclet.Index"));
- }
- Content indexHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Help_line_21"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(indexHead)
- : HtmlTree.LI(HtmlStyle.blockList, indexHead);
- Content line22 = getResource("doclet.Help_line_22", indexlink);
- Content indexPara = HtmlTree.P(line22);
- htmlTree.addContent(indexPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- }
- Content prevHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Help_line_23"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(prevHead)
- : HtmlTree.LI(HtmlStyle.blockList, prevHead);
- Content line24 = getResource("doclet.Help_line_24");
- Content prevPara = HtmlTree.P(line24);
- htmlTree.addContent(prevPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- Content frameHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Help_line_25"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(frameHead)
- : HtmlTree.LI(HtmlStyle.blockList, frameHead);
- Content line26 = getResource("doclet.Help_line_26");
- Content framePara = HtmlTree.P(line26);
- htmlTree.addContent(framePara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- Content allclassesHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.All_Classes"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(allclassesHead)
- : HtmlTree.LI(HtmlStyle.blockList, allclassesHead);
- Content line27 = getResource("doclet.Help_line_27",
- getHyperLink(DocPaths.ALLCLASSES_NOFRAME,
- configuration.getText("doclet.All_Classes")));
- Content allclassesPara = HtmlTree.P(line27);
- htmlTree.addContent(allclassesPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- Content sHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Serialized_Form"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(sHead)
- : HtmlTree.LI(HtmlStyle.blockList, sHead);
- Content line28 = getResource("doclet.Help_line_28");
- Content serialPara = HtmlTree.P(line28);
- htmlTree.addContent(serialPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- Content constHead = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
- getResource("doclet.Constants_Summary"));
- htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? HtmlTree.SECTION(constHead)
- : HtmlTree.LI(HtmlStyle.blockList, constHead);
- Content line29 = getResource("doclet.Help_line_29",
- getHyperLink(DocPaths.CONSTANT_VALUES,
- configuration.getText("doclet.Constants_Summary")));
- Content constPara = HtmlTree.P(line29);
- htmlTree.addContent(constPara);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
- } else {
- ul.addContent(htmlTree);
- }
- Content divContent = HtmlTree.DIV(HtmlStyle.contentContainer, ul);
- Content line30 = HtmlTree.SPAN(HtmlStyle.emphasizedPhrase, getResource("doclet.Help_line_30"));
- divContent.addContent(line30);
- if (configuration.allowTag(HtmlTag.MAIN)) {
- mainTree.addContent(divContent);
- contentTree.addContent(mainTree);
- } else {
- contentTree.addContent(divContent);
- }
- }
-
- /**
- * Get the help label.
- *
- * @return a content tree for the help label
- */
- @Override
- protected Content getNavLinkHelp() {
- Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, helpLabel);
- return li;
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
+++ /dev/null
@@ -1,350 +0,0 @@
-/*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-import java.util.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.builders.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * The class with "start" method, calls individual Writers.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Robert Field
- * @author Jamie Ho
- *
- */
-@Deprecated
-public class HtmlDoclet extends AbstractDoclet {
- // An instance will be created by validOptions, and used by start.
- private static HtmlDoclet docletToStart = null;
-
- public HtmlDoclet() {
- configuration = new ConfigurationImpl();
- }
-
- /**
- * The global configuration information for this run.
- */
- public final ConfigurationImpl configuration;
-
- /**
- * The "start" method as required by Javadoc.
- *
- * @param root the root of the documentation tree.
- * @see com.sun.javadoc.RootDoc
- * @return true if the doclet ran without encountering any errors.
- */
- public static boolean start(RootDoc root) {
- // In typical use, options will have been set up by calling validOptions,
- // which will create an HtmlDoclet for use here.
- HtmlDoclet doclet;
- if (docletToStart != null) {
- doclet = docletToStart;
- docletToStart = null;
- } else {
- doclet = new HtmlDoclet();
- }
- return doclet.startDoclet(root);
- }
-
- /**
- * Create the configuration instance.
- * Override this method to use a different
- * configuration.
- */
- public Configuration configuration() {
- return configuration;
- }
-
- /**
- * Start the generation of files. Call generate methods in the individual
- * writers, which will in turn genrate the documentation files. Call the
- * TreeWriter generation first to ensure the Class Hierarchy is built
- * first and then can be used in the later generation.
- *
- * For new format.
- *
- * @see com.sun.javadoc.RootDoc
- */
- protected void generateOtherFiles(RootDoc root, ClassTree classtree)
- throws Exception {
- super.generateOtherFiles(root, classtree);
- if (configuration.linksource) {
- SourceToHTMLConverter.convertRoot(configuration,
- root, DocPaths.SOURCE_OUTPUT);
- }
-
- if (configuration.topFile.isEmpty()) {
- configuration.standardmessage.
- error("doclet.No_Non_Deprecated_Classes_To_Document");
- return;
- }
- boolean nodeprecated = configuration.nodeprecated;
- performCopy(configuration.helpfile);
- performCopy(configuration.stylesheetfile);
- // do early to reduce memory footprint
- if (configuration.classuse) {
- ClassUseWriter.generate(configuration, classtree);
- }
- IndexBuilder indexbuilder = new IndexBuilder(configuration, nodeprecated);
-
- if (configuration.createtree) {
- TreeWriter.generate(configuration, classtree);
- }
- if (configuration.createindex) {
- configuration.buildSearchTagIndex();
- if (configuration.splitindex) {
- SplitIndexWriter.generate(configuration, indexbuilder);
- } else {
- SingleIndexWriter.generate(configuration, indexbuilder);
- }
- }
-
- if (!(configuration.nodeprecatedlist || nodeprecated)) {
- DeprecatedListWriter.generate(configuration);
- }
-
- AllClassesFrameWriter.generate(configuration,
- new IndexBuilder(configuration, nodeprecated, true));
-
- FrameOutputWriter.generate(configuration);
-
- if (configuration.createoverview) {
- PackageIndexWriter.generate(configuration);
- }
- if (configuration.helpfile.length() == 0 &&
- !configuration.nohelp) {
- HelpWriter.generate(configuration);
- }
- // If a stylesheet file is not specified, copy the default stylesheet
- // and replace newline with platform-specific newline.
- DocFile f;
- if (configuration.stylesheetfile.length() == 0) {
- f = DocFile.createFileForOutput(configuration, DocPaths.STYLESHEET);
- f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.STYLESHEET), false, true);
- }
- f = DocFile.createFileForOutput(configuration, DocPaths.JAVASCRIPT);
- f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.JAVASCRIPT), true, true);
- if (configuration.createindex) {
- f = DocFile.createFileForOutput(configuration, DocPaths.SEARCH_JS);
- f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.SEARCH_JS), true, true);
- f = DocFile.createFileForOutput(configuration, DocPaths.RESOURCES.resolve(DocPaths.GLASS_IMG));
- f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.GLASS_IMG), true, false);
- f = DocFile.createFileForOutput(configuration, DocPaths.RESOURCES.resolve(DocPaths.X_IMG));
- f.copyResource(DocPaths.RESOURCES.resolve(DocPaths.X_IMG), true, false);
- copyJqueryFiles();
- }
- }
-
- protected void copyJqueryFiles() {
- List
- * This method is not required and will default gracefully
- * (to true) if absent.
- *
- * Printing option related error messages (using the provided
- * DocErrorReporter) is the responsibility of this method.
- *
- * @return true if the options are valid.
- */
- public static boolean validOptions(String options[][],
- DocErrorReporter reporter) {
- docletToStart = new HtmlDoclet();
- return docletToStart.configuration.validOptions(options, reporter);
- }
-
- private void performCopy(String filename) {
- if (filename.isEmpty())
- return;
-
- try {
- DocFile fromfile = DocFile.createFileForInput(configuration, filename);
- DocPath path = DocPath.create(fromfile.getName());
- DocFile toFile = DocFile.createFileForOutput(configuration, path);
- if (toFile.isSameFile(fromfile))
- return;
-
- configuration.message.notice((SourcePosition) null,
- "doclet.Copying_File_0_To_File_1",
- fromfile.toString(), path.getPath());
- toFile.copyFile(fromfile);
- } catch (IOException exc) {
- configuration.message.error((SourcePosition) null,
- "doclet.perform_copy_exception_encountered",
- exc.toString());
- throw new DocletAbortException(exc);
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+++ /dev/null
@@ -1,2148 +0,0 @@
-/*
- * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.javac.util.StringUtils;
-
-/**
- * Class for the Html Format Code Generation specific to JavaDoc.
- * This Class contains methods related to the Html Code Generation which
- * are used extensively while generating the entire documentation.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @since 1.2
- * @author Atul M Dambalkar
- * @author Robert Field
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class HtmlDocletWriter extends HtmlDocWriter {
-
- /**
- * Relative path from the file getting generated to the destination
- * directory. For example, if the file getting generated is
- * "java/lang/Object.html", then the path to the root is "../..".
- * This string can be empty if the file getting generated is in
- * the destination directory.
- */
- public final DocPath pathToRoot;
-
- /**
- * Platform-independent path from the current or the
- * destination directory to the file getting generated.
- * Used when creating the file.
- */
- public final DocPath path;
-
- /**
- * Name of the file getting generated. If the file getting generated is
- * "java/lang/Object.html", then the filename is "Object.html".
- */
- public final DocPath filename;
-
- /**
- * The global configuration information for this run.
- */
- public final ConfigurationImpl configuration;
-
- protected final Utils utils;
-
- /**
- * To check whether annotation heading is printed or not.
- */
- protected boolean printedAnnotationHeading = false;
-
- /**
- * To check whether annotation field heading is printed or not.
- */
- protected boolean printedAnnotationFieldHeading = false;
-
- /**
- * To check whether the repeated annotations is documented or not.
- */
- private boolean isAnnotationDocumented = false;
-
- /**
- * To check whether the container annotations is documented or not.
- */
- private boolean isContainerDocumented = false;
-
- HtmlTree fixedNavDiv = new HtmlTree(HtmlTag.DIV);
-
- /**
- * Constructor to construct the HtmlStandardWriter object.
- *
- * @param path File to be generated.
- */
- public HtmlDocletWriter(ConfigurationImpl configuration, DocPath path)
- throws IOException {
- super(configuration, path);
- this.configuration = configuration;
- this.utils = configuration.utils;
- this.path = path;
- this.pathToRoot = path.parent().invert();
- this.filename = path.basename();
- }
-
- /**
- * Replace {@docRoot} tag used in options that accept HTML text, such
- * as -header, -footer, -top and -bottom, and when converting a relative
- * HREF where commentTagsToString inserts a {@docRoot} where one was
- * missing. (Also see DocRootTaglet for {@docRoot} tags in doc
- * comments.)
- *
- * Replace {@docRoot} tag in htmlstr with the relative path to the
- * destination directory from the directory where the file is being
- * written, looping to handle all such tags in htmlstr.
- *
- * For example, for "-d docs" and -header containing {@docRoot}, when
- * the HTML page for source file p/C1.java is being generated, the
- * {@docRoot} tag would be inserted into the header as "../",
- * the relative path from docs/p/ to docs/ (the document root).
- *
- * Note: This doc comment was written with '@' representing '@'
- * to prevent the inline tag from being interpreted.
- */
- public String replaceDocRootDir(String htmlstr) {
- // Return if no inline tags exist
- int index = htmlstr.indexOf("{@");
- if (index < 0) {
- return htmlstr;
- }
- Matcher docrootMatcher = docrootPattern.matcher(htmlstr);
- if (!docrootMatcher.find()) {
- return htmlstr;
- }
- StringBuilder buf = new StringBuilder();
- int prevEnd = 0;
- do {
- int match = docrootMatcher.start();
- // append htmlstr up to start of next {@docroot}
- buf.append(htmlstr.substring(prevEnd, match));
- prevEnd = docrootMatcher.end();
- if (configuration.docrootparent.length() > 0 && htmlstr.startsWith("/..", prevEnd)) {
- // Insert the absolute link if {@docRoot} is followed by "/..".
- buf.append(configuration.docrootparent);
- prevEnd += 3;
- } else {
- // Insert relative path where {@docRoot} was located
- buf.append(pathToRoot.isEmpty() ? "." : pathToRoot.getPath());
- }
- // Append slash if next character is not a slash
- if (prevEnd < htmlstr.length() && htmlstr.charAt(prevEnd) != '/') {
- buf.append('/');
- }
- } while (docrootMatcher.find());
- buf.append(htmlstr.substring(prevEnd));
- return buf.toString();
- }
- //where:
- // Note: {@docRoot} is not case sensitive when passed in w/command line option:
- private static final Pattern docrootPattern =
- Pattern.compile(Pattern.quote("{@docroot}"), Pattern.CASE_INSENSITIVE);
-
- /**
- * Get the script to show or hide the All classes link.
- *
- * @param id id of the element to show or hide
- * @return a content tree for the script
- */
- public Content getAllClassesLinkScript(String id) {
- HtmlTree script = HtmlTree.SCRIPT();
- String scriptCode = "" + DocletConstants.NL;
- Content scriptContent = new RawHtml(scriptCode);
- script.addContent(scriptContent);
- Content div = HtmlTree.DIV(script);
- Content div_noscript = HtmlTree.DIV(getResource("doclet.No_Script_Message"));
- Content noScript = HtmlTree.NOSCRIPT(div_noscript);
- div.addContent(noScript);
- return div;
- }
-
- /**
- * Add method information.
- *
- * @param method the method to be documented
- * @param dl the content tree to which the method information will be added
- */
- private void addMethodInfo(MethodDoc method, Content dl) {
- ClassDoc[] intfacs = method.containingClass().interfaces();
- MethodDoc overriddenMethod = method.overriddenMethod();
- // Check whether there is any implementation or overridden info to be
- // printed. If no overridden or implementation info needs to be
- // printed, do not print this section.
- if ((intfacs.length > 0 &&
- new ImplementedMethods(method, this.configuration).build().length > 0) ||
- overriddenMethod != null) {
- MethodWriterImpl.addImplementsInfo(this, method, dl);
- if (overriddenMethod != null) {
- MethodWriterImpl.addOverridden(this,
- method.overriddenType(), overriddenMethod, dl);
- }
- }
- }
-
- /**
- * Adds the tags information.
- *
- * @param doc the doc for which the tags will be generated
- * @param htmltree the documentation tree to which the tags will be added
- */
- protected void addTagsInfo(Doc doc, Content htmltree) {
- if (configuration.nocomment) {
- return;
- }
- Content dl = new HtmlTree(HtmlTag.DL);
- if (doc instanceof MethodDoc) {
- addMethodInfo((MethodDoc) doc, dl);
- }
- Content output = new ContentBuilder();
- TagletWriter.genTagOuput(configuration.tagletManager, doc,
- configuration.tagletManager.getCustomTaglets(doc),
- getTagletWriterInstance(false), output);
- dl.addContent(output);
- htmltree.addContent(dl);
- }
-
- /**
- * Check whether there are any tags for Serialization Overview
- * section to be printed.
- *
- * @param field the FieldDoc object to check for tags.
- * @return true if there are tags to be printed else return false.
- */
- protected boolean hasSerializationOverviewTags(FieldDoc field) {
- Content output = new ContentBuilder();
- TagletWriter.genTagOuput(configuration.tagletManager, field,
- configuration.tagletManager.getCustomTaglets(field),
- getTagletWriterInstance(false), output);
- return !output.isEmpty();
- }
-
- /**
- * Returns a TagletWriter that knows how to write HTML.
- *
- * @return a TagletWriter that knows how to write HTML.
- */
- public TagletWriter getTagletWriterInstance(boolean isFirstSentence) {
- return new TagletWriterImpl(this, isFirstSentence);
- }
-
- /**
- * Get Package link, with target frame.
- *
- * @param pd The link will be to the "package-summary.html" page for this package
- * @param target name of the target frame
- * @param label tag for the link
- * @return a content for the target package link
- */
- public Content getTargetPackageLink(PackageDoc pd, String target,
- Content label) {
- return getHyperLink(pathString(pd, DocPaths.PACKAGE_SUMMARY), label, "", target);
- }
-
- /**
- * Generates the HTML document tree and prints it out.
- *
- * @param metakeywords Array of String keywords for META tag. Each element
- * of the array is assigned to a separate META tag.
- * Pass in null for no array
- * @param includeScript true if printing windowtitle script
- * false for files that appear in the left-hand frames
- * @param body the body htmltree to be included in the document
- */
- public void printHtmlDocument(String[] metakeywords, boolean includeScript,
- Content body) throws IOException {
- Content htmlDocType = configuration.isOutputHtml5()
- ? DocType.HTML5
- : DocType.TRANSITIONAL;
- Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
- Content head = new HtmlTree(HtmlTag.HEAD);
- head.addContent(getGeneratedBy(!configuration.notimestamp));
- head.addContent(getTitle());
- Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
- (configuration.charset.length() > 0) ?
- configuration.charset : HtmlConstants.HTML_DEFAULT_CHARSET);
- head.addContent(meta);
- if (!configuration.notimestamp) {
- SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
- meta = HtmlTree.META(configuration.isOutputHtml5()
- ? "dc.created"
- : "date", dateFormat.format(new Date()));
- head.addContent(meta);
- }
- if (metakeywords != null) {
- for (String metakeyword : metakeywords) {
- meta = HtmlTree.META("keywords", metakeyword);
- head.addContent(meta);
- }
- }
- addStyleSheetProperties(head);
- addScriptProperties(head);
- Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
- head, body);
- Content htmlDocument = new HtmlDocument(htmlDocType,
- htmlComment, htmlTree);
- write(htmlDocument);
- }
-
- /**
- * Get the window title.
- *
- * @param title the title string to construct the complete window title
- * @return the window title string
- */
- public String getWindowTitle(String title) {
- if (configuration.windowtitle.length() > 0) {
- title += " (" + configuration.windowtitle + ")";
- }
- return title;
- }
-
- /**
- * Get user specified header and the footer.
- *
- * @param header if true print the user provided header else print the
- * user provided footer.
- */
- public Content getUserHeaderFooter(boolean header) {
- String content;
- if (header) {
- content = replaceDocRootDir(configuration.header);
- } else {
- if (configuration.footer.length() != 0) {
- content = replaceDocRootDir(configuration.footer);
- } else {
- content = replaceDocRootDir(configuration.header);
- }
- }
- Content rawContent = new RawHtml(content);
- return rawContent;
- }
-
- /**
- * Adds the user specified top.
- *
- * @param htmlTree the content tree to which user specified top will be added
- */
- public void addTop(Content htmlTree) {
- Content top = new RawHtml(replaceDocRootDir(configuration.top));
- fixedNavDiv.addContent(top);
- }
-
- /**
- * Adds the user specified bottom.
- *
- * @param htmlTree the content tree to which user specified bottom will be added
- */
- public void addBottom(Content htmlTree) {
- Content bottom = new RawHtml(replaceDocRootDir(configuration.bottom));
- Content small = HtmlTree.SMALL(bottom);
- Content p = HtmlTree.P(HtmlStyle.legalCopy, small);
- htmlTree.addContent(p);
- }
-
- /**
- * Adds the navigation bar for the Html page at the top and and the bottom.
- *
- * @param header If true print navigation bar at the top of the page else
- * @param htmlTree the HtmlTree to which the nav links will be added
- */
- protected void addNavLinks(boolean header, Content htmlTree) {
- if (!configuration.nonavbar) {
- Content tree = (configuration.allowTag(HtmlTag.NAV))
- ? HtmlTree.NAV()
- : htmlTree;
- String allClassesId = "allclasses_";
- HtmlTree navDiv = new HtmlTree(HtmlTag.DIV);
- fixedNavDiv.addStyle(HtmlStyle.fixedNav);
- Content skipNavLinks = configuration.getResource("doclet.Skip_navigation_links");
- if (header) {
- fixedNavDiv.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
- navDiv.addStyle(HtmlStyle.topNav);
- allClassesId += "navbar_top";
- Content a = getMarkerAnchor(SectionName.NAVBAR_TOP);
- //WCAG - Hyperlinks should contain text or an image with alt text - for AT tools
- navDiv.addContent(a);
- Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink(
- getDocLink(SectionName.SKIP_NAVBAR_TOP), skipNavLinks,
- skipNavLinks.toString(), ""));
- navDiv.addContent(skipLinkContent);
- } else {
- tree.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
- navDiv.addStyle(HtmlStyle.bottomNav);
- allClassesId += "navbar_bottom";
- Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM);
- navDiv.addContent(a);
- Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink(
- getDocLink(SectionName.SKIP_NAVBAR_BOTTOM), skipNavLinks,
- skipNavLinks.toString(), ""));
- navDiv.addContent(skipLinkContent);
- }
- if (header) {
- navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_TOP_FIRSTROW));
- } else {
- navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_BOTTOM_FIRSTROW));
- }
- HtmlTree navList = new HtmlTree(HtmlTag.UL);
- navList.addStyle(HtmlStyle.navList);
- navList.addAttr(HtmlAttr.TITLE,
- configuration.getText("doclet.Navigation"));
- if (configuration.createoverview) {
- navList.addContent(getNavLinkContents());
- }
- if (configuration.packages.size() == 1) {
- navList.addContent(getNavLinkPackage(configuration.packages.first()));
- } else if (configuration.packages.size() > 1) {
- navList.addContent(getNavLinkPackage());
- }
- navList.addContent(getNavLinkClass());
- if(configuration.classuse) {
- navList.addContent(getNavLinkClassUse());
- }
- if(configuration.createtree) {
- navList.addContent(getNavLinkTree());
- }
- if(!(configuration.nodeprecated ||
- configuration.nodeprecatedlist)) {
- navList.addContent(getNavLinkDeprecated());
- }
- if(configuration.createindex) {
- navList.addContent(getNavLinkIndex());
- }
- if (!configuration.nohelp) {
- navList.addContent(getNavLinkHelp());
- }
- navDiv.addContent(navList);
- Content aboutDiv = HtmlTree.DIV(HtmlStyle.aboutLanguage, getUserHeaderFooter(header));
- navDiv.addContent(aboutDiv);
- if (header) {
- fixedNavDiv.addContent(navDiv);
- } else {
- tree.addContent(navDiv);
- }
- Content ulNav = HtmlTree.UL(HtmlStyle.navList, getNavLinkPrevious());
- ulNav.addContent(getNavLinkNext());
- Content subDiv = HtmlTree.DIV(HtmlStyle.subNav, ulNav);
- Content ulFrames = HtmlTree.UL(HtmlStyle.navList, getNavShowLists());
- ulFrames.addContent(getNavHideLists(filename));
- subDiv.addContent(ulFrames);
- HtmlTree ulAllClasses = HtmlTree.UL(HtmlStyle.navList, getNavLinkClassIndex());
- ulAllClasses.addAttr(HtmlAttr.ID, allClassesId.toString());
- subDiv.addContent(ulAllClasses);
- if (header && configuration.createindex) {
- HtmlTree inputText = HtmlTree.INPUT("text", "search");
- HtmlTree inputReset = HtmlTree.INPUT("reset", "reset");
- Content searchTxt = configuration.getResource("doclet.search");
- searchTxt.addContent(getSpace());
- HtmlTree liInput = HtmlTree.LI(HtmlTree.SPAN(searchTxt));
- liInput.addContent(inputText);
- liInput.addContent(inputReset);
- HtmlTree ulSearch = HtmlTree.UL(HtmlStyle.navListSearch, liInput);
- subDiv.addContent(ulSearch);
- }
- subDiv.addContent(getAllClassesLinkScript(allClassesId.toString()));
- addSummaryDetailLinks(subDiv);
- if (header) {
- subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
- fixedNavDiv.addContent(subDiv);
- fixedNavDiv.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
- tree.addContent(fixedNavDiv);
- HtmlTree paddingDiv = HtmlTree.DIV(HtmlStyle.navPadding, getSpace());
- tree.addContent(paddingDiv);
- } else {
- subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM));
- tree.addContent(subDiv);
- tree.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
- }
- if (configuration.allowTag(HtmlTag.NAV)) {
- htmlTree.addContent(tree);
- }
- }
- }
-
- /**
- * Get the word "NEXT" to indicate that no link is available. Override
- * this method to customize next link.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkNext() {
- return getNavLinkNext(null);
- }
-
- /**
- * Get the word "PREV" to indicate that no link is available. Override
- * this method to customize prev link.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkPrevious() {
- return getNavLinkPrevious(null);
- }
-
- /**
- * Do nothing. This is the default method.
- */
- protected void addSummaryDetailLinks(Content navDiv) {
- }
-
- /**
- * Get link to the "overview-summary.html" page.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkContents() {
- Content linkContent = getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_SUMMARY),
- overviewLabel, "", "");
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get link to the "package-summary.html" page for the package passed.
- *
- * @param pkg Package to which link will be generated
- * @return a content tree for the link
- */
- protected Content getNavLinkPackage(PackageDoc pkg) {
- Content linkContent = getPackageLink(pkg,
- packageLabel);
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get the word "Package" , to indicate that link is not available here.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkPackage() {
- Content li = HtmlTree.LI(packageLabel);
- return li;
- }
-
- /**
- * Get the word "Use", to indicate that link is not available.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkClassUse() {
- Content li = HtmlTree.LI(useLabel);
- return li;
- }
-
- /**
- * Get link for previous file.
- *
- * @param prev File name for the prev link
- * @return a content tree for the link
- */
- public Content getNavLinkPrevious(DocPath prev) {
- Content li;
- if (prev != null) {
- li = HtmlTree.LI(getHyperLink(prev, prevLabel, "", ""));
- }
- else
- li = HtmlTree.LI(prevLabel);
- return li;
- }
-
- /**
- * Get link for next file. If next is null, just print the label
- * without linking it anywhere.
- *
- * @param next File name for the next link
- * @return a content tree for the link
- */
- public Content getNavLinkNext(DocPath next) {
- Content li;
- if (next != null) {
- li = HtmlTree.LI(getHyperLink(next, nextLabel, "", ""));
- }
- else
- li = HtmlTree.LI(nextLabel);
- return li;
- }
-
- /**
- * Get "FRAMES" link, to switch to the frame version of the output.
- *
- * @param link File to be linked, "index.html"
- * @return a content tree for the link
- */
- protected Content getNavShowLists(DocPath link) {
- DocLink dl = new DocLink(link, path.getPath(), null);
- Content framesContent = getHyperLink(dl, framesLabel, "", "_top");
- Content li = HtmlTree.LI(framesContent);
- return li;
- }
-
- /**
- * Get "FRAMES" link, to switch to the frame version of the output.
- *
- * @return a content tree for the link
- */
- protected Content getNavShowLists() {
- return getNavShowLists(pathToRoot.resolve(DocPaths.INDEX));
- }
-
- /**
- * Get "NO FRAMES" link, to switch to the non-frame version of the output.
- *
- * @param link File to be linked
- * @return a content tree for the link
- */
- protected Content getNavHideLists(DocPath link) {
- Content noFramesContent = getHyperLink(link, noframesLabel, "", "_top");
- Content li = HtmlTree.LI(noFramesContent);
- return li;
- }
-
- /**
- * Get "Tree" link in the navigation bar. If there is only one package
- * specified on the command line, then the "Tree" link will be to the
- * only "package-tree.html" file otherwise it will be to the
- * "overview-tree.html" file.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkTree() {
- Content treeLinkContent;
- PackageDoc[] packages = configuration.root.specifiedPackages();
- if (packages.length == 1 && configuration.root.specifiedClasses().length == 0) {
- treeLinkContent = getHyperLink(pathString(packages[0],
- DocPaths.PACKAGE_TREE), treeLabel,
- "", "");
- } else {
- treeLinkContent = getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE),
- treeLabel, "", "");
- }
- Content li = HtmlTree.LI(treeLinkContent);
- return li;
- }
-
- /**
- * Get the overview tree link for the main tree.
- *
- * @param label the label for the link
- * @return a content tree for the link
- */
- protected Content getNavLinkMainTree(String label) {
- Content mainTreeContent = getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE),
- new StringContent(label));
- Content li = HtmlTree.LI(mainTreeContent);
- return li;
- }
-
- /**
- * Get the word "Class", to indicate that class link is not available.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkClass() {
- Content li = HtmlTree.LI(classLabel);
- return li;
- }
-
- /**
- * Get "Deprecated" API link in the navigation bar.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkDeprecated() {
- Content linkContent = getHyperLink(pathToRoot.resolve(DocPaths.DEPRECATED_LIST),
- deprecatedLabel, "", "");
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get link for generated index. If the user has used "-splitindex"
- * command line option, then link to file "index-files/index-1.html" is
- * generated otherwise link to file "index-all.html" is generated.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkClassIndex() {
- Content allClassesContent = getHyperLink(pathToRoot.resolve(
- DocPaths.ALLCLASSES_NOFRAME),
- allclassesLabel, "", "");
- Content li = HtmlTree.LI(allClassesContent);
- return li;
- }
-
- /**
- * Get link for generated class index.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkIndex() {
- Content linkContent = getHyperLink(pathToRoot.resolve(
- (configuration.splitindex
- ? DocPaths.INDEX_FILES.resolve(DocPaths.indexN(1))
- : DocPaths.INDEX_ALL)),
- indexLabel, "", "");
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get help file link. If user has provided a help file, then generate a
- * link to the user given file, which is already copied to current or
- * destination directory.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkHelp() {
- String helpfile = configuration.helpfile;
- DocPath helpfilenm;
- if (helpfile.isEmpty()) {
- helpfilenm = DocPaths.HELP_DOC;
- } else {
- DocFile file = DocFile.createFileForInput(configuration, helpfile);
- helpfilenm = DocPath.create(file.getName());
- }
- Content linkContent = getHyperLink(pathToRoot.resolve(helpfilenm),
- helpLabel, "", "");
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-
- /**
- * Get summary table header.
- *
- * @param header the header for the table
- * @param scope the scope of the headers
- * @return a content tree for the header
- */
- public Content getSummaryTableHeader(String[] header, String scope) {
- Content tr = new HtmlTree(HtmlTag.TR);
- int size = header.length;
- Content tableHeader;
- if (size == 1) {
- tableHeader = new StringContent(header[0]);
- tr.addContent(HtmlTree.TH(HtmlStyle.colOne, scope, tableHeader));
- return tr;
- }
- for (int i = 0; i < size; i++) {
- tableHeader = new StringContent(header[i]);
- if(i == 0)
- tr.addContent(HtmlTree.TH(HtmlStyle.colFirst, scope, tableHeader));
- else if(i == (size - 1))
- tr.addContent(HtmlTree.TH(HtmlStyle.colLast, scope, tableHeader));
- else
- tr.addContent(HtmlTree.TH(scope, tableHeader));
- }
- return tr;
- }
-
- /**
- * Get table caption.
- *
- * @param rawText the caption for the table which could be raw Html
- * @return a content tree for the caption
- */
- public Content getTableCaption(Content title) {
- Content captionSpan = HtmlTree.SPAN(title);
- Content space = getSpace();
- Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, space);
- Content caption = HtmlTree.CAPTION(captionSpan);
- caption.addContent(tabSpan);
- return caption;
- }
-
- /**
- * Get the marker anchor which will be added to the documentation tree.
- *
- * @param anchorName the anchor name attribute
- * @return a content tree for the marker anchor
- */
- public Content getMarkerAnchor(String anchorName) {
- return getMarkerAnchor(getName(anchorName), null);
- }
-
- /**
- * Get the marker anchor which will be added to the documentation tree.
- *
- * @param sectionName the section name anchor attribute for page
- * @return a content tree for the marker anchor
- */
- public Content getMarkerAnchor(SectionName sectionName) {
- return getMarkerAnchor(sectionName.getName(), null);
- }
-
- /**
- * Get the marker anchor which will be added to the documentation tree.
- *
- * @param sectionName the section name anchor attribute for page
- * @param anchorName the anchor name combined with section name attribute for the page
- * @return a content tree for the marker anchor
- */
- public Content getMarkerAnchor(SectionName sectionName, String anchorName) {
- return getMarkerAnchor(sectionName.getName() + getName(anchorName), null);
- }
-
- /**
- * Get the marker anchor which will be added to the documentation tree.
- *
- * @param anchorName the anchor name or id attribute
- * @param anchorContent the content that should be added to the anchor
- * @return a content tree for the marker anchor
- */
- public Content getMarkerAnchor(String anchorName, Content anchorContent) {
- if (anchorContent == null)
- anchorContent = new Comment(" ");
- Content markerAnchor = HtmlTree.A(configuration.htmlVersion, anchorName, anchorContent);
- return markerAnchor;
- }
-
- /**
- * Returns a packagename content.
- *
- * @param packageDoc the package to check
- * @return package name content
- */
- public Content getPackageName(PackageDoc packageDoc) {
- return packageDoc == null || packageDoc.name().isEmpty() ?
- defaultPackageLabel :
- getPackageLabel(packageDoc.name());
- }
-
- /**
- * Returns a package name label.
- *
- * @param packageName the package name
- * @return the package name content
- */
- public Content getPackageLabel(String packageName) {
- return new StringContent(packageName);
- }
-
- /**
- * Add package deprecation information to the documentation tree
- *
- * @param deprPkgs list of deprecated packages
- * @param headingKey the caption for the deprecated package table
- * @param tableSummary the summary for the deprecated package table
- * @param tableHeader table headers for the deprecated package table
- * @param contentTree the content tree to which the deprecated package table will be added
- */
- protected void addPackageDeprecatedAPI(List
- * Here is the algorithm used to fix the link:
- *
- * {@literal
- * For example, suppose com.sun.javadoc.RootDoc has this link:
- * {@literal The package Page }
- *
- * If this link appeared in the index, we would redirect
- * the link like this:
- *
- * {@literal The package Page}
- *
- * @param doc the Doc object whose documentation is being written.
- * @param text the text being written.
- *
- * @return the text, with all the relative links redirected to work.
- */
- private String redirectRelativeLinks(Doc doc, String text) {
- if (doc == null || shouldNotRedirectRelativeLinks()) {
- return text;
- }
-
- DocPath redirectPathFromRoot;
- if (doc instanceof ClassDoc) {
- redirectPathFromRoot = DocPath.forPackage(((ClassDoc) doc).containingPackage());
- } else if (doc instanceof MemberDoc) {
- redirectPathFromRoot = DocPath.forPackage(((MemberDoc) doc).containingPackage());
- } else if (doc instanceof PackageDoc) {
- redirectPathFromRoot = DocPath.forPackage((PackageDoc) doc);
- } else {
- return text;
- }
-
- //Redirect all relative links.
- int end, begin = StringUtils.indexOfIgnoreCase(text, "= 0){
- StringBuilder textBuff = new StringBuilder(text);
-
- while(begin >=0){
- if (textBuff.length() > begin + 2 && ! Character.isWhitespace(textBuff.charAt(begin+2))) {
- begin = StringUtils.indexOfIgnoreCase(textBuff.toString(), "", begin +1);
- if(begin == 0){
- //Link has no equal symbol.
- configuration.root.printWarning(
- doc.position(),
- configuration.getText("doclet.malformed_html_link_tag", text));
- break;
- }
- if (end == -1) {
- //Break without warning. This tag is not necessarily malformed. The text
- //might be missing '>' character because the href has an inline tag.
- break;
- }
-
- String quote = textBuff.substring(begin, end);
- quote = quote.contains("\"") ? "\"" :
- quote.contains("\'") ? "\'" : null;
- if (quote != null) {
- begin = textBuff.indexOf(quote, begin) + 1;
- end = textBuff.indexOf(quote, begin +1);
- if (begin == 0 || end == -1){
- //Link is missing a quote.
- break;
- }
- }
- String relativeLink = textBuff.substring(begin, end);
- String relativeLinkLowerCase = StringUtils.toLowerCase(relativeLink);
- if (!(relativeLinkLowerCase.startsWith("mailto:") ||
- relativeLinkLowerCase.startsWith("http:") ||
- relativeLinkLowerCase.startsWith("https:") ||
- relativeLinkLowerCase.startsWith("file:"))) {
- relativeLink = "{@"+(new DocRootTaglet()).getName() + "}/"
- + redirectPathFromRoot.resolve(relativeLink).getPath();
- textBuff.replace(begin, end, relativeLink);
- }
- begin = StringUtils.indexOfIgnoreCase(textBuff.toString(), " blockTags = new HashSet<>();
- static {
- for (HtmlTag t: HtmlTag.values()) {
- if (t.blockType == HtmlTag.BlockType.BLOCK)
- blockTags.add(t.value);
- }
- }
-
- public static String removeNonInlineHtmlTags(String text) {
- final int len = text.length();
-
- int startPos = 0; // start of text to copy
- int lessThanPos = text.indexOf('<'); // position of latest '<'
- if (lessThanPos < 0) {
- return text;
- }
- StringBuilder result = new StringBuilder();
- main: while (lessThanPos != -1) {
- int currPos = lessThanPos + 1;
- if (currPos == len)
- break;
- char ch = text.charAt(currPos);
- if (ch == '/') {
- if (++currPos == len)
- break;
- ch = text.charAt(currPos);
- }
- int tagPos = currPos;
- while (isHtmlTagLetterOrDigit(ch)) {
- if (++currPos == len)
- break main;
- ch = text.charAt(currPos);
- }
- String tagFound = StringUtils.toLowerCase(text.substring(tagPos, currPos));
- if (blockTags.contains(tagFound)) {
- result.append(text, startPos, lessThanPos);
- currPos = tagPos + tagFound.length();
- boolean foundGT = false;
- Character quoteKind = null;
- while (!foundGT) {
- if (ch == '\"' || ch == '\'') {
- if (quoteKind == null) {
- quoteKind = ch;
- } else if (quoteKind == ch) {
- quoteKind = null;
- }
- }
- if (ch == '>' && quoteKind == null) {
- foundGT = true;
- }
- if (++currPos == len) {
- break;
- }
- ch = text.charAt(currPos);
- }
- startPos = currPos;
- }
- lessThanPos = text.indexOf('<', currPos);
- }
- result.append(text.substring(startPos));
- return result.toString();
- }
-
- private static boolean isHtmlTagLetterOrDigit(char ch) {
- return ('a' <= ch && ch <= 'z') ||
- ('A' <= ch && ch <= 'Z') ||
- ('1' <= ch && ch <= '6');
- }
-
- /**
- * Add a link to the stylesheet file.
- *
- * @param head the content tree to which the files will be added
- */
- public void addStyleSheetProperties(Content head) {
- String stylesheetfile = configuration.stylesheetfile;
- DocPath stylesheet;
- if (stylesheetfile.isEmpty()) {
- stylesheet = DocPaths.STYLESHEET;
- } else {
- DocFile file = DocFile.createFileForInput(configuration, stylesheetfile);
- stylesheet = DocPath.create(file.getName());
- }
- HtmlTree link = HtmlTree.LINK("stylesheet", "text/css",
- pathToRoot.resolve(stylesheet).getPath(),
- "Style");
- head.addContent(link);
- if (configuration.createindex) {
- HtmlTree jq_link = HtmlTree.LINK("stylesheet", "text/css",
- pathToRoot.resolve(DocPaths.JQUERY_FILES.resolve(DocPaths.JQUERY_STYLESHEET_FILE)).getPath(),
- "Style");
- head.addContent(jq_link);
- }
- }
-
- /**
- * Add a link to the JavaScript file.
- *
- * @param head the content tree to which the files will be added
- */
- public void addScriptProperties(Content head) {
- HtmlTree javascript = HtmlTree.SCRIPT(pathToRoot.resolve(DocPaths.JAVASCRIPT).getPath());
- head.addContent(javascript);
- if (configuration.createindex) {
- if (pathToRoot != null && script != null) {
- String path = pathToRoot.isEmpty() ? "." : pathToRoot.getPath();
- script.addContent(new RawHtml("var pathtoroot = \"" + path + "/\";loadScripts(document, \'script\');"));
- }
- addJQueryFile(head, DocPaths.JSZIP_MIN);
- addJQueryFile(head, DocPaths.JSZIPUTILS_MIN);
- head.addContent(new RawHtml(""));
- addJQueryFile(head, DocPaths.JQUERY_JS_1_10);
- addJQueryFile(head, DocPaths.JQUERY_JS);
- }
- }
-
- /**
- * Add a link to the JQuery javascript file.
- *
- * @param head the content tree to which the files will be added
- * @param filePath the DocPath of the file that needs to be added
- */
- private void addJQueryFile(Content head, DocPath filePath) {
- HtmlTree jqyeryScriptFile = HtmlTree.SCRIPT(
- pathToRoot.resolve(DocPaths.JQUERY_FILES.resolve(filePath)).getPath());
- head.addContent(jqyeryScriptFile);
- }
-
- /**
- * According to
- * The Java™ Language Specification,
- * all the outer classes and static nested classes are core classes.
- */
- public boolean isCoreClass(ClassDoc cd) {
- return cd.containingClass() == null || cd.isStatic();
- }
-
- /**
- * Adds the annotatation types for the given packageDoc.
- *
- * @param packageDoc the package to write annotations for.
- * @param htmltree the documentation tree to which the annotation info will be
- * added
- */
- public void addAnnotationInfo(PackageDoc packageDoc, Content htmltree) {
- addAnnotationInfo(packageDoc, packageDoc.annotations(), htmltree);
- }
-
- /**
- * Add the annotation types of the executable receiver.
- *
- * @param method the executable to write the receiver annotations for.
- * @param descList list of annotation description.
- * @param htmltree the documentation tree to which the annotation info will be
- * added
- */
- public void addReceiverAnnotationInfo(ExecutableMemberDoc method, AnnotationDesc[] descList,
- Content htmltree) {
- addAnnotationInfo(0, method, descList, false, htmltree);
- }
-
- /**
- * Adds the annotatation types for the given doc.
- *
- * @param doc the package to write annotations for
- * @param htmltree the content tree to which the annotation types will be added
- */
- public void addAnnotationInfo(ProgramElementDoc doc, Content htmltree) {
- addAnnotationInfo(doc, doc.annotations(), htmltree);
- }
-
- /**
- * Add the annotatation types for the given doc and parameter.
- *
- * @param indent the number of spaces to indent the parameters.
- * @param doc the doc to write annotations for.
- * @param param the parameter to write annotations for.
- * @param tree the content tree to which the annotation types will be added
- */
- public boolean addAnnotationInfo(int indent, Doc doc, Parameter param,
- Content tree) {
- return addAnnotationInfo(indent, doc, param.annotations(), false, tree);
- }
-
- /**
- * Adds the annotatation types for the given doc.
- *
- * @param doc the doc to write annotations for.
- * @param descList the array of {@link AnnotationDesc}.
- * @param htmltree the documentation tree to which the annotation info will be
- * added
- */
- private void addAnnotationInfo(Doc doc, AnnotationDesc[] descList,
- Content htmltree) {
- addAnnotationInfo(0, doc, descList, true, htmltree);
- }
-
- /**
- * Adds the annotation types for the given doc.
- *
- * @param indent the number of extra spaces to indent the annotations.
- * @param doc the doc to write annotations for.
- * @param descList the array of {@link AnnotationDesc}.
- * @param htmltree the documentation tree to which the annotation info will be
- * added
- */
- private boolean addAnnotationInfo(int indent, Doc doc,
- AnnotationDesc[] descList, boolean lineBreak, Content htmltree) {
- List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Joe Fialli
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class HtmlSerialFieldWriter extends FieldWriterImpl
- implements SerializedFormWriter.SerialFieldWriter {
- ProgramElementDoc[] members = null;
-
- public HtmlSerialFieldWriter(SubWriterHolderWriter writer,
- ClassDoc classdoc) {
- super(writer, classdoc);
- }
-
- public List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Joe Fialli
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class HtmlSerialMethodWriter extends MethodWriterImpl implements
- SerializedFormWriter.SerialMethodWriter{
-
- public HtmlSerialMethodWriter(SubWriterHolderWriter writer,
- ClassDoc classdoc) {
- super(writer, classdoc);
- }
-
- /**
- * Return the header for serializable methods section.
- *
- * @return a content tree for the header
- */
- public Content getSerializableMethodsHeader() {
- HtmlTree ul = new HtmlTree(HtmlTag.UL);
- ul.addStyle(HtmlStyle.blockList);
- return ul;
- }
-
- /**
- * Return the header for serializable methods content section.
- *
- * @param isLastContent true if the cotent being documented is the last content.
- * @return a content tree for the header
- */
- public Content getMethodsContentHeader(boolean isLastContent) {
- HtmlTree li = new HtmlTree(HtmlTag.LI);
- if (isLastContent)
- li.addStyle(HtmlStyle.blockListLast);
- else
- li.addStyle(HtmlStyle.blockList);
- return li;
- }
-
- /**
- * Add serializable methods.
- *
- * @param heading the heading for the section
- * @param serializableMethodContent the tree to be added to the serializable methods
- * content tree
- * @return a content tree for the serializable methods content
- */
- public Content getSerializableMethods(String heading, Content serializableMethodContent) {
- Content headingContent = new StringContent(heading);
- Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
- headingContent);
- Content li = HtmlTree.LI(HtmlStyle.blockList, serialHeading);
- li.addContent(serializableMethodContent);
- return li;
- }
-
- /**
- * Return the no customization message.
- *
- * @param msg the message to be displayed
- * @return no customization message content
- */
- public Content getNoCustomizationMsg(String msg) {
- Content noCustomizationMsg = new StringContent(msg);
- return noCustomizationMsg;
- }
-
- /**
- * Add the member header.
- *
- * @param member the method document to be listed
- * @param methodsContentTree the content tree to which the member header will be added
- */
- public void addMemberHeader(MethodDoc member, Content methodsContentTree) {
- methodsContentTree.addContent(getHead(member));
- methodsContentTree.addContent(getSignature(member));
- }
-
- /**
- * Add the deprecated information for this member.
- *
- * @param member the method to document.
- * @param methodsContentTree the tree to which the deprecated info will be added
- */
- public void addDeprecatedMemberInfo(MethodDoc member, Content methodsContentTree) {
- addDeprecatedInfo(member, methodsContentTree);
- }
-
- /**
- * Add the description text for this member.
- *
- * @param member the method to document.
- * @param methodsContentTree the tree to which the deprecated info will be added
- */
- public void addMemberDescription(MethodDoc member, Content methodsContentTree) {
- addComment(member, methodsContentTree);
- }
-
- /**
- * Add the tag information for this member.
- *
- * @param member the method to document.
- * @param methodsContentTree the tree to which the member tags info will be added
- */
- public void addMemberTags(MethodDoc member, Content methodsContentTree) {
- Content tagContent = new ContentBuilder();
- TagletManager tagletManager =
- configuration.tagletManager;
- TagletWriter.genTagOuput(tagletManager, member,
- tagletManager.getSerializedFormTaglets(),
- writer.getTagletWriterInstance(false), tagContent);
- Content dlTags = new HtmlTree(HtmlTag.DL);
- dlTags.addContent(tagContent);
- methodsContentTree.addContent(dlTags);
- MethodDoc method = member;
- if (method.name().compareTo("writeExternal") == 0
- && method.tags("serialData").length == 0) {
- serialWarning(member.position(), "doclet.MissingSerialDataTag",
- method.containingClass().qualifiedName(), method.name());
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*
- * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.util.List;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.util.links.*;
-
-/**
- * A factory that returns a link given the information about it.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Jamie Ho
- * @since 1.5
- */
-@Deprecated
-public class LinkFactoryImpl extends LinkFactory {
-
- private HtmlDocletWriter m_writer;
-
- public LinkFactoryImpl(HtmlDocletWriter writer) {
- m_writer = writer;
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content newContent() {
- return new ContentBuilder();
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getClassLink(LinkInfo linkInfo) {
- LinkInfoImpl classLinkInfo = (LinkInfoImpl) linkInfo;
- boolean noLabel = linkInfo.label == null || linkInfo.label.isEmpty();
- ClassDoc classDoc = classLinkInfo.classDoc;
- //Create a tool tip if we are linking to a class or interface. Don't
- //create one if we are linking to a member.
- String title =
- (classLinkInfo.where == null || classLinkInfo.where.length() == 0) ?
- getClassToolTip(classDoc,
- classLinkInfo.type != null &&
- !classDoc.qualifiedTypeName().equals(classLinkInfo.type.qualifiedTypeName())) :
- "";
- Content label = classLinkInfo.getClassLinkLabel(m_writer.configuration);
- Configuration configuration = m_writer.configuration;
- Content link = new ContentBuilder();
- if (classDoc.isIncluded()) {
- if (configuration.isGeneratedDoc(classDoc)) {
- DocPath filename = getPath(classLinkInfo);
- if (linkInfo.linkToSelf ||
- !(DocPath.forName(classDoc)).equals(m_writer.filename)) {
- link.addContent(m_writer.getHyperLink(
- filename.fragment(classLinkInfo.where),
- label,
- classLinkInfo.isStrong, classLinkInfo.styleName,
- title, classLinkInfo.target));
- if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
- link.addContent(getTypeParameterLinks(linkInfo));
- }
- return link;
- }
- }
- } else {
- Content crossLink = m_writer.getCrossClassLink(
- classDoc.qualifiedName(), classLinkInfo.where,
- label, classLinkInfo.isStrong, classLinkInfo.styleName,
- true);
- if (crossLink != null) {
- link.addContent(crossLink);
- if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
- link.addContent(getTypeParameterLinks(linkInfo));
- }
- return link;
- }
- }
- // Can't link so just write label.
- link.addContent(label);
- if (noLabel && !classLinkInfo.excludeTypeParameterLinks) {
- link.addContent(getTypeParameterLinks(linkInfo));
- }
- return link;
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getTypeParameterLink(LinkInfo linkInfo,
- Type typeParam) {
- LinkInfoImpl typeLinkInfo = new LinkInfoImpl(m_writer.configuration,
- ((LinkInfoImpl) linkInfo).getContext(), typeParam);
- typeLinkInfo.excludeTypeBounds = linkInfo.excludeTypeBounds;
- typeLinkInfo.excludeTypeParameterLinks = linkInfo.excludeTypeParameterLinks;
- typeLinkInfo.linkToSelf = linkInfo.linkToSelf;
- typeLinkInfo.isJava5DeclarationLocation = false;
- return getLink(typeLinkInfo);
- }
-
- protected Content getTypeAnnotationLink(LinkInfo linkInfo,
- AnnotationDesc annotation) {
- throw new RuntimeException("Not implemented yet!");
- }
-
- public Content getTypeAnnotationLinks(LinkInfo linkInfo) {
- ContentBuilder links = new ContentBuilder();
- AnnotationDesc[] annotations;
- if (linkInfo.type instanceof AnnotatedType) {
- annotations = linkInfo.type.asAnnotatedType().annotations();
- } else if (linkInfo.type instanceof TypeVariable) {
- annotations = linkInfo.type.asTypeVariable().annotations();
- } else {
- return links;
- }
-
- if (annotations.length == 0)
- return links;
-
- List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- */
-@Deprecated
-public class LinkInfoImpl extends LinkInfo {
-
- public enum Kind {
- DEFAULT,
-
- /**
- * Indicate that the link appears in a class list.
- */
- ALL_CLASSES_FRAME,
-
- /**
- * Indicate that the link appears in a class documentation.
- */
- CLASS,
-
- /**
- * Indicate that the link appears in member documentation.
- */
- MEMBER,
-
- /**
- * Indicate that the link appears in class use documentation.
- */
- CLASS_USE,
-
- /**
- * Indicate that the link appears in index documentation.
- */
- INDEX,
-
- /**
- * Indicate that the link appears in constant value summary.
- */
- CONSTANT_SUMMARY,
-
- /**
- * Indicate that the link appears in serialized form documentation.
- */
- SERIALIZED_FORM,
-
- /**
- * Indicate that the link appears in serial member documentation.
- */
- SERIAL_MEMBER,
-
- /**
- * Indicate that the link appears in package documentation.
- */
- PACKAGE,
-
- /**
- * Indicate that the link appears in see tag documentation.
- */
- SEE_TAG,
-
- /**
- * Indicate that the link appears in value tag documentation.
- */
- VALUE_TAG,
-
- /**
- * Indicate that the link appears in tree documentation.
- */
- TREE,
-
- /**
- * Indicate that the link appears in a class list.
- */
- PACKAGE_FRAME,
-
- /**
- * The header in the class documentation.
- */
- CLASS_HEADER,
-
- /**
- * The signature in the class documentation.
- */
- CLASS_SIGNATURE,
-
- /**
- * The return type of a method.
- */
- RETURN_TYPE,
-
- /**
- * The return type of a method in a member summary.
- */
- SUMMARY_RETURN_TYPE,
-
- /**
- * The type of a method/constructor parameter.
- */
- EXECUTABLE_MEMBER_PARAM,
-
- /**
- * Super interface links.
- */
- SUPER_INTERFACES,
-
- /**
- * Implemented interface links.
- */
- IMPLEMENTED_INTERFACES,
-
- /**
- * Implemented class links.
- */
- IMPLEMENTED_CLASSES,
-
- /**
- * Subinterface links.
- */
- SUBINTERFACES,
-
- /**
- * Subclasses links.
- */
- SUBCLASSES,
-
- /**
- * The signature in the class documentation (implements/extends portion).
- */
- CLASS_SIGNATURE_PARENT_NAME,
-
- /**
- * The header for method documentation copied from parent.
- */
- METHOD_DOC_COPY,
-
- /**
- * Method "specified by" link.
- */
- METHOD_SPECIFIED_BY,
-
- /**
- * Method "overrides" link.
- */
- METHOD_OVERRIDES,
-
- /**
- * Annotation link.
- */
- ANNOTATION,
-
- /**
- * The header for field documentation copied from parent.
- */
- FIELD_DOC_COPY,
-
- /**
- * The parent nodes in the class tree.
- */
- CLASS_TREE_PARENT,
-
- /**
- * The type parameters of a method or constructor.
- */
- MEMBER_TYPE_PARAMS,
-
- /**
- * Indicate that the link appears in class use documentation.
- */
- CLASS_USE_HEADER,
-
- /**
- * The header for property documentation copied from parent.
- */
- PROPERTY_DOC_COPY
- }
-
- public final ConfigurationImpl configuration;
-
- /**
- * The location of the link.
- */
- public Kind context = Kind.DEFAULT;
-
- /**
- * The value of the marker #.
- */
- public String where = "";
-
- /**
- * String style of text defined in style sheet.
- */
- public String styleName = "";
-
- /**
- * The value of the target.
- */
- public String target = "";
-
- /**
- * Construct a LinkInfo object.
- *
- * @param configuration the configuration data for the doclet
- * @param context the context of the link.
- * @param context the context of the link.
- * @param executableMemberDoc the member to link to.
- */
- public LinkInfoImpl(ConfigurationImpl configuration,
- Kind context, ExecutableMemberDoc executableMemberDoc) {
- this.configuration = configuration;
- this.executableMemberDoc = executableMemberDoc;
- setContext(context);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content newContent() {
- return new ContentBuilder();
- }
-
- /**
- * Construct a LinkInfo object.
- *
- * @param configuration the configuration data for the doclet
- * @param context the context of the link.
- * @param classDoc the class to link to.
- */
- public LinkInfoImpl(ConfigurationImpl configuration,
- Kind context, ClassDoc classDoc) {
- this.configuration = configuration;
- this.classDoc = classDoc;
- setContext(context);
- }
-
- /**
- * Construct a LinkInfo object.
- *
- * @param configuration the configuration data for the doclet
- * @param context the context of the link.
- * @param type the class to link to.
- */
- public LinkInfoImpl(ConfigurationImpl configuration,
- Kind context, Type type) {
- this.configuration = configuration;
- this.type = type;
- setContext(context);
- }
-
-
- /**
- * Set the label for the link.
- * @param label plain-text label for the link
- */
- public LinkInfoImpl label(String label) {
- this.label = new StringContent(label);
- return this;
- }
-
- /**
- * Set the label for the link.
- */
- public LinkInfoImpl label(Content label) {
- this.label = label;
- return this;
- }
-
- /**
- * Set whether or not the link should be strong.
- */
- public LinkInfoImpl strong(boolean strong) {
- this.isStrong = strong;
- return this;
- }
-
- /**
- * Set the style to be used for the link.
- * @param styleName String style of text defined in style sheet.
- */
- public LinkInfoImpl styleName(String styleName) {
- this.styleName = styleName;
- return this;
- }
-
- /**
- * Set the target to be used for the link.
- * @param styleName String style of text defined in style sheet.
- */
- public LinkInfoImpl target(String target) {
- this.target = target;
- return this;
- }
-
- /**
- * Set whether or not this is a link to a varargs parameter.
- */
- public LinkInfoImpl varargs(boolean varargs) {
- this.isVarArg = varargs;
- return this;
- }
-
- /**
- * Set the fragment specifier for the link.
- */
- public LinkInfoImpl where(String where) {
- this.where = where;
- return this;
- }
-
- /**
- * {@inheritDoc}
- */
- public Kind getContext() {
- return context;
- }
-
- /**
- * {@inheritDoc}
- *
- * This method sets the link attributes to the appropriate values
- * based on the context.
- *
- * @param c the context id to set.
- */
- public final void setContext(Kind c) {
- //NOTE: Put context specific link code here.
- switch (c) {
- case ALL_CLASSES_FRAME:
- case PACKAGE_FRAME:
- case IMPLEMENTED_CLASSES:
- case SUBCLASSES:
- case METHOD_DOC_COPY:
- case FIELD_DOC_COPY:
- case PROPERTY_DOC_COPY:
- case CLASS_USE_HEADER:
- includeTypeInClassLinkLabel = false;
- break;
-
- case ANNOTATION:
- excludeTypeParameterLinks = true;
- excludeTypeBounds = true;
- break;
-
- case IMPLEMENTED_INTERFACES:
- case SUPER_INTERFACES:
- case SUBINTERFACES:
- case CLASS_TREE_PARENT:
- case TREE:
- case CLASS_SIGNATURE_PARENT_NAME:
- excludeTypeParameterLinks = true;
- excludeTypeBounds = true;
- includeTypeInClassLinkLabel = false;
- includeTypeAsSepLink = true;
- break;
-
- case PACKAGE:
- case CLASS_USE:
- case CLASS_HEADER:
- case CLASS_SIGNATURE:
- excludeTypeParameterLinks = true;
- includeTypeAsSepLink = true;
- includeTypeInClassLinkLabel = false;
- break;
-
- case MEMBER_TYPE_PARAMS:
- includeTypeAsSepLink = true;
- includeTypeInClassLinkLabel = false;
- break;
-
- case RETURN_TYPE:
- case SUMMARY_RETURN_TYPE:
- excludeTypeBounds = true;
- break;
- case EXECUTABLE_MEMBER_PARAM:
- excludeTypeBounds = true;
- break;
- }
- context = c;
- if (type != null &&
- type.asTypeVariable()!= null &&
- type.asTypeVariable().owner() instanceof ExecutableMemberDoc) {
- excludeTypeParameterLinks = true;
- }
- }
-
- /**
- * Return true if this link is linkable and false if we can't link to the
- * desired place.
- *
- * @return true if this link is linkable and false if we can't link to the
- * desired place.
- */
- public boolean isLinkable() {
- return configuration.utils.isLinkable(classDoc, configuration);
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import com.sun.tools.doclets.internal.toolkit.util.links.*;
-
-/**
- * Stores output of a link.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Jamie Ho
- * @since 1.5
- */
-@Deprecated
-public class LinkOutputImpl implements LinkOutput {
-
- /**
- * The output of the link.
- */
- public StringBuilder output;
-
- /**
- * Construct a new LinkOutputImpl.
- */
- public LinkOutputImpl() {
- output = new StringBuilder();
- }
-
- /**
- * {@inheritDoc}
- */
- public void append(Object o) {
- output.append(o instanceof String ?
- (String) o : ((LinkOutputImpl)o).toString());
- }
-
- /**
- * {@inheritDoc}
- */
- public void insert(int offset, Object o) {
- output.insert(offset, o.toString());
- }
-
- /**
- * {@inheritDoc}
- */
- public String toString() {
- return output.toString();
- }
-
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.javac.util.StringUtils;
-
-/**
- * Writes method documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Jamie Ho (rewrite)
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class MethodWriterImpl extends AbstractExecutableMemberWriter
- implements MethodWriter, MemberSummaryWriter {
-
- /**
- * Construct a new MethodWriterImpl.
- *
- * @param writer the writer for the class that the methods belong to.
- * @param classDoc the class being documented.
- */
- public MethodWriterImpl(SubWriterHolderWriter writer, ClassDoc classDoc) {
- super(writer, classDoc);
- }
-
- /**
- * Construct a new MethodWriterImpl.
- *
- * @param writer The writer for the class that the methods belong to.
- */
- public MethodWriterImpl(SubWriterHolderWriter writer) {
- super(writer);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(HtmlConstants.START_OF_METHOD_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMethodDetailsTreeHeader(ClassDoc classDoc,
- Content memberDetailsTree) {
- memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS);
- Content methodDetailsTree = writer.getMemberTreeHeader();
- methodDetailsTree.addContent(writer.getMarkerAnchor(
- SectionName.METHOD_DETAIL));
- Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
- writer.methodDetailsLabel);
- methodDetailsTree.addContent(heading);
- return methodDetailsTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMethodDocTreeHeader(MethodDoc method,
- Content methodDetailsTree) {
- String erasureAnchor;
- if ((erasureAnchor = getErasureAnchor(method)) != null) {
- methodDetailsTree.addContent(writer.getMarkerAnchor((erasureAnchor)));
- }
- methodDetailsTree.addContent(
- writer.getMarkerAnchor(writer.getAnchor(method)));
- Content methodDocTree = writer.getMemberTreeHeader();
- Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
- heading.addContent(method.name());
- methodDocTree.addContent(heading);
- return methodDocTree;
- }
-
- /**
- * Get the signature for the given method.
- *
- * @param method the method being documented.
- * @return a content object for the signature
- */
- public Content getSignature(MethodDoc method) {
- Content pre = new HtmlTree(HtmlTag.PRE);
- writer.addAnnotationInfo(method, pre);
- int annotationLength = pre.charCount();
- addModifiers(method, pre);
- addTypeParameters(method, pre);
- addReturnType(method, pre);
- if (configuration.linksource) {
- Content methodName = new StringContent(method.name());
- writer.addSrcLink(method, methodName, pre);
- } else {
- addName(method.name(), pre);
- }
- int indent = pre.charCount() - annotationLength;
- addParameters(method, pre, indent);
- addExceptions(method, pre, indent);
- return pre;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDeprecated(MethodDoc method, Content methodDocTree) {
- addDeprecatedInfo(method, methodDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addComments(Type holder, MethodDoc method, Content methodDocTree) {
- ClassDoc holderClassDoc = holder.asClassDoc();
- if (method.inlineTags().length > 0) {
- if (holder.asClassDoc().equals(classdoc) ||
- (! (holderClassDoc.isPublic() ||
- utils.isLinkable(holderClassDoc, configuration)))) {
- writer.addInlineComment(method, methodDocTree);
- } else {
- Content link =
- writer.getDocLink(LinkInfoImpl.Kind.METHOD_DOC_COPY,
- holder.asClassDoc(), method,
- holder.asClassDoc().isIncluded() ?
- holder.typeName() : holder.qualifiedTypeName(),
- false);
- Content codelLink = HtmlTree.CODE(link);
- Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel, holder.asClassDoc().isClass()?
- writer.descfrmClassLabel : writer.descfrmInterfaceLabel);
- descfrmLabel.addContent(writer.getSpace());
- descfrmLabel.addContent(codelLink);
- methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
- writer.addInlineComment(method, methodDocTree);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTags(MethodDoc method, Content methodDocTree) {
- writer.addTagsInfo(method, methodDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMethodDetails(Content methodDetailsTree) {
- if (configuration.allowTag(HtmlTag.SECTION)) {
- HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(methodDetailsTree));
- return htmlTree;
- }
- return getMemberTree(methodDetailsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMethodDoc(Content methodDocTree,
- boolean isLastContent) {
- return getMemberTree(methodDocTree, isLastContent);
- }
-
- /**
- * Close the writer.
- */
- public void close() throws IOException {
- writer.close();
- }
-
- public int getMemberKind() {
- return VisibleMemberMap.METHODS;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Method_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Method_Summary"),
- configuration.getText("doclet.methods"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Methods");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Method"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.METHOD_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- inheritedTree.addContent(writer.getMarkerAnchor(
- SectionName.METHODS_INHERITANCE, configuration.getClassName(cd)));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- Content classLink = writer.getPreQualifiedClassLink(
- LinkInfoImpl.Kind.MEMBER, cd, false);
- Content label = new StringContent(cd.isClass() ?
- configuration.getText("doclet.Methods_Inherited_From_Class") :
- configuration.getText("doclet.Methods_Inherited_From_Interface"));
- Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
- label);
- labelHeading.addContent(writer.getSpace());
- labelHeading.addContent(classLink);
- inheritedTree.addContent(labelHeading);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
- MethodDoc meth = (MethodDoc)member;
- addModifierAndType(meth, meth.returnType(), tdSummaryType);
- }
-
- /**
- * {@inheritDoc}
- */
- protected static void addOverridden(HtmlDocletWriter writer,
- Type overriddenType, MethodDoc method, Content dl) {
- if (writer.configuration.nocomment) {
- return;
- }
- ClassDoc holderClassDoc = overriddenType.asClassDoc();
- if (! (holderClassDoc.isPublic() ||
- writer.configuration.utils.isLinkable(holderClassDoc, writer.configuration))) {
- //This is an implementation detail that should not be documented.
- return;
- }
- if (overriddenType.asClassDoc().isIncluded() && ! method.isIncluded()) {
- //The class is included but the method is not. That means that it
- //is not visible so don't document this.
- return;
- }
- Content label = writer.overridesLabel;
- LinkInfoImpl.Kind context = LinkInfoImpl.Kind.METHOD_OVERRIDES;
-
- if (method != null) {
- if (overriddenType.asClassDoc().isAbstract() && method.isAbstract()){
- //Abstract method is implemented from abstract class,
- //not overridden
- label = writer.specifiedByLabel;
- context = LinkInfoImpl.Kind.METHOD_SPECIFIED_BY;
- }
- Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, label));
- dl.addContent(dt);
- Content overriddenTypeLink =
- writer.getLink(new LinkInfoImpl(writer.configuration, context, overriddenType));
- Content codeOverridenTypeLink = HtmlTree.CODE(overriddenTypeLink);
- String name = method.name();
- Content methlink = writer.getLink(
- new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER,
- overriddenType.asClassDoc())
- .where(writer.getName(writer.getAnchor(method))).label(name));
- Content codeMethLink = HtmlTree.CODE(methlink);
- Content dd = HtmlTree.DD(codeMethLink);
- dd.addContent(writer.getSpace());
- dd.addContent(writer.getResource("doclet.in_class"));
- dd.addContent(writer.getSpace());
- dd.addContent(codeOverridenTypeLink);
- dl.addContent(dd);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected static void addImplementsInfo(HtmlDocletWriter writer,
- MethodDoc method, Content dl) {
- if(writer.configuration.nocomment){
- return;
- }
- ImplementedMethods implementedMethodsFinder =
- new ImplementedMethods(method, writer.configuration);
- MethodDoc[] implementedMethods = implementedMethodsFinder.build();
- for (MethodDoc implementedMeth : implementedMethods) {
- Type intfac = implementedMethodsFinder.getMethodHolder(implementedMeth);
- Content intfaclink = writer.getLink(new LinkInfoImpl(
- writer.configuration, LinkInfoImpl.Kind.METHOD_SPECIFIED_BY, intfac));
- Content codeIntfacLink = HtmlTree.CODE(intfaclink);
- Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.overrideSpecifyLabel, writer.specifiedByLabel));
- dl.addContent(dt);
- Content methlink = writer.getDocLink(
- LinkInfoImpl.Kind.MEMBER, implementedMeth,
- implementedMeth.name(), false);
- Content codeMethLink = HtmlTree.CODE(methlink);
- Content dd = HtmlTree.DD(codeMethLink);
- dd.addContent(writer.getSpace());
- dd.addContent(writer.getResource("doclet.in_interface"));
- dd.addContent(writer.getSpace());
- dd.addContent(codeIntfacLink);
- dl.addContent(dd);
- }
- }
-
- /**
- * Add the return type.
- *
- * @param method the method being documented.
- * @param htmltree the content tree to which the return type will be added
- */
- protected void addReturnType(MethodDoc method, Content htmltree) {
- Type type = method.returnType();
- if (type != null) {
- Content linkContent = writer.getLink(
- new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type));
- htmltree.addContent(linkContent);
- htmltree.addContent(writer.getSpace());
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- if (cd == null) {
- return writer.getHyperLink(
- SectionName.METHOD_SUMMARY,
- writer.getResource("doclet.navMethod"));
- } else {
- return writer.getHyperLink(
- SectionName.METHODS_INHERITANCE,
- configuration.getClassName(cd), writer.getResource("doclet.navMethod"));
- }
- } else {
- return writer.getResource("doclet.navMethod");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- if (link) {
- liNav.addContent(writer.getHyperLink(
- SectionName.METHOD_DETAIL, writer.getResource("doclet.navMethod")));
- } else {
- liNav.addContent(writer.getResource("doclet.navMethod"));
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Writes nested class documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Jamie Ho (rewrite)
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class NestedClassWriterImpl extends AbstractMemberWriter
- implements MemberSummaryWriter {
-
- public NestedClassWriterImpl(SubWriterHolderWriter writer,
- ClassDoc classdoc) {
- super(writer, classdoc);
- }
-
- public NestedClassWriterImpl(SubWriterHolderWriter writer) {
- super(writer);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(HtmlConstants.START_OF_NESTED_CLASS_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * Close the writer.
- */
- public void close() throws IOException {
- writer.close();
- }
-
- public int getMemberKind() {
- return VisibleMemberMap.INNERCLASSES;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Nested_Class_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Nested_Class_Summary"),
- configuration.getText("doclet.nested_classes"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Nested_Classes");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header;
- if (member.isInterface()) {
- header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Interface"),
- configuration.getText("doclet.Description"))
- };
- }
- else {
- header = new String[] {
- writer.getModifierTypeHeader(),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Class"),
- configuration.getText("doclet.Description"))
- };
- }
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.NESTED_CLASS_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- inheritedTree.addContent(writer.getMarkerAnchor(
- SectionName.NESTED_CLASSES_INHERITANCE,
- cd.qualifiedName()));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- Content classLink = writer.getPreQualifiedClassLink(
- LinkInfoImpl.Kind.MEMBER, cd, false);
- Content label = new StringContent(cd.isInterface() ?
- configuration.getText("doclet.Nested_Classes_Interface_Inherited_From_Interface") :
- configuration.getText("doclet.Nested_Classes_Interfaces_Inherited_From_Class"));
- Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
- label);
- labelHeading.addContent(writer.getSpace());
- labelHeading.addContent(classLink);
- inheritedTree.addContent(labelHeading);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
- Content tdSummary) {
- Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
- writer.getLink(new LinkInfoImpl(configuration, context, (ClassDoc)member)));
- Content code = HtmlTree.CODE(memberLink);
- tdSummary.addContent(code);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addInheritedSummaryLink(ClassDoc cd,
- ProgramElementDoc member, Content linksTree) {
- linksTree.addContent(
- writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
- (ClassDoc)member)));
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member,
- Content tdSummaryType) {
- ClassDoc cd = (ClassDoc)member;
- addModifierAndType(cd, null, tdSummaryType);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getDeprecatedLink(ProgramElementDoc member) {
- return writer.getQualifiedClassLink(LinkInfoImpl.Kind.MEMBER,
- (ClassDoc)member);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- if (cd == null) {
- return writer.getHyperLink(
- SectionName.NESTED_CLASS_SUMMARY,
- writer.getResource("doclet.navNested"));
- } else {
- return writer.getHyperLink(
- SectionName.NESTED_CLASSES_INHERITANCE,
- cd.qualifiedName(), writer.getResource("doclet.navNested"));
- }
- } else {
- return writer.getResource("doclet.navNested");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-import java.util.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Class to generate file for each package contents in the left-hand bottom
- * frame. This will list all the Class Kinds in the package. A click on any
- * class-kind will update the right-hand frame with the clicked class-kind page.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class PackageFrameWriter extends HtmlDocletWriter {
-
- /**
- * The package being documented.
- */
- private PackageDoc packageDoc;
-
- /**
- * The classes to be documented. Use this to filter out classes
- * that will not be documented.
- */
- private Set This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- */
-@Deprecated
-public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
-
- /**
- * Construct the PackageIndexFrameWriter object.
- *
- * @param filename Name of the package index file to be generated.
- */
- public PackageIndexFrameWriter(ConfigurationImpl configuration,
- DocPath filename) throws IOException {
- super(configuration, filename);
- }
-
- /**
- * Generate the package index file named "overview-frame.html".
- * @throws DocletAbortException
- */
- public static void generate(ConfigurationImpl configuration) {
- PackageIndexFrameWriter packgen;
- DocPath filename = DocPaths.OVERVIEW_FRAME;
- try {
- packgen = new PackageIndexFrameWriter(configuration, filename);
- packgen.buildPackageIndexFile("doclet.Window_Overview", false);
- packgen.close();
- } catch (IOException exc) {
- configuration.standardmessage.error(
- "doclet.exception_encountered",
- exc.toString(), filename);
- throw new DocletAbortException(exc);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addPackagesList(Collection This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class PackageIndexWriter extends AbstractPackageIndexWriter {
-
- /**
- * Root of the program structure. Used for "overview" documentation.
- */
- private RootDoc root;
-
- /**
- * Map representing the group of packages as specified on the command line.
- *
- * @see Group
- */
- private Map This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class PackageTreeWriter extends AbstractTreeWriter {
-
- /**
- * Package for which tree is to be generated.
- */
- protected PackageDoc packagedoc;
-
- /**
- * The previous package name in the alpha-order list.
- */
- protected PackageDoc prev;
-
- /**
- * The next package name in the alpha-order list.
- */
- protected PackageDoc next;
-
- /**
- * Constructor.
- * @throws IOException
- * @throws DocletAbortException
- */
- public PackageTreeWriter(ConfigurationImpl configuration,
- DocPath path,
- PackageDoc packagedoc,
- PackageDoc prev, PackageDoc next)
- throws IOException {
- super(configuration, path,
- new ClassTree(
- configuration.classDocCatalog.allClasses(packagedoc),
- configuration));
- this.packagedoc = packagedoc;
- this.prev = prev;
- this.next = next;
- }
-
- /**
- * Construct a PackageTreeWriter object and then use it to generate the
- * package tree page.
- *
- * @param pkg Package for which tree file is to be generated.
- * @param prev Previous package in the alpha-ordered list.
- * @param next Next package in the alpha-ordered list.
- * @param noDeprecated If true, do not generate any information for
- * deprecated classe or interfaces.
- * @throws DocletAbortException
- */
- public static void generate(ConfigurationImpl configuration,
- PackageDoc pkg, PackageDoc prev,
- PackageDoc next, boolean noDeprecated) {
- PackageTreeWriter packgen;
- DocPath path = DocPath.forPackage(pkg).resolve(DocPaths.PACKAGE_TREE);
- try {
- packgen = new PackageTreeWriter(configuration, path, pkg,
- prev, next);
- packgen.generatePackageTreeFile();
- packgen.close();
- } catch (IOException exc) {
- configuration.standardmessage.error(
- "doclet.exception_encountered",
- exc.toString(), path.getPath());
- throw new DocletAbortException(exc);
- }
- }
-
- /**
- * Generate a separate tree file for each package.
- */
- protected void generatePackageTreeFile() throws IOException {
- HtmlTree body = getPackageTreeHeader();
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
- ? HtmlTree.MAIN()
- : body;
- Content headContent = getResource("doclet.Hierarchy_For_Package",
- utils.getPackageName(packagedoc));
- Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
- HtmlStyle.title, headContent);
- Content div = HtmlTree.DIV(HtmlStyle.header, heading);
- if (configuration.packages.size() > 1) {
- addLinkToMainTree(div);
- }
- htmlTree.addContent(div);
- HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
- divTree.addStyle(HtmlStyle.contentContainer);
- addTree(classtree.baseclasses(), "doclet.Class_Hierarchy", divTree);
- addTree(classtree.baseinterfaces(), "doclet.Interface_Hierarchy", divTree);
- addTree(classtree.baseAnnotationTypes(), "doclet.Annotation_Type_Hierarchy", divTree);
- addTree(classtree.baseEnums(), "doclet.Enum_Hierarchy", divTree);
- htmlTree.addContent(divTree);
- if (configuration.allowTag(HtmlTag.MAIN)) {
- body.addContent(htmlTree);
- }
- HtmlTree tree = (configuration.allowTag(HtmlTag.FOOTER))
- ? HtmlTree.FOOTER()
- : body;
- addNavLinks(false, tree);
- addBottom(tree);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- body.addContent(tree);
- }
- printHtmlDocument(null, true, body);
- }
-
- /**
- * Get the package tree header.
- *
- * @return a content tree for the header
- */
- protected HtmlTree getPackageTreeHeader() {
- String title = packagedoc.name() + " " +
- configuration.getText("doclet.Window_Class_Hierarchy");
- HtmlTree bodyTree = getBody(true, getWindowTitle(title));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : bodyTree;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- bodyTree.addContent(htmlTree);
- }
- return bodyTree;
- }
-
- /**
- * Add a link to the tree for all the packages.
- *
- * @param div the content tree to which the link will be added
- */
- protected void addLinkToMainTree(Content div) {
- Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
- getResource("doclet.Package_Hierarchies"));
- div.addContent(span);
- HtmlTree ul = new HtmlTree (HtmlTag.UL);
- ul.addStyle(HtmlStyle.horizontal);
- ul.addContent(getNavLinkMainTree(configuration.getText("doclet.All_Packages")));
- div.addContent(ul);
- }
-
- /**
- * Get link for the previous package tree file.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkPrevious() {
- if (prev == null) {
- return getNavLinkPrevious(null);
- } else {
- DocPath path = DocPath.relativePath(packagedoc, prev);
- return getNavLinkPrevious(path.resolve(DocPaths.PACKAGE_TREE));
- }
- }
-
- /**
- * Get link for the next package tree file.
- *
- * @return a content tree for the link
- */
- protected Content getNavLinkNext() {
- if (next == null) {
- return getNavLinkNext(null);
- } else {
- DocPath path = DocPath.relativePath(packagedoc, next);
- return getNavLinkNext(path.resolve(DocPaths.PACKAGE_TREE));
- }
- }
-
- /**
- * Get link to the package summary page for the package of this tree.
- *
- * @return a content tree for the package link
- */
- protected Content getNavLinkPackage() {
- Content linkContent = getHyperLink(DocPaths.PACKAGE_SUMMARY,
- packageLabel);
- Content li = HtmlTree.LI(linkContent);
- return li;
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-import java.util.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Generate package usage information.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert G. Field
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class PackageUseWriter extends SubWriterHolderWriter {
-
- final PackageDoc pkgdoc;
- final SortedMap This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class PackageWriterImpl extends HtmlDocletWriter
- implements PackageSummaryWriter {
-
- /**
- * The prev package name in the alpha-order list.
- */
- protected PackageDoc prev;
-
- /**
- * The next package name in the alpha-order list.
- */
- protected PackageDoc next;
-
- /**
- * The package being documented.
- */
- protected PackageDoc packageDoc;
-
- /**
- * The HTML tree for main tag.
- */
- protected HtmlTree mainTree = HtmlTree.MAIN();
-
- /**
- * The HTML tree for section tag.
- */
- protected HtmlTree sectionTree = HtmlTree.SECTION();
-
- /**
- * Constructor to construct PackageWriter object and to generate
- * "package-summary.html" file in the respective package directory.
- * For example for package "java.lang" this will generate file
- * "package-summary.html" file in the "java/lang" directory. It will also
- * create "java/lang" directory in the current or the destination directory
- * if it doesn't exist.
- *
- * @param configuration the configuration of the doclet.
- * @param packageDoc PackageDoc under consideration.
- * @param prev Previous package in the sorted array.
- * @param next Next package in the sorted array.
- */
- public PackageWriterImpl(ConfigurationImpl configuration,
- PackageDoc packageDoc, PackageDoc prev, PackageDoc next)
- throws IOException {
- super(configuration, DocPath.forPackage(packageDoc).resolve(DocPaths.PACKAGE_SUMMARY));
- this.prev = prev;
- this.next = next;
- this.packageDoc = packageDoc;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getPackageHeader(String heading) {
- HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
- HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
- ? HtmlTree.HEADER()
- : bodyTree;
- addTop(htmlTree);
- addNavLinks(true, htmlTree);
- if (configuration.allowTag(HtmlTag.HEADER)) {
- bodyTree.addContent(htmlTree);
- }
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.header);
- Content annotationContent = new HtmlTree(HtmlTag.P);
- addAnnotationInfo(packageDoc, annotationContent);
- div.addContent(annotationContent);
- Content tHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
- HtmlStyle.title, packageLabel);
- tHeading.addContent(getSpace());
- Content packageHead = new StringContent(heading);
- tHeading.addContent(packageHead);
- div.addContent(tHeading);
- addDeprecationInfo(div);
- if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) {
- HtmlTree docSummaryDiv = new HtmlTree(HtmlTag.DIV);
- docSummaryDiv.addStyle(HtmlStyle.docSummary);
- addSummaryComment(packageDoc, docSummaryDiv);
- div.addContent(docSummaryDiv);
- Content space = getSpace();
- Content descLink = getHyperLink(getDocLink(
- SectionName.PACKAGE_DESCRIPTION),
- descriptionLabel, "", "");
- Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
- div.addContent(descPara);
- }
- if (configuration.allowTag(HtmlTag.MAIN)) {
- mainTree.addContent(div);
- } else {
- bodyTree.addContent(div);
- }
- return bodyTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getContentHeader() {
- HtmlTree div = new HtmlTree(HtmlTag.DIV);
- div.addStyle(HtmlStyle.contentContainer);
- return div;
- }
-
- /**
- * Add the package deprecation information to the documentation tree.
- *
- * @param div the content tree to which the deprecation information will be added
- */
- public void addDeprecationInfo(Content div) {
- Tag[] deprs = packageDoc.tags("deprecated");
- if (utils.isDeprecated(packageDoc)) {
- HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
- deprDiv.addStyle(HtmlStyle.deprecatedContent);
- Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
- deprDiv.addContent(deprPhrase);
- if (deprs.length > 0) {
- Tag[] commentTags = deprs[0].inlineTags();
- if (commentTags.length > 0) {
- addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv);
- }
- }
- div.addContent(deprDiv);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getSummaryHeader() {
- HtmlTree ul = new HtmlTree(HtmlTag.UL);
- ul.addStyle(HtmlStyle.blockList);
- return ul;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addClassesSummary(ClassDoc[] classes, String label,
- String tableSummary, String[] tableHeader, Content summaryContentTree) {
- if(classes.length > 0) {
- Arrays.sort(classes);
- Content caption = getTableCaption(new RawHtml(label));
- Content table = (configuration.isOutputHtml5())
- ? HtmlTree.TABLE(HtmlStyle.typeSummary, caption)
- : HtmlTree.TABLE(HtmlStyle.typeSummary, tableSummary, caption);
- table.addContent(getSummaryTableHeader(tableHeader, "col"));
- Content tbody = new HtmlTree(HtmlTag.TBODY);
- for (int i = 0; i < classes.length; i++) {
- if (!utils.isCoreClass(classes[i]) ||
- !configuration.isGeneratedDoc(classes[i])) {
- continue;
- }
- Content classContent = getLink(new LinkInfoImpl(
- configuration, LinkInfoImpl.Kind.PACKAGE, classes[i]));
- Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent);
- HtmlTree tr = HtmlTree.TR(tdClass);
- if (i%2 == 0)
- tr.addStyle(HtmlStyle.altColor);
- else
- tr.addStyle(HtmlStyle.rowColor);
- HtmlTree tdClassDescription = new HtmlTree(HtmlTag.TD);
- tdClassDescription.addStyle(HtmlStyle.colLast);
- if (utils.isDeprecated(classes[i])) {
- tdClassDescription.addContent(deprecatedLabel);
- if (classes[i].tags("deprecated").length > 0) {
- addSummaryDeprecatedComment(classes[i],
- classes[i].tags("deprecated")[0], tdClassDescription);
- }
- }
- else
- addSummaryComment(classes[i], tdClassDescription);
- tr.addContent(tdClassDescription);
- tbody.addContent(tr);
- }
- table.addContent(tbody);
- Content li = HtmlTree.LI(HtmlStyle.blockList, table);
- summaryContentTree.addContent(li);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPackageDescription(Content packageContentTree) {
- if (packageDoc.inlineTags().length > 0) {
- packageContentTree.addContent(
- getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION));
- Content h2Content = new StringContent(
- configuration.getText("doclet.Package_Description",
- packageDoc.name()));
- Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content);
- if (configuration.allowTag(HtmlTag.SECTION)) {
- sectionTree.addContent(heading);
- addInlineComment(packageDoc, sectionTree);
- } else {
- packageContentTree.addContent(heading);
- addInlineComment(packageDoc, packageContentTree);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPackageTags(Content packageContentTree) {
- Content htmlTree = (configuration.allowTag(HtmlTag.SECTION))
- ? sectionTree
- : packageContentTree;
- addTagsInfo(packageDoc, htmlTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPackageContent(Content contentTree, Content packageContentTree) {
- if (configuration.allowTag(HtmlTag.MAIN)) {
- packageContentTree.addContent(sectionTree);
- mainTree.addContent(packageContentTree);
- contentTree.addContent(mainTree);
- } else {
- contentTree.addContent(packageContentTree);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addPackageFooter(Content contentTree) {
- Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
- ? HtmlTree.FOOTER()
- : contentTree;
- addNavLinks(false, htmlTree);
- addBottom(htmlTree);
- if (configuration.allowTag(HtmlTag.FOOTER)) {
- contentTree.addContent(htmlTree);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void printDocument(Content contentTree) throws IOException {
- printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageDoc),
- true, contentTree);
- }
-
- /**
- * Get "Use" link for this pacakge in the navigation bar.
- *
- * @return a content tree for the class use link
- */
- protected Content getNavLinkClassUse() {
- Content useLink = getHyperLink(DocPaths.PACKAGE_USE,
- useLabel, "", "");
- Content li = HtmlTree.LI(useLink);
- return li;
- }
-
- /**
- * Get "PREV PACKAGE" link in the navigation bar.
- *
- * @return a content tree for the previous link
- */
- public Content getNavLinkPrevious() {
- Content li;
- if (prev == null) {
- li = HtmlTree.LI(prevpackageLabel);
- } else {
- DocPath path = DocPath.relativePath(packageDoc, prev);
- li = HtmlTree.LI(getHyperLink(path.resolve(DocPaths.PACKAGE_SUMMARY),
- prevpackageLabel, "", ""));
- }
- return li;
- }
-
- /**
- * Get "NEXT PACKAGE" link in the navigation bar.
- *
- * @return a content tree for the next link
- */
- public Content getNavLinkNext() {
- Content li;
- if (next == null) {
- li = HtmlTree.LI(nextpackageLabel);
- } else {
- DocPath path = DocPath.relativePath(packageDoc, next);
- li = HtmlTree.LI(getHyperLink(path.resolve(DocPaths.PACKAGE_SUMMARY),
- nextpackageLabel, "", ""));
- }
- return li;
- }
-
- /**
- * Get "Tree" link in the navigation bar. This will be link to the package
- * tree file.
- *
- * @return a content tree for the tree link
- */
- protected Content getNavLinkTree() {
- Content useLink = getHyperLink(DocPaths.PACKAGE_TREE,
- treeLabel, "", "");
- Content li = HtmlTree.LI(useLink);
- return li;
- }
-
- /**
- * Highlight "Package" in the navigation bar, as this is the package page.
- *
- * @return a content tree for the package link
- */
- protected Content getNavLinkPackage() {
- Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, packageLabel);
- return li;
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java
+++ /dev/null
@@ -1,341 +0,0 @@
-/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-/**
- * Writes property documentation in HTML format.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Robert Field
- * @author Atul M Dambalkar
- * @author Jamie Ho (rewrite)
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class PropertyWriterImpl extends AbstractMemberWriter
- implements PropertyWriter, MemberSummaryWriter {
-
- public PropertyWriterImpl(SubWriterHolderWriter writer, ClassDoc classdoc) {
- super(writer, classdoc);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getMemberSummaryHeader(ClassDoc classDoc,
- Content memberSummaryTree) {
- memberSummaryTree.addContent(HtmlConstants.START_OF_PROPERTY_SUMMARY);
- Content memberTree = writer.getMemberTreeHeader();
- writer.addSummaryHeader(this, classDoc, memberTree);
- return memberTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addMemberTree(Content memberSummaryTree, Content memberTree) {
- writer.addMemberTree(memberSummaryTree, memberTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getPropertyDetailsTreeHeader(ClassDoc classDoc,
- Content memberDetailsTree) {
- memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS);
- Content propertyDetailsTree = writer.getMemberTreeHeader();
- propertyDetailsTree.addContent(writer.getMarkerAnchor(
- SectionName.PROPERTY_DETAIL));
- Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
- writer.propertyDetailsLabel);
- propertyDetailsTree.addContent(heading);
- return propertyDetailsTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getPropertyDocTreeHeader(MethodDoc property,
- Content propertyDetailsTree) {
- propertyDetailsTree.addContent(
- writer.getMarkerAnchor(property.name()));
- Content propertyDocTree = writer.getMemberTreeHeader();
- Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
- heading.addContent(property.name().substring(0, property.name().lastIndexOf("Property")));
- propertyDocTree.addContent(heading);
- return propertyDocTree;
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getSignature(MethodDoc property) {
- Content pre = new HtmlTree(HtmlTag.PRE);
- writer.addAnnotationInfo(property, pre);
- addModifiers(property, pre);
- Content propertylink = writer.getLink(new LinkInfoImpl(
- configuration, LinkInfoImpl.Kind.MEMBER,
- property.returnType()));
- pre.addContent(propertylink);
- pre.addContent(" ");
- if (configuration.linksource) {
- Content propertyName = new StringContent(property.name());
- writer.addSrcLink(property, propertyName, pre);
- } else {
- addName(property.name(), pre);
- }
- return pre;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addDeprecated(MethodDoc property, Content propertyDocTree) {
- }
-
- /**
- * {@inheritDoc}
- */
- public void addComments(MethodDoc property, Content propertyDocTree) {
- ClassDoc holder = property.containingClass();
- if (property.inlineTags().length > 0) {
- if (holder.equals(classdoc) ||
- (! (holder.isPublic() || utils.isLinkable(holder, configuration)))) {
- writer.addInlineComment(property, propertyDocTree);
- } else {
- Content link =
- writer.getDocLink(LinkInfoImpl.Kind.PROPERTY_DOC_COPY,
- holder, property,
- holder.isIncluded() ?
- holder.typeName() : holder.qualifiedTypeName(),
- false);
- Content codeLink = HtmlTree.CODE(link);
- Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel, holder.isClass()?
- writer.descfrmClassLabel : writer.descfrmInterfaceLabel);
- descfrmLabel.addContent(writer.getSpace());
- descfrmLabel.addContent(codeLink);
- propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
- writer.addInlineComment(property, propertyDocTree);
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- public void addTags(MethodDoc property, Content propertyDocTree) {
- writer.addTagsInfo(property, propertyDocTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getPropertyDetails(Content propertyDetailsTree) {
- if (configuration.allowTag(HtmlTag.SECTION)) {
- HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(propertyDetailsTree));
- return htmlTree;
- }
- return getMemberTree(propertyDetailsTree);
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getPropertyDoc(Content propertyDocTree,
- boolean isLastContent) {
- return getMemberTree(propertyDocTree, isLastContent);
- }
-
- /**
- * Close the writer.
- */
- public void close() throws IOException {
- writer.close();
- }
-
- public int getMemberKind() {
- return VisibleMemberMap.PROPERTIES;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryLabel(Content memberTree) {
- Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
- writer.getResource("doclet.Property_Summary"));
- memberTree.addContent(label);
- }
-
- /**
- * {@inheritDoc}
- */
- public String getTableSummary() {
- return configuration.getText("doclet.Member_Table_Summary",
- configuration.getText("doclet.Property_Summary"),
- configuration.getText("doclet.properties"));
- }
-
- /**
- * {@inheritDoc}
- */
- public Content getCaption() {
- return configuration.getResource("doclet.Properties");
- }
-
- /**
- * {@inheritDoc}
- */
- public String[] getSummaryTableHeader(ProgramElementDoc member) {
- String[] header = new String[] {
- configuration.getText("doclet.Type"),
- configuration.getText("doclet.0_and_1",
- configuration.getText("doclet.Property"),
- configuration.getText("doclet.Description"))
- };
- return header;
- }
-
- /**
- * {@inheritDoc}
- */
- public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
- memberTree.addContent(writer.getMarkerAnchor(
- SectionName.PROPERTY_SUMMARY));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
- inheritedTree.addContent(writer.getMarkerAnchor(
- SectionName.PROPERTIES_INHERITANCE,
- configuration.getClassName(cd)));
- }
-
- /**
- * {@inheritDoc}
- */
- public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
- Content classLink = writer.getPreQualifiedClassLink(
- LinkInfoImpl.Kind.MEMBER, cd, false);
- Content label = new StringContent(cd.isClass() ?
- configuration.getText("doclet.Properties_Inherited_From_Class") :
- configuration.getText("doclet.Properties_Inherited_From_Interface"));
- Content labelHeading = HtmlTree.HEADING(HtmlConstants.INHERITED_SUMMARY_HEADING,
- label);
- labelHeading.addContent(writer.getSpace());
- labelHeading.addContent(classLink);
- inheritedTree.addContent(labelHeading);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
- Content tdSummary) {
- Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
- writer.getDocLink(context, cd,
- (MemberDoc) member,
- member.name().substring(0, member.name().lastIndexOf("Property")),
- false,
- true));
-
- Content code = HtmlTree.CODE(memberLink);
- tdSummary.addContent(code);
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addInheritedSummaryLink(ClassDoc cd,
- ProgramElementDoc member, Content linksTree) {
- linksTree.addContent(
- writer.getDocLink(LinkInfoImpl.Kind.MEMBER, cd, (MemberDoc)member,
- ((member.name().lastIndexOf("Property") != -1) && configuration.javafx)
- ? member.name().substring(0, member.name().length() - "Property".length())
- : member.name(),
- false, true));
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
- MethodDoc property = (MethodDoc)member;
- addModifierAndType(property, property.returnType(), tdSummaryType);
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getDeprecatedLink(ProgramElementDoc member) {
- return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
- (MemberDoc) member, ((MethodDoc)member).qualifiedName());
- }
-
- /**
- * {@inheritDoc}
- */
- protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
- if (link) {
- if (cd == null) {
- return writer.getHyperLink(
- SectionName.PROPERTY_SUMMARY,
- writer.getResource("doclet.navProperty"));
- } else {
- return writer.getHyperLink(
- SectionName.PROPERTIES_INHERITANCE,
- configuration.getClassName(cd), writer.getResource("doclet.navProperty"));
- }
- } else {
- return writer.getResource("doclet.navProperty");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- protected void addNavDetailLink(boolean link, Content liNav) {
- if (link) {
- liNav.addContent(writer.getHyperLink(
- SectionName.PROPERTY_DETAIL,
- writer.getResource("doclet.navProperty")));
- } else {
- liNav.addContent(writer.getResource("doclet.navProperty"));
- }
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SearchIndexItem.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SearchIndexItem.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SearchIndexItem.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-/**
- * Index item for search.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- */
-@Deprecated
-public class SearchIndexItem {
-
- private String label = "";
- private String url = "";
- private String category = "";
- private String containingPackage = "";
- private String containingClass = "";
- private String holder = "";
- private String description = "";
-
- public void setLabel(String l) {
- label = l;
- }
-
- public String getLabel() {
- return label;
- }
-
- public void setUrl(String u) {
- url = u;
- }
-
- public String getUrl() {
- return url;
- }
-
- public void setContainingPackage(String p) {
- containingPackage = p;
- }
-
- public void setContainingClass(String c) {
- containingClass = c;
- }
-
- public void setCategory(String c) {
- category = c;
- }
-
- public void setHolder(String h) {
- holder = h;
- }
-
- public String getHolder() {
- return holder;
- }
-
- public void setDescription(String d) {
- description = d;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String toString() {
- StringBuilder item = new StringBuilder("");
- if (category.equals("Packages")) {
- item.append("{")
- .append("\"l\":\"").append(label).append("\"")
- .append("}");
- } else if (category.equals("Types")) {
- item.append("{")
- .append("\"p\":\"").append(containingPackage).append("\",")
- .append("\"l\":\"").append(label).append("\"")
- .append("}");
- } else if (category.equals("Members")) {
- item.append("{")
- .append("\"p\":\"").append(containingPackage).append("\",")
- .append("\"c\":\"").append(containingClass).append("\",")
- .append("\"l\":\"").append(label).append("\"");
- if (!url.equals("")) {
- item.append(",\"url\":\"").append(url).append("\"");
- }
- item.append("}");
- } else {
- item.append("{")
- .append("\"l\":\"").append(label).append("\",")
- .append("\"h\":\"").append(holder).append("\",");
- if (!description.equals("")) {
- item.append("\"d\":\"").append(description).append("\",");
- }
- item.append("\"u\":\"").append(url).append("\"")
- .append("}");
- }
- return item.toString();
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SectionName.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SectionName.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SectionName.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-/**
- * Enum representing various section names of generated API documentation.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Bhavesh Patel
- */
-@Deprecated
-public enum SectionName {
-
- ANNOTATION_TYPE_ELEMENT_DETAIL("annotation.type.element.detail"),
- ANNOTATION_TYPE_FIELD_DETAIL("annotation.type.field.detail"),
- ANNOTATION_TYPE_FIELD_SUMMARY("annotation.type.field.summary"),
- ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY("annotation.type.optional.element.summary"),
- ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY("annotation.type.required.element.summary"),
- CONSTRUCTOR_DETAIL("constructor.detail"),
- CONSTRUCTOR_SUMMARY("constructor.summary"),
- ENUM_CONSTANT_DETAIL("enum.constant.detail"),
- ENUM_CONSTANTS_INHERITANCE("enum.constants.inherited.from.class."),
- ENUM_CONSTANT_SUMMARY("enum.constant.summary"),
- FIELD_DETAIL("field.detail"),
- FIELDS_INHERITANCE("fields.inherited.from.class."),
- FIELD_SUMMARY("field.summary"),
- METHOD_DETAIL("method.detail"),
- METHODS_INHERITANCE("methods.inherited.from.class."),
- METHOD_SUMMARY("method.summary"),
- NAVBAR_BOTTOM("navbar.bottom"),
- NAVBAR_BOTTOM_FIRSTROW("navbar.bottom.firstrow"),
- NAVBAR_TOP("navbar.top"),
- NAVBAR_TOP_FIRSTROW("navbar.top.firstrow"),
- NESTED_CLASSES_INHERITANCE("nested.classes.inherited.from.class."),
- NESTED_CLASS_SUMMARY("nested.class.summary"),
- OVERVIEW_DESCRIPTION("overview.description"),
- PACKAGE_DESCRIPTION("package.description"),
- PROPERTY_DETAIL("property.detail"),
- PROPERTIES_INHERITANCE("properties.inherited.from.class."),
- PROPERTY_SUMMARY("property.summary"),
- SKIP_NAVBAR_BOTTOM("skip.navbar.bottom"),
- SKIP_NAVBAR_TOP("skip.navbar.top"),
- UNNAMED_PACKAGE_ANCHOR("unnamed.package");
-
- private final String value;
-
- SectionName(String sName) {
- this.value = sName;
- }
-
- public String getName() {
- return this.value;
- }
-}
diff --git a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java
deleted file mode 100644
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java
+++ /dev/null
@@ -1,296 +0,0 @@
-/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.tools.doclets.formats.html;
-
-import java.io.*;
-import java.util.*;
-
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.DocPaths;
-import com.sun.tools.doclets.internal.toolkit.util.DocletAbortException;
-
-/**
- * Generate the Serialized Form Information Page.
- *
- * This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @author Atul M Dambalkar
- */
-@Deprecated
-public class SerializedFormWriterImpl extends SubWriterHolderWriter
- implements SerializedFormWriter {
-
- List This is NOT part of any supported API.
- * If you write code that depends on this, you do so at your own risk.
- * This code and its internal interfaces are subject to change or
- * deletion without notice.
- *
- * @see java.lang.Character
- * @author Atul M Dambalkar
- * @author Bhavesh Patel (Modified)
- */
-@Deprecated
-public class SingleIndexWriter extends AbstractIndexWriter {
-
- private ListProgramElement
is inherited
- * by the class that is being documented.
- *
- * @param ped The ProgramElement
being checked.
- * return true if the ProgramElement
is being inherited and
- * false otherwise.
- */
- protected boolean isInherited(ProgramElementDoc ped){
- if(ped.isPrivate() || (ped.isPackagePrivate() &&
- ! ped.containingPackage().equals(classdoc.containingPackage()))){
- return false;
- }
- return true;
- }
-
- /**
- * Add deprecated information to the documentation tree
- *
- * @param deprmembers list of deprecated members
- * @param headingKey the caption for the deprecated members table
- * @param tableSummary the summary for the deprecated members table
- * @param tableHeader table headers for the deprecated members table
- * @param contentTree the content tree to which the deprecated members table will be added
- */
- protected void addDeprecatedAPI(List
- * The options arrive as case-sensitive strings. For options that
- * are not case-sensitive, use toLowerCase() on the option string
- * before comparing it.
- *
- * @return number of arguments + 1 for a option. Zero return means
- * option not known. Negative value means error occurred.
- */
- public int optionLength(String option) {
- int result = -1;
- if ((result = super.optionLength(option)) > 0) {
- return result;
- }
- // otherwise look for the options we have added
- option = StringUtils.toLowerCase(option);
- if (option.equals("-nodeprecatedlist") ||
- option.equals("-noindex") ||
- option.equals("-notree") ||
- option.equals("-nohelp") ||
- option.equals("-splitindex") ||
- option.equals("-serialwarn") ||
- option.equals("-use") ||
- option.equals("-nonavbar") ||
- option.equals("-nooverview") ||
- option.equals("-html4") ||
- option.equals("-html5") ||
- option.equals("-xdoclint") ||
- option.startsWith("-xdoclint:") ||
- option.startsWith("-xdoclint/package:") ||
- option.startsWith("--allow-script-in-comments")) {
- return 1;
- } else if (option.equals("-help")) {
- // Uugh: first, this should not be hidden inside optionLength,
- // and second, we should not be writing directly to stdout.
- // But we have no access to a DocErrorReporter, which would
- // allow use of reporter.printNotice
- System.out.println(getText("doclet.usage"));
- return 1;
- } else if (option.equals("-x")) {
- // Uugh: first, this should not be hidden inside optionLength,
- // and second, we should not be writing directly to stdout.
- // But we have no access to a DocErrorReporter, which would
- // allow use of reporter.printNotice
- System.out.println(getText("doclet.X.usage"));
- return 1;
- } else if (option.equals("-footer") ||
- option.equals("-header") ||
- option.equals("-packagesheader") ||
- option.equals("-doctitle") ||
- option.equals("-windowtitle") ||
- option.equals("-top") ||
- option.equals("-bottom") ||
- option.equals("-helpfile") ||
- option.equals("-stylesheetfile") ||
- option.equals("-charset") ||
- option.equals("-overview") ||
- option.equals("-xdocrootparent")) {
- return 2;
- } else {
- return 0;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean validOptions(String options[][],
- DocErrorReporter reporter) {
- boolean helpfile = false;
- boolean nohelp = false;
- boolean overview = false;
- boolean nooverview = false;
- boolean splitindex = false;
- boolean noindex = false;
- // check shared options
- if (!generalValidOptions(options, reporter)) {
- return false;
- }
- // otherwise look at our options
- for (int oi = 0; oi < options.length; ++oi) {
- String[] os = options[oi];
- String opt = StringUtils.toLowerCase(os[0]);
- if (opt.equals("-helpfile")) {
- if (nohelp == true) {
- reporter.printError(getText("doclet.Option_conflict",
- "-helpfile", "-nohelp"));
- return false;
- }
- if (helpfile == true) {
- reporter.printError(getText("doclet.Option_reuse",
- "-helpfile"));
- return false;
- }
- DocFile help = DocFile.createFileForInput(this, os[1]);
- if (!help.exists()) {
- reporter.printError(getText("doclet.File_not_found", os[1]));
- return false;
- }
- helpfile = true;
- } else if (opt.equals("-nohelp")) {
- if (helpfile == true) {
- reporter.printError(getText("doclet.Option_conflict",
- "-nohelp", "-helpfile"));
- return false;
- }
- nohelp = true;
- } else if (opt.equals("-xdocrootparent")) {
- try {
- new URL(os[1]);
- } catch (MalformedURLException e) {
- reporter.printError(getText("doclet.MalformedURL", os[1]));
- return false;
- }
- } else if (opt.equals("-overview")) {
- if (nooverview == true) {
- reporter.printError(getText("doclet.Option_conflict",
- "-overview", "-nooverview"));
- return false;
- }
- if (overview == true) {
- reporter.printError(getText("doclet.Option_reuse",
- "-overview"));
- return false;
- }
- overview = true;
- } else if (opt.equals("-nooverview")) {
- if (overview == true) {
- reporter.printError(getText("doclet.Option_conflict",
- "-nooverview", "-overview"));
- return false;
- }
- nooverview = true;
- } else if (opt.equals("-splitindex")) {
- if (noindex == true) {
- reporter.printError(getText("doclet.Option_conflict",
- "-splitindex", "-noindex"));
- return false;
- }
- splitindex = true;
- } else if (opt.equals("-noindex")) {
- if (splitindex == true) {
- reporter.printError(getText("doclet.Option_conflict",
- "-noindex", "-splitindex"));
- return false;
- }
- noindex = true;
- } else if (opt.startsWith("-xdoclint:")) {
- if (opt.contains("/")) {
- reporter.printError(getText("doclet.Option_doclint_no_qualifiers"));
- return false;
- }
- if (!DocLint.isValidOption(
- opt.replace("-xdoclint:", DocLint.XMSGS_CUSTOM_PREFIX))) {
- reporter.printError(getText("doclet.Option_doclint_invalid_arg"));
- return false;
- }
- } else if (opt.startsWith("-xdoclint/package:")) {
- if (!DocLint.isValidOption(
- opt.replace("-xdoclint/package:", DocLint.XCHECK_PACKAGE))) {
- reporter.printError(getText("doclet.Option_doclint_package_invalid_arg"));
- return false;
- }
- }
- }
- return true;
- }
-
- /**
- * Return true if the generated output is HTML5.
- */
- public boolean isOutputHtml5() {
- return htmlVersion == HtmlVersion.HTML5;
- }
-
- /**
- * Return true if the tag is allowed for this specific version of HTML.
- */
- public boolean allowTag(HtmlTag htmlTag) {
- return htmlTag.allowTag(this.htmlVersion);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public MessageRetriever getDocletSpecificMsg() {
- return standardmessage;
- }
-
- /**
- * Decide the page which will appear first in the right-hand frame. It will
- * be "overview-summary.html" if "-overview" option is used or no
- * "-overview" but the number of packages is more than one. It will be
- * "package-summary.html" of the respective package if there is only one
- * package to document. It will be a class page(first in the sorted order),
- * if only classes are provided on the command line.
- *
- * @param root Root of the program structure.
- */
- protected void setTopFile(RootDoc root) {
- if (!checkForDeprecation(root)) {
- return;
- }
- if (createoverview) {
- topFile = DocPaths.OVERVIEW_SUMMARY;
- } else {
- if (packages.size() == 1 && packages.first().name().equals("")) {
- if (root.classes().length > 0) {
- ClassDoc[] classarr = root.classes();
- Arrays.sort(classarr);
- ClassDoc cd = getValidClass(classarr);
- topFile = DocPath.forClass(cd);
- }
- } else if (!packages.isEmpty()) {
- topFile = DocPath.forPackage(packages.first()).resolve(DocPaths.PACKAGE_SUMMARY);
- }
- }
- }
-
- protected ClassDoc getValidClass(ClassDoc[] classarr) {
- if (!nodeprecated) {
- return classarr[0];
- }
- for (ClassDoc cd : classarr) {
- if (cd.tags("deprecated").length == 0) {
- return cd;
- }
- }
- return null;
- }
-
- protected boolean checkForDeprecation(RootDoc root) {
- for (ClassDoc cd : root.classes()) {
- if (isGeneratedDoc(cd)) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * Generate "overview.html" page if option "-overview" is used or number of
- * packages is more than one. Sets {@link #createoverview} field to true.
- */
- protected void setCreateOverview() {
- if ((overview || packages.size() > 1) && !nooverview) {
- createoverview = true;
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public WriterFactory getWriterFactory() {
- return new WriterFactoryImpl(this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Comparatorserial
and
- * serialField
is processed.
- *
- * serialData
tag is processed.
- *
- *