changeset 3234:3f60a4808377 jdk-9+104

Merge
author lana
date Thu, 28 Jan 2016 15:42:06 -0800
parents 91bf4c9a4806 (current diff) b5d08bc0d224 (diff)
children d10e29115134 d3411a81ad65
files src/jdk.javadoc/share/classes/com/sun/tools/javadoc/api/JavadocTaskImpl.java src/jdk.javadoc/share/classes/com/sun/tools/javadoc/api/JavadocTool.java test/tools/javadoc/api/basic/JavadocTaskImplTest.java test/tools/javadoc/api/basic/RunTest.java test/tools/javadoc/doclint/DocLintTest.java test/tools/javadoc/doclint/ImplicitHeadersTest.java
diffstat 1022 files changed, 130645 insertions(+), 1038 deletions(-) [+]
line wrap: on
line diff
--- a/make/CompileInterim.gmk	Thu Jan 28 09:43:12 2016 -0800
+++ b/make/CompileInterim.gmk	Thu Jan 28 15:42:06 2016 -0800
@@ -46,7 +46,7 @@
       $(SUPPORT_OUTPUTDIR)/gensrc/jdk.compiler \
       $(SUPPORT_OUTPUTDIR)/gensrc/jdk.javadoc \
       $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdeps, \
-    EXCLUDES := sun jdk, \
+    EXCLUDES := sun, \
     COPY := .gif .png .xml .css .js javax.tools.JavaCompilerTool, \
     BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_interim_classes, \
     JAR := $(INTERIM_LANGTOOLS_JAR)))
--- a/make/gensrc/Gensrc-jdk.javadoc.gmk	Thu Jan 28 09:43:12 2016 -0800
+++ b/make/gensrc/Gensrc-jdk.javadoc.gmk	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 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
@@ -25,8 +25,11 @@
 
 include GensrcCommon.gmk
 
+$(eval $(call SetupVersionProperties,OLD_JAVADOC_VERSION,\
+    com/sun/tools/javadoc/resources/version.properties))
+
 $(eval $(call SetupVersionProperties,JAVADOC_VERSION,\
-    com/sun/tools/javadoc/resources/version.properties))
+    jdk/javadoc/internal/tool/resources/version.properties))
 
 $(eval $(call SetupCompileProperties,COMPILE_PROPERTIES, $(JAVADOC_VERSION)))
 
--- a/make/netbeans/langtools/build.xml	Thu Jan 28 09:43:12 2016 -0800
+++ b/make/netbeans/langtools/build.xml	Thu Jan 28 15:42:06 2016 -0800
@@ -93,7 +93,11 @@
         <macrodef name="resolve-main-class">
           <attribute name="tool.name"/>
           <sequential>
-            <property name="langtools.main.class" value="${tool.@{tool.name}.main.class}"/>
+            <condition property="langtools.main.class"
+                    value="jdk.javadoc.internal.tool.Main"
+                    else="${tool.@{tool.name}.main.class}">
+                <equals arg1="${langtools.tool.name}" arg2="javadoc"/>
+            </condition>
           </sequential>
         </macrodef>
     </target>
--- a/src/java.compiler/share/classes/javax/tools/ToolProvider.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/java.compiler/share/classes/javax/tools/ToolProvider.java	Thu Jan 28 15:42:06 2016 -0800
@@ -104,7 +104,7 @@
     }
 
     private static final String systemDocumentationToolName
-        = "com.sun.tools.javadoc.api.JavadocTool";
+        = "jdk.javadoc.internal.api.JavadocTool";
 
     /**
      * Returns the Java&trade; programming language documentation tool provided
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Jan 28 15:42:06 2016 -0800
@@ -26,9 +26,7 @@
 package com.sun.tools.javac.code;
 
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
-import java.util.Set;
 
 import javax.lang.model.element.ElementVisitor;
 import javax.tools.JavaFileObject;
@@ -39,7 +37,6 @@
 import com.sun.tools.javac.code.Symbol.Completer;
 import com.sun.tools.javac.code.Symbol.CompletionFailure;
 import com.sun.tools.javac.code.Symbol.MethodSymbol;
-import com.sun.tools.javac.code.Symbol.OperatorSymbol;
 import com.sun.tools.javac.code.Symbol.PackageSymbol;
 import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Symbol.VarSymbol;
@@ -50,7 +47,6 @@
 import com.sun.tools.javac.code.Type.JCVoidType;
 import com.sun.tools.javac.code.Type.MethodType;
 import com.sun.tools.javac.code.Type.UnknownType;
-import com.sun.tools.javac.jvm.ByteCodes;
 import com.sun.tools.javac.jvm.Target;
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.Context;
@@ -65,7 +61,6 @@
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.Kind.*;
-import static com.sun.tools.javac.jvm.ByteCodes.*;
 import static com.sun.tools.javac.code.TypeTag.*;
 
 /** A class that defines all predefined constants and operators
@@ -193,6 +188,7 @@
     public final Type autoCloseableType;
     public final Type trustMeType;
     public final Type lambdaMetafactory;
+    public final Type stringConcatFactory;
     public final Type repeatableType;
     public final Type documentedType;
     public final Type elementTypeType;
@@ -472,6 +468,7 @@
         trustMeType = enterClass("java.lang.SafeVarargs");
         nativeHeaderType = enterClass("java.lang.annotation.Native");
         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
+        stringConcatFactory = enterClass("java.lang.invoke.StringConcatFactory");
         functionalInterfaceType = enterClass("java.lang.FunctionalInterface");
 
         synthesizeEmptyInterfaceIfMissing(autoCloseableType);
@@ -479,6 +476,7 @@
         synthesizeEmptyInterfaceIfMissing(serializableType);
         synthesizeEmptyInterfaceIfMissing(lambdaMetafactory);
         synthesizeEmptyInterfaceIfMissing(serializedLambdaType);
+        synthesizeEmptyInterfaceIfMissing(stringConcatFactory);
         synthesizeBoxTypeIfMissing(doubleType);
         synthesizeBoxTypeIfMissing(floatType);
         synthesizeBoxTypeIfMissing(voidType);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/ArgumentAttr.java	Thu Jan 28 15:42:06 2016 -0800
@@ -68,6 +68,7 @@
 import java.util.function.Function;
 import java.util.function.Supplier;
 
+import static com.sun.tools.javac.code.TypeTag.ARRAY;
 import static com.sun.tools.javac.code.TypeTag.DEFERRED;
 import static com.sun.tools.javac.code.TypeTag.FORALL;
 import static com.sun.tools.javac.code.TypeTag.METHOD;
@@ -275,7 +276,7 @@
                 res.type != null && res.type.hasTag(FORALL) ||
                 (res.flags() & Flags.VARARGS) != 0 ||
                 (TreeInfo.isStaticSelector(exprTree, tree.name.table.names) &&
-                exprTree.type.isRaw())) {
+                exprTree.type.isRaw() && !exprTree.type.hasTag(ARRAY))) {
             tree.overloadKind = JCMemberReference.OverloadKind.OVERLOADED;
         } else {
             tree.overloadKind = JCMemberReference.OverloadKind.UNOVERLOADED;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Jan 28 15:42:06 2016 -0800
@@ -239,7 +239,7 @@
             //this means we are dealing with a partially inferred poly expression
             owntype = shouldCheck ? resultInfo.pt : found;
             if (resultInfo.checkMode.installPostInferenceHook()) {
-                inferenceContext.addFreeTypeListener(List.of(found, resultInfo.pt),
+                inferenceContext.addFreeTypeListener(List.of(found),
                         instantiatedContext -> {
                             ResultInfo pendingResult =
                                     resultInfo.dup(inferenceContext.asInstType(resultInfo.pt));
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1812,7 +1812,7 @@
 
             TranslationContext(T tree) {
                 this.tree = tree;
-                this.owner = owner();
+                this.owner = owner(true);
                 this.depth = frameStack.size() - 1;
                 this.prev = context();
                 ClassSymbol csym =
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Jan 28 15:42:06 2016 -0800
@@ -25,8 +25,6 @@
 
 package com.sun.tools.javac.jvm;
 
-import java.util.*;
-
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.List;
@@ -45,7 +43,6 @@
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.Kind.*;
-import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
 import static com.sun.tools.javac.code.TypeTag.*;
 import static com.sun.tools.javac.jvm.ByteCodes.*;
 import static com.sun.tools.javac.jvm.CRTFlags.*;
@@ -69,12 +66,12 @@
     private final TreeMaker make;
     private final Names names;
     private final Target target;
-    private final Map<Type,Symbol> stringBufferAppend;
     private Name accessDollar;
     private final Types types;
     private final Lower lower;
     private final Flow flow;
     private final Annotate annotate;
+    private final StringConcat concat;
 
     /** Format of stackmap tables to be generated. */
     private final Code.StackMapFormat stackMap;
@@ -105,8 +102,9 @@
         make = TreeMaker.instance(context);
         target = Target.instance(context);
         types = Types.instance(context);
+        concat = StringConcat.instance(context);
+
         methodType = new MethodType(null, null, null, syms.methodClass);
-        stringBufferAppend = new HashMap<>();
         accessDollar = names.
             fromString("access" + target.syntheticNameChar());
         flow = Flow.instance(context);
@@ -753,6 +751,18 @@
         }
     }
 
+    public Code getCode() {
+        return code;
+    }
+
+    public Items getItems() {
+        return items;
+    }
+
+    public Env<AttrContext> getAttrEnv() {
+        return attrEnv;
+    }
+
     /** Visitor class for expressions which might be constant expressions.
      *  This class is a subset of TreeScanner. Intended to visit trees pruned by
      *  Lower as long as constant expressions looking for references to any
@@ -1895,25 +1905,7 @@
         OperatorSymbol operator = (OperatorSymbol) tree.operator;
         Item l;
         if (operator.opcode == string_add) {
-            // Generate code to make a string buffer
-            makeStringBuffer(tree.pos());
-
-            // Generate code for first string, possibly save one
-            // copy under buffer
-            l = genExpr(tree.lhs, tree.lhs.type);
-            if (l.width() > 0) {
-                code.emitop0(dup_x1 + 3 * (l.width() - 1));
-            }
-
-            // Load first string and append to buffer.
-            l.load();
-            appendString(tree.lhs);
-
-            // Append all other strings to buffer.
-            appendStrings(tree.rhs);
-
-            // Convert buffer to string.
-            bufferToString(tree.pos());
+            l = concat.makeConcat(tree);
         } else {
             // Generate code for first expression
             l = genExpr(tree.lhs, tree.lhs.type);
@@ -2026,13 +2018,7 @@
     public void visitBinary(JCBinary tree) {
         OperatorSymbol operator = (OperatorSymbol)tree.operator;
         if (operator.opcode == string_add) {
-            // Create a string buffer.
-            makeStringBuffer(tree.pos());
-            // Append all strings to buffer.
-            appendStrings(tree);
-            // Convert buffer to string.
-            bufferToString(tree.pos());
-            result = items.makeStackItem(syms.stringType);
+            result = concat.makeConcat(tree);
         } else if (tree.hasTag(AND)) {
             CondItem lcond = genCond(tree.lhs, CRT_FLOW_CONTROLLER);
             if (!lcond.isFalse()) {
@@ -2066,67 +2052,7 @@
             result = completeBinop(tree.lhs, tree.rhs, operator);
         }
     }
-//where
-        /** Make a new string buffer.
-         */
-        void makeStringBuffer(DiagnosticPosition pos) {
-            code.emitop2(new_, makeRef(pos, syms.stringBuilderType));
-            code.emitop0(dup);
-            callMethod(
-                    pos, syms.stringBuilderType, names.init, List.<Type>nil(), false);
-        }
 
-        /** Append value (on tos) to string buffer (on tos - 1).
-         */
-        void appendString(JCTree tree) {
-            Type t = tree.type.baseType();
-            if (!t.isPrimitive() && t.tsym != syms.stringType.tsym) {
-                t = syms.objectType;
-            }
-            items.makeMemberItem(getStringBufferAppend(tree, t), false).invoke();
-        }
-        Symbol getStringBufferAppend(JCTree tree, Type t) {
-            Assert.checkNull(t.constValue());
-            Symbol method = stringBufferAppend.get(t);
-            if (method == null) {
-                method = rs.resolveInternalMethod(tree.pos(),
-                                                  attrEnv,
-                                                  syms.stringBuilderType,
-                                                  names.append,
-                                                  List.of(t),
-                                                  null);
-                stringBufferAppend.put(t, method);
-            }
-            return method;
-        }
-
-        /** Add all strings in tree to string buffer.
-         */
-        void appendStrings(JCTree tree) {
-            tree = TreeInfo.skipParens(tree);
-            if (tree.hasTag(PLUS) && tree.type.constValue() == null) {
-                JCBinary op = (JCBinary) tree;
-                if (op.operator.kind == MTH &&
-                    ((OperatorSymbol) op.operator).opcode == string_add) {
-                    appendStrings(op.lhs);
-                    appendStrings(op.rhs);
-                    return;
-                }
-            }
-            genExpr(tree, tree.type).load();
-            appendString(tree);
-        }
-
-        /** Convert string buffer on tos to string.
-         */
-        void bufferToString(DiagnosticPosition pos) {
-            callMethod(
-                    pos,
-                    syms.stringBuilderType,
-                    names.toString,
-                    List.<Type>nil(),
-                    false);
-        }
 
         /** Complete generating code for operation, with left operand
          *  already on stack.
@@ -2173,8 +2099,8 @@
         }
 
     public void visitTypeCast(JCTypeCast tree) {
+        result = genExpr(tree.expr, tree.clazz.type).load();
         setTypeAnnotationPositions(tree.pos);
-        result = genExpr(tree.expr, tree.clazz.type).load();
         // Additional code is only needed if we cast to a reference type
         // which is not statically a supertype of the expression's type.
         // For basic types, the coerce(...) in genExpr(...) will do
@@ -2191,8 +2117,8 @@
     }
 
     public void visitTypeTest(JCInstanceOf tree) {
+        genExpr(tree.expr, tree.expr.type).load();
         setTypeAnnotationPositions(tree.pos);
-        genExpr(tree.expr, tree.expr.type).load();
         code.emitop2(instanceof_, makeRef(tree.pos(), tree.clazz.type));
         result = items.makeStackItem(syms.booleanType);
     }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/StringConcat.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,485 @@
+/*
+ * Copyright (c) 2015, 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.javac.jvm;
+
+import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.comp.Resolve;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.TreeInfo;
+import com.sun.tools.javac.tree.TreeMaker;
+import com.sun.tools.javac.util.*;
+
+import static com.sun.tools.javac.code.Kinds.Kind.MTH;
+import static com.sun.tools.javac.code.TypeTag.DOUBLE;
+import static com.sun.tools.javac.code.TypeTag.LONG;
+import static com.sun.tools.javac.jvm.ByteCodes.*;
+import static com.sun.tools.javac.tree.JCTree.Tag.PLUS;
+import com.sun.tools.javac.jvm.Items.*;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/** This lowers the String concatenation to something that JVM can understand.
+ *
+ *  <p><b>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.</b>
+ */
+public abstract class StringConcat {
+
+    /**
+     * Maximum number of slots for String Concat call.
+     * JDK's StringConcatFactory does not support more than that.
+     */
+    private static final int MAX_INDY_CONCAT_ARG_SLOTS = 200;
+    private static final char TAG_ARG   = '\u0001';
+    private static final char TAG_CONST = '\u0002';
+
+    protected final Gen gen;
+    protected final Symtab syms;
+    protected final Names names;
+    protected final TreeMaker make;
+    protected final Types types;
+    protected final Map<Type, Symbol> sbAppends;
+    protected final Resolve rs;
+
+    protected static final Context.Key<StringConcat> concatKey = new Context.Key<>();
+
+    public static StringConcat instance(Context context) {
+        StringConcat instance = context.get(concatKey);
+        if (instance == null) {
+            instance = makeConcat(context);
+        }
+        return instance;
+    }
+
+    private static StringConcat makeConcat(Context context) {
+        Target target = Target.instance(context);
+        String opt = Options.instance(context).get("stringConcat");
+        if (target.hasStringConcatFactory()) {
+            if (opt == null) {
+                opt = "indyWithConstants";
+            }
+        } else {
+            if (opt != null && !"inline".equals(opt)) {
+                Assert.error("StringConcatFactory-based string concat is requested on a platform that does not support it.");
+            }
+            opt = "inline";
+        }
+
+        switch (opt) {
+            case "inline":
+                return new Inline(context);
+            case "indy":
+                return new IndyPlain(context);
+            case "indyWithConstants":
+                return new IndyConstants(context);
+            default:
+                Assert.error("Unknown stringConcat: " + opt);
+                throw new IllegalStateException("Unknown stringConcat: " + opt);
+        }
+    }
+
+    protected StringConcat(Context context) {
+        context.put(concatKey, this);
+        gen = Gen.instance(context);
+        syms = Symtab.instance(context);
+        types = Types.instance(context);
+        names = Names.instance(context);
+        make = TreeMaker.instance(context);
+        rs = Resolve.instance(context);
+        sbAppends = new HashMap<>();
+    }
+
+    public abstract Item makeConcat(JCTree.JCAssignOp tree);
+    public abstract Item makeConcat(JCTree.JCBinary tree);
+
+    protected List<JCTree> collectAll(JCTree tree) {
+        return collect(tree, List.nil());
+    }
+
+    protected List<JCTree> collectAll(JCTree.JCExpression lhs, JCTree.JCExpression rhs) {
+        return List.<JCTree>nil()
+                .appendList(collectAll(lhs))
+                .appendList(collectAll(rhs));
+    }
+
+    private List<JCTree> collect(JCTree tree, List<JCTree> res) {
+        tree = TreeInfo.skipParens(tree);
+        if (tree.hasTag(PLUS) && tree.type.constValue() == null) {
+            JCTree.JCBinary op = (JCTree.JCBinary) tree;
+            if (op.operator.kind == MTH &&
+                    ((Symbol.OperatorSymbol) op.operator).opcode == string_add) {
+                return res
+                        .appendList(collect(op.lhs, res))
+                        .appendList(collect(op.rhs, res));
+            }
+        }
+        return res.append(tree);
+    }
+
+    /**
+     * "Legacy" bytecode flavor: emit the StringBuilder.append chains for string
+     * concatenation.
+     */
+    private static class Inline extends StringConcat {
+        public Inline(Context context) {
+            super(context);
+        }
+
+        @Override
+        public Item makeConcat(JCTree.JCAssignOp tree) {
+            // Generate code to make a string builder
+            JCDiagnostic.DiagnosticPosition pos = tree.pos();
+
+            // Create a string builder.
+            newStringBuilder(tree);
+
+            // Generate code for first string, possibly save one
+            // copy under builder
+            Item l = gen.genExpr(tree.lhs, tree.lhs.type);
+            if (l.width() > 0) {
+                gen.getCode().emitop0(dup_x1 + 3 * (l.width() - 1));
+            }
+
+            // Load first string and append to builder.
+            l.load();
+            appendString(tree.lhs);
+
+            // Append all other strings to builder.
+            List<JCTree> args = collectAll(tree.rhs);
+            for (JCTree t : args) {
+                gen.genExpr(t, t.type).load();
+                appendString(t);
+            }
+
+            // Convert builder to string.
+            builderToString(pos);
+
+            return l;
+        }
+
+        @Override
+        public Item makeConcat(JCTree.JCBinary tree) {
+            JCDiagnostic.DiagnosticPosition pos = tree.pos();
+
+            // Create a string builder.
+            newStringBuilder(tree);
+
+            // Append all strings to builder.
+            List<JCTree> args = collectAll(tree);
+            for (JCTree t : args) {
+                gen.genExpr(t, t.type).load();
+                appendString(t);
+            }
+
+            // Convert builder to string.
+            builderToString(pos);
+
+            return gen.getItems().makeStackItem(syms.stringType);
+        }
+
+        private JCDiagnostic.DiagnosticPosition newStringBuilder(JCTree tree) {
+            JCDiagnostic.DiagnosticPosition pos = tree.pos();
+            gen.getCode().emitop2(new_, gen.makeRef(pos, syms.stringBuilderType));
+            gen.getCode().emitop0(dup);
+            gen.callMethod(pos, syms.stringBuilderType, names.init, List.<Type>nil(), false);
+            return pos;
+        }
+
+        private void appendString(JCTree tree) {
+            Type t = tree.type.baseType();
+            if (!t.isPrimitive() && t.tsym != syms.stringType.tsym) {
+                t = syms.objectType;
+            }
+
+            Assert.checkNull(t.constValue());
+            Symbol method = sbAppends.get(t);
+            if (method == null) {
+                method = rs.resolveInternalMethod(tree.pos(), gen.getAttrEnv(), syms.stringBuilderType, names.append, List.of(t), null);
+                sbAppends.put(t, method);
+            }
+
+            gen.getItems().makeMemberItem(method, false).invoke();
+        }
+
+        private void builderToString(JCDiagnostic.DiagnosticPosition pos) {
+            gen.callMethod(pos, syms.stringBuilderType, names.toString, List.<Type>nil(), false);
+        }
+    }
+
+    /**
+     * Base class for indified concatenation bytecode flavors.
+     */
+    private static abstract class Indy extends StringConcat {
+        public Indy(Context context) {
+            super(context);
+        }
+
+        @Override
+        public Item makeConcat(JCTree.JCAssignOp tree) {
+            List<JCTree> args = collectAll(tree.lhs, tree.rhs);
+            Item l = gen.genExpr(tree.lhs, tree.lhs.type);
+            emit(args, tree.type, tree.pos());
+            return l;
+        }
+
+        @Override
+        public Item makeConcat(JCTree.JCBinary tree) {
+            List<JCTree> args = collectAll(tree.lhs, tree.rhs);
+            emit(args, tree.type, tree.pos());
+            return gen.getItems().makeStackItem(syms.stringType);
+        }
+
+        protected abstract void emit(List<JCTree> args, Type type, JCDiagnostic.DiagnosticPosition pos);
+
+        /** Peel the argument list into smaller chunks. */
+        protected List<List<JCTree>> split(List<JCTree> args) {
+            ListBuffer<List<JCTree>> splits = new ListBuffer<>();
+
+            int slots = 0;
+
+            // Need to peel, so that neither call has more than acceptable number
+            // of slots for the arguments.
+            ListBuffer<JCTree> cArgs = new ListBuffer<>();
+            for (JCTree t : args) {
+                int needSlots = (t.type.getTag() == LONG || t.type.getTag() == DOUBLE) ? 2 : 1;
+                if (slots + needSlots >= MAX_INDY_CONCAT_ARG_SLOTS) {
+                    splits.add(cArgs.toList());
+                    cArgs.clear();
+                    slots = 0;
+                }
+                cArgs.add(t);
+                slots += needSlots;
+            }
+
+            // Flush the tail slice
+            if (!cArgs.isEmpty()) {
+                splits.add(cArgs.toList());
+            }
+
+            return splits.toList();
+        }
+    }
+
+    /**
+     * Emits the invokedynamic call to JDK java.lang.invoke.StringConcatFactory,
+     * without handling constants specially.
+     *
+     * We bypass empty strings, because they have no meaning at this level. This
+     * captures the Java language trick to force String concat with e.g. ("" + int)-like
+     * expression. Down here, we already know we are in String concat business, and do
+     * not require these markers.
+     */
+    private static class IndyPlain extends Indy {
+        public IndyPlain(Context context) {
+            super(context);
+        }
+
+        /** Emit the indy concat for all these arguments, possibly peeling along the way */
+        protected void emit(List<JCTree> args, Type type, JCDiagnostic.DiagnosticPosition pos) {
+            List<List<JCTree>> split = split(args);
+
+            for (List<JCTree> t : split) {
+                Assert.check(!t.isEmpty(), "Arguments list is empty");
+
+                ListBuffer<Type> dynamicArgs = new ListBuffer<>();
+                for (JCTree arg : t) {
+                    Object constVal = arg.type.constValue();
+                    if ("".equals(constVal)) continue;
+                    if (arg.type == syms.botType) {
+                        dynamicArgs.add(types.boxedClass(syms.voidType).type);
+                    } else {
+                        dynamicArgs.add(arg.type);
+                    }
+                    gen.genExpr(arg, arg.type).load();
+                }
+
+                doCall(type, pos, dynamicArgs.toList());
+            }
+
+            // More that one peel slice produced: concatenate the results
+            if (split.size() > 1) {
+                ListBuffer<Type> argTypes = new ListBuffer<>();
+                for (int c = 0; c < split.size(); c++) {
+                    argTypes.append(syms.stringType);
+                }
+                doCall(type, pos, argTypes.toList());
+            }
+        }
+
+        /** Produce the actual invokedynamic call to StringConcatFactory */
+        private void doCall(Type type, JCDiagnostic.DiagnosticPosition pos, List<Type> dynamicArgTypes) {
+            Type.MethodType indyType = new Type.MethodType(dynamicArgTypes,
+                    type,
+                    List.<Type>nil(),
+                    syms.methodClass);
+
+            int prevPos = make.pos;
+            try {
+                make.at(pos);
+
+                List<Type> bsm_staticArgs = List.of(syms.methodHandleLookupType,
+                        syms.stringType,
+                        syms.methodTypeType);
+
+                Symbol bsm = rs.resolveInternalMethod(pos,
+                        gen.getAttrEnv(),
+                        syms.stringConcatFactory,
+                        names.makeConcat,
+                        bsm_staticArgs,
+                        null);
+
+                Symbol.DynamicMethodSymbol dynSym = new Symbol.DynamicMethodSymbol(names.makeConcat,
+                        syms.noSymbol,
+                        ClassFile.REF_invokeStatic,
+                        (Symbol.MethodSymbol)bsm,
+                        indyType,
+                        List.nil().toArray());
+
+                Items.Item item = gen.getItems().makeDynamicItem(dynSym);
+                item.invoke();
+            } finally {
+                make.at(prevPos);
+            }
+        }
+    }
+
+    /**
+     * Emits the invokedynamic call to JDK java.lang.invoke.StringConcatFactory.
+     * This code concatenates all known constants into the recipe, possibly escaping
+     * some constants separately.
+     *
+     * We also bypass empty strings, because they have no meaning at this level. This
+     * captures the Java language trick to force String concat with e.g. ("" + int)-like
+     * expression. Down here, we already know we are in String concat business, and do
+     * not require these markers.
+     */
+    private static final class IndyConstants extends Indy {
+        public IndyConstants(Context context) {
+            super(context);
+        }
+
+        @Override
+        protected void emit(List<JCTree> args, Type type, JCDiagnostic.DiagnosticPosition pos) {
+            List<List<JCTree>> split = split(args);
+
+            for (List<JCTree> t : split) {
+                Assert.check(!t.isEmpty(), "Arguments list is empty");
+
+                StringBuilder recipe = new StringBuilder(t.size());
+                ListBuffer<Type> dynamicArgs = new ListBuffer<>();
+                ListBuffer<Object> staticArgs = new ListBuffer<>();
+
+                for (JCTree arg : t) {
+                    Object constVal = arg.type.constValue();
+                    if ("".equals(constVal)) continue;
+                    if (arg.type == syms.botType) {
+                        // Concat the null into the recipe right away
+                        recipe.append((String) null);
+                    } else if (constVal != null) {
+                        // Concat the String representation of the constant, except
+                        // for the case it contains special tags, which requires us
+                        // to expose it as detached constant.
+                        String a = arg.type.stringValue();
+                        if (a.indexOf(TAG_CONST) != -1 || a.indexOf(TAG_ARG) != -1) {
+                            recipe.append(TAG_CONST);
+                            staticArgs.add(a);
+                        } else {
+                            recipe.append(a);
+                        }
+                    } else {
+                        // Ordinary arguments come through the dynamic arguments.
+                        recipe.append(TAG_ARG);
+                        dynamicArgs.add(arg.type);
+                        gen.genExpr(arg, arg.type).load();
+                    }
+                }
+
+                doCall(type, pos, recipe.toString(), staticArgs.toList(), dynamicArgs.toList());
+            }
+
+            // More that one peel slice produced: concatenate the results
+            // All arguments are assumed to be non-constant Strings.
+            if (split.size() > 1) {
+                ListBuffer<Type> argTypes = new ListBuffer<>();
+                StringBuilder recipe = new StringBuilder();
+                for (int c = 0; c < split.size(); c++) {
+                    argTypes.append(syms.stringType);
+                    recipe.append(TAG_ARG);
+                }
+                doCall(type, pos, recipe.toString(), List.nil(), argTypes.toList());
+            }
+        }
+
+        /** Produce the actual invokedynamic call to StringConcatFactory */
+        private void doCall(Type type, JCDiagnostic.DiagnosticPosition pos, String recipe, List<Object> staticArgs, List<Type> dynamicArgTypes) {
+            Type.MethodType indyType = new Type.MethodType(dynamicArgTypes,
+                    type,
+                    List.<Type>nil(),
+                    syms.methodClass);
+
+            int prevPos = make.pos;
+            try {
+                make.at(pos);
+
+                ListBuffer<Type> constTypes = new ListBuffer<>();
+                ListBuffer<Object> constants = new ListBuffer<>();
+                for (Object t : staticArgs) {
+                    constants.add(t);
+                    constTypes.add(syms.stringType);
+                }
+
+                List<Type> bsm_staticArgs = List.of(syms.methodHandleLookupType,
+                        syms.stringType,
+                        syms.methodTypeType)
+                        .append(syms.stringType)
+                        .appendList(constTypes);
+
+                Symbol bsm = rs.resolveInternalMethod(pos,
+                        gen.getAttrEnv(),
+                        syms.stringConcatFactory,
+                        names.makeConcatWithConstants,
+                        bsm_staticArgs,
+                        null);
+
+                Symbol.DynamicMethodSymbol dynSym = new Symbol.DynamicMethodSymbol(names.makeConcatWithConstants,
+                        syms.noSymbol,
+                        ClassFile.REF_invokeStatic,
+                        (Symbol.MethodSymbol)bsm,
+                        indyType,
+                        List.<Object>of(recipe).appendList(constants).toArray());
+
+                Items.Item item = gen.getItems().makeDynamicItem(dynSym);
+                item.invoke();
+            } finally {
+                make.at(prevPos);
+            }
+        }
+    }
+
+}
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Target.java	Thu Jan 28 15:42:06 2016 -0800
@@ -135,4 +135,10 @@
         return hasInvokedynamic();
     }
 
+    /** Does the target JDK contain StringConcatFactory class?
+     */
+    public boolean hasStringConcatFactory() {
+        return compareTo(JDK1_9) >= 0;
+    }
+
 }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java	Thu Jan 28 15:42:06 2016 -0800
@@ -179,6 +179,10 @@
     public final Name altMetafactory;
     public final Name dollarThis;
 
+    // string concat
+    public final Name makeConcat;
+    public final Name makeConcatWithConstants;
+
     public final Name.Table table;
 
     public Names(Context context) {
@@ -316,6 +320,10 @@
         lambda = fromString("lambda$");
         metafactory = fromString("metafactory");
         altMetafactory = fromString("altMetafactory");
+
+        // string concat
+        makeConcat = fromString("makeConcat");
+        makeConcatWithConstants = fromString("makeConcatWithConstants");
     }
 
     protected Name.Table createTable(Options options) {
--- a/src/jdk.javadoc/share/classes/com/sun/javadoc/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/javadoc/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -24,6 +24,11 @@
  */
 
 /**
+<p style="font-style: italic; font-size:larger">
+<b>Note:</b> The declarations in this package have been superseded by those
+in the package {@code jdk.javadoc.doclet}.
+</p>
+
 The Doclet API (also called the Javadoc API) provides a mechanism
 for clients to inspect the source-level structure of programs and
 libraries, including javadoc comments embedded in the source.
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/Taglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2006, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -29,7 +29,14 @@
 
 /**
  * The interface for a custom tag used by Doclets. A custom
- * tag must implement this interface.  To be loaded and used by
+ * tag must implement this interface.
+ *
+ * <p style="font-style: italic; font-size:larger">
+ * <b>Note:</b> This interface has been superseded by one
+ * in the new package {@code jdk.javadoc.doclet.taglet}.
+ * </p>
+ *
+ * To be loaded and used by
  * doclets at run-time, the taglet must have a static method called
  * <code>register</code> that accepts a {@link java.util.Map} as an
  * argument with the following signature:
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/markup/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -31,4 +31,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
  */
+
 package com.sun.tools.doclets.formats.html.markup;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -24,8 +24,7 @@
  */
 
 /**
-    This is the default doclet provided with JDK that produces Javadoc's
-    default HTML-formatted API output.  For more documentation
+    This produces Javadoc's HTML-formatted API output.  For more documentation
     on this doclet, please refer to the link below.
 
     @see <a href="http://www.java.sun.com/javadoc/standard-doclet.html">
@@ -36,4 +35,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets.formats.html;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -29,6 +29,7 @@
 import java.util.*;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
+
 import javax.tools.JavaFileManager;
 
 import com.sun.javadoc.*;
@@ -37,6 +38,7 @@
 import com.sun.tools.doclets.internal.toolkit.builders.BuilderFactory;
 import com.sun.tools.doclets.internal.toolkit.taglets.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
+import com.sun.tools.doclets.internal.toolkit.util.VisibleMemberMap.GetterSetter;
 import com.sun.tools.javac.util.StringUtils;
 
 /**
@@ -304,6 +306,13 @@
      */
     public SortedSet<PackageDoc> packages;
 
+    // The following three fields provide caches for use by all instances of VisibleMemberMap.
+    public final Map<ClassDoc, ProgramElementDoc[]> propertiesCache = new HashMap<>();
+    public final Map<ProgramElementDoc, ProgramElementDoc> classPropertiesMap = new HashMap<>();
+    public final Map<ProgramElementDoc, GetterSetter> getterSetterMap = new HashMap<>();
+
+    public DocFileFactory docFileFactory;
+
     /**
      * Constructor. Constructs the message retriever with resource file.
      */
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/builders/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -37,4 +37,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets.internal.toolkit.builders;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -53,4 +53,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets.internal.toolkit;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -48,4 +48,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets.internal.toolkit.taglets;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFileFactory.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFileFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,9 +25,6 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
-import java.util.Map;
-import java.util.WeakHashMap;
-
 import javax.tools.JavaFileManager;
 import javax.tools.JavaFileManager.Location;
 import javax.tools.StandardJavaFileManager;
@@ -45,15 +42,13 @@
  *
  * @since 1.8
  */
-abstract class DocFileFactory {
-    private static final Map<Configuration, DocFileFactory> factories = new WeakHashMap<>();
-
+public abstract class DocFileFactory {
     /**
      * Get the appropriate factory, based on the file manager given in the
      * configuration.
      */
     static synchronized DocFileFactory getFactory(Configuration configuration) {
-        DocFileFactory f = factories.get(configuration);
+        DocFileFactory f = configuration.docFileFactory;
         if (f == null) {
             JavaFileManager fm = configuration.getFileManager();
             if (fm instanceof StandardJavaFileManager) {
@@ -61,7 +56,7 @@
             } else {
                 throw new IllegalStateException();
             }
-            factories.put(configuration, f);
+            configuration.docFileFactory = f;
         }
         return f;
     }
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Jan 28 15:42:06 2016 -0800
@@ -101,9 +101,9 @@
     private final Configuration configuration;
     private final Utils utils;
 
-    private static final Map<ClassDoc, ProgramElementDoc[]> propertiesCache = new HashMap<>();
-    private static final Map<ProgramElementDoc, ProgramElementDoc> classPropertiesMap = new HashMap<>();
-    private static final Map<ProgramElementDoc, GetterSetter> getterSetterMap = new HashMap<>();
+    private final Map<ClassDoc, ProgramElementDoc[]> propertiesCache;
+    private final Map<ProgramElementDoc, ProgramElementDoc> classPropertiesMap;
+    private final Map<ProgramElementDoc, GetterSetter> getterSetterMap;
 
     /**
      * Construct a VisibleMemberMap of the given type for the given
@@ -123,6 +123,9 @@
         this.kind = kind;
         this.configuration = configuration;
         this.utils = configuration.utils;
+        propertiesCache = configuration.propertiesCache;
+        classPropertiesMap = configuration.classPropertiesMap;
+        getterSetterMap = configuration.getterSetterMap;
         new ClassMembers(classdoc, STARTLEVEL).build();
     }
 
@@ -713,7 +716,7 @@
         }
     }
 
-    private class GetterSetter {
+    public class GetterSetter {
         private final ProgramElementDoc getter;
         private final ProgramElementDoc setter;
 
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -31,4 +31,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets.internal.toolkit.util.links;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/internal/toolkit/util/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -32,4 +32,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets.internal.toolkit.util;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/package-info.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -24,6 +24,11 @@
  */
 
 /**
+<p style="font-style: italic; font-size:larger">
+<b>Note:</b> The declarations in this package have been superseded by those
+in the new package {@code jdk.javadoc.doclet}.
+</p>
+
     As of JDK version 1.5, replaced by
     {@code com.sun.tools.doclets.internal.toolkit.util}.
 
@@ -32,4 +37,5 @@
     This code and its internal interfaces are subject to change or
     deletion without notice.</b>
 */
+
 package com.sun.tools.doclets;
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/Start.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/Start.java	Thu Jan 28 15:42:06 2016 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -103,7 +103,11 @@
         this(programName, errWriter, warnWriter, noticeWriter, defaultDocletClassName, null);
     }
 
-    Start(String programName,
+    public Start(PrintWriter pw) {
+        this(javadocName, pw, pw, pw, standardDocletClassName);
+    }
+
+    public Start(String programName,
           PrintWriter errWriter,
           PrintWriter warnWriter,
           PrintWriter noticeWriter,
@@ -139,7 +143,7 @@
         this(javadocName, docletParentClassLoader);
     }
 
-    Start() {
+    public Start() {
         this(javadocName);
     }
 
@@ -212,7 +216,7 @@
     /**
      * Main program - external wrapper
      */
-    int begin(String... argv) {
+    public int begin(String... argv) {
         boolean ok = begin(null, argv, Collections.<JavaFileObject> emptySet());
         return ok ? 0 : 1;
     }
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/api/JavadocTaskImpl.java	Thu Jan 28 09:43:12 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
- * Copyright (c) 2012, 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.javadoc.api;
-
-import com.sun.tools.javac.util.ClientCodeException;
-import java.util.Locale;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.tools.DocumentationTool.DocumentationTask;
-import javax.tools.JavaFileObject;
-
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javadoc.Start;
-import java.util.Collections;
-
-import com.sun.tools.javac.util.DefinedBy;
-import com.sun.tools.javac.util.DefinedBy.Api;
-
-/**
- * Provides access to functionality specific to the JDK documentation tool,
- * javadoc.
- *
- * <p><b>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.</b></p>
- */
-public class JavadocTaskImpl implements DocumentationTask {
-    private final AtomicBoolean used = new AtomicBoolean();
-
-    private final Context context;
-    private Class<?> docletClass;
-    private Iterable<String> options;
-    private Iterable<? extends JavaFileObject> fileObjects;
-    private Locale locale;
-
-    public JavadocTaskImpl(Context context, Class<?> docletClass,
-            Iterable<String> options, Iterable<? extends JavaFileObject> fileObjects) {
-        this.context = context;
-        this.docletClass = docletClass;
-
-        this.options = (options == null) ? Collections.<String>emptySet()
-                : nullCheck(options);
-        this.fileObjects = (fileObjects == null) ? Collections.<JavaFileObject>emptySet()
-                : nullCheck(fileObjects);
-        setLocale(Locale.getDefault());
-    }
-
-    @DefinedBy(Api.COMPILER)
-    public void setLocale(Locale locale) {
-        if (used.get())
-            throw new IllegalStateException();
-        this.locale = locale;
-    }
-
-    @DefinedBy(Api.COMPILER)
-    public Boolean call() {
-        if (!used.getAndSet(true)) {
-            initContext();
-            Start jdoc = new Start(context);
-            try {
-                return jdoc.begin(docletClass, options, fileObjects);
-            } catch (ClientCodeException e) {
-                throw new RuntimeException(e.getCause());
-            }
-        } else {
-            throw new IllegalStateException("multiple calls to method 'call'");
-        }
-    }
-
-    private void initContext() {
-        //initialize compiler's default locale
-        context.put(Locale.class, locale);
-    }
-
-    private static <T> Iterable<T> nullCheck(Iterable<T> items) {
-        for (T item: items) {
-            if (item == null)
-                throw new NullPointerException();
-        }
-        return items;
-    }
-}
--- a/src/jdk.javadoc/share/classes/com/sun/tools/javadoc/api/JavadocTool.java	Thu Jan 28 09:43:12 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-/*
- * Copyright (c) 2012, 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.javadoc.api;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.Writer;
-import java.nio.charset.Charset;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.Locale;
-import java.util.Objects;
-import java.util.Set;
-
-import javax.lang.model.SourceVersion;
-import javax.tools.DiagnosticListener;
-import javax.tools.DocumentationTool;
-import javax.tools.JavaFileManager;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-
-import com.sun.tools.javac.api.ClientCodeWrapper;
-import com.sun.tools.javac.file.JavacFileManager;
-import com.sun.tools.javac.file.BaseFileManager;
-import com.sun.tools.javac.util.ClientCodeException;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.DefinedBy;
-import com.sun.tools.javac.util.DefinedBy.Api;
-import com.sun.tools.javac.util.Log;
-import com.sun.tools.javadoc.ToolOption;
-
-/**
- * Provides access to functionality specific to the JDK documentation tool,
- * javadoc.
- *
- * <p><b>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.</b></p>
- */
-public class JavadocTool implements DocumentationTool {
-    @Override @DefinedBy(Api.COMPILER)
-    public DocumentationTask getTask(
-            Writer out,
-            JavaFileManager fileManager,
-            DiagnosticListener<? super JavaFileObject> diagnosticListener,
-            Class<?> docletClass,
-            Iterable<String> options,
-            Iterable<? extends JavaFileObject> compilationUnits) {
-        Context context = new Context();
-        return getTask(out, fileManager, diagnosticListener,
-                docletClass, options, compilationUnits, context);
-    }
-
-    public DocumentationTask getTask(
-            Writer out,
-            JavaFileManager fileManager,
-            DiagnosticListener<? super JavaFileObject> diagnosticListener,
-            Class<?> docletClass,
-            Iterable<String> options,
-            Iterable<? extends JavaFileObject> compilationUnits,
-            Context context) {
-        try {
-            ClientCodeWrapper ccw = ClientCodeWrapper.instance(context);
-
-            if (options != null) {
-                for (String option : options)
-                    Objects.requireNonNull(option);
-            }
-
-            if (compilationUnits != null) {
-                compilationUnits = ccw.wrapJavaFileObjects(compilationUnits); // implicit null check
-                for (JavaFileObject cu : compilationUnits) {
-                    if (cu.getKind() != JavaFileObject.Kind.SOURCE) {
-                        final String kindMsg = "All compilation units must be of SOURCE kind";
-                        throw new IllegalArgumentException(kindMsg);
-                    }
-                }
-            }
-
-            if (diagnosticListener != null)
-                context.put(DiagnosticListener.class, ccw.wrap(diagnosticListener));
-
-            if (out == null)
-                context.put(Log.outKey, new PrintWriter(System.err, true));
-            else if (out instanceof PrintWriter)
-                context.put(Log.outKey, ((PrintWriter) out));
-            else
-                context.put(Log.outKey, new PrintWriter(out, true));
-
-            if (fileManager == null) {
-                fileManager = getStandardFileManager(diagnosticListener, null, null);
-                if (fileManager instanceof BaseFileManager) {
-                    ((BaseFileManager) fileManager).autoClose = true;
-                }
-            }
-            fileManager = ccw.wrap(fileManager);
-            context.put(JavaFileManager.class, fileManager);
-
-            return new JavadocTaskImpl(context, docletClass, options, compilationUnits);
-        } catch (ClientCodeException ex) {
-            throw new RuntimeException(ex.getCause());
-        }
-    }
-
-    // TODO: used shared static method in JavacFileManager
-    @Override @DefinedBy(Api.COMPILER)
-    public StandardJavaFileManager getStandardFileManager(
-            DiagnosticListener<? super JavaFileObject> diagnosticListener,
-            Locale locale,
-            Charset charset) {
-        Context context = new Context();
-        context.put(Locale.class, locale);
-        if (diagnosticListener != null)
-            context.put(DiagnosticListener.class, diagnosticListener);
-        PrintWriter pw = (charset == null)
-                ? new PrintWriter(System.err, true)
-                : new PrintWriter(new OutputStreamWriter(System.err, charset), true);
-        context.put(Log.outKey, pw);
-        return new JavacFileManager(context, true, charset);
-    }
-
-    @Override @DefinedBy(Api.COMPILER)
-    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {
-        PrintWriter err_pw = new PrintWriter(err == null ? System.err : err, true);
-        PrintWriter out_pw = new PrintWriter(out == null ? System.out : out);
-        try {
-            String standardDocletName = "com.sun.tools.doclets.standard.Standard";
-            ClassLoader cl = getClass().getClassLoader();
-            return com.sun.tools.javadoc.Main.execute(
-                    "javadoc", err_pw, err_pw, out_pw, standardDocletName, cl, arguments);
-        } finally {
-            err_pw.flush();
-            out_pw.flush();
-        }
-    }
-
-    @Override @DefinedBy(Api.COMPILER)
-    public Set<SourceVersion> getSourceVersions() {
-        return Collections.unmodifiableSet(
-                EnumSet.range(SourceVersion.RELEASE_3, SourceVersion.latest()));
-    }
-
-    @Override @DefinedBy(Api.COMPILER)
-    public int isSupportedOption(String option) {
-        if (option == null)
-            throw new NullPointerException();
-        for (ToolOption o: ToolOption.values()) {
-            if (o.opt.equals(option))
-                return o.hasArg ? 1 : 0;
-        }
-        return -1;
-    }
-
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/Doclet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2015, 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 jdk.javadoc.doclet;
+
+import java.util.ListIterator;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+/**
+ * The user doclet must implement this interface, as described in the
+ * <a href="package-summary.html#package_description">package description</a>.
+ * Each implementation of a Doclet must provide a public no-argument constructor
+ * to be used by tools to instantiate the doclet. The tool infrastructure will
+ * interact with classes implementing this interface as follows:
+ * <ol>
+ * <li> The tool will create an instance of a doclet using the no-arg constructor
+ *  of the doclet class.
+ * <li> Next, the tool calls the {@link #init init} method with an appropriate locale
+ *  and reporter.
+ * <li> Afterwards, the tool calls {@link #getSupportedOptions getSupportedOptions},
+ * and {@link #getSupportedSourceVersion getSupportedSourceVersion}.
+ * These methods are only called once.
+ * <li> As appropriate, the tool calls the {@link #run run} method on the doclet
+ * object, giving it a DocletEnvironment object, from which the doclet can determine
+ * the elements to be included in the documentation.
+ * </ol>
+ * <p>
+ * If a doclet object is created and used without the above protocol being followed,
+ * then the doclet's behavior is not defined by this interface specification.
+ * <p> To start the doclet, pass {@code -doclet} followed by the fully-qualified
+ * name of the entry point class (i.e. the implementation of this interface) on
+ * the javadoc tool command line.
+ *
+ * @since 9
+ */
+public interface Doclet {
+
+    /**
+     * Initializes this doclet with the given locale and error reporter.
+     * This locale will be used by the reporter and the doclet components.
+     * It is recommended to call this as early as possible, for a
+     * uniform localized user experience,
+     * @param locale the locale to be used
+     * @param reporter the reporter to be used
+     */
+    public void init(Locale locale, Reporter reporter);
+
+    /**
+     * Returns a name identifying the doclet. A name is a simple identifier
+     * without white spaces, as defined in <cite>The Java&trade; Language Specification</cite>,
+     * section 6.2 "Names and Identifiers".
+     * @return name of the Doclet
+     */
+    public abstract String getName();
+
+    /**
+     * Returns all the supported options.
+     *
+     * @return a Set containing all the supported options, an empty set if none.
+     */
+    public Set<Option> getSupportedOptions();
+
+    /**
+     * Returns the version of the Java Programming Language supported
+     * by this doclet.
+     *
+     * @return  the language version supported by this doclet, usually
+     * the latest version.
+     */
+    public SourceVersion getSupportedSourceVersion();
+
+    /**
+     * The entry point of the doclet. Further processing will commence as
+     * instructed by this method.
+     *
+     * @param environment from which essential information can be extracted
+     * @return true on success
+     */
+    public boolean run(DocletEnvironment environment);
+
+    /**
+     * An encapsulation of option name, aliases, parameters and descriptions
+     * as used by the Doclet.
+     */
+    interface Option {
+        /**
+         * Returns the number of arguments, this option will consume.
+         * @return number of consumed arguments
+         */
+        int getArgumentCount();
+
+        /**
+         * Returns the description of the option. For instance, the option "group", would
+         * return the synopsis of the option such as, "groups the documents".
+         * @return description if set, otherwise an empty String
+         */
+        String getDescription();
+
+        /**
+         * Returns the option kind.
+         * @return the kind of this option
+         */
+        Option.Kind getKind();
+
+        /**
+         * Returns the option name. For instance for option "-group", will return "group"
+         * @return name of the option, if set, otherwise an empty String
+         */
+        String getName();
+
+        /**
+         * Returns the parameters of the option. For instance "name &lt;p1&gt;:&lt;p2&gt;.."
+         * @return parameters if set, otherwise an empty String
+         */
+        String getParameters();
+
+        /**
+         * Checks if the given option name is handled by this option.
+         * @param option the option name with or without the leading "-"
+         * @return true if same
+         */
+        boolean matches(String option);
+
+        /**
+         * Processes the option and arguments as needed. This method will
+         * be invoked if the given option name matches the option.
+         * @param option the option
+         * @param arguments a ListIterator encapsulating the arguments
+         * @return true if operation succeeded, false otherwise
+         */
+        boolean process(String option, ListIterator<String> arguments);
+
+        /**
+         * The kind of an option.
+         */
+        public static enum Kind {
+            /** an extended option, such as those prefixed with -X */
+            EXTENDED,
+            /** a standard option */
+            STANDARD,
+            /** an implementation reserved option */
+            OTHER;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/DocletEnvironment.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2015, 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 jdk.javadoc.doclet;
+
+import java.util.List;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.Types;
+import javax.tools.JavaFileManager;
+
+import com.sun.source.util.DocTrees;
+
+/**
+ * Represents the operating environment of a single invocation
+ * of the doclet. This object can be used to access the program
+ * structures, various utilities and the user specified elements
+ * on the command line.
+ *
+ * @since 9
+ */
+public interface DocletEnvironment {
+    /**
+     * Returns the <a href="package-summary.html#included">included</a>
+     * classes, interfaces and enums in all packages.
+     *
+     * @return a Set containing {@link javax.lang.model.element.TypeElement TypeElements}.
+     */
+    Set<TypeElement> getIncludedClasses();
+
+    /**
+     * Returns an instance of the {@code DocTrees} utility class.
+     * This class provides methods to access {@code TreePath}s, {@code DocCommentTree}s
+     * and so on.
+     * @return a utility class to operate on doc trees.
+     */
+    DocTrees getDocTrees();
+
+    /**
+     * Returns an instance of the {@code Elements} utility class.
+     * This class provides methods for operating on
+     * {@link javax.lang.model.element.Element elements}.
+     * @return a utility class to operate on elements
+     */
+    Elements getElementUtils();
+
+    /**
+     * Returns the selected elements that can be documented.
+     *
+     * @param elements those that need to be checked
+     * @return elements selected, an empty list if none.
+     */
+    List<Element> getSelectedElements(List<? extends Element> elements);
+
+    /**
+     * Returns the elements <a href="package-summary.html#included">specified</a>
+     * on the command line, usually PackageElements and TypeElements.
+     * If {@code -subpackages} and {@code -exclude} options
+     * are used, return all the non-excluded packages.
+     *
+     * @return elements specified on the command line.
+     */
+    Set<Element> getSpecifiedElements();
+
+    /**
+     * Returns an instance of the {@code Types} utility class.
+     * This class provides methods for operating on
+     * {@link javax.lang.model.type.TypeMirror type mirrors}.
+     * @return a utility class to operate on type mirrors
+     */
+    Types getTypeUtils();
+
+    /**
+     * Indicates if an element is <a href="package-summary.html#included">included</a>.
+     *
+     * @param e the Element in question
+     * @return true if included, false otherwise
+     */
+    boolean isIncluded(Element e);
+
+    /**
+     * Returns the file manager used to read and write files.
+     *
+     * @return the file manager used to read and write files
+     */
+    JavaFileManager getJavaFileManager();
+
+    /**
+     * Returns the source version of the source files that were read.
+     *
+     * @return the source version
+     */
+    SourceVersion getSourceVersion();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/Reporter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.doclet;
+
+import javax.lang.model.element.Element;
+import javax.tools.Diagnostic;
+
+import com.sun.source.util.DocTreePath;
+
+/**
+ * This interface provides error, warning and notice reporting.
+ *
+ * @since 9
+ */
+public interface Reporter {
+
+    /**
+     * Print error message and increment error count.
+     *
+     * @param kind specify the diagnostic kind
+     * @param msg message to print
+     */
+    void print(Diagnostic.Kind kind, String msg);
+
+    /**
+     * Print an error message and increment error count.
+     *
+     * @param kind specify the diagnostic kind
+     * @param path the DocTreePath of item where the error occurs
+     * @param msg message to print
+     */
+    void print(Diagnostic.Kind kind, DocTreePath path, String msg);
+
+    /**
+     * Print an error message and increment error count.
+     *
+     * @param kind specify the diagnostic kind
+     * @param e the Element for which  the error occurs
+     * @param msg message to print
+     */
+    void print(Diagnostic.Kind kind, Element e, String msg);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+/**
+ * The Doclet API provides an environment which, in conjunction with
+ * the Language Model API and Compiler Tree API, allows clients
+ * to inspect the source-level structures of programs and
+ * libraries, including javadoc comments embedded in the source.
+ *
+ * <p style="font-style: italic">
+ * <b>Note:</b> The declarations in this package supersede those
+ * in the older package {@code com.sun.javadoc}. For details on the
+ * mapping of old types to new types, see the
+ * <a href="#migration">Migration Guide</a>.
+ * </p>
+ *
+ * <p>
+ * Doclets are invoked by javadoc and this API can be used to write out
+ * program information to files.  For example, the standard doclet is
+ * invoked by default, to generate HTML documentation.
+ * <p>
+
+ * The invocation is defined by the interface {@link jdk.javadoc.doclet.Doclet}
+ * -- the {@link jdk.javadoc.doclet.Doclet#run(DocletEnvironment) run} interface
+ * method, defines the entry point.
+ * <pre>
+ *    public boolean <b>run</b>(DocletEnvironment environment)
+ * </pre>
+ * The {@link jdk.javadoc.doclet.DocletEnvironment} instance holds the environment that the
+ * doclet will be initialized with. From this environment all other information can be
+ * extracted, in the form of {@link javax.lang.model} elements. One can further use the
+ * APIs and utilities described by {@link javax.lang.model} to query Elements and Types.
+ * <p>
+ *
+ * <a name="terminology"></a>
+ * <h3>Terminology</h3>
+ *
+ * <a name="included"></a>
+ * When calling javadoc, one can pass in package names and source file names --
+ * these are called the <em>specified</em> PackageElements and TypeElements.
+ * Javadoc options are also passed in; the <em>access control</em> Javadoc options
+ * ({@code -public}, {@code -protected}, {@code -package},
+ * and {@code -private}) are used to filter program elements, producing a
+ * result set, called the <em>included</em> set, or "selected" set.
+ * <p>
+
+ * <a name="qualified"></a>
+ * A <em>qualified</em> element name is one that has its package
+ * name prepended to it, such as {@code java.lang.String}.  A non-qualified
+ * name has no package name, such as {@code String}.
+ * <p>
+ *
+ * <a name="example"></a>
+ * <h3>Example</h3>
+ *
+ * The following is an example doclet that displays information of a class
+ * and its members, supporting an option "someoption".
+ * <pre>
+ * import com.sun.source.doctree.DocCommentTree;
+ * import com.sun.source.util.DocTrees;
+ * import java.io.IOException;
+ * import java.util.Collections;
+ * import java.util.Set;
+ * import javax.lang.model.SourceVersion;
+ * import javax.lang.model.element.Element;
+ * import javax.lang.model.element.TypeElement;
+ * import jdk.javadoc.doclet.*;
+ *
+ * public class Example implements Doclet {
+ *
+ *     &#64;Override
+ *     public void init(Locale locale, Reporter reporter) {
+ *        return;
+ *     }
+ *
+ *     &#64;Override
+ *     public boolean run(RootDoc root) {
+ *         // cache the DocTrees utility class to access DocComments
+ *         DocTrees docTrees = root.getDocTrees();
+ *
+ *         // location of an element in the same directory as overview.html
+ *         try {
+ *             Element barElement = null;
+ *             for (Element e : root.getIncludedClasses()) {
+ *                 if (e.getSimpleName().toString().equals("FooBar")) {
+ *                     barElement = e;
+ *                 }
+ *             }
+ *             DocCommentTree docCommentTree =
+ *                     docTrees.getDocCommentTree(barElement, "overview.html");
+ *             if (docCommentTree != null) {
+ *                 System.out.println("Overview html: " +
+ *                         docCommentTree.getFullBody());
+ *             }
+ *         } catch (IOException missing) {
+ *             System.err.println("No overview.html found.");
+ *         }
+ *
+ *         for (TypeElement t : root.getIncludedClasses()) {
+ *             System.out.println(t.getKind() + ":" + t);
+ *             for (Element e : t.getEnclosedElements()) {
+ *                 DocCommentTree docCommentTree = docTrees.getDocCommentTree(e);
+ *                 if (docCommentTree != null) {
+ *                     System.out.println("Element (" + e.getKind() + ": " +
+ *                             e + ") has the following comments:");
+ *                     System.out.println("Entire body: " + docCommentTree.getFullBody());
+ *                     System.out.println("Block tags: " + docCommentTree.getBlockTags());
+ *                 } else {
+ *                     System.out.println("no comment.");
+ *                 }
+ *             }
+ *         }
+ *         return true;
+ *     }
+ *
+ *     &#64;Override
+ *     public String getName() {
+ *         return "Example";
+ *     }
+ *
+ *   private String someOption;
+ *
+ *   &#64;Override
+ *   public Set&lt;Option&gt; getSupportedOptions() {
+ *       Option[] options = {
+ *           new Option() {
+ *               public int getArgumentCount() {
+ *                   return 1;
+ *               }
+ *               public String getDescription() {
+ *                   return "someoption";
+ *               }
+ *               public Option.Kind getKind() {
+ *                   return Option.Kind.STANDARD;
+ *               }
+ *               public String getName() {
+ *                   return "someoption";
+ *               }
+ *               public String getParameters() {
+ *                   return "url";
+ *               }
+ *               public boolean matches(String option) {
+ *                  String opt = option.startsWith("-") ? option.substring(1) : option;
+ *                  return getName().equals(opt);
+ *               }
+ *               public boolean process(String option, ListIterator&lt;String&gt; arguments) {
+ *                  overviewpath = arguments.next();
+ *                  return true;
+ *               }
+ *          }
+ *      };
+ *      return new HashSet&lt;Option&gt;(Arrays.asList(options));
+ *     }
+ *
+ *     &#64;Override
+ *     public SourceVersion getSupportedSourceVersion() {
+ *         // support the latest release
+ *         return SourceVersion.latest();
+ *     }
+ * }
+ * </pre>
+ * <p>
+ * This doclet when invoked with a command line, such as:
+ * <pre>
+ *     javadoc -doclet Example -sourcepath &lt;source-location&gt;
+ * </pre>
+ * will produce an output, such as:
+ * <pre>
+ *  Overview.html: overview comments
+ *  ...
+ *  ...
+ *  CLASS: SomeKlass
+ *  .....
+ *  Element (METHOD: main(java.lang.String...)) has the following comments:
+ *  Entire body: The main entry point.
+ *  Block tags: @param an array of Strings
+ *  ...
+ * </pre>
+ *
+ * <h3><a name="migration">Migration Guide</a></h3>
+ *
+ * <p>Many of the types in the old {@code com.sun.javadoc} API do not have equivalents in this
+ * package. Instead, types in the {@code javax.lang.model} and {@code com.sun.source} APIs
+ * are used instead.
+ *
+ * <p>The following table gives a guide to the mapping from old types to their replacements.
+ * In some cases, there is no direct equivalent.
+ *
+ * <table style="font-family: monospace" border=1>
+    <caption>Guide for mapping old types to new types</caption>
+    <tr><th>Old Type<th>New Type
+    <tr><td>AnnotatedType<td>javax.lang.model.type.Type
+    <tr><td>AnnotationDesc<td>javax.lang.model.element.AnnotationMirror
+    <tr><td>AnnotationDesc.ElementValuePair<td>javax.lang.model.element.AnnotationValue
+    <tr><td>AnnotationTypeDoc<td>javax.lang.model.element.TypeElement
+    <tr><td>AnnotationTypeElementDoc<td>javax.lang.model.element.ExecutableElement
+    <tr><td>AnnotationValue<td>javax.lang.model.element.AnnotationValue
+    <tr><td>ClassDoc<td>javax.lang.model.element.TypeElement
+    <tr><td>ConstructorDoc<td>javax.lang.model.element.ExecutableElement
+    <tr><td>Doc<td>javax.lang.model.element.Element
+    <tr><td>DocErrorReporter<td>jdk.javadoc.doclet.Reporter
+    <tr><td>Doclet<td>jdk.javadoc.doclet.Doclet
+    <tr><td>ExecutableMemberDoc<td>javax.lang.model.element.ExecutableElement
+    <tr><td>FieldDoc<td>javax.lang.model.element.VariableElement
+    <tr><td>LanguageVersion<td>javax.lang.model.SourceVersion
+    <tr><td>MemberDoc<td>javax.lang.model.element.Element
+    <tr><td>MethodDoc<td>javax.lang.model.element.ExecutableElement
+    <tr><td>PackageDoc<td>javax.lang.model.element.PackageElement
+    <tr><td>Parameter<td>javax.lang.model.element.VariableElement
+    <tr><td>ParameterizedType<td>javax.lang.model.type.DeclaredType
+    <tr><td>ParamTag<td>com.sun.source.doctree.ParamTree
+    <tr><td>ProgramElementDoc<td>javax.lang.model.element.Element
+    <tr><td>RootDoc<td>jdk.javadoc.doclet.DocletEnvironment
+    <tr><td>SeeTag<td>com.sun.source.doctree.LinkTree<br>com.sun.source.doctree.SeeTree
+    <tr><td>SerialFieldTag<td>com.sun.source.doctree.SerialFieldTree
+    <tr><td>SourcePosition<td>com.sun.source.util.SourcePositions
+    <tr><td>Tag<td>com.sun.source.doctree.DocTree
+    <tr><td>ThrowsTag<td>com.sun.source.doctree.ThrowsTree
+    <tr><td>Type<td>javax.lang.model.type.Type
+    <tr><td>TypeVariable<td>javax.lang.model.type.TypeVariable
+    <tr><td>WildcardType<td>javax.lang.model.type.WildcardType
+ * </table>
+ *
+ * @see jdk.javadoc.doclet.Doclet
+ * @see jdk.javadoc.doclet.DocletEnvironment
+ * @since 9
+*/
+
+package jdk.javadoc.doclet;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/Taglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.doclet.taglet;
+
+import java.util.List;
+import java.util.Set;
+
+import com.sun.source.doctree.DocTree;
+
+/**
+ * The interface for a custom tag used by Doclets. A custom
+ * tag must implement this interface, and must have a public
+ * default constructor (i.e. a public constructor with no
+ * parameters), by which, the doclet will instantiate and
+ * register the custom tag.
+ *
+ * @since 9
+ */
+
+public interface Taglet {
+
+    /**
+     * Returns the set of locations in which a taglet may be used.
+     * @return the set of locations in which a taglet may be used
+     * allowed in or an empty set.
+     */
+    Set<Location> getAllowedLocations();
+
+    /**
+     * Indicates the tag is an inline or a body tag.
+     * @return true if this <code>Taglet</code>
+     * is an inline tag, false otherwise.
+     */
+    public abstract boolean isInlineTag();
+
+    /**
+     * Returns the name of the tag.
+     * @return the name of this custom tag.
+     */
+    public abstract String getName();
+
+    /**
+     * Given the {@link DocTree DocTree} representation of this custom
+     * tag, return its string representation, which is output
+     * to the generated page.
+     * @param tag the <code>Tag</code> representation of this custom tag.
+     * @return the string representation of this <code>Tag</code>.
+     */
+    public abstract String toString(DocTree tag);
+
+    /**
+     * Given a List of {@link DocTree DocTrees} 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 or body tag.
+     * @param tags the list of <code>DocTree</code>s representing this custom tag.
+     * @return the string representation of this <code>Tag</code>.
+     */
+    public abstract String toString(List<? extends DocTree> tags);
+
+    /**
+     * The kind of location.
+     */
+    public static enum Location {
+        /** In an Overview document. */
+        OVERVIEW,
+        /** In the documentation for a package. */
+        PACKAGE,
+        /** In the documentation for a class, interface or enum. */
+        TYPE,
+        /** In the documentation for a constructor. */
+        CONSTRUCTOR,
+        /** In the documentation for a method. */
+        METHOD,
+        /** In the documentation for a field. */
+        FIELD
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/doclet/taglet/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2003, 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.
+ */
+
+/**
+ * The Taglet API provides a way to declare custom tags that can be
+ * used by the standard doclet.
+ *
+ * <p style="font-style: italic">
+ * <b>Note:</b> The declarations in this package supersede those
+ * in the older package {@code com.sun.tools.doclets}.
+ * </p>
+ *
+ * @since 9
+ */
+package jdk.javadoc.doclet.taglet;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTaskImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2012, 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 jdk.javadoc.internal.api;
+
+import java.util.Collections;
+import java.util.Locale;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+
+import com.sun.tools.javac.util.ClientCodeException;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.internal.tool.Start;
+
+/**
+ * Provides access to functionality specific to the JDK documentation tool,
+ * javadoc.
+ *
+ * <p><b>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.</b></p>
+ */
+public class JavadocTaskImpl implements DocumentationTask {
+    private final AtomicBoolean used = new AtomicBoolean();
+
+    private final Context context;
+    private Class<?> docletClass;
+    private Iterable<String> options;
+    private Iterable<? extends JavaFileObject> fileObjects;
+    private Locale locale;
+
+    public JavadocTaskImpl(Context context, Class<?> docletClass,
+            Iterable<String> options, Iterable<? extends JavaFileObject> fileObjects) {
+        this.context = context;
+        this.docletClass = docletClass;
+
+        this.options = (options == null) ? Collections.<String>emptySet()
+                : nullCheck(options);
+        this.fileObjects = (fileObjects == null) ? Collections.<JavaFileObject>emptySet()
+                : nullCheck(fileObjects);
+        setLocale(Locale.getDefault());
+    }
+
+    @DefinedBy(Api.COMPILER)
+    public void setLocale(Locale locale) {
+        if (used.get())
+            throw new IllegalStateException();
+        this.locale = locale;
+    }
+
+    @DefinedBy(Api.COMPILER)
+    public Boolean call() {
+        if (!used.getAndSet(true)) {
+            initContext();
+            Start jdoc = new Start(context);
+            try {
+                return jdoc.begin(docletClass, options, fileObjects);
+            } catch (ClientCodeException e) {
+                throw new RuntimeException(e.getCause());
+            }
+        } else {
+            throw new IllegalStateException("multiple calls to method 'call'");
+        }
+    }
+
+    private void initContext() {
+        //initialize compiler's default locale
+        context.put(Locale.class, locale);
+    }
+
+    private static <T> Iterable<T> nullCheck(Iterable<T> items) {
+        for (T item: items) {
+            if (item == null)
+                throw new NullPointerException();
+        }
+        return items;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/api/JavadocTool.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2012, 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 jdk.javadoc.internal.api;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.PrintWriter;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.tools.DiagnosticListener;
+import javax.tools.DocumentationTool;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+
+import com.sun.tools.javac.api.ClientCodeWrapper;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.file.BaseFileManager;
+import com.sun.tools.javac.util.ClientCodeException;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import com.sun.tools.javac.util.Log;
+import jdk.javadoc.internal.tool.ToolOption;
+
+/**
+ * Provides access to functionality specific to the JDK documentation tool,
+ * javadoc.
+ *
+ * <p><b>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.</b></p>
+ */
+public class JavadocTool implements DocumentationTool {
+    @Override @DefinedBy(Api.COMPILER)
+    public DocumentationTask getTask(
+            Writer out,
+            JavaFileManager fileManager,
+            DiagnosticListener<? super JavaFileObject> diagnosticListener,
+            Class<?> docletClass,
+            Iterable<String> options,
+            Iterable<? extends JavaFileObject> compilationUnits) {
+        Context context = new Context();
+        return getTask(out, fileManager, diagnosticListener,
+                docletClass, options, compilationUnits, context);
+    }
+
+    public DocumentationTask getTask(
+            Writer out,
+            JavaFileManager fileManager,
+            DiagnosticListener<? super JavaFileObject> diagnosticListener,
+            Class<?> docletClass,
+            Iterable<String> options,
+            Iterable<? extends JavaFileObject> compilationUnits,
+            Context context) {
+        try {
+            ClientCodeWrapper ccw = ClientCodeWrapper.instance(context);
+
+            if (options != null) {
+                for (String option : options)
+                    Objects.requireNonNull(option);
+            }
+
+            if (compilationUnits != null) {
+                compilationUnits = ccw.wrapJavaFileObjects(compilationUnits); // implicit null check
+                for (JavaFileObject cu : compilationUnits) {
+                    if (cu.getKind() != JavaFileObject.Kind.SOURCE) {
+                        final String kindMsg = "All compilation units must be of SOURCE kind";
+                        throw new IllegalArgumentException(kindMsg);
+                    }
+                }
+            }
+
+            if (diagnosticListener != null)
+                context.put(DiagnosticListener.class, ccw.wrap(diagnosticListener));
+
+            if (out == null)
+                context.put(Log.outKey, new PrintWriter(System.err, true));
+            else if (out instanceof PrintWriter)
+                context.put(Log.outKey, ((PrintWriter) out));
+            else
+                context.put(Log.outKey, new PrintWriter(out, true));
+
+            if (fileManager == null) {
+                fileManager = getStandardFileManager(diagnosticListener, null, null);
+                if (fileManager instanceof BaseFileManager) {
+                    ((BaseFileManager) fileManager).autoClose = true;
+                }
+            }
+            fileManager = ccw.wrap(fileManager);
+            context.put(JavaFileManager.class, fileManager);
+
+            return new JavadocTaskImpl(context, docletClass, options, compilationUnits);
+        } catch (ClientCodeException ex) {
+            throw new RuntimeException(ex.getCause());
+        }
+    }
+
+    // TODO: used shared static method in JavacFileManager
+    @Override @DefinedBy(Api.COMPILER)
+    public StandardJavaFileManager getStandardFileManager(
+            DiagnosticListener<? super JavaFileObject> diagnosticListener,
+            Locale locale,
+            Charset charset) {
+        Context context = new Context();
+        context.put(Locale.class, locale);
+        if (diagnosticListener != null)
+            context.put(DiagnosticListener.class, diagnosticListener);
+        PrintWriter pw = (charset == null)
+                ? new PrintWriter(System.err, true)
+                : new PrintWriter(new OutputStreamWriter(System.err, charset), true);
+        context.put(Log.outKey, pw);
+        return new JavacFileManager(context, true, charset);
+    }
+
+    @Override @DefinedBy(Api.COMPILER)
+    public int run(InputStream in, OutputStream out, OutputStream err, String... arguments) {
+        PrintWriter err_pw = new PrintWriter(err == null ? System.err : err, true);
+        PrintWriter out_pw = new PrintWriter(out == null ? System.out : out);
+        try {
+            return jdk.javadoc.internal.tool.Main.execute(arguments, err_pw);
+        } finally {
+            err_pw.flush();
+            out_pw.flush();
+        }
+    }
+
+    @Override @DefinedBy(Api.COMPILER)
+    public Set<SourceVersion> getSourceVersions() {
+        return Collections.unmodifiableSet(
+                EnumSet.range(SourceVersion.RELEASE_3, SourceVersion.latest()));
+    }
+
+    @Override @DefinedBy(Api.COMPILER)
+    public int isSupportedOption(String option) {
+        if (option == null)
+            throw new NullPointerException();
+        for (ToolOption o: ToolOption.values()) {
+            if (o.opt.equals(option))
+                return o.hasArg ? 1 : 0;
+        }
+        return -1;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,352 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.util.List;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.TypeVariable;
+import javax.lang.model.util.SimpleTypeVisitor9;
+
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+
+import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.*;
+
+/**
+ * Print method and constructor info.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public abstract class AbstractExecutableMemberWriter extends AbstractMemberWriter {
+
+    public AbstractExecutableMemberWriter(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    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(ExecutableElement 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(ExecutableElement member) {
+        LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, MEMBER_TYPE_PARAMS, member);
+        return writer.getTypeParameterLinks(linkInfo);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getDeprecatedLink(Element member) {
+        StringBuilder sb = new StringBuilder();
+        sb.append(utils.getFullyQualifiedName(member));
+        if (!utils.isConstructor(member)) {
+            sb.append(".");
+            sb.append(member.getSimpleName().toString());
+        }
+        sb.append(utils.flatSignature((ExecutableElement) member));
+
+        return writer.getDocLink(MEMBER, member, sb.toString());
+    }
+
+    /**
+     * Add the summary link for the member.
+     *
+     * @param context the id of the context where the link will be printed
+     * @param te 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
+     */
+    @Override
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement te, Element member,
+            Content tdSummary) {
+        ExecutableElement ee = (ExecutableElement)member;
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getDocLink(context, te, ee,
+                name(ee), false));
+        Content code = HtmlTree.CODE(memberLink);
+        addParameters(ee, false, code, name(ee).length() - 1);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * Add the inherited summary link for the member.
+     *
+     * @param te the type element that we should link to
+     * @param member the member being linked to
+     * @param linksTree the content tree to which the link will be added
+     */
+    @Override
+    protected void addInheritedSummaryLink(TypeElement te, Element member, Content linksTree) {
+        linksTree.addContent(writer.getDocLink(MEMBER, te, member, name(member), 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(ExecutableElement member, VariableElement param,
+            boolean isVarArg, Content tree) {
+        Content link = writer.getLink(new LinkInfoImpl(configuration, EXECUTABLE_MEMBER_PARAM,
+                param.asType()).varargs(isVarArg));
+        tree.addContent(link);
+        if(name(param).length() > 0) {
+            tree.addContent(writer.getSpace());
+            tree.addContent(name(param));
+        }
+    }
+
+    /**
+     * 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(ExecutableElement member, TypeMirror rcvrType,
+            List<? extends AnnotationMirror> annotationMirrors, Content tree) {
+        writer.addReceiverAnnotationInfo(member, rcvrType, annotationMirrors, tree);
+        tree.addContent(writer.getSpace());
+        tree.addContent(utils.getTypeName(rcvrType, false));
+        LinkInfoImpl linkInfo = new LinkInfoImpl(configuration, RECEIVER_TYPE, 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(ExecutableElement 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(ExecutableElement member,
+            boolean includeAnnotations, Content htmltree, int indentSize) {
+        htmltree.addContent("(");
+        String sep = "";
+        List<? extends VariableElement> parameters = member.getParameters();
+        String indent = makeSpace(indentSize + 1);
+        TypeMirror rcvrType = member.getReceiverType();
+        if (includeAnnotations && rcvrType != null && utils.isAnnotated(rcvrType)) {
+            List<? extends AnnotationMirror> annotationMirrors = rcvrType.getAnnotationMirrors();
+            addReceiverAnnotations(member, rcvrType, annotationMirrors, htmltree);
+            sep = "," + DocletConstants.NL + indent;
+        }
+        int paramstart;
+        for (paramstart = 0; paramstart < parameters.size(); paramstart++) {
+            htmltree.addContent(sep);
+            VariableElement param = parameters.get(paramstart);
+
+            if (param.getKind() != ElementKind.INSTANCE_INIT) {
+                if (includeAnnotations) {
+                    boolean foundAnnotations =
+                            writer.addAnnotationInfo(indent.length(),
+                            member, param, htmltree);
+                    if (foundAnnotations) {
+                        htmltree.addContent(DocletConstants.NL);
+                        htmltree.addContent(indent);
+                    }
+                }
+                addParam(member, param,
+                    (paramstart == parameters.size() - 1) && member.isVarArgs(), htmltree);
+                break;
+            }
+        }
+
+        for (int i = paramstart + 1; i < parameters.size(); i++) {
+            htmltree.addContent(",");
+            htmltree.addContent(DocletConstants.NL);
+            htmltree.addContent(indent);
+            if (includeAnnotations) {
+                boolean foundAnnotations =
+                        writer.addAnnotationInfo(indent.length(), member, parameters.get(i),
+                        htmltree);
+                if (foundAnnotations) {
+                    htmltree.addContent(DocletConstants.NL);
+                    htmltree.addContent(indent);
+                }
+            }
+            addParam(member, parameters.get(i), (i == parameters.size() - 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(ExecutableElement member, Content htmltree, int indentSize) {
+        List<? extends TypeMirror> exceptions = member.getThrownTypes();
+        if (!exceptions.isEmpty()) {
+            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, MEMBER, exceptions.get(0)));
+            htmltree.addContent(link);
+            for(int i = 1; i < exceptions.size(); i++) {
+                htmltree.addContent(",");
+                htmltree.addContent(DocletConstants.NL);
+                htmltree.addContent(indent);
+                Content exceptionLink = writer.getLink(new LinkInfoImpl(configuration, MEMBER,
+                        exceptions.get(i)));
+                htmltree.addContent(exceptionLink);
+            }
+        }
+    }
+
+    protected TypeElement implementsMethodInIntfac(ExecutableElement method,
+                                                List<TypeElement> intfacs) {
+        for (TypeElement intf : intfacs) {
+            List<ExecutableElement> methods = utils.getMethods(intf);
+            if (!methods.isEmpty()) {
+                for (ExecutableElement md : methods) {
+                    if (name(md).equals(name(method)) &&
+                        md.toString().equals(method.toString())) {
+                        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 executableElement the ExecutableElement to anchor to.
+     * @return the 1.4.x style anchor for the executable element.
+     */
+    protected String getErasureAnchor(ExecutableElement executableElement) {
+        final StringBuilder buf = new StringBuilder(name(executableElement) + "(");
+        List<? extends VariableElement> parameters = executableElement.getParameters();
+        boolean foundTypeVariable = false;
+        for (int i = 0; i < parameters.size(); i++) {
+            if (i > 0) {
+                buf.append(",");
+            }
+            TypeMirror t = parameters.get(i).asType();
+            SimpleTypeVisitor9<Boolean, Void> stv = new SimpleTypeVisitor9<Boolean, Void>() {
+                boolean foundTypeVariable = false;
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitArray(ArrayType t, Void p) {
+                    visit(t.getComponentType());
+                    buf.append(utils.getDimension(t));
+                    return foundTypeVariable;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitTypeVariable(TypeVariable t, Void p) {
+                    buf.append(utils.asTypeElement(t).getQualifiedName());
+                    foundTypeVariable = true;
+                    return foundTypeVariable;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitDeclared(DeclaredType t, Void p) {
+                    buf.append(utils.getQualifiedTypeName(t));
+                    return foundTypeVariable;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected Boolean defaultAction(TypeMirror e, Void p) {
+                    buf.append(e.toString());
+                    return foundTypeVariable;
+                }
+            };
+
+            boolean isTypeVariable = stv.visit(t);
+            if (!foundTypeVariable) {
+                foundTypeVariable = isTypeVariable;
+            }
+        }
+        buf.append(")");
+        return foundTypeVariable ? writer.getName(buf.toString()) : null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractIndexWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,461 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.nio.file.*;
+import java.util.*;
+import java.util.zip.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.SimpleElementVisitor9;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.tools.javac.util.DefinedBy;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder;
+
+/**
+ * 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.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see    IndexBuilder
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+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, Collection<? extends Element> memberlist,
+            Content contentTree) {
+        addHeading(uc, contentTree);
+        // Display the list only if there are elements to be displayed.
+        if (!memberlist.isEmpty()) {
+            Content dl = new HtmlTree(HtmlTag.DL);
+            for (Element element : memberlist) {
+                addDescription(dl, element);
+            }
+            contentTree.addContent(dl);
+        }
+    }
+
+    protected void addSearchContents(Character uc, List<SearchIndexItem> searchList,
+            Content contentTree) {
+        addHeading(uc, contentTree);
+        // Display the list only if there are elements to be displayed.
+        if (!searchList.isEmpty()) {
+            Content dl = new HtmlTree(HtmlTag.DL);
+            for (SearchIndexItem sii : searchList) {
+                addDescription(sii, dl);
+            }
+            contentTree.addContent(dl);
+        }
+    }
+
+    protected void addContents(Character uc, List<? extends Element> memberlist,
+            List<SearchIndexItem> searchList, Content contentTree) {
+        addHeading(uc, contentTree);
+        int memberListSize = memberlist.size();
+        int searchListSize = searchList.size();
+        int i = 0;
+        int j = 0;
+        Content dl = new HtmlTree(HtmlTag.DL);
+        while (i < memberListSize && j < searchListSize) {
+            String name = utils.getSimpleName(memberlist.get(i));
+            if (name.compareTo(searchList.get(j).getLabel()) < 0) {
+                addDescription(dl, memberlist.get(i));
+                i++;
+            } else if (name.compareTo(searchList.get(j).getLabel()) > 0) {
+                addDescription(searchList.get(j), dl);
+                j++;
+            } else {
+                addDescription(dl, memberlist.get(i));
+                addDescription(searchList.get(j), dl);
+                j++;
+                i++;
+            }
+        }
+        if (i >= memberListSize) {
+            while (j < searchListSize) {
+                addDescription(searchList.get(j), dl);
+                j++;
+            }
+        }
+        if (j >= searchListSize) {
+            while (i < memberListSize) {
+                addDescription(dl, memberlist.get(i));
+                i++;
+            }
+        }
+        contentTree.addContent(dl);
+    }
+
+    protected void addHeading(Character uc, Content contentTree) {
+        String unicode = uc.toString();
+        contentTree.addContent(getMarkerAnchorForIndex(unicode));
+        Content headContent = new StringContent(unicode);
+        Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false,
+                HtmlStyle.title, headContent);
+        contentTree.addContent(heading);
+    }
+
+    protected void addDescription(Content dl, Element element) {
+        SearchIndexItem si = new SearchIndexItem();
+        new SimpleElementVisitor9<Void, Void>() {
+
+            @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+            public Void visitPackage(PackageElement e, Void p) {
+                addDescription(e, dl, si);
+                configuration.packageSearchIndex.add(si);
+                return null;
+            }
+
+            @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+            public Void visitType(TypeElement e, Void p) {
+                addDescription(e, dl, si);
+                configuration.typeSearchIndex.add(si);
+                return null;
+            }
+
+            @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+            protected Void defaultAction(Element e, Void p) {
+                addDescription(e, dl, si);
+                configuration.memberSearchIndex.add(si);
+                return null;
+            }
+
+        }.visit(element);
+    }
+
+    /**
+     * Add one line summary comment for the package.
+     *
+     * @param pkg the package to be documented
+     * @param dlTree the content tree to which the description will be added
+     */
+    protected void addDescription(PackageElement pkg, Content dlTree, SearchIndexItem si) {
+        Content link = getPackageLink(pkg, new StringContent(utils.getPackageName(pkg)));
+        si.setLabel(utils.getPackageName(pkg));
+        si.setCategory(getResource("doclet.Packages").toString());
+        Content dt = HtmlTree.DT(link);
+        dt.addContent(" - ");
+        dt.addContent(getResource("doclet.package"));
+        dt.addContent(" " + utils.getPackageName(pkg));
+        dlTree.addContent(dt);
+        Content dd = new HtmlTree(HtmlTag.DD);
+        addSummaryComment(pkg, dd);
+        dlTree.addContent(dd);
+    }
+
+    /**
+     * Add one line summary comment for the class.
+     *
+     * @param typeElement the class being documented
+     * @param dlTree the content tree to which the description will be added
+     */
+    protected void addDescription(TypeElement typeElement, Content dlTree, SearchIndexItem si) {
+        Content link = getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.INDEX, typeElement).strong(true));
+        si.setContainingPackage(utils.getPackageName(utils.containingPackage(typeElement)));
+        si.setLabel(utils.getSimpleName(typeElement));
+        si.setCategory(getResource("doclet.Types").toString());
+        Content dt = HtmlTree.DT(link);
+        dt.addContent(" - ");
+        addClassInfo(typeElement, dt);
+        dlTree.addContent(dt);
+        Content dd = new HtmlTree(HtmlTag.DD);
+        addComment(typeElement, dd);
+        dlTree.addContent(dd);
+    }
+
+    /**
+     * Add the classkind (class, interface, exception), error of the class
+     * passed.
+     *
+     * @param te the class being documented
+     * @param contentTree the content tree to which the class info will be added
+     */
+    protected void addClassInfo(TypeElement te, Content contentTree) {
+        contentTree.addContent(getResource("doclet.in",
+                utils.getTypeElementName(te, false),
+                getPackageLink(utils.containingPackage(te),
+                    utils.getPackageName(utils.containingPackage(te)))
+                ));
+    }
+
+    /**
+     * Add description for Class, Field, Method or Constructor.
+     *
+     * @param member the member of the Class Kind
+     * @param dlTree the content tree to which the description will be added
+     * @param si search index item
+     */
+    protected void addDescription(Element member, Content dlTree, SearchIndexItem si) {
+
+        si.setContainingPackage(utils.getPackageName(utils.containingPackage(member)));
+        si.setContainingClass(utils.getSimpleName(utils.getEnclosingTypeElement(member)));
+        String name = utils.getSimpleName(member);
+        if (utils.isExecutableElement(member)) {
+            ExecutableElement ee = (ExecutableElement)member;
+            name = name + utils.flatSignature(ee);
+            si.setLabel(name);
+            if (!((utils.signature(ee)).equals(utils.flatSignature(ee)))) {
+                si.setUrl(getName(getAnchor(ee)));
+            }
+
+        }  else {
+            si.setLabel(name);
+        }
+        si.setCategory(getResource("doclet.Members").toString());
+        Content span = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                getDocLink(LinkInfoImpl.Kind.INDEX, member, name));
+        Content dt = HtmlTree.DT(span);
+        dt.addContent(" - ");
+        addMemberDesc(member, dt);
+        dlTree.addContent(dt);
+        Content dd = new HtmlTree(HtmlTag.DD);
+        addComment(member, dd);
+        dlTree.addContent(dd);
+    }
+
+    protected void addDescription(SearchIndexItem sii, Content dlTree) {
+        String path = pathToRoot.isEmpty() ? "" : pathToRoot.getPath() + "/";
+        path += sii.getUrl();
+        HtmlTree labelLink = HtmlTree.A(path, new StringContent(sii.getLabel()));
+        Content dt = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.searchTagLink, labelLink));
+        dt.addContent(" - ");
+        dt.addContent(getResource("doclet.Search_tag_in", sii.getHolder()));
+        dlTree.addContent(dt);
+        Content dd = new HtmlTree(HtmlTag.DD);
+        if (sii.getDescription().isEmpty()) {
+            dd.addContent(getSpace());
+        } else {
+            dd.addContent(sii.getDescription());
+        }
+        dlTree.addContent(dd);
+    }
+
+    /**
+     * Add comment for each element in the index. If the element is deprecated
+     * and it has a @deprecated tag, use that comment. Else if the containing
+     * class for this element is deprecated, then add the word "Deprecated." at
+     * the start and then print the normal comment.
+     *
+     * @param element Index element
+     * @param contentTree the content tree to which the comment will be added
+     */
+    protected void addComment(Element element, Content contentTree) {
+        List<? extends DocTree> tags;
+        Content span = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+        HtmlTree div = new HtmlTree(HtmlTag.DIV);
+        div.addStyle(HtmlStyle.block);
+        if (utils.isDeprecated(element)) {
+            div.addContent(span);
+            tags = utils.getBlockTags(element, DocTree.Kind.DEPRECATED);
+            if (!tags.isEmpty())
+                addInlineDeprecatedComment(element, tags.get(0), div);
+            contentTree.addContent(div);
+        } else {
+            TypeElement encl = utils.getEnclosingTypeElement(element);
+            while (encl != null) {
+                if (utils.isDeprecated(encl)) {
+                    div.addContent(span);
+                    contentTree.addContent(div);
+                    break;
+                }
+                encl = utils.getEnclosingTypeElement(encl);
+            }
+            addSummaryComment(element, contentTree);
+        }
+    }
+
+    /**
+     * Add description about the Static Variable/Method/Constructor for a
+     * member.
+     *
+     * @param member MemberDoc for the member within the Class Kind
+     * @param contentTree the content tree to which the member description will be added
+     */
+    protected void addMemberDesc(Element member, Content contentTree) {
+        TypeElement containing = utils.getEnclosingTypeElement(member);
+        String classdesc = utils.getTypeElementName(containing, true) + " ";
+        if (utils.isField(member)) {
+            Content resource = getResource(utils.isStatic(member)
+                    ? "doclet.Static_variable_in"
+                    : "doclet.Variable_in", classdesc);
+            contentTree.addContent(resource);
+        } else if (utils.isConstructor(member)) {
+            contentTree.addContent(
+                    getResource("doclet.Constructor_for", classdesc));
+        } else if (utils.isMethod(member)) {
+            Content resource = getResource(utils.isStatic(member)
+                    ? "doclet.Static_method_in"
+                    : "doclet.Method_in", classdesc);
+            contentTree.addContent(resource);
+        }
+        addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing,
+                false, contentTree);
+    }
+
+    /**
+     * Get the marker anchor which will be added to the index documentation tree.
+     *
+     * @param anchorNameForIndex the anchor name attribute for index page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchorForIndex(String anchorNameForIndex) {
+        return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null);
+    }
+
+    /**
+     * Generate a valid HTML name for member index page.
+     *
+     * @param unicode the string that needs to be converted to valid HTML name.
+     * @return a valid HTML name string.
+     */
+    public String getNameForIndex(String unicode) {
+        return "I:" + getName(unicode);
+    }
+
+    protected void createSearchIndexFiles() {
+        createSearchIndexFile(DocPaths.PACKAGE_SEARCH_INDEX_JSON, DocPaths.PACKAGE_SEARCH_INDEX_ZIP,
+                configuration.packageSearchIndex);
+        createSearchIndexFile(DocPaths.TYPE_SEARCH_INDEX_JSON, DocPaths.TYPE_SEARCH_INDEX_ZIP,
+                configuration.typeSearchIndex);
+        createSearchIndexFile(DocPaths.MEMBER_SEARCH_INDEX_JSON, DocPaths.MEMBER_SEARCH_INDEX_ZIP,
+                configuration.memberSearchIndex);
+        createSearchIndexFile(DocPaths.TAG_SEARCH_INDEX_JSON, DocPaths.TAG_SEARCH_INDEX_ZIP,
+                configuration.tagSearchIndex);
+    }
+
+    protected void createSearchIndexFile(DocPath searchIndexFile, DocPath searchIndexZip,
+            List<SearchIndexItem> searchIndex) {
+        if (!searchIndex.isEmpty()) {
+            try {
+                StringBuilder searchVar = new StringBuilder("[");
+                boolean first = true;
+                DocFile searchFile = DocFile.createFileForOutput(configuration, searchIndexFile);
+                Path p = Paths.get(searchFile.getPath());
+                for (SearchIndexItem item : searchIndex) {
+                    if (first) {
+                        searchVar.append(item.toString());
+                        first = false;
+                    } else {
+                        searchVar.append(",").append(item.toString());
+                    }
+                }
+                searchVar.append("]");
+                Files.write(p, searchVar.toString().getBytes());
+                DocFile zipFile = DocFile.createFileForOutput(configuration, searchIndexZip);
+                try (FileOutputStream fos = new FileOutputStream(zipFile.getPath());
+                        ZipOutputStream zos = new ZipOutputStream(fos)) {
+                    zipFile(searchFile.getPath(), searchIndexFile, zos);
+                }
+                Files.delete(p);
+            } catch (IOException ie) {
+                throw new DocletAbortException(ie);
+            }
+        }
+    }
+
+    protected void zipFile(String inputFile, DocPath file, ZipOutputStream zos) {
+        try {
+            try {
+                ZipEntry ze = new ZipEntry(file.getPath());
+                zos.putNextEntry(ze);
+                try (FileInputStream fis = new FileInputStream(new File(inputFile))) {
+                    byte[] buf = new byte[2048];
+                    int len = fis.read(buf);
+                    while (len > 0) {
+                        zos.write(buf, 0, len);
+                        len = fis.read(buf);
+                    }
+                }
+            } finally {
+                zos.closeEntry();
+            }
+        } catch (IOException e) {
+            throw new DocletAbortException(e);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,708 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.util.*;
+import java.util.stream.Collectors;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.TypeParameterElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.SimpleElementVisitor9;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.taglets.DeprecatedTaglet;
+import jdk.javadoc.internal.doclets.toolkit.util.MethodTypes;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+import static javax.lang.model.element.Modifier.*;
+
+/**
+ * The base class for member writers.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Jamie Ho (Re-write)
+ * @author Bhavesh Patel (Modified)
+ */
+public abstract class AbstractMemberWriter {
+
+    protected final ConfigurationImpl configuration;
+    protected final Utils utils;
+    protected final SubWriterHolderWriter writer;
+    protected final TypeElement typeElement;
+    protected Map<String, Integer> typeMap = new LinkedHashMap<>();
+    protected Set<MethodTypes> methodTypes = EnumSet.noneOf(MethodTypes.class);
+    private int methodTypesOr = 0;
+    public final boolean nodepr;
+
+    protected boolean printedSummaryHeader = false;
+
+    public AbstractMemberWriter(SubWriterHolderWriter writer, TypeElement typeElement) {
+        this.configuration = writer.configuration;
+        this.writer = writer;
+        this.nodepr = configuration.nodeprecated;
+        this.typeElement = typeElement;
+        this.utils = writer.configuration.utils;
+    }
+
+    public AbstractMemberWriter(SubWriterHolderWriter writer) {
+        this(writer, null);
+    }
+
+    /*** abstracts ***/
+
+    /**
+     * Add the summary label for the member.
+     *
+     * @param memberTree the content tree to which the label will be added
+     */
+    public abstract void addSummaryLabel(Content memberTree);
+
+    /**
+     * Get the summary for the member summary table.
+     *
+     * @return a string for the table summary
+     */
+    public abstract String getTableSummary();
+
+    /**
+     * Get the caption for the member summary table.
+     *
+     * @return a string for the table caption
+     */
+    public abstract Content getCaption();
+
+    /**
+     * Get the summary table header for the member.
+     *
+     * @param member the member to be documented
+     * @return the summary table header
+     */
+    public abstract List<String> getSummaryTableHeader(Element member);
+
+    /**
+     * Add inherited summary label for the member.
+     *
+     * @param typeElement the TypeElement to which to link to
+     * @param inheritedTree the content tree to which the inherited summary label will be added
+     */
+    public abstract void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree);
+
+    /**
+     * Add the anchor for the summary section of the member.
+     *
+     * @param typeElement the TypeElement to be documented
+     * @param memberTree the content tree to which the summary anchor will be added
+     */
+    public abstract void addSummaryAnchor(TypeElement typeElement, Content memberTree);
+
+    /**
+     * Add the anchor for the inherited summary section of the member.
+     *
+     * @param typeElement the TypeElement to be documented
+     * @param inheritedTree the content tree to which the inherited summary anchor will be added
+     */
+    public abstract void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree);
+
+    /**
+     * Add the summary type for the member.
+     *
+     * @param member the member to be documented
+     * @param tdSummaryType the content tree to which the type will be added
+     */
+    protected abstract void addSummaryType(Element member, Content tdSummaryType);
+
+    /**
+     * Add the summary link for the member.
+     *
+     * @param typeElement the TypeElement to be documented
+     * @param member the member to be documented
+     * @param tdSummary the content tree to which the link will be added
+     */
+    protected void addSummaryLink(TypeElement typeElement, Element member, Content tdSummary) {
+        addSummaryLink(LinkInfoImpl.Kind.MEMBER, typeElement, member, tdSummary);
+    }
+
+    /**
+     * Add the summary link for the member.
+     *
+     * @param context the id of the context where the link will be printed
+     * @param typeElement the TypeElement to be documented
+     * @param member the member to be documented
+     * @param tdSummary the content tree to which the summary link will be added
+     */
+    protected abstract void addSummaryLink(LinkInfoImpl.Kind context,
+            TypeElement typeElement, Element member, Content tdSummary);
+
+    /**
+     * Add the inherited summary link for the member.
+     *
+     * @param typeElement the TypeElement to be documented
+     * @param member the member to be documented
+     * @param linksTree the content tree to which the inherited summary link will be added
+     */
+    protected abstract void addInheritedSummaryLink(TypeElement typeElement,
+            Element member, Content linksTree);
+
+    /**
+     * Get the deprecated link.
+     *
+     * @param member the member being linked to
+     * @return a content tree representing the link
+     */
+    protected abstract Content getDeprecatedLink(Element member);
+
+    /**
+     * Get the navigation summary link.
+     *
+     * @param typeElement the TypeElement to be documented
+     * @param link true if its a link else the label to be printed
+     * @return a content tree for the navigation summary link.
+     */
+    protected abstract Content getNavSummaryLink(TypeElement typeElement, boolean link);
+
+    /**
+     * Add the navigation detail link.
+     *
+     * @param link true if its a link else the label to be printed
+     * @param liNav the content tree to which the navigation detail link will be added
+     */
+    protected abstract void addNavDetailLink(boolean link, Content liNav);
+
+    /**
+     * Add the member name to the content tree.
+     *
+     * @param name the member name to be added to the content tree.
+     * @param htmltree the content tree to which the name will be added.
+     */
+    protected void addName(String name, Content htmltree) {
+        htmltree.addContent(name);
+    }
+
+    protected String typeString(Element member) {
+        return new SimpleElementVisitor9<String, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitExecutable(ExecutableElement e, Void p) {
+               return utils.isMethod(e) ? e.getReturnType().toString() : "";
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitVariable(VariableElement e, Void p) {
+                return e.toString();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected String defaultAction(Element e, Void p) {
+                return "";
+            }
+        }.visit(member);
+    }
+
+    /**
+     * Add the modifier for the member. The modifiers are ordered as specified
+     * by <em>The Java Language Specification</em>.
+     *
+     * @param member the member for which teh modifier will be added.
+     * @param htmltree the content tree to which the modifier information will be added.
+     */
+    protected void addModifiers(Element member, Content htmltree) {
+        Set<Modifier> set = new TreeSet<>(member.getModifiers());
+
+        // remove the ones we really don't need
+        set.remove(NATIVE);
+        set.remove(SYNCHRONIZED);
+        set.remove(STRICTFP);
+
+        // According to JLS, we should not be showing public modifier for
+        // interface methods.
+        if ((utils.isField(member) || utils.isMethod(member))
+                && writer instanceof ClassWriterImpl
+                && utils.isInterface(((ClassWriterImpl) writer).getTypeElement())) {
+            // Remove the implicit abstract and public modifiers
+            if (utils.isMethod(member) && utils.isInterface(member.getEnclosingElement())) {
+                set.remove(ABSTRACT);
+                set.remove(PUBLIC);
+            }
+            if (!utils.isMethod(member)) {
+                set.remove(PUBLIC);
+            }
+        }
+        if (!set.isEmpty()) {
+            String mods = set.stream().map(m -> m.toString()).collect(Collectors.joining(" "));
+            htmltree.addContent(mods);
+            htmltree.addContent(writer.getSpace());
+        }
+    }
+
+    protected String makeSpace(int len) {
+        if (len <= 0) {
+            return "";
+        }
+        StringBuilder sb = new StringBuilder(len);
+        for (int i = 0; i < len; i++) {
+            sb.append(' ');
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Add the modifier and type for the member in the member summary.
+     *
+     * @param member the member to add the type for
+     * @param type the type to add
+     * @param tdSummaryType the content tree to which the modified and type will be added
+     */
+    protected void addModifierAndType(Element member, TypeMirror type,
+            Content tdSummaryType) {
+        HtmlTree code = new HtmlTree(HtmlTag.CODE);
+        addModifier(member, code);
+        if (type == null) {
+            code.addContent(utils.isClass(member) ? "class" : "interface");
+            code.addContent(writer.getSpace());
+        } else {
+            List<? extends TypeParameterElement> list = utils.isExecutableElement(member)
+                    ? ((ExecutableElement)member).getTypeParameters()
+                    : null;
+            if (list != null && !list.isEmpty()) {
+                Content typeParameters = ((AbstractExecutableMemberWriter) this)
+                        .getTypeParameters((ExecutableElement)member);
+                    code.addContent(typeParameters);
+                //Code to avoid ugly wrapping in member summary table.
+                if (typeParameters.charCount() > 10) {
+                    code.addContent(new HtmlTree(HtmlTag.BR));
+                } else {
+                    code.addContent(writer.getSpace());
+                }
+                code.addContent(
+                        writer.getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type)));
+            } else {
+                code.addContent(
+                        writer.getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.SUMMARY_RETURN_TYPE, type)));
+            }
+
+        }
+        tdSummaryType.addContent(code);
+    }
+
+    /**
+     * Add the modifier for the member.
+     *
+     * @param member the member to add the type for
+     * @param code the content tree to which the modified will be added
+     */
+    private void addModifier(Element member, Content code) {
+        if (utils.isProtected(member)) {
+            code.addContent("protected ");
+        } else if (utils.isPrivate(member)) {
+            code.addContent("private ");
+        } else if (!utils.isPublic(member)) { // Package private
+            code.addContent(configuration.getText("doclet.Package_private"));
+            code.addContent(" ");
+        }
+        boolean isAnnotatedTypeElement = utils.isAnnotationType(member.getEnclosingElement());
+        if (!isAnnotatedTypeElement && utils.isMethod(member)) {
+            if (!utils.isInterface(member.getEnclosingElement()) && utils.isAbstract(member)) {
+                code.addContent("abstract ");
+            }
+            if (utils.isDefault(member)) {
+                code.addContent("default ");
+            }
+        }
+        if (utils.isStatic(member)) {
+            code.addContent("static ");
+        }
+    }
+
+    /**
+     * Add the deprecated information for the given member.
+     *
+     * @param member the member being documented.
+     * @param contentTree the content tree to which the deprecated information will be added.
+     */
+    protected void addDeprecatedInfo(Element member, Content contentTree) {
+        Content output = (new DeprecatedTaglet()).getTagletOutput(member,
+            writer.getTagletWriterInstance(false));
+        if (!output.isEmpty()) {
+            Content deprecatedContent = output;
+            Content div = HtmlTree.DIV(HtmlStyle.block, deprecatedContent);
+            contentTree.addContent(div);
+        }
+    }
+
+    /**
+     * Add the comment for the given member.
+     *
+     * @param member the member being documented.
+     * @param htmltree the content tree to which the comment will be added.
+     */
+    protected void addComment(Element member, Content htmltree) {
+        if (!utils.getBody(member).isEmpty()) {
+            writer.addInlineComment(member, htmltree);
+        }
+    }
+
+    protected String name(Element member) {
+        return utils.getSimpleName(member);
+    }
+
+    /**
+     * Get the header for the section.
+     *
+     * @param member the member being documented.
+     * @return a header content for the section.
+     */
+    protected Content getHead(Element member) {
+        Content memberContent = new StringContent(name(member));
+        Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, memberContent);
+        return heading;
+    }
+
+    /**
+    * Return true if the given <code>ProgramElement</code> is inherited
+    * by the class that is being documented.
+    *
+    * @param ped The <code>ProgramElement</code> being checked.
+    * return true if the <code>ProgramElement</code> is being inherited and
+    * false otherwise.
+    */
+    protected boolean isInherited(Element ped){
+        return (!utils.isPrivate(ped) &&
+                (!utils.isPackagePrivate(ped) ||
+                    ped.getEnclosingElement().equals(ped.getEnclosingElement())));
+    }
+
+    /**
+     * 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(Collection<Element> deprmembers, String headingKey,
+            String tableSummary, List<String> tableHeader, Content contentTree) {
+        if (deprmembers.size() > 0) {
+            Content caption = writer.getTableCaption(configuration.getResource(headingKey));
+            Content table = (configuration.isOutputHtml5())
+                    ? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
+                    : HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
+            table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
+            Content tbody = new HtmlTree(HtmlTag.TBODY);
+            boolean altColor = true;
+            for (Element member : deprmembers) {
+                HtmlTree td = HtmlTree.TD(HtmlStyle.colOne, getDeprecatedLink(member));
+                List<? extends DocTree> deprTrees = utils.getBlockTags(member, DocTree.Kind.DEPRECATED);
+                if (!deprTrees.isEmpty()) {
+                    writer.addInlineDeprecatedComment(member, deprTrees.get(0), td);
+                }
+                HtmlTree tr = HtmlTree.TR(td);
+                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+                altColor = !altColor;
+                tbody.addContent(tr);
+            }
+            table.addContent(tbody);
+            Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+            Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
+            contentTree.addContent(ul);
+        }
+    }
+
+    /**
+     * Add use information to the documentation tree.
+     *
+     * @param mems list of program elements for which the use information will be added
+     * @param heading the section heading
+     * @param tableSummary the summary for the use table
+     * @param contentTree the content tree to which the use information will be added
+     */
+    protected void addUseInfo(List<? extends Element> mems,
+            Content heading, String tableSummary, Content contentTree) {
+        if (mems == null || mems.isEmpty()) {
+            return;
+        }
+        List<? extends Element> members = mems;
+        boolean printedUseTableHeader = false;
+        if (members.size() > 0) {
+            Content caption = writer.getTableCaption(heading);
+            Content table = (configuration.isOutputHtml5())
+                    ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+                    : HtmlTree.TABLE(HtmlStyle.useSummary, tableSummary, caption);
+            Content tbody = new HtmlTree(HtmlTag.TBODY);
+            boolean altColor = true;
+            for (Element element : members) {
+                TypeElement te = utils.getEnclosingTypeElement(element);
+                if (!printedUseTableHeader) {
+                    table.addContent(writer.getSummaryTableHeader(
+                            this.getSummaryTableHeader(element), "col"));
+                    printedUseTableHeader = true;
+                }
+                HtmlTree tr = new HtmlTree(HtmlTag.TR);
+                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+                altColor = !altColor;
+                HtmlTree tdFirst = new HtmlTree(HtmlTag.TD);
+                tdFirst.addStyle(HtmlStyle.colFirst);
+                writer.addSummaryType(this, element, tdFirst);
+                tr.addContent(tdFirst);
+                HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
+                tdLast.addStyle(HtmlStyle.colLast);
+                if (te != null
+                        && !utils.isConstructor(element)
+                        && !utils.isClass(element)
+                        && !utils.isInterface(element)
+                        && !utils.isAnnotationType(element)) {
+                    HtmlTree name = new HtmlTree(HtmlTag.SPAN);
+                    name.addStyle(HtmlStyle.typeNameLabel);
+                    name.addContent(name(te) + ".");
+                    tdLast.addContent(name);
+                }
+                addSummaryLink(utils.isClass(element) || utils.isInterface(element)
+                        ? LinkInfoImpl.Kind.CLASS_USE
+                        : LinkInfoImpl.Kind.MEMBER,
+                    te, element, tdLast);
+                writer.addSummaryLinkComment(this, element, tdLast);
+                tr.addContent(tdLast);
+                tbody.addContent(tr);
+            }
+            table.addContent(tbody);
+            contentTree.addContent(table);
+        }
+    }
+
+    /**
+     * Add the navigation detail link.
+     *
+     * @param members the members to be linked
+     * @param liNav the content tree to which the navigation detail link will be added
+     */
+    protected void addNavDetailLink(SortedSet<Element> members, Content liNav) {
+        addNavDetailLink(!members.isEmpty(), liNav);
+    }
+
+    /**
+     * Add the navigation summary link.
+     *
+     * @param members members to be linked
+     * @param visibleMemberMap the visible inherited members map
+     * @param liNav the content tree to which the navigation summary link will be added
+     */
+    protected void addNavSummaryLink(SortedSet<? extends Element> members,
+            VisibleMemberMap visibleMemberMap, Content liNav) {
+        if (!members.isEmpty()) {
+            liNav.addContent(getNavSummaryLink(null, true));
+            return;
+        }
+
+        TypeElement superClass = utils.getSuperClass(typeElement);
+        while (superClass != null) {
+            if (visibleMemberMap.hasMembersFor(superClass)) {
+                liNav.addContent(getNavSummaryLink(superClass, true));
+                return;
+            }
+            superClass = utils.getSuperClass(superClass);
+        }
+        liNav.addContent(getNavSummaryLink(null, false));
+    }
+
+    protected void serialWarning(Element e, String key, String a1, String a2) {
+        if (configuration.serialwarn) {
+            configuration.getDocletSpecificMsg().warning(e, key, a1, a2);
+        }
+    }
+
+    /**
+     * Add the member summary for the given class.
+     *
+     * @param tElement the class that is being documented
+     * @param member the member being documented
+     * @param firstSentenceTags the first sentence tags to be added to the summary
+     * @param tableContents the list of contents to which the documentation will be added
+     * @param counter the counter for determining id and style for the table row
+     */
+    public void addMemberSummary(TypeElement tElement, Element member,
+            List<? extends DocTree> firstSentenceTags, List<Content> tableContents, int counter) {
+        HtmlTree tdSummaryType = new HtmlTree(HtmlTag.TD);
+        tdSummaryType.addStyle(HtmlStyle.colFirst);
+        writer.addSummaryType(this, member, tdSummaryType);
+        HtmlTree tdSummary = new HtmlTree(HtmlTag.TD);
+        setSummaryColumnStyle(tdSummary);
+        addSummaryLink(tElement, member, tdSummary);
+        writer.addSummaryLinkComment(this, member, firstSentenceTags, tdSummary);
+        HtmlTree tr = HtmlTree.TR(tdSummaryType);
+        tr.addContent(tdSummary);
+        if (utils.isMethod(member) && !utils.isAnnotationType(member)) {
+            int methodType = utils.isStatic(member) ? MethodTypes.STATIC.value() :
+                    MethodTypes.INSTANCE.value();
+            if (utils.isInterface(member.getEnclosingElement())) {
+                methodType = utils.isAbstract(member)
+                        ? methodType | MethodTypes.ABSTRACT.value()
+                        : methodType | MethodTypes.DEFAULT.value();
+            } else {
+                methodType = utils.isAbstract(member)
+                        ? methodType | MethodTypes.ABSTRACT.value()
+                        : methodType | MethodTypes.CONCRETE.value();
+            }
+            if (utils.isDeprecated(member) || utils.isDeprecated(typeElement)) {
+                methodType = methodType | MethodTypes.DEPRECATED.value();
+            }
+            methodTypesOr = methodTypesOr | methodType;
+            String tableId = "i" + counter;
+            typeMap.put(tableId, methodType);
+            tr.addAttr(HtmlAttr.ID, tableId);
+        }
+        if (counter%2 == 0)
+            tr.addStyle(HtmlStyle.altColor);
+        else
+            tr.addStyle(HtmlStyle.rowColor);
+        tableContents.add(tr);
+    }
+
+    /**
+     * Generate the method types set and return true if the method summary table
+     * needs to show tabs.
+     *
+     * @return true if the table should show tabs
+     */
+    public boolean showTabs() {
+        int value;
+        for (MethodTypes type : EnumSet.allOf(MethodTypes.class)) {
+            value = type.value();
+            if ((value & methodTypesOr) == value) {
+                methodTypes.add(type);
+            }
+        }
+        boolean showTabs = methodTypes.size() > 1;
+        if (showTabs) {
+            methodTypes.add(MethodTypes.ALL);
+        }
+        return showTabs;
+    }
+
+    /**
+     * Set the style for the summary column.
+     *
+     * @param tdTree the column for which the style will be set
+     */
+    public void setSummaryColumnStyle(HtmlTree tdTree) {
+        tdTree.addStyle(HtmlStyle.colLast);
+    }
+
+    /**
+     * Add inherited member summary for the given class and member.
+     *
+     * @param tElement the class the inherited member belongs to
+     * @param nestedClass the inherited member that is summarized
+     * @param isFirst true if this is the first member in the list
+     * @param isLast true if this is the last member in the list
+     * @param linksTree the content tree to which the summary will be added
+     */
+    public void addInheritedMemberSummary(TypeElement tElement,
+            Element nestedClass, boolean isFirst, boolean isLast,
+            Content linksTree) {
+        writer.addInheritedMemberSummary(this, tElement, nestedClass, isFirst,
+                linksTree);
+    }
+
+    /**
+     * Get the inherited summary header for the given class.
+     *
+     * @param tElement the class the inherited member belongs to
+     * @return a content tree for the inherited summary header
+     */
+    public Content getInheritedSummaryHeader(TypeElement tElement) {
+        Content inheritedTree = writer.getMemberTreeHeader();
+        writer.addInheritedSummaryHeader(this, tElement, inheritedTree);
+        return inheritedTree;
+    }
+
+    /**
+     * Get the inherited summary links tree.
+     *
+     * @return a content tree for the inherited summary links
+     */
+    public Content getInheritedSummaryLinksTree() {
+        return new HtmlTree(HtmlTag.CODE);
+    }
+
+    /**
+     * Get the summary table tree for the given class.
+     *
+     * @param tElement the class for which the summary table is generated
+     * @param tableContents list of contents to be displayed in the summary table
+     * @return a content tree for the summary table
+     */
+    public Content getSummaryTableTree(TypeElement tElement, List<Content> tableContents) {
+        return writer.getSummaryTableTree(this, tElement, tableContents, showTabs());
+    }
+
+    /**
+     * Get the member tree to be documented.
+     *
+     * @param memberTree the content tree of member to be documented
+     * @return a content tree that will be added to the class documentation
+     */
+    public Content getMemberTree(Content memberTree) {
+        return writer.getMemberTree(memberTree);
+    }
+
+    /**
+     * Get the member tree to be documented.
+     *
+     * @param memberTree the content tree of member to be documented
+     * @param isLastContent true if the content to be added is the last content
+     * @return a content tree that will be added to the class documentation
+     */
+    public Content getMemberTree(Content memberTree, boolean isLastContent) {
+        if (isLastContent)
+            return HtmlTree.UL(HtmlStyle.blockListLast, memberTree);
+        else
+            return HtmlTree.UL(HtmlStyle.blockList, memberTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractPackageIndexWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,202 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+
+/**
+ * Abstract class to generate the overview files in
+ * Frame and Non-Frame format. This will be sub-classed by to
+ * generate overview-frame.html as well as overview-summary.html.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public abstract class AbstractPackageIndexWriter extends HtmlDocletWriter {
+
+    /**
+     * A Set of Packages to be documented.
+     */
+    protected SortedSet<PackageElement> packages;
+
+    /**
+     * Constructor. Also initializes the packages variable.
+     *
+     * @param configuration  The current configuration
+     * @param filename Name of the package index file to be generated.
+     */
+    public AbstractPackageIndexWriter(ConfigurationImpl configuration,
+                                      DocPath filename) throws IOException {
+        super(configuration, filename);
+        packages = configuration.packages;
+    }
+
+    /**
+     * Adds the navigation bar header to the documentation tree.
+     *
+     * @param body the document tree to which the navigation bar header will be added
+     */
+    protected abstract void addNavigationBarHeader(Content body);
+
+    /**
+     * Adds the navigation bar footer to the documentation tree.
+     *
+     * @param body the document tree to which the navigation bar footer will be added
+     */
+    protected abstract void addNavigationBarFooter(Content body);
+
+    /**
+     * Adds the overview header to the documentation tree.
+     *
+     * @param body the document tree to which the overview header will be added
+     */
+    protected abstract void addOverviewHeader(Content body);
+
+    /**
+     * Adds the packages list to the documentation tree.
+     *
+     * @param packages a collection of packagedoc objects
+     * @param text caption for the table
+     * @param tableSummary summary for the table
+     * @param body the document tree to which the packages list will be added
+     */
+    protected abstract void addPackagesList(Collection<PackageElement> packages, String text,
+            String tableSummary, Content body);
+
+    /**
+     * Generate and prints the contents in the package index file. Call appropriate
+     * methods from the sub-class in order to generate Frame or Non
+     * Frame format.
+     *
+     * @param title the title of the window.
+     * @param includeScript boolean set true if windowtitle script is to be included
+     */
+    protected void buildPackageIndexFile(String title, boolean includeScript) throws IOException {
+        String windowOverview = configuration.getText(title);
+        Content body = getBody(includeScript, getWindowTitle(windowOverview));
+        addNavigationBarHeader(body);
+        addOverviewHeader(body);
+        addIndex(body);
+        addOverview(body);
+        addNavigationBarFooter(body);
+        printHtmlDocument(configuration.metakeywords.getOverviewMetaKeywords(title,
+                configuration.doctitle), includeScript, body);
+    }
+
+    /**
+     * Default to no overview, override to add overview.
+     *
+     * @param body the document tree to which the overview will be added
+     */
+    protected void addOverview(Content body) throws IOException {
+    }
+
+    /**
+     * Adds the frame or non-frame package index to the documentation tree.
+     *
+     * @param body the document tree to which the index will be added
+     */
+    protected void addIndex(Content body) {
+        addIndexContents(packages, "doclet.Package_Summary",
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Package_Summary"),
+                configuration.getText("doclet.packages")), body);
+    }
+
+    /**
+     * Adds package index contents. Call appropriate methods from
+     * the sub-classes. Adds it to the body HtmlTree
+     *
+     * @param packages a collection of packages to be documented
+     * @param text string which will be used as the heading
+     * @param tableSummary summary for the table
+     * @param body the document tree to which the index contents will be added
+     */
+    protected void addIndexContents(Collection<PackageElement> packages, String text,
+            String tableSummary, Content body) {
+        if (!packages.isEmpty()) {
+            HtmlTree htmlTree = (configuration.allowTag(HtmlTag.NAV))
+                    ? HtmlTree.NAV()
+                    : new HtmlTree(HtmlTag.DIV);
+            htmlTree.addStyle(HtmlStyle.indexNav);
+            HtmlTree ul = new HtmlTree(HtmlTag.UL);
+            addAllClassesLink(ul);
+            htmlTree.addContent(ul);
+            body.addContent(htmlTree);
+            addPackagesList(packages, text, tableSummary, body);
+        }
+    }
+
+    /**
+     * Adds the doctitle to the documentation tree, if it is specified on the command line.
+     *
+     * @param body the document tree to which the title will be added
+     */
+    protected void addConfigurationTitle(Content body) {
+        if (configuration.doctitle.length() > 0) {
+            Content title = new RawHtml(configuration.doctitle);
+            Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING,
+                    HtmlStyle.title, title);
+            Content div = HtmlTree.DIV(HtmlStyle.header, heading);
+            body.addContent(div);
+        }
+    }
+
+    /**
+     * Returns highlighted "Overview", in the navigation bar as this is the
+     * overview page.
+     *
+     * @return a Content object to be added to the documentation tree
+     */
+    protected Content getNavLinkContents() {
+        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, overviewLabel);
+        return li;
+    }
+
+    /**
+     * Do nothing. This will be overridden.
+     *
+     * @param div the document tree to which the all classes link will be added
+     */
+    protected void addAllClassesLink(Content div) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractTreeWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,202 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * Abstract class to print the class hierarchy page for all the Classes. This
+ * is sub-classed by {@link PackageTreeWriter} and {@link TreeWriter} to
+ * generate the Package Tree and global Tree(for all the classes and packages)
+ * pages.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+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 sub-classes info.
+     *
+     * @param parent the superclass or superinterface of the sset
+     * @param collection  a collection 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(TypeElement parent, Collection<TypeElement> collection,
+            boolean isEnum, Content contentTree) {
+        if (!collection.isEmpty()) {
+            Content ul = new HtmlTree(HtmlTag.UL);
+            for (TypeElement local : collection) {
+                HtmlTree li = new HtmlTree(HtmlTag.LI);
+                li.addStyle(HtmlStyle.circle);
+                addPartialInfo(local, li);
+                addExtendsImplements(parent, local, li);
+                addLevelInfo(local, classtree.directSubClasses(local, isEnum),
+                             isEnum, li);   // Recurse
+                ul.addContent(li);
+            }
+            contentTree.addContent(ul);
+        }
+    }
+
+    /**
+     * Add the heading for the tree depending upon tree type if it's a
+     * Class Tree or Interface tree.
+     *
+     * @param sset classes which are at the most base level, all the
+     * other classes in this run will derive from these classes
+     * @param heading heading for the tree
+     * @param div the content tree to which the tree will be added
+     */
+    protected void addTree(SortedSet<TypeElement> sset, String heading, HtmlTree div) {
+        addTree(sset, heading, div, false);
+    }
+
+    protected void addTree(SortedSet<TypeElement> sset, String heading,
+                           HtmlTree div, boolean isEnums) {
+        if (!sset.isEmpty()) {
+            TypeElement firstTypeElement = sset.first();
+            Content headingContent = getResource(heading);
+            Content sectionHeading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+                    headingContent);
+            HtmlTree htmlTree;
+            if (configuration.allowTag(HtmlTag.SECTION)) {
+                htmlTree = HtmlTree.SECTION(sectionHeading);
+            } else {
+                div.addContent(sectionHeading);
+                htmlTree = div;
+            }
+            addLevelInfo(!utils.isInterface(firstTypeElement) ? firstTypeElement : null,
+                    sset, isEnums, htmlTree);
+            if (configuration.allowTag(HtmlTag.SECTION)) {
+                div.addContent(htmlTree);
+            }
+        }
+    }
+
+    /**
+     * Add information regarding the classes which this class extends or
+     * implements.
+     *
+     * @param parent the parent class of the class being documented
+     * @param typeElement the TypeElement under consideration
+     * @param contentTree the content tree to which the information will be added
+     */
+    protected void addExtendsImplements(TypeElement parent, TypeElement typeElement,
+            Content contentTree) {
+        SortedSet<TypeElement> interfaces = new TreeSet<>(utils.makeGeneralPurposeComparator());
+        typeElement.getInterfaces().stream().forEach((t) -> {
+            interfaces.add(utils.asTypeElement(t));
+        });
+        if (interfaces.size() > (utils.isInterface(typeElement) ? 1 : 0)) {
+            boolean isFirst = true;
+            for (TypeElement intf : interfaces) {
+                if (parent != intf) {
+                    if (utils.isPublic(intf) || utils.isLinkable(intf)) {
+                        if (isFirst) {
+                            isFirst = false;
+                            if (utils.isInterface(typeElement)) {
+                                contentTree.addContent(" (");
+                                contentTree.addContent(getResource("doclet.also"));
+                                contentTree.addContent(" extends ");
+                            } else {
+                                contentTree.addContent(" (implements ");
+                            }
+                        } else {
+                            contentTree.addContent(", ");
+                        }
+                        addPreQualifiedClassLink(LinkInfoImpl.Kind.TREE, intf, contentTree);
+                    }
+                }
+            }
+            if (!isFirst) {
+                contentTree.addContent(")");
+            }
+        }
+    }
+
+    /**
+     * Add information about the class kind, if it's a "class" or "interface".
+     *
+     * @param typeElement the class being documented
+     * @param contentTree the content tree to which the information will be added
+     */
+    protected void addPartialInfo(TypeElement typeElement, Content contentTree) {
+        addPreQualifiedStrongClassLink(LinkInfoImpl.Kind.TREE, typeElement, contentTree);
+    }
+
+    /**
+     * Get the tree label for the navigation bar.
+     *
+     * @return a content tree for the tree label
+     */
+    protected Content getNavLinkTree() {
+        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, treeLabel);
+        return li;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AllClassesFrameWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,180 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder;
+
+
+/**
+ * Generate the file with list of all the classes in this run. This page will be
+ * used in the left-hand bottom frame, when "All Classes" link is clicked in
+ * the left-hand top frame. The name of the generated file is
+ * "allclasses-frame.html".
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Doug Kramer
+ * @author Bhavesh Patel (Modified)
+ */
+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 (Character unicode : indexbuilder.index()) {
+            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(Iterable<? extends Element> classlist, boolean wantFrames,
+                               Content content) {
+        for (Element element : classlist) {
+            TypeElement typeElement = (TypeElement)element;
+            if (!utils.isCoreClass(typeElement)) {
+                continue;
+            }
+            Content label = interfaceName(typeElement, false);
+            Content linkContent;
+            if (wantFrames) {
+                linkContent = getLink(new LinkInfoImpl(configuration,
+                                                       LinkInfoImpl.Kind.ALL_CLASSES_FRAME, typeElement).label(label).target("classFrame"));
+            } else {
+                linkContent = getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, typeElement).label(label));
+            }
+            Content li = HtmlTree.LI(linkContent);
+            content.addContent(li);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,324 @@
+/*
+ * Copyright (c) 2013, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeFieldWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+
+
+/**
+ * Writes annotation type field documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+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,
+            TypeElement annotationType) {
+        super(writer, annotationType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(
+                HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, 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(TypeElement typeElement,
+            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(Element member,
+            Content annotationDetailsTree) {
+        annotationDetailsTree.addContent(
+                writer.getMarkerAnchor(name(member)));
+        Content annotationDocTree = writer.getMemberTreeHeader();
+        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        heading.addContent(name(member));
+        annotationDocTree.addContent(heading);
+        return annotationDocTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getSignature(Element 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(name(member));
+            writer.addSrcLink(member, memberName, pre);
+        } else {
+            addName(name(member), pre);
+        }
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addDeprecated(Element member, Content annotationDocTree) {
+        addDeprecatedInfo(member, annotationDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addComments(Element member, Content annotationDocTree) {
+        addComment(member, annotationDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addTags(Element 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 List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(writer.getModifierTypeHeader(),
+                configuration.getText("doclet.0_and_1",
+                        configuration.getText("doclet.Fields"),
+                        configuration.getText("doclet.Description")));
+        return header;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.ANNOTATION_TYPE_FIELD_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
+            Content tdSummary) {
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getDocLink(context, member, name(member), false));
+        Content code = HtmlTree.CODE(memberLink);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addInheritedSummaryLink(TypeElement typeElement,
+            Element member, Content linksTree) {
+        //Not applicable.
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        addModifierAndType(member, getType(member), tdSummaryType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content getDeprecatedLink(Element member) {
+        return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
+                member, utils.getFullyQualifiedName(member));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content getNavSummaryLink(TypeElement typeElement, 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 TypeMirror getType(Element member) {
+        if (utils.isConstructor(member))
+            return null;
+        if (utils.isExecutableElement(member))
+            return utils.getReturnType((ExecutableElement)member);
+        return member.asType();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,171 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeOptionalMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+
+
+/**
+ * Writes annotation type optional member documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+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,
+        TypeElement annotationType) {
+        super(writer, annotationType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(
+                HtmlConstants.START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addDefaultValueInfo(Element member, Content annotationDocTree) {
+        if (utils.isAnnotationType(member)) {
+            ExecutableElement ee = (ExecutableElement)member;
+            AnnotationValue value = ee.getDefaultValue();
+            if (value != null) {
+                Content dt = HtmlTree.DT(writer.getResource("doclet.Default"));
+                Content dl = HtmlTree.DL(dt);
+                Content dd = HtmlTree.DD(new StringContent(value.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 List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(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(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY,
+                    writer.getResource("doclet.navAnnotationTypeOptionalMember"));
+        } else {
+            return writer.getResource("doclet.navAnnotationTypeOptionalMember");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,324 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+
+
+/**
+ * Writes annotation type required member documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+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,
+            TypeElement annotationType) {
+        super(writer, annotationType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(
+                HtmlConstants.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, 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(TypeElement 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(Element member,
+            Content annotationDetailsTree) {
+        String simpleName = name(member);
+        annotationDetailsTree.addContent(writer.getMarkerAnchor(simpleName +
+                utils.signature((ExecutableElement) member)));
+        Content annotationDocTree = writer.getMemberTreeHeader();
+        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        heading.addContent(simpleName);
+        annotationDocTree.addContent(heading);
+        return annotationDocTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getSignature(Element 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(name(member));
+            writer.addSrcLink(member, memberName, pre);
+        } else {
+            addName(name(member), pre);
+        }
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addDeprecated(Element member, Content annotationDocTree) {
+        addDeprecatedInfo(member, annotationDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addComments(Element member, Content annotationDocTree) {
+        addComment(member, annotationDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addTags(Element 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 List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(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(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
+            Content tdSummary) {
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getDocLink(context, member, name(member), false));
+        Content code = HtmlTree.CODE(memberLink);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addInheritedSummaryLink(TypeElement typeElement,
+            Element member, Content linksTree) {
+        //Not applicable.
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        addModifierAndType(member, getType(member), tdSummaryType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content getDeprecatedLink(Element member) {
+        String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName();
+        return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member, name);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content getNavSummaryLink(TypeElement typeElement, 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 TypeMirror getType(Element member) {
+        return utils.isExecutableElement(member)
+                ? utils.getReturnType((ExecutableElement) member)
+                : member.asType();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,465 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.IOException;
+import java.util.List;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+/**
+ * Generate the Class Information Page.
+ *
+ *  <p><b>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.</b>
+ *
+ * @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)
+ */
+public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
+        implements AnnotationTypeWriter {
+
+    protected TypeElement annotationType;
+
+    protected TypeMirror prev;
+
+    protected TypeMirror next;
+
+    /**
+     * @param configuration the configuration
+     * @param annotationType the annotation type being documented.
+     * @param prevType the previous class that was documented.
+     * @param nextType the next class being documented.
+     * @throws java.lang.Exception
+     */
+    public AnnotationTypeWriterImpl(ConfigurationImpl configuration,
+            TypeElement annotationType, TypeMirror prevType, TypeMirror nextType)
+            throws Exception {
+        super(configuration, DocPath.forClass(configuration.utils, annotationType));
+        this.annotationType = annotationType;
+        configuration.currentTypeElement = annotationType;
+        this.prev = prevType;
+        this.next = nextType;
+    }
+
+    /**
+     * Get this package link.
+     *
+     * @return a content tree for the package link
+     */
+    @Override
+    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
+     */
+    @Override
+    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
+     */
+    @Override
+    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
+     */
+    @Override
+    public Content getNavLinkPrevious() {
+        Content li;
+        if (prev != null) {
+            Content prevLink = getLink(new LinkInfoImpl(configuration,
+                    LinkInfoImpl.Kind.CLASS, utils.asTypeElement(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
+     */
+    @Override
+    public Content getNavLinkNext() {
+        Content li;
+        if (next != null) {
+            Content nextLink = getLink(new LinkInfoImpl(configuration,
+                    LinkInfoImpl.Kind.CLASS, utils.asTypeElement(next))
+                    .label(nextclassLabel).strong(true));
+            li = HtmlTree.LI(nextLink);
+        }
+        else
+            li = HtmlTree.LI(nextclassLabel);
+        return li;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getHeader(String header) {
+        HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getSimpleName(annotationType)));
+        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);
+        PackageElement pkg = utils.containingPackage(annotationType);
+        if (!pkg.isUnnamed()) {
+            Content pkgNameContent = new StringContent(utils.getPackageName(pkg));
+            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}
+     */
+    @Override
+    public Content getAnnotationContentHeader() {
+        return getContentHeader();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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}
+     */
+    @Override
+    public void printDocument(Content contentTree) throws IOException {
+        printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType),
+                true, contentTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getAnnotationInfoTreeHeader() {
+        return getMemberTreeHeader();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getAnnotationInfo(Content annotationInfoTree) {
+        return getMemberTree(HtmlStyle.description, annotationInfoTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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(utils.getSimpleName(annotationType));
+        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}
+     */
+    @Override
+    public void addAnnotationTypeDescription(Content annotationInfoTree) {
+        if(!configuration.nocomment) {
+            if (!utils.getBody(annotationType).isEmpty()) {
+                addInlineComment(annotationType, annotationInfoTree);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addAnnotationTypeTagInfo(Content annotationInfoTree) {
+        if(!configuration.nocomment) {
+            addTagsInfo(annotationType, annotationInfoTree);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addAnnotationTypeDeprecationInfo(Content annotationInfoTree) {
+        Content hr = new HtmlTree(HtmlTag.HR);
+        annotationInfoTree.addContent(hr);
+        List<? extends DocTree> deprs = utils.getBlockTags(annotationType, DocTree.Kind.DEPRECATED);
+        if (utils.isDeprecated(annotationType)) {
+            CommentHelper ch = utils.getCommentHelper(annotationType);
+            Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
+            if (!deprs.isEmpty()) {
+
+                List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
+                if (!commentTags.isEmpty()) {
+                    div.addContent(getSpace());
+                    addInlineDeprecatedComment(annotationType, deprs.get(0), div);
+                }
+            }
+            annotationInfoTree.addContent(div);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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
+     */
+    @Override
+    protected void addSummaryDetailLinks(Content subDiv) {
+        try {
+            Content div = HtmlTree.DIV(getNavSummaryLinks());
+            div.addContent(getNavDetailLinks());
+            subDiv.addContent(div);
+        } catch (Exception e) {
+            throw new DocletAbortException(e);
+        }
+    }
+
+    /**
+     * Get summary links for navigation bar.
+     *
+     * @return the content tree for the navigation summary links
+     * @throws java.lang.Exception
+     */
+    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.Kind.ANNOTATION_TYPE_FIELDS, liNavField);
+        addNavGap(liNavField);
+        ulNav.addContent(liNavField);
+        Content liNavReq = new HtmlTree(HtmlTag.LI);
+        addNavSummaryLink(memberSummaryBuilder,
+                "doclet.navAnnotationTypeRequiredMember",
+                VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_REQUIRED, liNavReq);
+        addNavGap(liNavReq);
+        ulNav.addContent(liNavReq);
+        Content liNavOpt = new HtmlTree(HtmlTag.LI);
+        addNavSummaryLink(memberSummaryBuilder,
+                "doclet.navAnnotationTypeOptionalMember",
+                VisibleMemberMap.Kind.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, VisibleMemberMap.Kind 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
+     * @throws java.lang.Exception
+     */
+    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.Kind.ANNOTATION_TYPE_FIELDS));
+        AbstractMemberWriter writerOptional =
+                ((AbstractMemberWriter) memberSummaryBuilder.
+                getMemberSummaryWriter(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL));
+        AbstractMemberWriter writerRequired =
+                ((AbstractMemberWriter) memberSummaryBuilder.
+                getMemberSummaryWriter(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_REQUIRED));
+        Content liNavField = new HtmlTree(HtmlTag.LI);
+        if (writerField != null) {
+            writerField.addNavDetailLink(!utils.getAnnotationFields(annotationType).isEmpty(), liNavField);
+        } else {
+            liNavField.addContent(getResource("doclet.navField"));
+        }
+        addNavGap(liNavField);
+        ulNav.addContent(liNavField);
+        if (writerOptional != null){
+            Content liNavOpt = new HtmlTree(HtmlTag.LI);
+            writerOptional.addNavDetailLink(!annotationType.getAnnotationMirrors().isEmpty(), liNavOpt);
+            ulNav.addContent(liNavOpt);
+        } else if (writerRequired != null){
+            Content liNavReq = new HtmlTree(HtmlTag.LI);
+            writerRequired.addNavDetailLink(!annotationType.getAnnotationMirrors().isEmpty(), 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}
+     */
+    @Override
+    public TypeElement getAnnotationTypeElement() {
+        return annotationType;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassUseWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,554 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.tools.Diagnostic;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassUseMapper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+/**
+ * Generate class usage information.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert G. Field
+ * @author Bhavesh Patel (Modified)
+ */
+public class ClassUseWriter extends SubWriterHolderWriter {
+
+    final TypeElement typeElement;
+    Set<PackageElement> pkgToPackageAnnotations = null;
+    final Map<PackageElement, List<Element>> pkgToClassTypeParameter;
+    final Map<PackageElement, List<Element>> pkgToClassAnnotations;
+    final Map<PackageElement, List<Element>> pkgToMethodTypeParameter;
+    final Map<PackageElement, List<Element>> pkgToMethodArgTypeParameter;
+    final Map<PackageElement, List<Element>> pkgToMethodReturnTypeParameter;
+    final Map<PackageElement, List<Element>> pkgToMethodAnnotations;
+    final Map<PackageElement, List<Element>> pkgToMethodParameterAnnotations;
+    final Map<PackageElement, List<Element>> pkgToFieldTypeParameter;
+    final Map<PackageElement, List<Element>> pkgToFieldAnnotations;
+    final Map<PackageElement, List<Element>> pkgToSubclass;
+    final Map<PackageElement, List<Element>> pkgToSubinterface;
+    final Map<PackageElement, List<Element>> pkgToImplementingClass;
+    final Map<PackageElement, List<Element>> pkgToField;
+    final Map<PackageElement, List<Element>> pkgToMethodReturn;
+    final Map<PackageElement, List<Element>> pkgToMethodArgs;
+    final Map<PackageElement, List<Element>> pkgToMethodThrows;
+    final Map<PackageElement, List<Element>> pkgToConstructorAnnotations;
+    final Map<PackageElement, List<Element>> pkgToConstructorParameterAnnotations;
+    final Map<PackageElement, List<Element>> pkgToConstructorArgs;
+    final Map<PackageElement, List<Element>> pkgToConstructorArgTypeParameter;
+    final Map<PackageElement, List<Element>> pkgToConstructorThrows;
+    final SortedSet<PackageElement> pkgSet;
+    final MethodWriterImpl methodSubWriter;
+    final ConstructorWriterImpl constrSubWriter;
+    final FieldWriterImpl fieldSubWriter;
+    final NestedClassWriterImpl classSubWriter;
+    // Summary for various use tables.
+    final String classUseTableSummary;
+    final String subclassUseTableSummary;
+    final String subinterfaceUseTableSummary;
+    final String fieldUseTableSummary;
+    final String methodUseTableSummary;
+    final String constructorUseTableSummary;
+
+    /**
+     * The HTML tree for main tag.
+     */
+    protected HtmlTree mainTree = HtmlTree.MAIN();
+
+    /**
+     * Constructor.
+     *
+     * @param filename the file to be generated.
+     * @throws IOException
+     * @throws DocletAbortException
+     */
+    public ClassUseWriter(ConfigurationImpl configuration,
+                          ClassUseMapper mapper, DocPath filename,
+                          TypeElement typeElement) throws IOException {
+        super(configuration, filename);
+        this.typeElement = typeElement;
+        if (mapper.classToPackageAnnotations.containsKey(typeElement)) {
+            pkgToPackageAnnotations = new TreeSet<>(utils.makeClassUseComparator());
+            pkgToPackageAnnotations.addAll(mapper.classToPackageAnnotations.get(typeElement));
+        }
+        configuration.currentTypeElement = typeElement;
+        this.pkgSet = new TreeSet<>(utils.makePackageComparator());
+        this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam);
+        this.pkgToClassAnnotations = pkgDivide(mapper.classToClassAnnotations);
+        this.pkgToMethodTypeParameter = pkgDivide(mapper.classToMethodTypeParam);
+        this.pkgToMethodArgTypeParameter = pkgDivide(mapper.classToMethodArgTypeParam);
+        this.pkgToFieldTypeParameter = pkgDivide(mapper.classToFieldTypeParam);
+        this.pkgToFieldAnnotations = pkgDivide(mapper.annotationToField);
+        this.pkgToMethodReturnTypeParameter = pkgDivide(mapper.classToMethodReturnTypeParam);
+        this.pkgToMethodAnnotations = pkgDivide(mapper.classToMethodAnnotations);
+        this.pkgToMethodParameterAnnotations = pkgDivide(mapper.classToMethodParamAnnotation);
+        this.pkgToSubclass = pkgDivide(mapper.classToSubclass);
+        this.pkgToSubinterface = pkgDivide(mapper.classToSubinterface);
+        this.pkgToImplementingClass = pkgDivide(mapper.classToImplementingClass);
+        this.pkgToField = pkgDivide(mapper.classToField);
+        this.pkgToMethodReturn = pkgDivide(mapper.classToMethodReturn);
+        this.pkgToMethodArgs = pkgDivide(mapper.classToMethodArgs);
+        this.pkgToMethodThrows = pkgDivide(mapper.classToMethodThrows);
+        this.pkgToConstructorAnnotations = pkgDivide(mapper.classToConstructorAnnotations);
+        this.pkgToConstructorParameterAnnotations = pkgDivide(mapper.classToConstructorParamAnnotation);
+        this.pkgToConstructorArgs = pkgDivide(mapper.classToConstructorArgs);
+        this.pkgToConstructorArgTypeParameter = pkgDivide(mapper.classToConstructorArgTypeParam);
+        this.pkgToConstructorThrows = pkgDivide(mapper.classToConstructorThrows);
+        //tmp test
+        if (pkgSet.size() > 0 &&
+            mapper.classToPackage.containsKey(this.typeElement) &&
+            !pkgSet.equals(mapper.classToPackage.get(this.typeElement))) {
+            configuration.reporter.print(Diagnostic.Kind.WARNING,
+                    "Internal error: package sets don't match: "
+                    + pkgSet + " with: " + mapper.classToPackage.get(this.typeElement));
+        }
+        methodSubWriter = new MethodWriterImpl(this);
+        constrSubWriter = new ConstructorWriterImpl(this);
+        fieldSubWriter = new FieldWriterImpl(this);
+        classSubWriter = new NestedClassWriterImpl(this);
+        classUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.classes"));
+        subclassUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.subclasses"));
+        subinterfaceUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.subinterfaces"));
+        fieldUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.fields"));
+        methodUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.methods"));
+        constructorUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.constructors"));
+    }
+
+    /**
+     * Write out class use pages.
+     * @throws DocletAbortException
+     */
+    public static void generate(ConfigurationImpl configuration, ClassTree classtree)  {
+        ClassUseMapper mapper = new ClassUseMapper(configuration, classtree);
+        for (TypeElement aClass : configuration.root.getIncludedClasses()) {
+            // If -nodeprecated option is set and the containing package is marked
+            // as deprecated, do not generate the class-use page. We will still generate
+            // the class-use page if the class is marked as deprecated but the containing
+            // package is not since it could still be linked from that package-use page.
+            if (!(configuration.nodeprecated &&
+                  configuration.utils.isDeprecated(configuration.utils.containingPackage(aClass))))
+                ClassUseWriter.generate(configuration, mapper, aClass);
+        }
+        for (PackageElement pkg : configuration.packages) {
+            // If -nodeprecated option is set and the package is marked
+            // as deprecated, do not generate the package-use page.
+            if (!(configuration.nodeprecated && configuration.utils.isDeprecated(pkg)))
+                PackageUseWriter.generate(configuration, mapper, pkg);
+        }
+    }
+
+    private Map<PackageElement, List<Element>> pkgDivide(Map<TypeElement, ? extends List<? extends Element>> classMap) {
+        Map<PackageElement, List<Element>> map = new HashMap<>();
+        List<? extends Element> elements = (List<? extends Element>) classMap.get(typeElement);
+        if (elements != null) {
+            Collections.sort(elements, utils.makeClassUseComparator());
+            for (Element e : elements) {
+                PackageElement pkg = utils.containingPackage(e);
+                pkgSet.add(pkg);
+                List<Element> inPkg = map.get(pkg);
+                if (inPkg == null) {
+                    inPkg = new ArrayList<>();
+                    map.put(pkg, inPkg);
+                }
+                inPkg.add(e);
+            }
+        }
+        return map;
+    }
+
+    /**
+     * Generate a class page.
+     */
+    public static void generate(ConfigurationImpl configuration, ClassUseMapper mapper,
+                                TypeElement typeElement) {
+        ClassUseWriter clsgen;
+        DocPath path = DocPath.forPackage(configuration.utils, typeElement)
+                              .resolve(DocPaths.CLASS_USE)
+                              .resolve(DocPath.forName(configuration.utils, typeElement));
+        try {
+            clsgen = new ClassUseWriter(configuration, mapper, path, typeElement);
+            clsgen.generateClassUseFile();
+            clsgen.close();
+        } catch (IOException exc) {
+            configuration.standardmessage.
+                error("doclet.exception_encountered",
+                      exc.toString(), path.getPath());
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Generate the class use elements.
+     */
+    protected void generateClassUseFile() throws IOException {
+        HtmlTree body = getClassUseHeader();
+        HtmlTree div = new HtmlTree(HtmlTag.DIV);
+        div.addStyle(HtmlStyle.classUseContainer);
+        if (pkgSet.size() > 0) {
+            addClassUse(div);
+        } else {
+            div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
+                    utils.getFullyQualifiedName(typeElement)));
+        }
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(div);
+            body.addContent(mainTree);
+        } else {
+            body.addContent(div);
+        }
+        HtmlTree 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 class use documentation.
+     *
+     * @param contentTree the content tree to which the class use information will be added
+     */
+    protected void addClassUse(Content contentTree) throws IOException {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        if (configuration.packages.size() > 1) {
+            addPackageList(ul);
+            addPackageAnnotationList(ul);
+        }
+        addClassList(ul);
+        contentTree.addContent(ul);
+    }
+
+    /**
+     * Add the packages elements that use the given class.
+     *
+     * @param contentTree the content tree to which the packages elements will be added
+     */
+    protected void addPackageList(Content contentTree) throws IOException {
+        Content caption = getTableCaption(configuration.getResource(
+                "doclet.ClassUse_Packages.that.use.0",
+                getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.CLASS_USE_HEADER, typeElement))));
+        Content table = (configuration.isOutputHtml5())
+                ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+                : HtmlTree.TABLE(HtmlStyle.useSummary, useTableSummary, caption);
+        table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
+        Content tbody = new HtmlTree(HtmlTag.TBODY);
+        boolean altColor = true;
+        for (PackageElement pkg : pkgSet) {
+            HtmlTree tr = new HtmlTree(HtmlTag.TR);
+            tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+            altColor = !altColor;
+            addPackageUse(pkg, tr);
+            tbody.addContent(tr);
+        }
+        table.addContent(tbody);
+        Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+        contentTree.addContent(li);
+    }
+
+    /**
+     * Add the package annotation elements.
+     *
+     * @param contentTree the content tree to which the package annotation elements will be added
+     */
+    protected void addPackageAnnotationList(Content contentTree) throws IOException {
+        if (!utils.isAnnotationType(typeElement) ||
+                pkgToPackageAnnotations == null ||
+                pkgToPackageAnnotations.isEmpty()) {
+            return;
+        }
+        Content caption = getTableCaption(configuration.getResource(
+                "doclet.ClassUse_PackageAnnotation",
+                getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.CLASS_USE_HEADER, typeElement))));
+        Content table = (configuration.isOutputHtml5())
+                ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+                : HtmlTree.TABLE(HtmlStyle.useSummary, useTableSummary, caption);
+        table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
+        Content tbody = new HtmlTree(HtmlTag.TBODY);
+        boolean altColor = true;
+        for (PackageElement pkg : pkgToPackageAnnotations) {
+            HtmlTree tr = new HtmlTree(HtmlTag.TR);
+            tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+            altColor = !altColor;
+            Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst, getPackageLink(pkg));
+            tr.addContent(tdFirst);
+            HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
+            tdLast.addStyle(HtmlStyle.colLast);
+            addSummaryComment(pkg, tdLast);
+            tr.addContent(tdLast);
+            tbody.addContent(tr);
+        }
+        table.addContent(tbody);
+        Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+        contentTree.addContent(li);
+    }
+
+    /**
+     * Add the class elements that use the given class.
+     *
+     * @param contentTree the content tree to which the class elements will be added
+     */
+    protected void addClassList(Content contentTree) throws IOException {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        for (PackageElement pkg : pkgSet) {
+            Content markerAnchor = getMarkerAnchor(getPackageAnchorName(pkg));
+            HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+                    ? HtmlTree.SECTION(markerAnchor)
+                    : HtmlTree.LI(HtmlStyle.blockList, markerAnchor);
+            Content link = getResource("doclet.ClassUse_Uses.of.0.in.1",
+                                       getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER,
+                                                                typeElement)),
+                                       getPackageLink(pkg, utils.getPackageName(pkg)));
+            Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
+            htmlTree.addContent(heading);
+            addClassUse(pkg, htmlTree);
+            if (configuration.allowTag(HtmlTag.SECTION)) {
+                ul.addContent(HtmlTree.LI(HtmlStyle.blockList, htmlTree));
+            } else {
+                ul.addContent(htmlTree);
+            }
+        }
+        Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
+        contentTree.addContent(li);
+    }
+
+    /**
+     * Add the package use information.
+     *
+     * @param pkg the package that uses the given class
+     * @param contentTree the content tree to which the package use information will be added
+     */
+    protected void addPackageUse(PackageElement pkg, Content contentTree) throws IOException {
+        Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
+                getHyperLink(getPackageAnchorName(pkg), new StringContent(utils.getPackageName(pkg))));
+        contentTree.addContent(tdFirst);
+        HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
+        tdLast.addStyle(HtmlStyle.colLast);
+        addSummaryComment(pkg, tdLast);
+        contentTree.addContent(tdLast);
+    }
+
+    /**
+     * Add the class use information.
+     *
+     * @param pkg the package that uses the given class
+     * @param contentTree the content tree to which the class use information will be added
+     */
+    protected void addClassUse(PackageElement pkg, Content contentTree) throws IOException {
+        Content classLink = getLink(new LinkInfoImpl(configuration,
+            LinkInfoImpl.Kind.CLASS_USE_HEADER, typeElement));
+        Content pkgLink = getPackageLink(pkg, utils.getPackageName(pkg));
+        classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg),
+                configuration.getResource("doclet.ClassUse_Annotation", classLink,
+                pkgLink), classUseTableSummary, contentTree);
+        classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg),
+                configuration.getResource("doclet.ClassUse_TypeParameter", classLink,
+                pkgLink), classUseTableSummary, contentTree);
+        classSubWriter.addUseInfo(pkgToSubclass.get(pkg),
+                configuration.getResource("doclet.ClassUse_Subclass", classLink,
+                pkgLink), subclassUseTableSummary, contentTree);
+        classSubWriter.addUseInfo(pkgToSubinterface.get(pkg),
+                configuration.getResource("doclet.ClassUse_Subinterface", classLink,
+                pkgLink), subinterfaceUseTableSummary, contentTree);
+        classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg),
+                configuration.getResource("doclet.ClassUse_ImplementingClass", classLink,
+                pkgLink), classUseTableSummary, contentTree);
+        fieldSubWriter.addUseInfo(pkgToField.get(pkg),
+                configuration.getResource("doclet.ClassUse_Field", classLink,
+                pkgLink), fieldUseTableSummary, contentTree);
+        fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg),
+                configuration.getResource("doclet.ClassUse_FieldAnnotations", classLink,
+                pkgLink), fieldUseTableSummary, contentTree);
+        fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg),
+                configuration.getResource("doclet.ClassUse_FieldTypeParameter", classLink,
+                pkgLink), fieldUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodAnnotations", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodParameterAnnotations", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodTypeParameter", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodReturn", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodReturnTypeParameter", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodArgs", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodArgsTypeParameters", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg),
+                configuration.getResource("doclet.ClassUse_MethodThrows", classLink,
+                pkgLink), methodUseTableSummary, contentTree);
+        constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg),
+                configuration.getResource("doclet.ClassUse_ConstructorAnnotations", classLink,
+                pkgLink), constructorUseTableSummary, contentTree);
+        constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg),
+                configuration.getResource("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
+                pkgLink), constructorUseTableSummary, contentTree);
+        constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg),
+                configuration.getResource("doclet.ClassUse_ConstructorArgs", classLink,
+                pkgLink), constructorUseTableSummary, contentTree);
+        constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg),
+                configuration.getResource("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
+                pkgLink), constructorUseTableSummary, contentTree);
+        constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg),
+                configuration.getResource("doclet.ClassUse_ConstructorThrows", classLink,
+                pkgLink), constructorUseTableSummary, contentTree);
+    }
+
+    /**
+     * Get the header for the class use Listing.
+     *
+     * @return a content tree representing the class use header
+     */
+    protected HtmlTree getClassUseHeader() {
+        String cltype = configuration.getText(utils.isInterface(typeElement)
+                ? "doclet.Interface"
+                : "doclet.Class");
+        String clname = utils.getFullyQualifiedName(typeElement);
+        String title = configuration.getText("doclet.Window_ClassUse_Header",
+                cltype, clname);
+        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);
+        }
+        ContentBuilder headContent = new ContentBuilder();
+        headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
+        headContent.addContent(new HtmlTree(HtmlTag.BR));
+        headContent.addContent(clname);
+        Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
+                true, HtmlStyle.title, headContent);
+        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(div);
+        } else {
+            bodyTree.addContent(div);
+        }
+        return bodyTree;
+    }
+
+    /**
+     * Get this package link.
+     *
+     * @return a content tree for the package link
+     */
+    protected Content getNavLinkPackage() {
+        Content linkContent =
+                getHyperLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), packageLabel);
+        Content li = HtmlTree.LI(linkContent);
+        return li;
+    }
+
+    /**
+     * Get class page link.
+     *
+     * @return a content tree for the class page link
+     */
+    protected Content getNavLinkClass() {
+        Content linkContent = getLink(new LinkInfoImpl(
+                configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, typeElement)
+                .label(configuration.getText("doclet.Class")));
+        Content li = HtmlTree.LI(linkContent);
+        return li;
+    }
+
+    /**
+     * Get the use link.
+     *
+     * @return a content tree for the use link
+     */
+    protected Content getNavLinkClassUse() {
+        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel);
+        return li;
+    }
+
+    /**
+     * Get the tree link.
+     *
+     * @return a content tree for the tree link
+     */
+    protected Content getNavLinkTree() {
+        Content linkContent = utils.isEnclosingPackageIncluded(typeElement)
+                ? getHyperLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), treeLabel)
+                : getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), treeLabel);
+        Content li = HtmlTree.LI(linkContent);
+        return li;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,759 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.IOException;
+import java.util.*;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.SimpleElementVisitor8;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.builders.MemberSummaryBuilder;
+import jdk.javadoc.internal.doclets.toolkit.taglets.ParamTaglet;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap.Kind;
+
+/**
+ * Generate the Class Information Page.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see javax.lang.model.element.TypeElement
+ * @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)
+ */
+public class ClassWriterImpl extends SubWriterHolderWriter implements ClassWriter {
+
+    protected final TypeElement typeElement;
+
+    protected final ClassTree classtree;
+
+    protected final TypeElement prev;
+
+    protected final TypeElement next;
+
+    /**
+     * @param configuration the configuration data for the doclet
+     * @param typeElement 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.
+     * @throws java.io.IOException
+     */
+    public ClassWriterImpl(ConfigurationImpl configuration, TypeElement typeElement,
+            TypeElement prevClass, TypeElement nextClass, ClassTree classTree)
+            throws IOException {
+        super(configuration, DocPath.forClass(configuration.utils, typeElement));
+        this.typeElement = typeElement;
+        configuration.currentTypeElement = typeElement;
+        this.classtree = classTree;
+        this.prev = prevClass;
+        this.next = nextClass;
+    }
+
+    /**
+     * Get this package link.
+     *
+     * @return a content tree for the package link
+     */
+    @Override
+    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
+     */
+    @Override
+    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
+     */
+    @Override
+    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
+     */
+    @Override
+    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
+     */
+    @Override
+    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}
+     */
+    @Override
+    public Content getHeader(String header) {
+        HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getSimpleName(typeElement)));
+        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);
+        PackageElement pkg = utils.containingPackage(typeElement);
+        if (!pkg.isUnnamed()) {
+            Content pkgNameContent = new StringContent(utils.getPackageName(pkg));
+            Content pkgNameDiv = HtmlTree.DIV(HtmlStyle.subTitle, pkgNameContent);
+            div.addContent(pkgNameDiv);
+        }
+        LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
+                LinkInfoImpl.Kind.CLASS_HEADER, typeElement);
+        //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}
+     */
+    @Override
+    public Content getClassContentHeader() {
+        return getContentHeader();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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}
+     */
+    @Override
+    public void printDocument(Content contentTree) throws IOException {
+        printHtmlDocument(configuration.metakeywords.getMetaKeywords(typeElement),
+                true, contentTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getClassInfoTreeHeader() {
+        return getMemberTreeHeader();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getClassInfo(Content classInfoTree) {
+        return getMemberTree(HtmlStyle.description, classInfoTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addClassSignature(String modifiers, Content classInfoTree) {
+        classInfoTree.addContent(new HtmlTree(HtmlTag.BR));
+        Content pre = new HtmlTree(HtmlTag.PRE);
+        addAnnotationInfo(typeElement, pre);
+        pre.addContent(modifiers);
+        LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
+                LinkInfoImpl.Kind.CLASS_SIGNATURE, typeElement);
+        //Let's not link to ourselves in the signature.
+        linkInfo.linkToSelf = false;
+        Content className = new StringContent(utils.getSimpleName(typeElement));
+        Content parameterLinks = getTypeParameterLinks(linkInfo);
+        if (configuration.linksource) {
+            addSrcLink(typeElement, className, pre);
+            pre.addContent(parameterLinks);
+        } else {
+            Content span = HtmlTree.SPAN(HtmlStyle.typeNameLabel, className);
+            span.addContent(parameterLinks);
+            pre.addContent(span);
+        }
+        if (!utils.isInterface(typeElement)) {
+            TypeMirror superclass = utils.getFirstVisibleSuperClass(typeElement);
+            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);
+            }
+        }
+        List<? extends TypeMirror> interfaces = typeElement.getInterfaces();
+        if (!interfaces.isEmpty()) {
+            boolean isFirst = true;
+            for (TypeMirror type : interfaces) {
+                TypeElement tDoc = utils.asTypeElement(type);
+                if (!(utils.isPublic(tDoc) || utils.isLinkable(tDoc))) {
+                    continue;
+                }
+                if (isFirst) {
+                    pre.addContent(DocletConstants.NL);
+                    pre.addContent(utils.isInterface(typeElement) ? "extends " : "implements ");
+                    isFirst = false;
+                } else {
+                    pre.addContent(", ");
+                }
+                Content link = getLink(new LinkInfoImpl(configuration,
+                                                        LinkInfoImpl.Kind.CLASS_SIGNATURE_PARENT_NAME,
+                                                        type));
+                pre.addContent(link);
+            }
+        }
+        classInfoTree.addContent(pre);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addClassDescription(Content classInfoTree) {
+        if(!configuration.nocomment) {
+            // generate documentation for the class.
+            if (!utils.getBody(typeElement).isEmpty()) {
+                addInlineComment(typeElement, classInfoTree);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addClassTagInfo(Content classInfoTree) {
+        if(!configuration.nocomment) {
+            // Print Information about all the tags here
+            addTagsInfo(typeElement, 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(TypeMirror type) {
+        TypeMirror sup;
+        HtmlTree classTreeUl = new HtmlTree(HtmlTag.UL);
+        classTreeUl.addStyle(HtmlStyle.inheritance);
+        Content liTree = null;
+        do {
+            sup = utils.getFirstVisibleSuperClass(type);
+            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(TypeMirror type) {
+        Content li = new HtmlTree(HtmlTag.LI);
+        if (type.equals(typeElement.asType())) {
+            Content typeParameters = getTypeParameterLinks(
+                    new LinkInfoImpl(configuration, LinkInfoImpl.Kind.TREE,
+                    typeElement));
+            if (configuration.shouldExcludeQualifier(utils.containingPackage(typeElement).toString())) {
+                li.addContent(utils.asTypeElement(type).getSimpleName().toString());
+                li.addContent(typeParameters);
+            } else {
+                li.addContent(utils.asTypeElement(type).getQualifiedName().toString());
+                li.addContent(typeParameters);
+            }
+        } else {
+            Content link = getLink(new LinkInfoImpl(configuration,
+                    LinkInfoImpl.Kind.CLASS_TREE_PARENT, type)
+                    .label(configuration.getClassName(utils.asTypeElement(type))));
+            li.addContent(link);
+        }
+        return li;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addClassTree(Content classContentTree) {
+        if (!utils.isClass(typeElement)) {
+            return;
+        }
+        classContentTree.addContent(getClassInheritenceTree(typeElement.asType()));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addTypeParamInfo(Content classInfoTree) {
+        if (!utils.getTypeParamTrees(typeElement).isEmpty()) {
+            Content typeParam = (new ParamTaglet()).getTagletOutput(typeElement,
+                    getTagletWriterInstance(false));
+            Content dl = HtmlTree.DL(typeParam);
+            classInfoTree.addContent(dl);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSubClassInfo(Content classInfoTree) {
+        if (utils.isClass(typeElement)) {
+            if (typeElement.getQualifiedName().toString().equals("java.lang.Object") ||
+                    typeElement.getQualifiedName().toString().equals("org.omg.CORBA.Object")) {
+                return;    // Don't generate the list, too huge
+            }
+            Set<TypeElement> subclasses = classtree.directSubClasses(typeElement, false);
+            if (!subclasses.isEmpty()) {
+                Content label = getResource(
+                        "doclet.Subclasses");
+                Content dt = HtmlTree.DT(label);
+                Content dl = HtmlTree.DL(dt);
+                dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBCLASSES,
+                        subclasses));
+                classInfoTree.addContent(dl);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSubInterfacesInfo(Content classInfoTree) {
+        if (utils.isInterface(typeElement)) {
+            Set<TypeElement> subInterfaces = classtree.allSubClasses(typeElement, false);
+            if (!subInterfaces.isEmpty()) {
+                Content label = getResource(
+                        "doclet.Subinterfaces");
+                Content dt = HtmlTree.DT(label);
+                Content dl = HtmlTree.DL(dt);
+                dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUBINTERFACES,
+                        subInterfaces));
+                classInfoTree.addContent(dl);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInterfaceUsageInfo (Content classInfoTree) {
+        if (!utils.isInterface(typeElement)) {
+            return;
+        }
+        if (typeElement.getQualifiedName().toString().equals("java.lang.Cloneable") ||
+                typeElement.getQualifiedName().toString().equals("java.io.Serializable")) {
+            return;   // Don't generate the list, too big
+        }
+        Set<TypeElement> implcl = classtree.implementingClasses(typeElement);
+        if (!implcl.isEmpty()) {
+            Content label = getResource(
+                    "doclet.Implementing_Classes");
+            Content dt = HtmlTree.DT(label);
+            Content dl = HtmlTree.DL(dt);
+            dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_CLASSES,
+                    implcl));
+            classInfoTree.addContent(dl);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addImplementedInterfacesInfo(Content classInfoTree) {
+        SortedSet<TypeMirror> interfaces = new TreeSet<>(utils.makeTypeMirrorClassUseComparator());
+        interfaces.addAll(utils.getAllInterfaces(typeElement));
+        if (utils.isClass(typeElement) && !interfaces.isEmpty()) {
+            Content label = getResource(
+                    "doclet.All_Implemented_Interfaces");
+            Content dt = HtmlTree.DT(label);
+            Content dl = HtmlTree.DL(dt);
+            dl.addContent(getClassLinks(LinkInfoImpl.Kind.IMPLEMENTED_INTERFACES, interfaces));
+            classInfoTree.addContent(dl);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSuperInterfacesInfo(Content classInfoTree) {
+        SortedSet<TypeMirror> interfaces =
+                new TreeSet<>(utils.makeTypeMirrorIndexUseComparator());
+        interfaces.addAll(utils.getAllInterfaces(typeElement));
+
+        if (utils.isInterface(typeElement) && !interfaces.isEmpty()) {
+            Content label = getResource("doclet.All_Superinterfaces");
+            Content dt = HtmlTree.DT(label);
+            Content dl = HtmlTree.DL(dt);
+            dl.addContent(getClassLinks(LinkInfoImpl.Kind.SUPER_INTERFACES, interfaces));
+            classInfoTree.addContent(dl);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addNestedClassInfo(final Content classInfoTree) {
+        Element outerClass = typeElement.getEnclosingElement();
+        if (outerClass == null)
+            return;
+        new SimpleElementVisitor8<Void, Void>() {
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Void visitType(TypeElement e, Void p) {
+                String label = utils.isInterface(e)
+                        ? "doclet.Enclosing_Interface"
+                        : "doclet.Enclosing_Class";
+                Content dt = HtmlTree.DT(getResource(label));
+                Content dl = HtmlTree.DL(dt);
+                Content dd = new HtmlTree(HtmlTag.DD);
+                dd.addContent(getLink(new LinkInfoImpl(configuration,
+                        LinkInfoImpl.Kind.CLASS, e)));
+                dl.addContent(dd);
+                classInfoTree.addContent(dl);
+                return null;
+            }
+        }.visit(outerClass);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addFunctionalInterfaceInfo (Content classInfoTree) {
+        if (isFunctionalInterface()) {
+            Content dt = HtmlTree.DT(getResource("doclet.Functional_Interface"));
+            Content dl = HtmlTree.DL(dt);
+            Content dd = new HtmlTree(HtmlTag.DD);
+            dd.addContent(getResource("doclet.Functional_Interface_Message"));
+            dl.addContent(dd);
+            classInfoTree.addContent(dl);
+        }
+    }
+
+    public boolean isFunctionalInterface() {
+        List<? extends AnnotationMirror> annotationMirrors = ((Element) typeElement).getAnnotationMirrors();
+        for (AnnotationMirror anno : annotationMirrors) {
+            if (utils.isFunctionalInterface(anno)) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addClassDeprecationInfo(Content classInfoTree) {
+        Content hr = new HtmlTree(HtmlTag.HR);
+        classInfoTree.addContent(hr);
+        List<? extends DocTree> deprs = utils.getBlockTags(typeElement, DocTree.Kind.DEPRECATED);
+        if (utils.isDeprecated(typeElement)) {
+            Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            Content div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
+            if (!deprs.isEmpty()) {
+                CommentHelper ch = utils.getCommentHelper(typeElement);
+                DocTree dt = deprs.get(0);
+                List<? extends DocTree> commentTags = ch.getBody(configuration, dt);
+                if (!commentTags.isEmpty()) {
+                    div.addContent(getSpace());
+                    addInlineDeprecatedComment(typeElement, deprs.get(0), div);
+                }
+            }
+            classInfoTree.addContent(div);
+        }
+    }
+
+    /**
+     * Get links to the given classes.
+     *
+     * @param context the id of the context where the link will be printed
+     * @param list the list of classes
+     * @return a content tree for the class list
+     */
+    private Content getClassLinks(LinkInfoImpl.Kind context, Collection<?> list) {
+        Content dd = new HtmlTree(HtmlTag.DD);
+        boolean isFirst = true;
+        for (Object type : list) {
+            if (!isFirst) {
+                Content separator = new StringContent(", ");
+                dd.addContent(separator);
+            } else {
+                isFirst = false;
+            }
+            // TODO: should we simply split this method up to avoid instanceof ?
+            if (type instanceof TypeElement) {
+                Content link = getLink(
+                        new LinkInfoImpl(configuration, context, (TypeElement)(type)));
+                dd.addContent(link);
+            } else {
+                Content link = getLink(
+                        new LinkInfoImpl(configuration, context, ((TypeMirror)type)));
+                dd.addContent(link);
+            }
+        }
+        return dd;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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) {
+            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);
+        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.summarySet) {
+            Content liNav = new HtmlTree(HtmlTag.LI);
+            if (kind == VisibleMemberMap.Kind.ENUM_CONSTANTS && !utils.isEnum(typeElement)) {
+                continue;
+            }
+            if (kind == VisibleMemberMap.Kind.CONSTRUCTORS && utils.isEnum(typeElement)) {
+                continue;
+            }
+            AbstractMemberWriter writer =
+                ((AbstractMemberWriter) memberSummaryBuilder.getMemberSummaryWriter(kind));
+            if (writer == null) {
+                liNav.addContent(getResource(VisibleMemberMap.Kind.getNavLinkLabels(kind)));
+            } else {
+                writer.addNavSummaryLink(
+                        memberSummaryBuilder.members(kind),
+                        memberSummaryBuilder.getVisibleMemberMap(kind), liNav);
+            }
+            if (kind != Kind.METHODS) {
+                addNavGap(liNav);
+            }
+            ulNav.addContent(liNav);
+        }
+        return ulNav;
+    }
+
+    /**
+     * Get detail links for the navigation bar.
+     *
+     * @return the content tree for the detail links
+     * @throws java.lang.Exception
+     */
+    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);
+        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.detailSet) {
+            Content liNav = new HtmlTree(HtmlTag.LI);
+            AbstractMemberWriter writer =
+                    ((AbstractMemberWriter) memberSummaryBuilder.
+                    getMemberSummaryWriter(kind));
+            if (kind == VisibleMemberMap.Kind.ENUM_CONSTANTS && !utils.isEnum(typeElement)) {
+                continue;
+            }
+            if (kind == VisibleMemberMap.Kind.CONSTRUCTORS && utils.isEnum(typeElement)) {
+                continue;
+            }
+            if (writer == null) {
+                liNav.addContent(getResource(VisibleMemberMap.Kind.getNavLinkLabels(kind)));
+            } else {
+                writer.addNavDetailLink(memberSummaryBuilder.members(kind), liNav);
+            }
+            if (kind != Kind.METHODS) {
+                addNavGap(liNav);
+            }
+            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());
+    }
+
+    /**
+     * Return the TypeElement being documented.
+     *
+     * @return the TypeElement being documented.
+     */
+    @Override
+    public TypeElement getTypeElement() {
+        return typeElement;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConfigurationImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,747 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.net.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+
+import com.sun.source.util.DocTreePath;
+import com.sun.tools.doclint.DocLint;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlVersion;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.WriterFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.MessageRetriever;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static javax.tools.Diagnostic.Kind.*;
+
+/**
+ * Configure the output based on the command line options.
+ * <p>
+ * 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.
+ * </p>
+ * <p>
+ * Also do the error checking on the options used. For example it is illegal to
+ * use "-helpfile" option when already "-nohelp" option is used.
+ * </p>
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field.
+ * @author Atul Dambalkar.
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+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 = "";
+
+    public boolean sortedMethodDetails = false;
+
+    /**
+     * 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;
+
+    /**
+     * The overview path specified with "-overview" flag.
+     */
+    public String overviewpath = null;
+
+    /**
+     * 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 Map<Doclet.Option, String> doclintOpts = new LinkedHashMap<>();
+
+    /**
+     * Unique Resource Handler for this package.
+     */
+    public final MessageRetriever standardmessage;
+
+    /**
+     * First file to appear in the right-hand frame in the generated
+     * documentation.
+     */
+    public DocPath topFile = DocPath.empty;
+
+    /**
+     * The TypeElement for the class file getting generated.
+     */
+    public TypeElement currentTypeElement = null;  // Set this TypeElement in the ClassWriter.
+
+    protected List<SearchIndexItem> memberSearchIndex = new ArrayList<>();
+
+    protected List<SearchIndexItem> packageSearchIndex = new ArrayList<>();
+
+    protected List<SearchIndexItem> tagSearchIndex = new ArrayList<>();
+
+    protected List<SearchIndexItem> typeSearchIndex = new ArrayList<>();
+
+    protected Map<Character,List<SearchIndexItem>> tagSearchIndexMap = new HashMap<>();
+
+    protected Set<Character> tagSearchIndexKeys;
+
+    /**
+     * Constructor. Initializes resource for the
+     * {@link com.sun.tools.doclets.internal.toolkit.util.MessageRetriever MessageRetriever}.
+     */
+    public ConfigurationImpl() {
+        standardmessage = new MessageRetriever(this,
+            "jdk.javadoc.internal.doclets.formats.html.resources.standard");
+    }
+
+    private final String versionRBName = "jdk.javadoc.internal.tool.resources.version";
+    private ResourceBundle versionRB;
+
+    /**
+     * Return the build date for the doclet.
+     * @return the build date
+     */
+    @Override
+    public String getDocletSpecificBuildDate() {
+        if (versionRB == null) {
+            try {
+                versionRB = ResourceBundle.getBundle(versionRBName, getLocale());
+            } catch (MissingResourceException e) {
+                return BUILD_DATE;
+            }
+        }
+
+        try {
+            return versionRB.getString("release");
+        } catch (MissingResourceException e) {
+            return BUILD_DATE;
+        }
+    }
+
+    protected boolean validateOptions() {
+        // check shared options
+        if (!generalValidOptions()) {
+            return false;
+        }
+        boolean helpfileSeen = false;
+        // otherwise look at our options
+        for (Doclet.Option opt : optionsProcessed) {
+            if (opt.matches("-helpfile")) {
+                if (nohelp == true) {
+                    reporter.print(ERROR, getText("doclet.Option_conflict",
+                        "-helpfile", "-nohelp"));
+                    return false;
+                }
+                if (helpfileSeen) {
+                    reporter.print(ERROR, getText("doclet.Option_reuse",
+                        "-helpfile"));
+                    return false;
+                }
+                helpfileSeen = true;
+                DocFile help = DocFile.createFileForInput(this, helpfile);
+                if (!help.exists()) {
+                    reporter.print(ERROR, getText("doclet.File_not_found", helpfile));
+                    return false;
+                }
+            } else  if (opt.matches("-nohelp")) {
+                if (helpfileSeen) {
+                    reporter.print(ERROR, getText("doclet.Option_conflict",
+                        "-nohelp", "-helpfile"));
+                    return false;
+                }
+            } else if (opt.matches("-xdocrootparent")) {
+                try {
+                    URL ignored = new URL(docrootparent);
+                } catch (MalformedURLException e) {
+                    reporter.print(ERROR, getText("doclet.MalformedURL", docrootparent));
+                    return false;
+                }
+            } else if (opt.matches("-overview")) {
+                if (nooverview == true) {
+                    reporter.print(ERROR, getText("doclet.Option_conflict",
+                        "-overview", "-nooverview"));
+                    return false;
+                }
+            } else  if (opt.matches("-nooverview")) {
+                if (overviewpath != null) {
+                    reporter.print(ERROR, getText("doclet.Option_conflict",
+                        "-nooverview", "-overview"));
+                    return false;
+                }
+            } else if (opt.matches("-splitindex")) {
+                if (createindex == false) {
+                    reporter.print(ERROR, getText("doclet.Option_conflict",
+                        "-splitindex", "-noindex"));
+                    return false;
+                }
+            } else if (opt.matches("-noindex")) {
+                if (splitindex == true) {
+                    reporter.print(ERROR, getText("doclet.Option_conflict",
+                        "-noindex", "-splitindex"));
+                    return false;
+                }
+            } else if (opt.matches("-xdoclint:")) {
+                String dopt = doclintOpts.get(opt);
+                if (dopt == null) {
+                    continue;
+                }
+                if (dopt.contains("/")) {
+                    reporter.print(ERROR, getText("doclet.Option_doclint_no_qualifiers"));
+                    return false;
+                }
+                if (!DocLint.isValidOption(dopt)) {
+                    reporter.print(ERROR, getText("doclet.Option_doclint_invalid_arg"));
+                    return false;
+                }
+            } else if (opt.matches("-xdoclint/package:")) {
+                 String dopt = doclintOpts.get(opt);
+                    if (!DocLint.isValidOption(dopt)) {
+                        reporter.print(ERROR, getText("doclet.Option_doclint_package_invalid_arg"));
+                        return false;
+                    }
+                }
+        }
+        return true;
+    }
+
+    @Override
+    public boolean finishOptionSettings() {
+        if (!validateOptions()) {
+            return false;
+        }
+        if (!root.getSpecifiedElements().isEmpty()) {
+            Map<String, PackageElement> map = new HashMap<>();
+            PackageElement pkg;
+            List<TypeElement> classes = new ArrayList<>(root.getIncludedClasses());
+            for (TypeElement aClass : classes) {
+                pkg = utils.containingPackage(aClass);
+                if (!map.containsKey(utils.getPackageName(pkg))) {
+                    map.put(utils.getPackageName(pkg), pkg);
+                }
+            }
+        }
+        setCreateOverview();
+        setTopFile(root);
+        workArounds.initDocLint(doclintOpts.values(), tagletManager.getCustomTagNames(),
+                Utils.toLowerCase(htmlVersion.name()));
+        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(DocletEnvironment root) {
+        if (!checkForDeprecation(root)) {
+            return;
+        }
+        if (createoverview) {
+            topFile = DocPaths.OVERVIEW_SUMMARY;
+        } else {
+            if (packages.size() == 1 && packages.first().isUnnamed()) {
+                if (!root.getIncludedClasses().isEmpty()) {
+                    List<TypeElement> classes = new ArrayList<>(root.getIncludedClasses());
+                    TypeElement te = getValidClass(classes);
+                    topFile = DocPath.forClass(utils, te);
+                }
+            } else if (!packages.isEmpty()) {
+                topFile = DocPath.forPackage(packages.first()).resolve(DocPaths.PACKAGE_SUMMARY);
+            }
+        }
+    }
+
+    protected TypeElement getValidClass(List<TypeElement> classes) {
+        if (!nodeprecated) {
+            return classes.get(0);
+        }
+        for (TypeElement te : classes) {
+            if (!utils.isDeprecated(te)) {
+                return te;
+            }
+        }
+        return null;
+    }
+
+    protected boolean checkForDeprecation(DocletEnvironment root) {
+        for (TypeElement te : root.getIncludedClasses()) {
+            if (isGeneratedDoc(te)) {
+                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 ((overviewpath != null || packages.size() > 1) && !nooverview) {
+            createoverview = true;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public WriterFactory getWriterFactory() {
+        return new WriterFactoryImpl(this);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Locale getLocale() {
+        if (locale == null)
+            return Locale.getDefault();
+        return locale;
+    }
+
+    /**
+     * Return the path of the overview file and null if it does not exist.
+     *
+     * @return the path of the overview file and null if it does not exist.
+     */
+    public JavaFileObject getOverviewPath() {
+        if (overviewpath != null && getFileManager() instanceof StandardJavaFileManager) {
+            StandardJavaFileManager fm = (StandardJavaFileManager) getFileManager();
+            return fm.getJavaFileObjects(overviewpath).iterator().next();
+        }
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public JavaFileManager getFileManager() {
+        return root.getJavaFileManager();
+    }
+
+    @Override
+    public boolean showMessage(DocTreePath path, String key) {
+        return (path == null || workArounds.haveDocLint());
+    }
+
+    @Override
+    public boolean showMessage(Element e, String key) {
+        return (e == null || workArounds.haveDocLint());
+    }
+
+    @Override
+    public Content newContent() {
+        return new ContentBuilder();
+    }
+
+    protected void buildSearchTagIndex() {
+        for (SearchIndexItem sii : tagSearchIndex) {
+            String tagLabel = sii.getLabel();
+            Character unicode = (tagLabel.length() == 0)
+                    ? '*'
+                    : Character.toUpperCase(tagLabel.charAt(0));
+            List<SearchIndexItem> list = tagSearchIndexMap.get(unicode);
+            if (list == null) {
+                list = new ArrayList<>();
+                tagSearchIndexMap.put(unicode, list);
+            }
+            list.add(sii);
+        }
+        tagSearchIndexKeys = tagSearchIndexMap.keySet();
+    }
+
+    @Override
+    public Set<Doclet.Option> getSupportedOptions() {
+        Doclet.Option[] options = {
+            new Option(this, "bottom", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    bottom = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "charset", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    charset = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "doctitle", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    doctitle = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "footer", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    footer = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "header", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    header = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "helpfile", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    helpfile = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "html4") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    htmlVersion = HtmlVersion.HTML4;
+                    return true;
+                }
+            },
+            new Option(this, "html5") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    htmlVersion = HtmlVersion.HTML5;
+                    return true;
+                }
+            },
+            new Option(this, "nohelp") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nohelp = true;
+                    return true;
+                }
+            },
+            new Option(this, "nodeprecatedlist") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nodeprecatedlist = true;
+                    return true;
+                }
+            },
+            new Option(this, "noindex") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    createindex = false;
+                    return true;
+                }
+            },
+            new Option(this, "nonavbar") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nonavbar = true;
+                    return true;
+                }
+            },
+            new Hidden(this, "nooverview") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nooverview = true;
+                    return true;
+                }
+            },
+            new Option(this, "notree") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    createtree = false;
+                    return true;
+                }
+            },
+            new Hidden(this, "overview", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    overviewpath = args.next();
+                    return true;
+                }
+            },
+            new Hidden(this, "packagesheader", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    packagesheader = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "splitindex") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    splitindex = true;
+                    return true;
+                }
+            },
+            new Option(this, "stylesheetfile", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    stylesheetfile = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "top", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    top = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "use") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    classuse = true;
+                    return true;
+                }
+            },
+            new Option(this, "windowtitle", 1) {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    windowtitle = args.next().replaceAll("\\<.*?>", "");
+                    return true;
+                }
+            },
+            new XOption(this, "xdoclint") {
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    doclintOpts.put(this, DocLint.XMSGS_OPTION);
+                    return true;
+                }
+            },
+            new XOption(this, "Xdocrootparent", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    docrootparent = args.next();
+                    return true;
+                }
+            },
+            new XOption(this, "doclet.xusage.xdoclint-extended.", "Xdoclint:", 0) {
+                @Override
+                public boolean matches(String option) {
+                    String opt = option.startsWith("-") ? option.substring(1) : option;
+                    return opt.toLowerCase().startsWith(getName().toLowerCase());
+                }
+
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    doclintOpts.put(this, opt.replace("-Xdoclint:", DocLint.XMSGS_CUSTOM_PREFIX));
+                    return true;
+                }
+            },
+            new XOption(this, "doclet.xusage.xdoclint-package.", "Xdoclint/package:", 0) {
+                @Override
+                public boolean matches(String option) {
+                    String opt = option.startsWith("-") ? option.substring(1) : option;
+                    return opt.toLowerCase().startsWith(getName().toLowerCase());
+                }
+
+                @Override
+                public boolean process(String opt,  ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    doclintOpts.put(this, opt.replace("-Xdoclint/package:", DocLint.XCHECK_PACKAGE));
+                    return true;
+                }
+            }
+        };
+        Set<Doclet.Option> oset = new TreeSet<>();
+        oset.addAll(Arrays.asList(options));
+        oset.addAll(super.getSupportedOptions());
+        return oset;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,388 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.ConstantsSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocLink;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+
+
+/**
+ * Write the Constants Summary Page in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+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 TypeElement currentTypeElement;
+
+    private final String constantsTableSummary;
+
+    private final List<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 ArrayList<>();
+        constantsTableHeader.add(getModifierTypeHeader());
+        constantsTableHeader.add(configuration.getText("doclet.ConstantField"));
+        constantsTableHeader.add(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(PackageElement pkg,
+            Set<PackageElement> printedPackageHeaders, Content contentListTree) {
+        //add link to summary
+        Content link;
+        if (pkg.isUnnamed()) {
+            link = getHyperLink(getDocLink(
+                    SectionName.UNNAMED_PACKAGE_ANCHOR),
+                    defaultPackageLabel, "", "");
+        } else {
+            String parsedPackageName = utils.parsePackageName(pkg);
+            Content packageNameContent = getPackageLabel(parsedPackageName);
+            packageNameContent.addContent(".*");
+            link = getHyperLink(DocLink.fragment(parsedPackageName),
+                    packageNameContent, "", "");
+            PackageElement abbrevPkg = utils.elementUtils.getPackageElement(parsedPackageName);
+            printedPackageHeaders.add(abbrevPkg);
+        }
+        contentListTree.addContent(HtmlTree.LI(link));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addContentsList(Content contentTree, Content contentListTree) {
+        Content titleContent = getResource(
+                "doclet.Constants_Summary");
+        Content pHeading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+                HtmlStyle.title, titleContent);
+        Content div = HtmlTree.DIV(HtmlStyle.header, pHeading);
+        Content headingContent = getResource(
+                "doclet.Contents");
+        Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, true,
+                headingContent);
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree section = HtmlTree.SECTION(heading);
+            section.addContent(contentListTree);
+            div.addContent(section);
+            mainTree.addContent(div);
+        } else {
+            div.addContent(heading);
+            div.addContent(contentListTree);
+            contentTree.addContent(div);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getConstantSummaries() {
+        HtmlTree summariesDiv = new HtmlTree(HtmlTag.DIV);
+        summariesDiv.addStyle(HtmlStyle.constantValuesContainer);
+        return summariesDiv;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addPackageName(PackageElement pkg, Content summariesTree, boolean first) {
+        Content pkgNameContent;
+        if (!first && configuration.allowTag(HtmlTag.SECTION)) {
+            summariesTree.addContent(summaryTree);
+        }
+        if (pkg.isUnnamed()) {
+            summariesTree.addContent(getMarkerAnchor(
+                    SectionName.UNNAMED_PACKAGE_ANCHOR));
+            pkgNameContent = defaultPackageLabel;
+        } else {
+            String parsedPackageName = utils.parsePackageName(pkg);
+            summariesTree.addContent(getMarkerAnchor(parsedPackageName));
+            pkgNameContent = getPackageLabel(parsedPackageName);
+        }
+        Content headingContent = new StringContent(".*");
+        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+                pkgNameContent);
+        heading.addContent(headingContent);
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            summaryTree = HtmlTree.SECTION(heading);
+        } else {
+            summariesTree.addContent(heading);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getClassConstantHeader() {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        return ul;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addClassConstant(Content summariesTree, Content classConstantTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            summaryTree.addContent(classConstantTree);
+        } else {
+            summariesTree.addContent(classConstantTree);
+        }
+    }
+
+    /**
+     * Get the table caption and header for the constant summary table
+     *
+     * @param typeElement the TypeElement to be documented
+     * @return constant members header content
+     */
+    public Content getConstantMembersHeader(TypeElement typeElement) {
+        //generate links backward only to public classes.
+        Content classlink = (utils.isPublic(typeElement) || utils.isProtected(typeElement)) ?
+            getLink(new LinkInfoImpl(configuration,
+                    LinkInfoImpl.Kind.CONSTANT_SUMMARY, typeElement)) :
+            new StringContent(utils.getFullyQualifiedName(typeElement));
+
+        PackageElement enclosingPackage  = utils.containingPackage(typeElement);
+        if (!enclosingPackage.isUnnamed()) {
+            Content cb = new ContentBuilder();
+            cb.addContent(enclosingPackage.getQualifiedName().toString());
+            cb.addContent(".");
+            cb.addContent(classlink);
+            return getClassName(cb);
+        } else {
+            return getClassName(classlink);
+        }
+    }
+
+    /**
+     * Get the class name in the table caption and the table header.
+     *
+     * @param classStr the class name to print.
+     * @return the table caption and header
+     */
+    protected Content getClassName(Content classStr) {
+        Content caption = getTableCaption(classStr);
+        Content table = (configuration.isOutputHtml5())
+                ? HtmlTree.TABLE(HtmlStyle.constantsSummary, caption)
+                : HtmlTree.TABLE(HtmlStyle.constantsSummary, constantsTableSummary, caption);
+        table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
+        return table;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addConstantMembers(TypeElement typeElement, Collection<VariableElement> fields,
+            Content classConstantTree) {
+        currentTypeElement = typeElement;
+        Content tbody = new HtmlTree(HtmlTag.TBODY);
+        boolean altColor = true;
+        for (VariableElement field : fields) {
+            HtmlTree tr = new HtmlTree(HtmlTag.TR);
+            tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+            addConstantMember(field, tr);
+            tbody.addContent(tr);
+            altColor = !altColor;
+        }
+        Content table = getConstantMembersHeader(typeElement);
+        table.addContent(tbody);
+        Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+        classConstantTree.addContent(li);
+    }
+
+    /**
+     * Add the row for the constant summary table.
+     *
+     * @param member the field to be documented.
+     * @param trTree an htmltree object for the table row
+     */
+    private void addConstantMember(VariableElement member, HtmlTree trTree) {
+        trTree.addContent(getTypeColumn(member));
+        trTree.addContent(getNameColumn(member));
+        trTree.addContent(getValue(member));
+    }
+
+    /**
+     * Get the type column for the constant summary table row.
+     *
+     * @param member the field to be documented.
+     * @return the type column of the constant table row
+     */
+    private Content getTypeColumn(VariableElement member) {
+        Content anchor = getMarkerAnchor(currentTypeElement.getQualifiedName() +
+                "." + member.getSimpleName());
+        Content tdType = HtmlTree.TD(HtmlStyle.colFirst, anchor);
+        Content code = new HtmlTree(HtmlTag.CODE);
+        for (Modifier mod : member.getModifiers()) {
+            Content modifier = new StringContent(mod.toString());
+            code.addContent(modifier);
+            code.addContent(getSpace());
+        }
+        Content type = getLink(new LinkInfoImpl(configuration,
+                LinkInfoImpl.Kind.CONSTANT_SUMMARY, member.asType()));
+        code.addContent(type);
+        tdType.addContent(code);
+        return tdType;
+    }
+
+    /**
+     * Get the name column for the constant summary table row.
+     *
+     * @param member the field to be documented.
+     * @return the name column of the constant table row
+     */
+    private Content getNameColumn(VariableElement member) {
+        Content nameContent = getDocLink(LinkInfoImpl.Kind.CONSTANT_SUMMARY,
+                member, member.getSimpleName().toString(), false);
+        Content code = HtmlTree.CODE(nameContent);
+        return HtmlTree.TD(code);
+    }
+
+    /**
+     * Get the value column for the constant summary table row.
+     *
+     * @param member the field to be documented.
+     * @return the value column of the constant table row
+     */
+    private Content getValue(VariableElement member) {
+        String value = utils.constantValueExpresion(member);
+        Content valueContent = new StringContent(value);
+        Content code = HtmlTree.CODE(valueContent);
+        return HtmlTree.TD(HtmlStyle.colLast, code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addConstantSummaries(Content contentTree, Content summariesTree) {
+        if (configuration.allowTag(HtmlTag.SECTION) && summaryTree != null) {
+            summariesTree.addContent(summaryTree);
+        }
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(summariesTree);
+            contentTree.addContent(mainTree);
+        } else {
+            contentTree.addContent(summariesTree);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addFooter(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(null, true, contentTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ConstructorWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,354 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.ConstructorWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Writes constructor documentation.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+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 typeElement the class being documented.
+     */
+    public ConstructorWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+
+        VisibleMemberMap visibleMemberMap = new VisibleMemberMap(
+                typeElement,
+                VisibleMemberMap.Kind.CONSTRUCTORS, configuration);
+        SortedSet<Element> constructors = visibleMemberMap.getMembersFor(typeElement);
+        for (Element constructor : constructors) {
+            if (utils.isProtected(constructor) || utils.isPrivate(constructor)) {
+                setFoundNonPubConstructor(true);
+            }
+        }
+    }
+
+    /**
+     * Construct a new ConstructorWriterImpl.
+     *
+     * @param writer The writer for the class that the constructors belong to.
+     */
+    public ConstructorWriterImpl(SubWriterHolderWriter writer) {
+        super(writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree) {
+        memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
+        Content constructorDetailsTree = writer.getMemberTreeHeader();
+        constructorDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.CONSTRUCTOR_DETAIL));
+        Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
+                writer.constructorDetailsLabel);
+        constructorDetailsTree.addContent(heading);
+        return constructorDetailsTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getConstructorDocTreeHeader(ExecutableElement constructor,
+            Content constructorDetailsTree) {
+        String erasureAnchor;
+        if ((erasureAnchor = getErasureAnchor(constructor)) != null) {
+            constructorDetailsTree.addContent(writer.getMarkerAnchor((erasureAnchor)));
+        }
+        constructorDetailsTree.addContent(
+                writer.getMarkerAnchor(writer.getAnchor(constructor)));
+        Content constructorDocTree = writer.getMemberTreeHeader();
+        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        heading.addContent(name(constructor));
+        constructorDocTree.addContent(heading);
+        return constructorDocTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getSignature(ExecutableElement constructor) {
+        Content pre = new HtmlTree(HtmlTag.PRE);
+        writer.addAnnotationInfo(constructor, pre);
+        int annotationLength = pre.charCount();
+        addModifiers(constructor, pre);
+        if (configuration.linksource) {
+            Content constructorName = new StringContent(name(constructor));
+            writer.addSrcLink(constructor, constructorName, pre);
+        } else {
+            addName(name(constructor), pre);
+        }
+        int indent = pre.charCount() - annotationLength;
+        addParameters(constructor, pre, indent);
+        addExceptions(constructor, pre, indent);
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSummaryColumnStyle(HtmlTree tdTree) {
+        if (foundNonPubConstructor)
+            tdTree.addStyle(HtmlStyle.colLast);
+        else
+            tdTree.addStyle(HtmlStyle.colOne);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addDeprecated(ExecutableElement constructor, Content constructorDocTree) {
+        addDeprecatedInfo(constructor, constructorDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addComments(ExecutableElement constructor, Content constructorDocTree) {
+        addComment(constructor, constructorDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addTags(ExecutableElement constructor, Content constructorDocTree) {
+        writer.addTagsInfo(constructor, constructorDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getConstructorDetails(Content constructorDetailsTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(constructorDetailsTree));
+            return htmlTree;
+        }
+        return getMemberTree(constructorDetailsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getConstructorDoc(Content constructorDocTree,
+            boolean isLastContent) {
+        return getMemberTree(constructorDocTree, isLastContent);
+    }
+
+    /**
+     * Close the writer.
+     */
+    @Override
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * Let the writer know whether a non public constructor was found.
+     *
+     * @param foundNonPubConstructor true if we found a non public constructor.
+     */
+    @Override
+    public void setFoundNonPubConstructor(boolean foundNonPubConstructor) {
+        this.foundNonPubConstructor = foundNonPubConstructor;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryLabel(Content memberTree) {
+        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+                writer.getResource("doclet.Constructor_Summary"));
+        memberTree.addContent(label);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableSummary() {
+        return configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Constructor_Summary"),
+                configuration.getText("doclet.constructors"));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getCaption() {
+        return configuration.getResource("doclet.Constructors");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<String> getSummaryTableHeader(Element member) {
+        List<String> header = new ArrayList<>();
+        if (foundNonPubConstructor) {
+            header.add(configuration.getText("doclet.Modifier"));
+        }
+        header.add(configuration.getText("doclet.0_and_1",
+                configuration.getText("doclet.Constructor"),
+                configuration.getText("doclet.Description")));
+        return header;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.CONSTRUCTOR_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            return writer.getHyperLink(SectionName.CONSTRUCTOR_SUMMARY,
+                    writer.getResource("doclet.navConstructor"));
+        } else {
+            return writer.getResource("doclet.navConstructor");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addNavDetailLink(boolean link, Content liNav) {
+        if (link) {
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.CONSTRUCTOR_DETAIL,
+                    writer.getResource("doclet.navConstructor")));
+        } else {
+            liNav.addContent(writer.getResource("doclet.navConstructor"));
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        if (foundNonPubConstructor) {
+            Content code = new HtmlTree(HtmlTag.CODE);
+            if (utils.isProtected(member)) {
+                code.addContent("protected ");
+            } else if (utils.isPrivate(member)) {
+                code.addContent("private ");
+            } else if (utils.isPublic(member)) {
+                code.addContent(writer.getSpace());
+            } else {
+                code.addContent(
+                        configuration.getText("doclet.Package_private"));
+            }
+            tdSummaryType.addContent(code);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/DeprecatedListWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,385 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.EnumMap;
+import java.util.List;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DeprecatedAPIListBuilder;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+import static jdk.javadoc.internal.doclets.toolkit.util.DeprecatedAPIListBuilder.*;
+
+/**
+ * Generate File to list all the deprecated classes and class members with the
+ * appropriate links.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see java.util.List
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class DeprecatedListWriter extends SubWriterHolderWriter {
+
+    private String getAnchorName(DeprElementKind kind) {
+        switch (kind) {
+            case PACKAGE:
+                return "package";
+            case INTERFACE:
+                return "interface";
+            case CLASS:
+                return "class";
+            case ENUM:
+                return "enum";
+            case EXCEPTION:
+                return "exception";
+            case ERROR:
+                return "error";
+            case ANNOTATION_TYPE:
+                return "annotation.type";
+            case FIELD:
+                return "field";
+            case METHOD:
+                return "method";
+            case CONSTRUCTOR:
+                return "constructor";
+            case ENUM_CONSTANT:
+                return "enum.constant";
+            case ANNOTATION_TYPE_MEMBER:
+                return "annotation.type.member";
+            default:
+                throw new AssertionError("unknown kind: " + kind);
+        }
+    }
+
+    private String getHeadingKey(DeprElementKind kind) {
+        switch (kind) {
+            case PACKAGE:
+                return "doclet.Deprecated_Packages";
+            case INTERFACE:
+                return "doclet.Deprecated_Interfaces";
+            case CLASS:
+                return "doclet.Deprecated_Classes";
+            case ENUM:
+                return "doclet.Deprecated_Enums";
+            case EXCEPTION:
+                return "doclet.Deprecated_Exceptions";
+            case ERROR:
+                return "doclet.Deprecated_Errors";
+            case ANNOTATION_TYPE:
+                return "doclet.Deprecated_Annotation_Types";
+            case FIELD:
+                return "doclet.Deprecated_Fields";
+            case METHOD:
+                return "doclet.Deprecated_Methods";
+            case CONSTRUCTOR:
+                return "doclet.Deprecated_Constructors";
+            case ENUM_CONSTANT:
+                return "doclet.Deprecated_Enum_Constants";
+            case ANNOTATION_TYPE_MEMBER:
+                return "doclet.Deprecated_Annotation_Type_Members";
+            default:
+                throw new AssertionError("unknown kind: " + kind);
+        }
+    }
+
+    private String getSummaryKey(DeprElementKind kind) {
+        switch (kind) {
+            case PACKAGE:
+                return "doclet.deprecated_packages";
+            case INTERFACE:
+                return "doclet.deprecated_interfaces";
+            case CLASS:
+                return "doclet.deprecated_classes";
+            case ENUM:
+                return "doclet.deprecated_enums";
+            case EXCEPTION:
+                return "doclet.deprecated_exceptions";
+            case ERROR:
+                return "doclet.deprecated_errors";
+            case ANNOTATION_TYPE:
+                return "doclet.deprecated_annotation_types";
+            case FIELD:
+                return "doclet.deprecated_fields";
+            case METHOD:
+                return "doclet.deprecated_methods";
+            case CONSTRUCTOR:
+                return "doclet.deprecated_constructors";
+            case ENUM_CONSTANT:
+                return "doclet.deprecated_enum_constants";
+            case ANNOTATION_TYPE_MEMBER:
+                return "doclet.deprecated_annotation_type_members";
+            default:
+                throw new AssertionError("unknown kind: " + kind);
+        }
+    }
+
+    private String getHeaderKey(DeprElementKind kind) {
+        switch (kind) {
+            case PACKAGE:
+                return "doclet.Package";
+            case INTERFACE:
+                return "doclet.Interface";
+            case CLASS:
+                return "doclet.Class";
+            case ENUM:
+                return "doclet.Enum";
+            case EXCEPTION:
+                return "doclet.Exceptions";
+            case ERROR:
+                return "doclet.Errors";
+            case ANNOTATION_TYPE:
+                return "doclet.AnnotationType";
+            case FIELD:
+                return "doclet.Field";
+            case METHOD:
+                return "doclet.Method";
+            case CONSTRUCTOR:
+                return "doclet.Constructor";
+            case ENUM_CONSTANT:
+                return "doclet.Enum_Constant";
+            case ANNOTATION_TYPE_MEMBER:
+                return "doclet.Annotation_Type_Member";
+            default:
+                throw new AssertionError("unknown kind: " + kind);
+        }
+    }
+
+    private EnumMap<DeprElementKind, AbstractMemberWriter> writerMap;
+
+    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);
+        writerMap = new EnumMap<>(DeprElementKind.class);
+        for (DeprElementKind kind : DeprElementKind.values()) {
+            switch (kind) {
+                case PACKAGE:
+                case INTERFACE:
+                case CLASS:
+                case ENUM:
+                case EXCEPTION:
+                case ERROR:
+                case ANNOTATION_TYPE:
+                    writerMap.put(kind, classW);
+                    break;
+                case FIELD:
+                    writerMap.put(kind, new FieldWriterImpl(this));
+                    break;
+                case METHOD:
+                    writerMap.put(kind, new MethodWriterImpl(this));
+                    break;
+                case CONSTRUCTOR:
+                    writerMap.put(kind, new ConstructorWriterImpl(this));
+                    break;
+                case ENUM_CONSTANT:
+                    writerMap.put(kind, new EnumConstantWriterImpl(this));
+                    break;
+                case ANNOTATION_TYPE_MEMBER:
+                    writerMap.put(kind, new AnnotationTypeOptionalMemberWriterImpl(this, null));
+                    break;
+                default:
+                   throw new AssertionError("unknown kind: " + kind);
+            }
+        }
+    }
+
+    /**
+     * 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;
+        HtmlTree div = new HtmlTree(HtmlTag.DIV);
+        div.addStyle(HtmlStyle.contentContainer);
+        for (DeprElementKind kind : DeprElementKind.values()) {
+            if (deprapi.hasDocumentation(kind)) {
+                addAnchor(deprapi, kind, div);
+                memberTableSummary =
+                        configuration.getText("doclet.Member_Table_Summary",
+                        configuration.getText(getHeadingKey(kind)),
+                        configuration.getText(getSummaryKey(kind)));
+                List<String> memberTableHeader = new ArrayList<>();
+                memberTableHeader.add(configuration.getText("doclet.0_and_1",
+                        configuration.getText(getHeaderKey(kind)),
+                        configuration.getText("doclet.Description")));
+                if (kind == DeprElementKind.PACKAGE)
+                    addPackageDeprecatedAPI(deprapi.getSet(kind),
+                            getHeadingKey(kind), memberTableSummary, memberTableHeader, div);
+                else
+                    writerMap.get(kind).addDeprecatedAPI(deprapi.getSet(kind),
+                            getHeadingKey(kind), 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,
+            DeprElementKind kind, Content contentTree) {
+        if (builder.hasDocumentation(kind)) {
+            Content li = HtmlTree.LI(getHyperLink(getAnchorName(kind),
+                    getResource(getHeadingKey(kind))));
+            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 (DeprElementKind kind : DeprElementKind.values()) {
+            addIndexLink(deprapi, kind, 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, DeprElementKind kind, Content htmlTree) {
+        if (builder.hasDocumentation(kind)) {
+            htmlTree.addContent(getMarkerAnchor(getAnchorName(kind)));
+        }
+    }
+
+    /**
+     * 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;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/EnumConstantWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,330 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.EnumConstantWriter;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+
+/**
+ * Writes enum constant documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class EnumConstantWriterImpl extends AbstractMemberWriter
+    implements EnumConstantWriter, MemberSummaryWriter {
+
+    public EnumConstantWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    public EnumConstantWriterImpl(SubWriterHolderWriter writer) {
+        super(writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getEnumConstantsDetailsTreeHeader(TypeElement typeElement,
+            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}
+     */
+    @Override
+    public Content getEnumConstantsTreeHeader(VariableElement enumConstant,
+            Content enumConstantsDetailsTree) {
+        enumConstantsDetailsTree.addContent(
+                writer.getMarkerAnchor(name(enumConstant)));
+        Content enumConstantsTree = writer.getMemberTreeHeader();
+        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        heading.addContent(name(enumConstant));
+        enumConstantsTree.addContent(heading);
+        return enumConstantsTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getSignature(VariableElement 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.asType()));
+        pre.addContent(enumConstantLink);
+        pre.addContent(" ");
+        if (configuration.linksource) {
+            Content enumConstantName = new StringContent(name(enumConstant));
+            writer.addSrcLink(enumConstant, enumConstantName, pre);
+        } else {
+            addName(name(enumConstant), pre);
+        }
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addDeprecated(VariableElement enumConstant, Content enumConstantsTree) {
+        addDeprecatedInfo(enumConstant, enumConstantsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addComments(VariableElement enumConstant, Content enumConstantsTree) {
+        addComment(enumConstant, enumConstantsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addTags(VariableElement enumConstant, Content enumConstantsTree) {
+        writer.addTagsInfo(enumConstant, enumConstantsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getEnumConstantsDetails(Content enumConstantsDetailsTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(enumConstantsDetailsTree));
+            return htmlTree;
+        }
+        return getMemberTree(enumConstantsDetailsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getEnumConstants(Content enumConstantsTree,
+            boolean isLastContent) {
+        return getMemberTree(enumConstantsTree, isLastContent);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryLabel(Content memberTree) {
+        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+                writer.getResource("doclet.Enum_Constant_Summary"));
+        memberTree.addContent(label);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableSummary() {
+        return configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Enum_Constant_Summary"),
+                configuration.getText("doclet.enum_constants"));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getCaption() {
+        return configuration.getResource("doclet.Enum_Constants");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(configuration.getText("doclet.0_and_1",
+                configuration.getText("doclet.Enum_Constant"),
+                configuration.getText("doclet.Description")));
+        return header;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.ENUM_CONSTANT_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
+            Content tdSummary) {
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getDocLink(context, member, name(member), false));
+        Content code = HtmlTree.CODE(memberLink);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void setSummaryColumnStyle(HtmlTree tdTree) {
+        tdTree.addStyle(HtmlStyle.colOne);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        //Not applicable.
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getDeprecatedLink(Element member) {
+        String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName();
+        return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member, name);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            if (typeElement == null) {
+                return writer.getHyperLink(SectionName.ENUM_CONSTANT_SUMMARY,
+                        writer.getResource("doclet.navEnum"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.ENUM_CONSTANTS_INHERITANCE,
+                        configuration.getClassName(typeElement), writer.getResource("doclet.navEnum"));
+            }
+        } else {
+            return writer.getResource("doclet.navEnum");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,339 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.FieldWriter;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+
+/**
+ * Writes field documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Jamie Ho (rewrite)
+ * @author Bhavesh Patel (Modified)
+ */
+public class FieldWriterImpl extends AbstractMemberWriter
+    implements FieldWriter, MemberSummaryWriter {
+
+    public FieldWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    public FieldWriterImpl(SubWriterHolderWriter writer) {
+        super(writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(HtmlConstants.START_OF_FIELD_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getFieldDetailsTreeHeader(TypeElement typeElement, 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}
+     */
+    @Override
+    public Content getFieldDocTreeHeader(VariableElement field, Content fieldDetailsTree) {
+        fieldDetailsTree.addContent(writer.getMarkerAnchor(name(field)));
+        Content fieldTree = writer.getMemberTreeHeader();
+        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        heading.addContent(name(field));
+        fieldTree.addContent(heading);
+        return fieldTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getSignature(VariableElement 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.asType()));
+        pre.addContent(fieldlink);
+        pre.addContent(" ");
+        if (configuration.linksource) {
+            Content fieldName = new StringContent(name(field));
+            writer.addSrcLink(field, fieldName, pre);
+        } else {
+            addName(name(field), pre);
+        }
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addDeprecated(VariableElement field, Content fieldTree) {
+        addDeprecatedInfo(field, fieldTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addComments(VariableElement field, Content fieldTree) {
+        if (!utils.getBody(field).isEmpty()) {
+            writer.addInlineComment(field, fieldTree);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addTags(VariableElement field, Content fieldTree) {
+        writer.addTagsInfo(field, fieldTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getFieldDetails(Content fieldDetailsTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(fieldDetailsTree));
+            return htmlTree;
+        }
+        return getMemberTree(fieldDetailsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getFieldDoc(Content fieldTree,
+            boolean isLastContent) {
+        return getMemberTree(fieldTree, isLastContent);
+    }
+
+    /**
+     * Close the writer.
+     */
+    @Override
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryLabel(Content memberTree) {
+        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+                writer.getResource("doclet.Field_Summary"));
+        memberTree.addContent(label);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableSummary() {
+        return configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Field_Summary"),
+                configuration.getText("doclet.fields"));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getCaption() {
+        return configuration.getResource("doclet.Fields");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(writer.getModifierTypeHeader(),
+            configuration.getText("doclet.0_and_1",
+                    configuration.getText("doclet.Field"),
+                    configuration.getText("doclet.Description")));
+        return header;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.FIELD_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+        inheritedTree.addContent(writer.getMarkerAnchor(
+                SectionName.FIELDS_INHERITANCE, configuration.getClassName(typeElement)));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+        Content classLink = writer.getPreQualifiedClassLink(
+                LinkInfoImpl.Kind.MEMBER, typeElement, false);
+        Content label = new StringContent(utils.isClass(typeElement)
+                ? 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}
+     */
+    @Override
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
+            Content tdSummary) {
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getDocLink(context, typeElement , member, name(member), false));
+        Content code = HtmlTree.CODE(memberLink);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
+        linksTree.addContent(
+                writer.getDocLink(LinkInfoImpl.Kind.MEMBER, typeElement, member,
+                name(member), false));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        addModifierAndType(member, member.asType(), tdSummaryType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getDeprecatedLink(Element member) {
+        String name = utils.getFullyQualifiedName(member) + "." + member.getSimpleName();
+        return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member, name);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            if (typeElement == null) {
+                return writer.getHyperLink(
+                        SectionName.FIELD_SUMMARY,
+                        writer.getResource("doclet.navField"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.FIELDS_INHERITANCE,
+                        configuration.getClassName(typeElement), writer.getResource("doclet.navField"));
+            }
+        } else {
+            return writer.getResource("doclet.navField");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FrameOutputWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,177 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * 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.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+public class FrameOutputWriter extends HtmlDocletWriter {
+
+    /**
+     * Number of packages specified on the command line.
+     */
+    int noOfPackages;
+
+    /**
+     * Constructor to construct FrameOutputWriter object.
+     *
+     * @param configuration for this run
+     * @param filename File to be generated.
+     * @throws java.io.IOException
+     */
+    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);
+        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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HelpWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,449 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * Generate the Help File for the generated API documentation. The help file
+ * contents are helpful for browsing the generated documentation.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+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;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDoclet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,323 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.doclet.Doclet.Option;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.internal.doclets.toolkit.AbstractDoclet;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder;
+
+/**
+ * The class with "start" method, calls individual Writers.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Robert Field
+ * @author Jamie Ho
+ *
+ */
+public class HtmlDoclet extends AbstractDoclet {
+
+    public HtmlDoclet() {
+        configuration = new ConfigurationImpl();
+    }
+
+    /**
+     * The global configuration information for this run.
+     */
+    public final ConfigurationImpl configuration;
+
+
+    private static final DocPath DOCLET_RESOURCES = DocPath
+            .create("/jdk/javadoc/internal/doclets/formats/html/resources");
+
+    public void init(Locale locale, Reporter reporter) {
+        configuration.reporter = reporter;
+        configuration.locale = locale;
+    }
+
+    /**
+     * The "start" method as required by Javadoc.
+     *
+     * @param root the root of the documentation tree.
+     * @see jdk.doclet.DocletEnvironment
+     * @return true if the doclet ran without encountering any errors.
+     */
+    public boolean run(DocletEnvironment root) {
+        return 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 jdk.doclet.RootDoc
+     */
+    protected void generateOtherFiles(DocletEnvironment 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(DOCLET_RESOURCES.resolve(DocPaths.SEARCH_JS), true, true);
+
+            f = DocFile.createFileForOutput(configuration, DocPaths.RESOURCES.resolve(DocPaths.GLASS_IMG));
+            f.copyResource(DOCLET_RESOURCES.resolve(DocPaths.GLASS_IMG), true, false);
+
+            f = DocFile.createFileForOutput(configuration, DocPaths.RESOURCES.resolve(DocPaths.X_IMG));
+            f.copyResource(DOCLET_RESOURCES.resolve(DocPaths.X_IMG), true, false);
+            copyJqueryFiles();
+        }
+    }
+
+    protected void copyJqueryFiles() {
+        List<String> files = Arrays.asList(
+                "jquery-1.10.2.js",
+                "jquery-ui.js",
+                "jquery-ui.css",
+                "jquery-ui.min.js",
+                "jquery-ui.min.css",
+                "jquery-ui.structure.min.css",
+                "jquery-ui.structure.css",
+                "external/jquery/jquery.js",
+                "jszip/dist/jszip.js",
+                "jszip/dist/jszip.min.js",
+                "jszip-utils/dist/jszip-utils.js",
+                "jszip-utils/dist/jszip-utils.min.js",
+                "jszip-utils/dist/jszip-utils-ie.js",
+                "jszip-utils/dist/jszip-utils-ie.min.js",
+                "images/ui-bg_flat_0_aaaaaa_40x100.png",
+                "images/ui-icons_454545_256x240.png",
+                "images/ui-bg_glass_95_fef1ec_1x400.png",
+                "images/ui-bg_glass_75_dadada_1x400.png",
+                "images/ui-bg_highlight-soft_75_cccccc_1x100.png",
+                "images/ui-icons_888888_256x240.png",
+                "images/ui-icons_2e83ff_256x240.png",
+                "images/ui-bg_glass_65_ffffff_1x400.png",
+                "images/ui-icons_cd0a0a_256x240.png",
+                "images/ui-bg_glass_55_fbf9ee_1x400.png",
+                "images/ui-icons_222222_256x240.png",
+                "images/ui-bg_glass_75_e6e6e6_1x400.png",
+                "images/ui-bg_flat_75_ffffff_40x100.png");
+        DocFile f;
+        for (String file : files) {
+            DocPath filePath = DocPaths.JQUERY_FILES.resolve(file);
+            f = DocFile.createFileForOutput(configuration, filePath);
+            f.copyResource(DOCLET_RESOURCES.resolve(filePath), true, false);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void generateClassFiles(SortedSet<TypeElement> arr, ClassTree classtree) {
+        List<TypeElement> list = new ArrayList<>(arr);
+        ListIterator<TypeElement> iterator = list.listIterator();
+        TypeElement klass = null;
+        while (iterator.hasNext()) {
+            TypeElement prev = iterator.hasPrevious() ? klass : null;
+            klass = iterator.next();
+            TypeElement next = iterator.nextIndex() == list.size()
+                    ? null : list.get(iterator.nextIndex());
+            if (!(configuration.isGeneratedDoc(klass) && utils.isIncluded(klass))) {
+                continue;
+            }
+            try {
+                if (utils.isAnnotationType(klass)) {
+                    AbstractBuilder annotationTypeBuilder =
+                        configuration.getBuilderFactory()
+                            .getAnnotationTypeBuilder(klass,
+                                prev == null ? null : prev.asType(),
+                                next == null ? null : next.asType());
+                    annotationTypeBuilder.build();
+                } else {
+                    AbstractBuilder classBuilder =
+                        configuration.getBuilderFactory().getClassBuilder(klass,
+                                prev, next, classtree);
+                    classBuilder.build();
+                }
+            } catch (IOException e) {
+                throw new DocletAbortException(e);
+            } catch (DocletAbortException de) {
+                throw de;
+            } catch (Exception e) {
+                e.printStackTrace();
+                throw new DocletAbortException(e);
+            }
+        }
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void generatePackageFiles(ClassTree classtree) throws Exception {
+        Set<PackageElement> packages = configuration.packages;
+        if (packages.size() > 1) {
+            PackageIndexFrameWriter.generate(configuration);
+        }
+        List<PackageElement> pList = new ArrayList<>(packages);
+        PackageElement prev = null;
+        for (int i = 0 ; i < pList.size() ; i++) {
+            // if -nodeprecated option is set and the package is marked as
+            // deprecated, do not generate the package-summary.html, package-frame.html
+            // and package-tree.html pages for that package.
+            PackageElement pkg = pList.get(i);
+            if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
+                PackageFrameWriter.generate(configuration, pkg);
+                int nexti = i + 1;
+                PackageElement next = null;
+                if (nexti < pList.size()) {
+                    next = pList.get(nexti);
+                    // If the next package is unnamed package, skip 2 ahead if possible
+                    if (next.isUnnamed() && ++nexti < pList.size()) {
+                       next = pList.get(nexti);
+                    }
+                }
+                AbstractBuilder packageSummaryBuilder =
+                        configuration.getBuilderFactory().getPackageSummaryBuilder(
+                        pkg, prev, next);
+                packageSummaryBuilder.build();
+                if (configuration.createtree) {
+                    PackageTreeWriter.generate(configuration, pkg, prev, next,
+                            configuration.nodeprecated);
+                }
+                prev = pkg;
+            }
+        }
+    }
+
+    public Set<Option> getSupportedOptions() {
+        return configuration.getSupportedOptions();
+    }
+
+    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("doclet.Copying_File_0_To_File_1",
+                    fromfile.toString(), path.getPath());
+            toFile.copyFile(fromfile);
+        } catch (IOException exc) {
+            configuration.message.error("doclet.perform_copy_exception_encountered",
+                    exc.toString());
+            throw new DocletAbortException(exc);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2522 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.AnnotationValue;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.SimpleAnnotationValueVisitor9;
+import javax.lang.model.util.SimpleElementVisitor9;
+import javax.lang.model.util.SimpleTypeVisitor9;
+
+import com.sun.source.doctree.AttributeTree;
+import com.sun.source.doctree.AttributeTree.ValueKind;
+import com.sun.source.doctree.CommentTree;
+import com.sun.source.doctree.DocRootTree;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.DocTree.Kind;
+import com.sun.source.doctree.EndElementTree;
+import com.sun.source.doctree.EntityTree;
+import com.sun.source.doctree.ErroneousTree;
+import com.sun.source.doctree.InheritDocTree;
+import com.sun.source.doctree.IndexTree;
+import com.sun.source.doctree.LinkTree;
+import com.sun.source.doctree.LiteralTree;
+import com.sun.source.doctree.SeeTree;
+import com.sun.source.doctree.StartElementTree;
+import com.sun.source.doctree.TextTree;
+import com.sun.source.util.SimpleDocTreeVisitor;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.Comment;
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.DocType;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocWriter;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
+import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.taglets.DocRootTaglet;
+import jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocLink;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+import jdk.javadoc.internal.doclets.toolkit.util.ImplementedMethods;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+
+import static com.sun.source.doctree.AttributeTree.ValueKind.*;
+import static com.sun.source.doctree.DocTree.Kind.*;
+import static jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocWriter.CONTENT_TYPE;
+import static jdk.javadoc.internal.doclets.toolkit.util.CommentHelper.SPACER;
+
+
+/**
+ * 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.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Robert Field
+ * @author Bhavesh Patel (Modified)
+ */
+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 {&#064;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 {&#064;docRoot} where one was
+     * missing.  (Also see DocRootTaglet for {&#064;docRoot} tags in doc
+     * comments.)
+     * <p>
+     * Replace {&#064;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.
+     * <p>
+     * For example, for "-d docs" and -header containing {&#064;docRoot}, when
+     * the HTML page for source file p/C1.java is being generated, the
+     * {&#064;docRoot} tag would be inserted into the header as "../",
+     * the relative path from docs/p/ to docs/ (the document root).
+     * <p>
+     * Note: This doc comment was written with '&amp;#064;' 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 +
+                "  allClassesLink = document.getElementById(\"" + id + "\");" + DocletConstants.NL +
+                "  if(window==top) {" + DocletConstants.NL +
+                "    allClassesLink.style.display = \"block\";" + DocletConstants.NL +
+                "  }" + DocletConstants.NL +
+                "  else {" + DocletConstants.NL +
+                "    allClassesLink.style.display = \"none\";" + DocletConstants.NL +
+                "  }" + DocletConstants.NL +
+                "  //-->" + 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(ExecutableElement method, Content dl) {
+        TypeElement enclosing = utils.getEnclosingTypeElement(method);
+        List<? extends TypeMirror> intfacs = enclosing.getInterfaces();
+        ExecutableElement overriddenMethod = utils.overriddenMethod(method);
+        // 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.isEmpty()
+                && new ImplementedMethods(method, this.configuration).build().isEmpty() == false)
+                || overriddenMethod != null) {
+            MethodWriterImpl.addImplementsInfo(this, method, dl);
+            if (overriddenMethod != null) {
+                MethodWriterImpl.addOverridden(this,
+                        utils.overriddenType(method),
+                        overriddenMethod,
+                        dl);
+            }
+        }
+    }
+
+    /**
+     * Adds the tags information.
+     *
+     * @param e the Element for which the tags will be generated
+     * @param htmltree the documentation tree to which the tags will be added
+     */
+    protected void addTagsInfo(Element e, Content htmltree) {
+        if (configuration.nocomment) {
+            return;
+        }
+        Content dl = new HtmlTree(HtmlTag.DL);
+        if (utils.isExecutableElement(e) && !utils.isConstructor(e)) {
+            addMethodInfo((ExecutableElement)e, dl);
+        }
+        Content output = new ContentBuilder();
+        TagletWriter.genTagOutput(configuration.tagletManager, e,
+            configuration.tagletManager.getCustomTaglets(e),
+                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 VariableElement object to check for tags.
+     * @return true if there are tags to be printed else return false.
+     */
+    protected boolean hasSerializationOverviewTags(VariableElement field) {
+        Content output = new ContentBuilder();
+        TagletWriter.genTagOutput(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 pkg 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(PackageElement pkg, String target,
+            Content label) {
+        return getHyperLink(pathString(pkg, DocPaths.PACKAGE_SUMMARY), label, "", target);
+    }
+
+
+    public void addClassesSummary(SortedSet<TypeElement> classes, String label,
+            String tableSummary, List<String> tableHeader, Content summaryContentTree) {
+        if (!classes.isEmpty()) {
+            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);
+            boolean altColor = true;
+            for (TypeElement te : classes) {
+                if (!utils.isCoreClass(te) ||
+                    !configuration.isGeneratedDoc(te)) {
+                    continue;
+                }
+                Content classContent = getLink(new LinkInfoImpl(
+                        configuration, LinkInfoImpl.Kind.PACKAGE, te));
+                Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent);
+                HtmlTree tr = HtmlTree.TR(tdClass);
+                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+                altColor = !altColor;
+                HtmlTree tdClassDescription = new HtmlTree(HtmlTag.TD);
+                tdClassDescription.addStyle(HtmlStyle.colLast);
+                if (utils.isDeprecated(te)) {
+                    tdClassDescription.addContent(deprecatedLabel);
+                    List<? extends DocTree> tags = utils.getDeprecatedTrees(te);
+                    if (!tags.isEmpty()) {
+                        addSummaryDeprecatedComment(te, tags.get(0), tdClassDescription);
+                    }
+                } else {
+                    addSummaryComment(te, tdClassDescription);
+                }
+                tr.addContent(tdClassDescription);
+                tbody.addContent(tr);
+            }
+            table.addContent(tbody);
+            summaryContentTree.addContent(table);
+        }
+    }
+
+    /**
+     * 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(List<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.isEmpty()) {
+                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);
+            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));
+            addSummaryDetailLinks(subDiv);
+            if (header) {
+                subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
+                fixedNavDiv.addContent(subDiv);
+                fixedNavDiv.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
+                tree.addContent(fixedNavDiv);
+            } 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(PackageElement 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() {
+        List<PackageElement> packages = new ArrayList<>(utils.getSpecifiedPackages());
+        DocPath docPath = packages.size() == 1 && utils.getSpecifiedClasses().isEmpty()
+                ? pathString(packages.get(0), DocPaths.PACKAGE_TREE)
+                : pathToRoot.resolve(DocPaths.OVERVIEW_TREE);
+        return HtmlTree.LI(getHyperLink(docPath, treeLabel, "", ""));
+    }
+
+    /**
+     * 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(List<String> header, String scope) {
+        Content tr = new HtmlTree(HtmlTag.TR);
+        final int size = header.size();
+        Content tableHeader;
+        if (size == 1) {
+            tableHeader = new StringContent(header.get(0));
+            tr.addContent(HtmlTree.TH(HtmlStyle.colOne, scope, tableHeader));
+            return tr;
+        }
+        for (int i = 0; i < size; i++) {
+            tableHeader = new StringContent(header.get(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 packageElement the package to check
+     * @return package name content
+     */
+    public Content getPackageName(PackageElement packageElement) {
+        return packageElement == null || packageElement.isUnnamed()
+                ? defaultPackageLabel
+                : getPackageLabel(packageElement.getQualifiedName().toString());
+    }
+
+    /**
+     * 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(SortedSet<Element> deprPkgs, String headingKey,
+            String tableSummary, List<String> tableHeader, Content contentTree) {
+        if (deprPkgs.size() > 0) {
+            Content caption = getTableCaption(configuration.getResource(headingKey));
+            Content table = (configuration.isOutputHtml5())
+                    ? HtmlTree.TABLE(HtmlStyle.deprecatedSummary, caption)
+                    : HtmlTree.TABLE(HtmlStyle.deprecatedSummary, tableSummary, caption);
+            table.addContent(getSummaryTableHeader(tableHeader, "col"));
+            Content tbody = new HtmlTree(HtmlTag.TBODY);
+            boolean altColor = true;
+            for (Element e : deprPkgs) {
+                PackageElement pkg = (PackageElement) e;
+                HtmlTree td = HtmlTree.TD(HtmlStyle.colOne,
+                        getPackageLink(pkg, getPackageName(pkg)));
+                List<? extends DocTree> tags = utils.getDeprecatedTrees(pkg);
+                if (!tags.isEmpty()) {
+                    addInlineDeprecatedComment(pkg, tags.get(0), td);
+                }
+                HtmlTree tr = HtmlTree.TR(td);
+                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+                altColor = !altColor;
+                tbody.addContent(tr);
+            }
+            table.addContent(tbody);
+            Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+            Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
+            contentTree.addContent(ul);
+        }
+    }
+
+    /**
+     * Return the path to the class page for a typeElement.
+     *
+     * @param te   TypeElement for which the path is requested.
+     * @param name Name of the file(doesn't include path).
+     */
+    protected DocPath pathString(TypeElement te, DocPath name) {
+        return pathString(utils.containingPackage(te), name);
+    }
+
+    /**
+     * Return path to the given file name in the given package. So if the name
+     * passed is "Object.html" and the name of the package is "java.lang", and
+     * if the relative path is "../.." then returned string will be
+     * "../../java/lang/Object.html"
+     *
+     * @param packageElement Package in which the file name is assumed to be.
+     * @param name File name, to which path string is.
+     */
+    protected DocPath pathString(PackageElement packageElement, DocPath name) {
+        return pathToRoot.resolve(DocPath.forPackage(packageElement).resolve(name));
+    }
+
+    /**
+     * Given a package, return the name to be used in HTML anchor tag.
+     * @param packageElement the package.
+     * @return the name to be used in HTML anchor tag.
+     */
+    public String getPackageAnchorName(PackageElement packageElement) {
+        return packageElement == null || packageElement.isUnnamed()
+                ? SectionName.UNNAMED_PACKAGE_ANCHOR.getName()
+                : utils.getPackageName(packageElement);
+    }
+
+    /**
+     * Return the link to the given package.
+     *
+     * @param packageElement the package to link to.
+     * @param label the label for the link.
+     * @return a content tree for the package link.
+     */
+    public Content getPackageLink(PackageElement packageElement, String label) {
+        return getPackageLink(packageElement, new StringContent(label));
+    }
+
+    public Content getPackageLink(PackageElement packageElement) {
+        StringContent content =  packageElement.isUnnamed()
+                ? new StringContent()
+                : new StringContent(utils.getPackageName(packageElement));
+        return getPackageLink(packageElement, content);
+    }
+
+    /**
+     * Return the link to the given package.
+     *
+     * @param packageElement the package to link to.
+     * @param label the label for the link.
+     * @return a content tree for the package link.
+     */
+    public Content getPackageLink(PackageElement packageElement, Content label) {
+        boolean included = packageElement != null && utils.isIncluded(packageElement);
+        if (!included) {
+            for (PackageElement p : configuration.packages) {
+                if (p.equals(packageElement)) {
+                    included = true;
+                    break;
+                }
+            }
+        }
+        if (included || packageElement == null) {
+            return getHyperLink(pathString(packageElement, DocPaths.PACKAGE_SUMMARY),
+                    label);
+        } else {
+            DocLink crossPkgLink = getCrossPackageLink(utils.getPackageName(packageElement));
+            if (crossPkgLink != null) {
+                return getHyperLink(crossPkgLink, label);
+            } else {
+                return label;
+            }
+        }
+    }
+
+    public Content interfaceName(TypeElement typeElement, boolean qual) {
+        Content name = new StringContent((qual)
+                ? typeElement.getQualifiedName().toString()
+                : utils.getSimpleName(typeElement));
+        return (utils.isInterface(typeElement)) ?  HtmlTree.SPAN(HtmlStyle.interfaceName, name) : name;
+    }
+
+    /**
+     * Add the link to the content tree.
+     *
+     * @param typeElement program element typeElement for which the link will be added
+     * @param label label for the link
+     * @param htmltree the content tree to which the link will be added
+     */
+    public void addSrcLink(Element typeElement, Content label, Content htmltree) {
+        if (typeElement == null) {
+            return;
+        }
+        TypeElement te = utils.getEnclosingTypeElement(typeElement);
+        if (te == null) {
+            // must be a typeElement since in has no containing class.
+            te = (TypeElement) typeElement;
+        }
+        DocPath href = pathToRoot
+                .resolve(DocPaths.SOURCE_OUTPUT)
+                .resolve(DocPath.forClass(utils, te));
+        Content linkContent = getHyperLink(href
+                .fragment(SourceToHTMLConverter.getAnchorName(utils, typeElement)), label, "", "");
+        htmltree.addContent(linkContent);
+    }
+
+    /**
+     * Return the link to the given class.
+     *
+     * @param linkInfo the information about the link.
+     *
+     * @return the link for the given class.
+     */
+    public Content getLink(LinkInfoImpl linkInfo) {
+        LinkFactoryImpl factory = new LinkFactoryImpl(this);
+        return factory.getLink(linkInfo);
+    }
+
+    /**
+     * Return the type parameters for the given class.
+     *
+     * @param linkInfo the information about the link.
+     * @return the type for the given class.
+     */
+    public Content getTypeParameterLinks(LinkInfoImpl linkInfo) {
+        LinkFactoryImpl factory = new LinkFactoryImpl(this);
+        return factory.getTypeParameterLinks(linkInfo, false);
+    }
+
+    /*************************************************************
+     * Return a class cross link to external class documentation.
+     * The name must be fully qualified to determine which package
+     * the class is in.  The -link option does not allow users to
+     * link to external classes in the "default" package.
+     *
+     * @param qualifiedClassName the qualified name of the external class.
+     * @param refMemName the name of the member being referenced.  This should
+     * be null or empty string if no member is being referenced.
+     * @param label the label for the external link.
+     * @param strong true if the link should be strong.
+     * @param style the style of the link.
+     * @param code true if the label should be code font.
+     */
+    public Content getCrossClassLink(String qualifiedClassName, String refMemName,
+                                    Content label, boolean strong, String style,
+                                    boolean code) {
+        String className = "";
+        String packageName = qualifiedClassName == null ? "" : qualifiedClassName;
+        int periodIndex;
+        while ((periodIndex = packageName.lastIndexOf('.')) != -1) {
+            className = packageName.substring(periodIndex + 1, packageName.length()) +
+                (className.length() > 0 ? "." + className : "");
+            Content defaultLabel = new StringContent(className);
+            if (code)
+                defaultLabel = HtmlTree.CODE(defaultLabel);
+            packageName = packageName.substring(0, periodIndex);
+            if (getCrossPackageLink(packageName) != null) {
+                /*
+                The package exists in external documentation, so link to the external
+                class (assuming that it exists).  This is definitely a limitation of
+                the -link option.  There are ways to determine if an external package
+                exists, but no way to determine if the external class exists.  We just
+                have to assume that it does.
+                */
+                DocLink link = configuration.extern.getExternalLink(packageName, pathToRoot,
+                                className + ".html", refMemName);
+                return getHyperLink(link,
+                    (label == null) || label.isEmpty() ? defaultLabel : label,
+                    strong, style,
+                    configuration.getText("doclet.Href_Class_Or_Interface_Title", packageName),
+                    "");
+            }
+        }
+        return null;
+    }
+
+    public boolean isClassLinkable(TypeElement typeElement) {
+        if (utils.isIncluded(typeElement)) {
+            return configuration.isGeneratedDoc(typeElement);
+        }
+        return configuration.extern.isExternal(typeElement);
+    }
+
+    public DocLink getCrossPackageLink(String pkgName) {
+        return configuration.extern.getExternalLink(pkgName, pathToRoot,
+            DocPaths.PACKAGE_SUMMARY.getPath());
+    }
+
+    /**
+     * Get the class link.
+     *
+     * @param context the id of the context where the link will be added
+     * @param element to link to
+     * @return a content tree for the link
+     */
+    public Content getQualifiedClassLink(LinkInfoImpl.Kind context, Element element) {
+        LinkInfoImpl linkInfoImpl = new LinkInfoImpl(configuration, context, (TypeElement)element);
+        return getLink(linkInfoImpl.label(utils.getFullyQualifiedName(element)));
+    }
+
+    /**
+     * Add the class link.
+     *
+     * @param context the id of the context where the link will be added
+     * @param typeElement to link to
+     * @param contentTree the content tree to which the link will be added
+     */
+    public void addPreQualifiedClassLink(LinkInfoImpl.Kind context, TypeElement typeElement, Content contentTree) {
+        addPreQualifiedClassLink(context, typeElement, false, contentTree);
+    }
+
+    /**
+     * Retrieve the class link with the package portion of the label in
+     * plain text.  If the qualifier is excluded, it will not be included in the
+     * link label.
+     *
+     * @param typeElement the class to link to.
+     * @param isStrong true if the link should be strong.
+     * @return the link with the package portion of the label in plain text.
+     */
+    public Content getPreQualifiedClassLink(LinkInfoImpl.Kind context,
+            TypeElement typeElement, boolean isStrong) {
+        ContentBuilder classlink = new ContentBuilder();
+        PackageElement pkg = utils.containingPackage(typeElement);
+        if (pkg != null && ! configuration.shouldExcludeQualifier(pkg.getSimpleName().toString())) {
+            classlink.addContent(getEnclosingPackageName(typeElement));
+        }
+        classlink.addContent(getLink(new LinkInfoImpl(configuration,
+                context, typeElement).label(utils.getSimpleName(typeElement)).strong(isStrong)));
+        return classlink;
+    }
+
+    /**
+     * Add the class link with the package portion of the label in
+     * plain text. If the qualifier is excluded, it will not be included in the
+     * link label.
+     *
+     * @param context the id of the context where the link will be added
+     * @param typeElement the class to link to
+     * @param isStrong true if the link should be strong
+     * @param contentTree the content tree to which the link with be added
+     */
+    public void addPreQualifiedClassLink(LinkInfoImpl.Kind context,
+            TypeElement typeElement, boolean isStrong, Content contentTree) {
+        PackageElement pkg = utils.containingPackage(typeElement);
+        if(pkg != null && ! configuration.shouldExcludeQualifier(pkg.getSimpleName().toString())) {
+            contentTree.addContent(getEnclosingPackageName(typeElement));
+        }
+        LinkInfoImpl linkinfo = new LinkInfoImpl(configuration, context, typeElement)
+                .label(utils.getSimpleName(typeElement))
+                .strong(isStrong);
+        Content link = getLink(linkinfo);
+        contentTree.addContent(link);
+    }
+
+    /**
+     * Add the class link, with only class name as the strong link and prefixing
+     * plain package name.
+     *
+     * @param context the id of the context where the link will be added
+     * @param typeElement the class to link to
+     * @param contentTree the content tree to which the link with be added
+     */
+    public void addPreQualifiedStrongClassLink(LinkInfoImpl.Kind context, TypeElement typeElement, Content contentTree) {
+        addPreQualifiedClassLink(context, typeElement, true, contentTree);
+    }
+
+    /**
+     * Get the link for the given member.
+     *
+     * @param context the id of the context where the link will be added
+     * @param element the member being linked to
+     * @param label the label for the link
+     * @return a content tree for the element link
+     */
+    public Content getDocLink(LinkInfoImpl.Kind context, Element element, String label) {
+        return getDocLink(context, utils.getEnclosingTypeElement(element), element,
+                new StringContent(label));
+    }
+
+    /**
+     * Return the link for the given member.
+     *
+     * @param context the id of the context where the link will be printed.
+     * @param element the member being linked to.
+     * @param label the label for the link.
+     * @param strong true if the link should be strong.
+     * @return the link for the given member.
+     */
+    public Content getDocLink(LinkInfoImpl.Kind context, Element element, String label,
+            boolean strong) {
+        return getDocLink(context, utils.getEnclosingTypeElement(element), element, label, strong);
+    }
+
+    /**
+     * Return the link for the given member.
+     *
+     * @param context the id of the context where the link will be printed.
+     * @param typeElement the typeElement that we should link to.  This is not
+                 necessarily equal to element.containingClass().  We may be
+                 inheriting comments.
+     * @param element the member being linked to.
+     * @param label the label for the link.
+     * @param strong true if the link should be strong.
+     * @return the link for the given member.
+     */
+    public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element,
+            String label, boolean strong) {
+        return getDocLink(context, typeElement, element, label, strong, false);
+    }
+
+    public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element,
+            Content label, boolean strong) {
+        return getDocLink(context, typeElement, element, label, strong, false);
+    }
+
+   /**
+     * Return the link for the given member.
+     *
+     * @param context the id of the context where the link will be printed.
+     * @param typeElement the typeElement that we should link to.  This is not
+                 necessarily equal to element.containingClass().  We may be
+                 inheriting comments.
+     * @param element the member being linked to.
+     * @param label the label for the link.
+     * @param strong true if the link should be strong.
+     * @param isProperty true if the element parameter is a JavaFX property.
+     * @return the link for the given member.
+     */
+    public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element,
+            String label, boolean strong, boolean isProperty) {
+        return getDocLink(context, typeElement, element, new StringContent(check(label)), strong, isProperty);
+    }
+
+    String check(String s) {
+        if (s.matches(".*[&<>].*")) {
+            throw new IllegalArgumentException(s);
+        }
+        return s;
+    }
+
+    public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element,
+            Content label, boolean strong, boolean isProperty) {
+        if (! (utils.isIncluded(element) || utils.isLinkable(typeElement))) {
+            return label;
+        } else if (utils.isExecutableElement(element)) {
+            ExecutableElement ee = (ExecutableElement)element;
+            return getLink(new LinkInfoImpl(configuration, context, typeElement)
+                .label(label)
+                .where(getName(getAnchor(ee, isProperty)))
+                .strong(strong));
+        } else if (utils.isVariableElement(element) || utils.isTypeElement(element)) {
+            return getLink(new LinkInfoImpl(configuration, context, typeElement)
+                .label(label)
+                .where(getName(element.getSimpleName().toString()))
+                .strong(strong));
+        } else {
+            return label;
+        }
+    }
+
+    /**
+     * Return the link for the given member.
+     *
+     * @param context the id of the context where the link will be added
+     * @param typeElement the typeElement that we should link to.  This is not
+                 necessarily equal to element.containingClass().  We may be
+                 inheriting comments
+     * @param element the member being linked to
+     * @param label the label for the link
+     * @return the link for the given member
+     */
+    public Content getDocLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element element,
+            Content label) {
+        if (! (utils.isIncluded(element) || utils.isLinkable(typeElement))) {
+            return label;
+        } else if (utils.isExecutableElement(element)) {
+            ExecutableElement emd = (ExecutableElement) element;
+            return getLink(new LinkInfoImpl(configuration, context, typeElement)
+                .label(label)
+                .where(getName(getAnchor(emd))));
+        } else if (utils.isVariableElement(element) || utils.isTypeElement(element)) {
+            return getLink(new LinkInfoImpl(configuration, context, typeElement)
+                .label(label).where(getName(element.getSimpleName().toString())));
+        } else {
+            return label;
+        }
+    }
+
+    public String getAnchor(ExecutableElement executableElement) {
+        return getAnchor(executableElement, false);
+    }
+
+    public String getAnchor(ExecutableElement executableElement, boolean isProperty) {
+        if (isProperty) {
+            return executableElement.getSimpleName().toString();
+        }
+        String signature = utils.signature(executableElement);
+        StringBuilder signatureParsed = new StringBuilder();
+        int counter = 0;
+        for (int i = 0; i < signature.length(); i++) {
+            char c = signature.charAt(i);
+            if (c == '<') {
+                counter++;
+            } else if (c == '>') {
+                counter--;
+            } else if (counter == 0) {
+                signatureParsed.append(c);
+            }
+        }
+        return utils.getSimpleName(executableElement) + signatureParsed.toString();
+    }
+
+    public Content seeTagToContent(Element element, DocTree see) {
+
+        Kind kind = see.getKind();
+        if (!(kind == LINK || kind == SEE || kind == LINK_PLAIN)) {
+            return new ContentBuilder();
+        }
+
+        CommentHelper ch = utils.getCommentHelper(element);
+        String tagName = ch.getTagName(see);
+        String seetext = replaceDocRootDir(utils.normalizeNewlines(ch.getText(see)));
+        // Check if @see is an href or "string"
+        if (seetext.startsWith("<") || seetext.startsWith("\"")) {
+            return new RawHtml(seetext);
+        }
+        boolean isLinkPlain = kind == LINK_PLAIN;
+        Content label = plainOrCode(isLinkPlain, new RawHtml(ch.getLabel(configuration, see)));
+
+        //The text from the @see tag.  We will output this text when a label is not specified.
+        Content text = plainOrCode(kind == LINK_PLAIN, new RawHtml(seetext));
+
+        TypeElement refClass = ch.getReferencedClass(configuration, see);
+        String refClassName =  ch.getReferencedClassName(configuration, see);
+        Element refMem =       ch.getReferencedMember(configuration, see);
+        String refMemName =    ch.getReferencedMemberName(see);
+
+        if (refMemName == null && refMem != null) {
+            refMemName = refMem.toString();
+        }
+        if (refClass == null) {
+            //@see is not referencing an included class
+            PackageElement refPackage = ch.getReferencedPackage(configuration, see);
+            if (refPackage != null && utils.isIncluded(refPackage)) {
+                //@see is referencing an included package
+                if (label.isEmpty())
+                    label = plainOrCode(isLinkPlain,
+                            new StringContent(refPackage.getQualifiedName().toString()));
+                return getPackageLink(refPackage, label);
+            } else {
+                // @see is not referencing an included class or package.  Check for cross links.
+                Content classCrossLink;
+                DocLink packageCrossLink = getCrossPackageLink(refClassName);
+                if (packageCrossLink != null) {
+                    // Package cross link found
+                    return getHyperLink(packageCrossLink,
+                        (label.isEmpty() ? text : label));
+                } else if ((classCrossLink = getCrossClassLink(refClassName,
+                        refMemName, label, false, "", !isLinkPlain)) != null) {
+                    // Class cross link found (possibly to a member in the class)
+                    return classCrossLink;
+                } else {
+                    // No cross link found so print warning
+                    configuration.getDocletSpecificMsg().warning(ch.getDocTreePath(see),
+                            "doclet.see.class_or_package_not_found",
+                            "@" + tagName,
+                            seetext);
+                    return (label.isEmpty() ? text: label);
+                }
+            }
+        } else if (refMemName == null) {
+            // Must be a class reference since refClass is not null and refMemName is null.
+            if (label.isEmpty()) {
+                /*
+                 * it seems to me this is the right thing to do, but it causes comparator failures.
+                 */
+                if (!configuration.backwardCompatibility) {
+                    StringContent content = utils.isEnclosingPackageIncluded(refClass)
+                            ? new StringContent(utils.getSimpleName(refClass))
+                            : new StringContent(utils.getFullyQualifiedName(refClass));
+                    label = plainOrCode(isLinkPlain, content);
+                } else {
+                    label = plainOrCode(isLinkPlain,
+                            new StringContent(utils.getSimpleName(refClass)));
+                }
+
+            }
+            return getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, refClass)
+                    .label(label));
+        } else if (refMem == null) {
+            // Must be a member reference since refClass is not null and refMemName is not null.
+            // However, refMem is null, so this referenced member does not exist.
+            return (label.isEmpty() ? text: label);
+        } else {
+            // Must be a member reference since refClass is not null and refMemName is not null.
+            // refMem is not null, so this @see tag must be referencing a valid member.
+            TypeElement containing = utils.getEnclosingTypeElement(refMem);
+            if (ch.getText(see).trim().startsWith("#") &&
+                ! (utils.isPublic(containing) || utils.isLinkable(containing))) {
+                // Since the link is relative and the holder is not even being
+                // documented, this must be an inherited link.  Redirect it.
+                // The current class either overrides the referenced member or
+                // inherits it automatically.
+                if (this instanceof ClassWriterImpl) {
+                    containing = ((ClassWriterImpl) this).getTypeElement();
+                } else if (!utils.isPublic(containing)) {
+                    configuration.getDocletSpecificMsg().warning(
+                        ch.getDocTreePath(see), "doclet.see.class_or_package_not_accessible",
+                        tagName, utils.getFullyQualifiedName(containing));
+                } else {
+                    configuration.getDocletSpecificMsg().warning(
+                        ch.getDocTreePath(see), "doclet.see.class_or_package_not_found",
+                        tagName, seetext);
+                }
+            }
+            if (configuration.currentTypeElement != containing) {
+                refMemName = (utils.isConstructor(refMem))
+                        ? refMemName
+                        : utils.getSimpleName(containing) + "." + refMemName;
+            }
+            if (utils.isExecutableElement(refMem)) {
+                if (refMemName.indexOf('(') < 0) {
+                    refMemName += utils.makeSignature((ExecutableElement)refMem, true);
+                }
+            }
+
+            text = plainOrCode(kind == LINK_PLAIN, new StringContent(refMemName));
+
+            return getDocLink(LinkInfoImpl.Kind.SEE_TAG, containing,
+                    refMem, (label.isEmpty() ? text: label), false);
+        }
+    }
+
+    private Content plainOrCode(boolean plain, Content body) {
+        return (plain || body.isEmpty()) ? body : HtmlTree.CODE(body);
+    }
+
+    /**
+     * Add the inline comment.
+     *
+     * @param element the Element for which the inline comment will be added
+     * @param tag the inline tag to be added
+     * @param htmltree the content tree to which the comment will be added
+     */
+    public void addInlineComment(Element element, DocTree tag, Content htmltree) {
+        CommentHelper ch = utils.getCommentHelper(element);
+        List<? extends DocTree> description = ch.getDescription(configuration, tag);
+        addCommentTags(element, tag, description, false, false, htmltree);
+    }
+
+    /**
+     * Add the inline deprecated comment.
+     *
+     * @param e the Element for which the inline deprecated comment will be added
+     * @param tag the inline tag to be added
+     * @param htmltree the content tree to which the comment will be added
+     */
+    public void addInlineDeprecatedComment(Element e, DocTree tag, Content htmltree) {
+        CommentHelper ch = utils.getCommentHelper(e);
+        addCommentTags(e, ch.getBody(configuration, tag), true, false, htmltree);
+    }
+
+    /**
+     * Adds the summary content.
+     *
+     * @param element the Element for which the summary will be generated
+     * @param htmltree the documentation tree to which the summary will be added
+     */
+    public void addSummaryComment(Element element, Content htmltree) {
+        addSummaryComment(element, utils.getFirstSentenceTrees(element), htmltree);
+    }
+
+    /**
+     * Adds the summary content.
+     *
+     * @param element the Element for which the summary will be generated
+     * @param firstSentenceTags the first sentence tags for the doc
+     * @param htmltree the documentation tree to which the summary will be added
+     */
+    public void addSummaryComment(Element element, List<? extends DocTree> firstSentenceTags, Content htmltree) {
+        addCommentTags(element, firstSentenceTags, false, true, htmltree);
+    }
+
+    public void addSummaryDeprecatedComment(Element element, DocTree tag, Content htmltree) {
+        CommentHelper ch = utils.getCommentHelper(element);
+        List<? extends DocTree> body = ch.getBody(configuration, tag);
+        addCommentTags(element, ch.getFirstSentenceTrees(configuration, body), true, true, htmltree);
+    }
+
+    /**
+     * Adds the inline comment.
+     *
+     * @param element the Element for which the inline comments will be generated
+     * @param htmltree the documentation tree to which the inline comments will be added
+     */
+    public void addInlineComment(Element element, Content htmltree) {
+        addCommentTags(element, utils.getBody(element), false, false, htmltree);
+    }
+
+    /**
+     * Adds the comment tags.
+     *
+     * @param element the Element for which the comment tags will be generated
+     * @param tags the first sentence tags for the doc
+     * @param depr true if it is deprecated
+     * @param first true if the first sentence tags should be added
+     * @param htmltree the documentation tree to which the comment tags will be added
+     */
+    private void addCommentTags(Element element, List<? extends DocTree> tags, boolean depr,
+            boolean first, Content htmltree) {
+        addCommentTags(element, null, tags, depr, first, htmltree);
+    }
+
+    /**
+     * Adds the comment tags.
+     *
+     * @param element for which the comment tags will be generated
+     * @param holderTag the block tag context for the inline tags
+     * @param tags the first sentence tags for the doc
+     * @param depr true if it is deprecated
+     * @param first true if the first sentence tags should be added
+     * @param htmltree the documentation tree to which the comment tags will be added
+     */
+    private void addCommentTags(Element element, DocTree holderTag, List<? extends DocTree> tags, boolean depr,
+            boolean first, Content htmltree) {
+        if(configuration.nocomment){
+            return;
+        }
+        Content div;
+        Content result = commentTagsToContent(null, element, tags, first);
+        if (depr) {
+            Content italic = HtmlTree.SPAN(HtmlStyle.deprecationComment, result);
+            div = HtmlTree.DIV(HtmlStyle.block, italic);
+            htmltree.addContent(div);
+        }
+        else {
+            div = HtmlTree.DIV(HtmlStyle.block, result);
+            htmltree.addContent(div);
+        }
+        if (tags.isEmpty()) {
+            htmltree.addContent(getSpace());
+        }
+    }
+
+    boolean ignoreNonInlineTag(DocTree dtree) {
+        Name name = null;
+        if (dtree.getKind() == Kind.START_ELEMENT) {
+            StartElementTree setree = (StartElementTree)dtree;
+            name = setree.getName();
+        } else if (dtree.getKind() == Kind.END_ELEMENT) {
+            EndElementTree eetree = (EndElementTree)dtree;
+            name = eetree.getName();
+        }
+
+        if (name != null) {
+            com.sun.tools.doclint.HtmlTag htmlTag = com.sun.tools.doclint.HtmlTag.get(name);
+            if (htmlTag != null &&
+                    htmlTag.blockType != com.sun.tools.doclint.HtmlTag.BlockType.INLINE) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    boolean isAllWhiteSpace(String body) {
+        for (int i = 0 ; i < body.length(); i++) {
+            if (!Character.isWhitespace(body.charAt(i)))
+                return false;
+        }
+        return true;
+    }
+
+    /**
+     * Converts inline tags and text to text strings, expanding the
+     * inline tags along the way.  Called wherever text can contain
+     * an inline tag, such as in comments or in free-form text arguments
+     * to non-inline tags.
+     *
+     * @param holderTag    specific tag where comment resides
+     * @param element    specific element where comment resides
+     * @param tags   array of text tags and inline tags (often alternating)
+               present in the text of interest for this element
+     * @param isFirstSentence  true if text is first sentence
+     * @return a Content object
+     */
+    public Content commentTagsToContent(DocTree holderTag, Element element,
+            List<? extends DocTree> tags, boolean isFirstSentence) {
+
+        final Content result = new ContentBuilder() {
+            @Override
+            public void addContent(String text) {
+                super.addContent(utils.normalizeNewlines(text));
+            }
+        };
+        CommentHelper ch = utils.getCommentHelper(element);
+        // Array of all possible inline tags for this javadoc run
+        configuration.tagletManager.checkTags(utils, element, tags, true);
+        for (ListIterator<? extends DocTree> iterator = tags.listIterator(); iterator.hasNext();) {
+            DocTree tag = iterator.next();
+             // zap block tags
+            if (isFirstSentence && ignoreNonInlineTag(tag))
+                continue;
+
+            if (isFirstSentence && iterator.nextIndex() == tags.size() &&
+                    (tag.getKind() == TEXT && isAllWhiteSpace(ch.getText(tag))))
+                continue;
+
+            boolean allDone = new SimpleDocTreeVisitor<Boolean, Content>() {
+                // notify the next DocTree handler to take necessary action
+                boolean commentRemoved = false;
+
+                private boolean isLast(DocTree node) {
+                    return node.equals(tags.get(tags.size() - 1));
+                }
+
+                private boolean isFirst(DocTree node) {
+                    return node.equals(tags.get(0));
+                }
+
+                private boolean inAnAtag() {
+                    if (utils.isStartElement(tag)) {
+                        StartElementTree st = (StartElementTree)tag;
+                        Name name = st.getName();
+                        if (name != null) {
+                            com.sun.tools.doclint.HtmlTag htag =
+                                    com.sun.tools.doclint.HtmlTag.get(name);
+                            return htag != null && htag.equals(com.sun.tools.doclint.HtmlTag.A);
+                        }
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitAttribute(AttributeTree node, Content c) {
+                    StringBuilder sb = new StringBuilder(SPACER).append(node.getName());
+                    if (node.getValueKind() == ValueKind.EMPTY) {
+                        result.addContent(sb.toString());
+                        return false;
+                    }
+                    sb.append("=");
+                    String quote;
+                    switch (node.getValueKind()) {
+                        case DOUBLE:
+                            quote = "\"";
+                            break;
+                        case SINGLE:
+                            quote = "\'";
+                            break;
+                        default:
+                            quote = "";
+                            break;
+                    }
+                    sb.append(quote);
+                    result.addContent(sb.toString());
+                    Content docRootContent = new ContentBuilder();
+
+                    for (DocTree dt : node.getValue()) {
+                        if (utils.isText(dt) && inAnAtag()) {
+                            String text = ((TextTree) dt).getBody();
+                            if (text.startsWith("/..") && !configuration.docrootparent.isEmpty()) {
+                                result.addContent(configuration.docrootparent);
+                                docRootContent = new ContentBuilder();
+                                text = textCleanup(text.substring(3), isLast(node));
+                            } else {
+                                if (!docRootContent.isEmpty()) {
+                                    docRootContent = copyDocRootContent(docRootContent);
+                                } else {
+                                    text = redirectRelativeLinks(element, (TextTree) dt);
+                                }
+                                text = textCleanup(text, isLast(node));
+                            }
+                            result.addContent(text);
+                        } else {
+                            docRootContent = copyDocRootContent(docRootContent);
+                            dt.accept(this, docRootContent);
+                        }
+                    }
+                    copyDocRootContent(docRootContent);
+                    result.addContent(quote);
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitComment(CommentTree node, Content c) {
+                    if (isFirstSentence && isFirst(node)) {
+                        commentRemoved = true;
+                        return this.visit(iterator.next(), c);
+                    }
+                    result.addContent(new RawHtml(node.getBody()));
+                    return false;
+                }
+
+                private Content copyDocRootContent(Content content) {
+                    if (!content.isEmpty()) {
+                        result.addContent(content);
+                        return new ContentBuilder();
+                    }
+                    return content;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitDocRoot(DocRootTree node, Content c) {
+                    Content docRootContent = TagletWriter.getInlineTagOutput(element,
+                            configuration.tagletManager,
+                            holderTag,
+                            node,
+                            getTagletWriterInstance(isFirstSentence));
+                    if (c != null) {
+                        c.addContent(docRootContent);
+                    } else {
+                        result.addContent(docRootContent);
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitEndElement(EndElementTree node, Content c) {
+                    RawHtml rawHtml = new RawHtml("</" + node.getName() + ">");
+                    result.addContent(rawHtml);
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitEntity(EntityTree node, Content c) {
+                    result.addContent(new RawHtml(node.toString()));
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitErroneous(ErroneousTree node, Content c) {
+                    configuration.getDocletSpecificMsg().warning(ch.getDocTreePath(node),
+                            "doclet.tag.invalid_usage", node);
+                    result.addContent(new RawHtml(node.toString()));
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitInheritDoc(InheritDocTree node, Content c) {
+                    Content output = TagletWriter.getInlineTagOutput(element,
+                            configuration.tagletManager, holderTag,
+                            tag, getTagletWriterInstance(isFirstSentence));
+                    result.addContent(output);
+                    // if we obtained the first sentence successfully, nothing more to do
+                    return (isFirstSentence && !output.isEmpty());
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitIndex(IndexTree node, Content p) {
+                    Content output = TagletWriter.getInlineTagOutput(element,
+                            configuration.tagletManager, holderTag, tag,
+                            getTagletWriterInstance(isFirstSentence));
+                    if (output != null) {
+                        result.addContent(output);
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitLink(LinkTree node, Content c) {
+                    // we need to pass the DocTreeImpl here, so ignore node
+                    result.addContent(seeTagToContent(element, tag));
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitLiteral(LiteralTree node, Content c) {
+                    String s = node.getBody().toString();
+                    Content content = new StringContent(utils.normalizeNewlines(s));
+                    if (node.getKind() == CODE)
+                        content = HtmlTree.CODE(content);
+                    result.addContent(content);
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitSee(SeeTree node, Content c) {
+                    // we need to pass the DocTreeImpl here, so ignore node
+                    result.addContent(seeTagToContent(element, tag));
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitStartElement(StartElementTree node, Content c) {
+                    String text = "<" + node.getName();
+                    text = utils.normalizeNewlines(text);
+                    RawHtml rawHtml = new RawHtml(text);
+                    result.addContent(rawHtml);
+
+                    for (DocTree dt : node.getAttributes()) {
+                        dt.accept(this, null);
+                    }
+                    result.addContent(new RawHtml(node.isSelfClosing() ? "/>" : ">"));
+                    return false;
+                }
+
+                private String textCleanup(String text, boolean isLast) {
+                    return textCleanup(text, isLast, false);
+                }
+
+                private String textCleanup(String text, boolean isLast, boolean trimLeader) {
+                    if (trimLeader) {
+                        text = removeLeadingWhitespace(text);
+                    }
+                    if (isFirstSentence && isLast) {
+                        text = removeTrailingWhitespace(text);
+                    }
+                    text = utils.replaceTabs(text);
+                    text = utils.normalizeNewlines(text);
+                    return text;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                public Boolean visitText(TextTree node, Content c) {
+                    String text = node.getBody();
+                    text = textCleanup(text, isLast(node), commentRemoved);
+                    commentRemoved = false;
+                    result.addContent(new RawHtml(text));
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.COMPILER_TREE)
+                protected Boolean defaultAction(DocTree node, Content c) {
+                    Content output = TagletWriter.getInlineTagOutput(element,
+                            configuration.tagletManager, holderTag, tag,
+                            getTagletWriterInstance(isFirstSentence));
+                    if (output != null) {
+                        result.addContent(output);
+                    }
+                    return false;
+                }
+
+            }.visit(tag, null);
+            if (allDone)
+                break;
+        }
+        return result;
+    }
+
+    private String removeTrailingWhitespace(String text) {
+        char[] buf = text.toCharArray();
+        for (int i = buf.length - 1; i > 0 ; i--) {
+            if (!Character.isWhitespace(buf[i]))
+                return text.substring(0, i + 1);
+        }
+        return text;
+    }
+
+    private String removeLeadingWhitespace(String text) {
+        char[] buf = text.toCharArray();
+        for (int i = 0; i < buf.length; i++) {
+            if (!Character.isWhitespace(buf[i])) {
+                return text.substring(i);
+            }
+        }
+        return text;
+    }
+
+    /**
+     * Return true if relative links should not be redirected.
+     *
+     * @return Return true if a relative link should not be redirected.
+     */
+    private boolean shouldNotRedirectRelativeLinks() {
+        return  this instanceof AnnotationTypeWriter ||
+                this instanceof ClassWriter ||
+                this instanceof PackageSummaryWriter;
+    }
+
+    /**
+     * Suppose a piece of documentation has a relative link.  When you copy
+     * that documentation to another place such as the index or class-use page,
+     * that relative link will no longer work.  We should redirect those links
+     * so that they will work again.
+     * <p>
+     * Here is the algorithm used to fix the link:
+     * <p>
+     * {@literal <relative link> => docRoot + <relative path to file> + <relative link> }
+     * <p>
+     * For example, suppose DocletEnvironment has this link:
+     * {@literal <a href="package-summary.html">The package Page</a> }
+     * <p>
+     * If this link appeared in the index, we would redirect
+     * the link like this:
+     *
+     * {@literal <a href="./com/sun/javadoc/package-summary.html">The package Page</a>}
+     *
+     * @param element the Element 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(Element element, TextTree tt) {
+        String text = tt.getBody();
+        if (element == null || utils.isOverviewElement(element) || shouldNotRedirectRelativeLinks()) {
+            return text;
+        }
+
+        DocPath redirectPathFromRoot = new SimpleElementVisitor9<DocPath, Void>() {
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public DocPath visitType(TypeElement e, Void p) {
+                return DocPath.forPackage(utils.containingPackage(e));
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public DocPath visitPackage(PackageElement e, Void p) {
+                return DocPath.forPackage(e);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public DocPath visitVariable(VariableElement e, Void p) {
+                return DocPath.forPackage(utils.containingPackage(e));
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public DocPath visitExecutable(ExecutableElement e, Void p) {
+                return DocPath.forPackage(utils.containingPackage(e));
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected DocPath defaultAction(Element e, Void p) {
+                return null;
+            }
+        }.visit(element);
+        if (redirectPathFromRoot == null) {
+            return text;
+        }
+        String lower = Utils.toLowerCase(text);
+        if (!(lower.startsWith("mailto:")
+                || lower.startsWith("http:")
+                || lower.startsWith("https:")
+                || lower.startsWith("file:"))) {
+            text = "{@" + (new DocRootTaglet()).getName() + "}/"
+                    + redirectPathFromRoot.resolve(text).getPath();
+            text = replaceDocRootDir(text);
+        }
+        return text;
+    }
+
+    static final Set<String> blockTags = new HashSet<>();
+    static {
+        for (HtmlTag t: HtmlTag.values()) {
+            if (t.blockType == HtmlTag.BlockType.BLOCK)
+                blockTags.add(t.value);
+        }
+    }
+
+    /**
+     * 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("<!--[if IE]>"));
+            addJQueryFile(head, DocPaths.JSZIPUTILS_IE_MIN);
+            head.addContent(new RawHtml("<![endif]-->"));
+            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
+     * <cite>The Java&trade; Language Specification</cite>,
+     * all the outer classes and static nested classes are core classes.
+     */
+    public boolean isCoreClass(TypeElement typeElement) {
+        return utils.getEnclosingTypeElement(typeElement) == null || utils.isStatic(typeElement);
+    }
+
+    /**
+     * Adds the annotation types for the given packageElement.
+     *
+     * @param packageElement the package to write annotations for.
+     * @param htmltree the documentation tree to which the annotation info will be
+     *        added
+     */
+    public void addAnnotationInfo(PackageElement packageElement, Content htmltree) {
+        addAnnotationInfo(packageElement, packageElement.getAnnotationMirrors(), 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(ExecutableElement method, List<AnnotationMirror> descList,
+            Content htmltree) {
+        addAnnotationInfo(0, method, descList, false, htmltree);
+    }
+
+    /*
+     * this is a hack to delay dealing with Annotations in the writers, the assumption
+     * is that all necessary checks have been made to get here.
+     */
+    public void addReceiverAnnotationInfo(ExecutableElement method, TypeMirror rcvrTypeMirror,
+            List<? extends AnnotationMirror> annotationMirrors, Content htmltree) {
+        TypeMirror rcvrType = method.getReceiverType();
+        List<? extends AnnotationMirror> annotationMirrors1 = rcvrType.getAnnotationMirrors();
+        addAnnotationInfo(0, method, annotationMirrors1, false, htmltree);
+    }
+
+    /**
+     * Adds the annotatation types for the given element.
+     *
+     * @param element the package to write annotations for
+     * @param htmltree the content tree to which the annotation types will be added
+     */
+    public void addAnnotationInfo(Element element, Content htmltree) {
+        addAnnotationInfo(element, element.getAnnotationMirrors(), htmltree);
+    }
+
+    /**
+     * Add the annotatation types for the given element and parameter.
+     *
+     * @param indent the number of spaces to indent the parameters.
+     * @param element the element 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, Element element, VariableElement param,
+            Content tree) {
+        return addAnnotationInfo(indent, element, param.getAnnotationMirrors(), false, tree);
+    }
+
+    /**
+     * Adds the annotatation types for the given Element.
+     *
+     * @param element the element 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(Element element, List<? extends AnnotationMirror> descList,
+            Content htmltree) {
+        addAnnotationInfo(0, element, descList, true, htmltree);
+    }
+
+    /**
+     * Adds the annotation types for the given element.
+     *
+     * @param indent the number of extra spaces to indent the annotations.
+     * @param element the element 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, Element element,
+            List<? extends AnnotationMirror> descList, boolean lineBreak, Content htmltree) {
+        List<Content> annotations = getAnnotations(indent, descList, lineBreak);
+        String sep = "";
+        if (annotations.isEmpty()) {
+            return false;
+        }
+        for (Content annotation: annotations) {
+            htmltree.addContent(sep);
+            htmltree.addContent(annotation);
+            if (!lineBreak) {
+                sep = " ";
+            }
+        }
+        return true;
+    }
+
+   /**
+     * Return the string representations of the annotation types for
+     * the given doc.
+     *
+     * @param indent the number of extra spaces to indent the annotations.
+     * @param descList the array of {@link AnnotationDesc}.
+     * @param linkBreak if true, add new line between each member value.
+     * @return an array of strings representing the annotations being
+     *         documented.
+     */
+    private List<Content> getAnnotations(int indent, List<? extends AnnotationMirror> descList, boolean linkBreak) {
+        return getAnnotations(indent, descList, linkBreak, true);
+    }
+
+    private List<Content> getAnnotations(int indent, AnnotationMirror amirror, boolean linkBreak) {
+        List<AnnotationMirror> descList = new ArrayList<>();
+        descList.add(amirror);
+        return getAnnotations(indent, descList, linkBreak, true);
+    }
+
+    /**
+     * Return the string representations of the annotation types for
+     * the given doc.
+     *
+     * A {@code null} {@code elementType} indicates that all the
+     * annotations should be returned without any filtering.
+     *
+     * @param indent the number of extra spaces to indent the annotations.
+     * @param descList the array of {@link AnnotationDesc}.
+     * @param linkBreak if true, add new line between each member value.
+     * @param isJava5DeclarationLocation
+     * @return an array of strings representing the annotations being
+     *         documented.
+     */
+    public List<Content> getAnnotations(int indent, List<? extends AnnotationMirror> descList,
+            boolean linkBreak, boolean isJava5DeclarationLocation) {
+        List<Content> results = new ArrayList<>();
+        ContentBuilder annotation;
+        for (AnnotationMirror aDesc : descList) {
+            TypeElement annotationElement = (TypeElement)aDesc.getAnnotationType().asElement();
+            // If an annotation is not documented, do not add it to the list. If
+            // the annotation is of a repeatable type, and if it is not documented
+            // and also if its container annotation is not documented, do not add it
+            // to the list. If an annotation of a repeatable type is not documented
+            // but its container is documented, it will be added to the list.
+            if (!utils.isDocumentedAnnotation(annotationElement) &&
+                (!isAnnotationDocumented && !isContainerDocumented)) {
+                continue;
+            }
+            /* TODO: check logic here to correctly handle declaration
+             * and type annotations.
+            if  (utils.isDeclarationAnnotation(annotationElement, isJava5DeclarationLocation)) {
+                continue;
+            }*/
+            annotation = new ContentBuilder();
+            isAnnotationDocumented = false;
+            LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
+                                                     LinkInfoImpl.Kind.ANNOTATION, annotationElement);
+            Map<? extends ExecutableElement, ? extends AnnotationValue> pairs = aDesc.getElementValues();
+            // If the annotation is synthesized, do not print the container.
+            if (utils.configuration.workArounds.isSynthesized(aDesc)) {
+                for (ExecutableElement ee : pairs.keySet()) {
+                    AnnotationValue annotationValue = pairs.get(ee);
+                    List<AnnotationValue> annotationTypeValues = new ArrayList<>();
+
+                    new SimpleAnnotationValueVisitor9<Void, List<AnnotationValue>>() {
+                        @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                        public Void visitArray(List<? extends AnnotationValue> vals, List<AnnotationValue> p) {
+                            p.addAll(vals);
+                            return null;
+                        }
+
+                        @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                        protected Void defaultAction(Object o, List<AnnotationValue> p) {
+                            p.add(annotationValue);
+                            return null;
+                        }
+                    }.visit(annotationValue, annotationTypeValues);
+
+                    String sep = "";
+                    for (AnnotationValue av : annotationTypeValues) {
+                        annotation.addContent(sep);
+                        annotation.addContent(annotationValueToContent(av));
+                        sep = " ";
+                    }
+                }
+            } else if (isAnnotationArray(pairs)) {
+                // If the container has 1 or more value defined and if the
+                // repeatable type annotation is not documented, do not print
+                // the container.
+                if (pairs.size() == 1 && isAnnotationDocumented) {
+                    List<AnnotationValue> annotationTypeValues = new ArrayList<>();
+                    for (AnnotationValue a :  pairs.values()) {
+                        new SimpleAnnotationValueVisitor9<Void, List<AnnotationValue>>() {
+                            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                            public Void visitArray(List<? extends AnnotationValue> vals, List<AnnotationValue> annotationTypeValues) {
+                               for (AnnotationValue av : vals) {
+                                   annotationTypeValues.add(av);
+                               }
+                               return null;
+                            }
+                        }.visit(a, annotationTypeValues);
+                    }
+                    String sep = "";
+                    for (AnnotationValue av : annotationTypeValues) {
+                        annotation.addContent(sep);
+                        annotation.addContent(annotationValueToContent(av));
+                        sep = " ";
+                    }
+                }
+                // If the container has 1 or more value defined and if the
+                // repeatable type annotation is not documented, print the container.
+                else {
+                    addAnnotations(annotationElement, linkInfo, annotation, pairs,
+                                   indent, false);
+                }
+            }
+            else {
+                addAnnotations(annotationElement, linkInfo, annotation, pairs,
+                               indent, linkBreak);
+            }
+            annotation.addContent(linkBreak ? DocletConstants.NL : "");
+            results.add(annotation);
+        }
+        return results;
+    }
+
+    /**
+     * Add annotation to the annotation string.
+     *
+     * @param annotationDoc the annotation being documented
+     * @param linkInfo the information about the link
+     * @param annotation the annotation string to which the annotation will be added
+     * @param pairs annotation type element and value pairs
+     * @param indent the number of extra spaces to indent the annotations.
+     * @param linkBreak if true, add new line between each member value
+     */
+    private void addAnnotations(TypeElement annotationDoc, LinkInfoImpl linkInfo,
+        ContentBuilder annotation, Map<? extends ExecutableElement,? extends AnnotationValue>map,
+        int indent, boolean linkBreak) {
+        linkInfo.label = new StringContent("@" + annotationDoc.getSimpleName().toString());
+        annotation.addContent(getLink(linkInfo));
+        if (!map.isEmpty()) {
+            annotation.addContent("(");
+            boolean isFirst = true;
+            for (ExecutableElement element : map.keySet()) {
+                if (isFirst) {
+                    isFirst = false;
+                } else {
+                    annotation.addContent(",");
+                    if (linkBreak) {
+                        annotation.addContent(DocletConstants.NL);
+                        int spaces = annotationDoc.getSimpleName().toString().length() + 2;
+                        for (int k = 0; k < (spaces + indent); k++) {
+                            annotation.addContent(" ");
+                        }
+                    }
+                }
+                annotation.addContent(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
+                        element, element.getSimpleName().toString(), false));
+                annotation.addContent("=");
+                AnnotationValue annotationValue = map.get(element);
+                List<AnnotationValue> annotationTypeValues = new ArrayList<>();
+                new SimpleAnnotationValueVisitor9<Void, AnnotationValue>() {
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitArray(List<? extends AnnotationValue> vals, AnnotationValue p) {
+                        annotationTypeValues.addAll(vals);
+                        return null;
+                    }
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    protected Void defaultAction(Object o, AnnotationValue p) {
+                        annotationTypeValues.add(p);
+                        return null;
+                    }
+                }.visit(annotationValue, annotationValue);
+                annotation.addContent(annotationTypeValues.size() == 1 ? "" : "{");
+                String sep = "";
+                for (AnnotationValue av : annotationTypeValues) {
+                    annotation.addContent(sep);
+                    annotation.addContent(annotationValueToContent(av));
+                    sep = ",";
+                }
+                annotation.addContent(annotationTypeValues.size() == 1 ? "" : "}");
+                isContainerDocumented = false;
+            }
+            annotation.addContent(")");
+        }
+    }
+
+    /**
+     * Check if the annotation contains an array of annotation as a value. This
+     * check is to verify if a repeatable type annotation is present or not.
+     *
+     * @param pairs annotation type element and value pairs
+     *
+     * @return true if the annotation contains an array of annotation as a value.
+     */
+    private boolean isAnnotationArray(Map<? extends ExecutableElement, ? extends AnnotationValue> pairs) {
+        AnnotationValue annotationValue;
+        for (ExecutableElement ee : pairs.keySet()) {
+            annotationValue = pairs.get(ee);
+            boolean rvalue = new SimpleAnnotationValueVisitor9<Boolean, Void>() {
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitArray(List<? extends AnnotationValue> vals, Void p) {
+                    if (vals.size() > 1) {
+                        if (vals.get(0) instanceof AnnotationMirror) {
+                            isContainerDocumented = true;
+                            return new SimpleAnnotationValueVisitor9<Boolean, Void>() {
+                                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                                public Boolean visitAnnotation(AnnotationMirror a, Void p) {
+                                    isContainerDocumented = true;
+                                    Element asElement = a.getAnnotationType().asElement();
+                                    if (utils.isDocumentedAnnotation((TypeElement)asElement)) {
+                                        isAnnotationDocumented = true;
+                                    }
+                                    return true;
+                                }
+                                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                                protected Boolean defaultAction(Object o, Void p) {
+                                    return false;
+                                }
+                            }.visit(vals.get(0));
+                        }
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected Boolean defaultAction(Object o, Void p) {
+                    return false;
+                }
+            }.visit(annotationValue);
+            if (rvalue) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private Content annotationValueToContent(AnnotationValue annotationValue) {
+        return new SimpleAnnotationValueVisitor9<Content, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Content visitType(TypeMirror t, Void p) {
+                return new SimpleTypeVisitor9<Content, Void>() {
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Content visitDeclared(DeclaredType t, Void p) {
+                        LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
+                                LinkInfoImpl.Kind.ANNOTATION, t);
+                        String name = utils.isIncluded(t.asElement())
+                                ? t.asElement().getSimpleName().toString()
+                                : utils.getFullyQualifiedName(t.asElement());
+                        linkInfo.label = new StringContent(name + utils.getDimension(t) + ".class");
+                        return getLink(linkInfo);
+                    }
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    protected Content defaultAction(TypeMirror e, Void p) {
+                        return new StringContent(t + utils.getDimension(t) + ".class");
+                    }
+                }.visit(t);
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Content visitAnnotation(AnnotationMirror a, Void p) {
+                List<Content> list = getAnnotations(0, a, false);
+                ContentBuilder buf = new ContentBuilder();
+                for (Content c : list) {
+                    buf.addContent(c);
+                }
+                return buf;
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Content visitEnumConstant(VariableElement c, Void p) {
+                return getDocLink(LinkInfoImpl.Kind.ANNOTATION,
+                        c, c.getSimpleName().toString(), false);
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Content visitArray(List<? extends AnnotationValue> vals, Void p) {
+                ContentBuilder buf = new ContentBuilder();
+                String sep = "";
+                for (AnnotationValue av : vals) {
+                    buf.addContent(sep);
+                    buf.addContent(visit(av));
+                    sep = " ";
+                }
+                return buf;
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected Content defaultAction(Object o, Void p) {
+                return new StringContent(annotationValue.toString());
+            }
+        }.visit(annotationValue);
+    }
+
+    /**
+     * Return the configuration for this doclet.
+     *
+     * @return the configuration for this doclet.
+     */
+    public Configuration configuration() {
+        return configuration;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.util.*;
+
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import com.sun.source.doctree.DocTree;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter;
+import jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+
+/**
+ * Generate serialized form for serializable fields.
+ * Documentation denoted by the tags <code>serial</code> and
+ * <code>serialField</code> is processed.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Joe Fialli
+ * @author Bhavesh Patel (Modified)
+ */
+public class HtmlSerialFieldWriter extends FieldWriterImpl
+        implements SerializedFormWriter.SerialFieldWriter {
+
+    public HtmlSerialFieldWriter(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    public SortedSet<VariableElement> members(TypeElement te) {
+        return utils.serializableFields(te);
+    }
+
+    /**
+     * Return the header for serializable fields section.
+     *
+     * @return a content tree for the header
+     */
+    public Content getSerializableFieldsHeader() {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        return ul;
+    }
+
+    /**
+     * Return the header for serializable fields content section.
+     *
+     * @param isLastContent true if the cotent being documented is the last content.
+     * @return a content tree for the header
+     */
+    public Content getFieldsContentHeader(boolean isLastContent) {
+        HtmlTree li = new HtmlTree(HtmlTag.LI);
+        if (isLastContent)
+            li.addStyle(HtmlStyle.blockListLast);
+        else
+            li.addStyle(HtmlStyle.blockList);
+        return li;
+    }
+
+    /**
+     * Add serializable fields.
+     *
+     * @param heading the heading for the section
+     * @param serializableFieldsTree the tree to be added to the serializable fileds
+     *        content tree
+     * @return a content tree for the serializable fields content
+     */
+    public Content getSerializableFields(String heading, Content serializableFieldsTree) {
+        HtmlTree li = new HtmlTree(HtmlTag.LI);
+        li.addStyle(HtmlStyle.blockList);
+        if (serializableFieldsTree.isValid()) {
+            Content headingContent = new StringContent(heading);
+            Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
+                    headingContent);
+            li.addContent(serialHeading);
+            li.addContent(serializableFieldsTree);
+        }
+        return li;
+    }
+
+    /**
+     * Add the member header.
+     *
+     * @param fieldType the class document to be listed
+     * @param fieldTypeStr the string for the field type to be documented
+     * @param fieldDimensions the dimensions of the field string to be added
+     * @param fieldName name of the field to be added
+     * @param contentTree the content tree to which the member header will be added
+     */
+    public void addMemberHeader(TypeElement fieldType, String fieldTypeStr,
+            String fieldDimensions, String fieldName, Content contentTree) {
+        Content nameContent = new RawHtml(fieldName);
+        Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, nameContent);
+        contentTree.addContent(heading);
+        Content pre = new HtmlTree(HtmlTag.PRE);
+        if (fieldType == null) {
+            pre.addContent(fieldTypeStr);
+        } else {
+            Content fieldContent = writer.getLink(new LinkInfoImpl(
+                    configuration, LinkInfoImpl.Kind.SERIAL_MEMBER, fieldType));
+            pre.addContent(fieldContent);
+        }
+        pre.addContent(fieldDimensions + " ");
+        pre.addContent(fieldName);
+        contentTree.addContent(pre);
+    }
+
+    /**
+     * Add the deprecated information for this member.
+     *
+     * @param field the field to document.
+     * @param contentTree the tree to which the deprecated info will be added
+     */
+    public void addMemberDeprecatedInfo(VariableElement field, Content contentTree) {
+        addDeprecatedInfo(field, contentTree);
+    }
+
+    /**
+     * Add the description text for this member.
+     *
+     * @param field the field to document.
+     * @param contentTree the tree to which the deprecated info will be added
+     */
+    public void addMemberDescription(VariableElement field, Content contentTree) {
+        if (!utils.getBody(field).isEmpty()) {
+            writer.addInlineComment(field, contentTree);
+        }
+        List<? extends DocTree> tags = utils.getBlockTags(field, DocTree.Kind.SERIAL);
+        if (!tags.isEmpty()) {
+            writer.addInlineComment(field, tags.get(0), contentTree);
+        }
+    }
+
+    /**
+     * Add the description text for this member represented by the tag.
+     *
+     * @param serialFieldTag the field to document (represented by tag)
+     * @param contentTree the tree to which the deprecated info will be added
+     */
+    public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content contentTree) {
+        CommentHelper ch = utils.getCommentHelper(field);
+        List<? extends DocTree> description = ch.getDescription(configuration, serialFieldTag);
+        if (!description.isEmpty()) {
+            Content serialFieldContent = new RawHtml(ch.getText(description));
+            Content div = HtmlTree.DIV(HtmlStyle.block, serialFieldContent);
+            contentTree.addContent(div);
+        }
+    }
+
+    /**
+     * Add the tag information for this member.
+     *
+     * @param field the field to document.
+     * @param contentTree the tree to which the member tags info will be added
+     */
+    public void addMemberTags(VariableElement field, Content contentTree) {
+        Content tagContent = new ContentBuilder();
+        TagletWriter.genTagOutput(configuration.tagletManager, field,
+                configuration.tagletManager.getCustomTaglets(field),
+                writer.getTagletWriterInstance(false), tagContent);
+        Content dlTags = new HtmlTree(HtmlTag.DL);
+        dlTags.addContent(tagContent);
+        contentTree.addContent(dlTags);  // TODO: what if empty?
+    }
+
+    /**
+     * Check to see if overview details should be printed. If
+     * nocomment option set or if there is no text to be printed
+     * for deprecation info, comment or tags, do not print overview details.
+     *
+     * @param field the field to check overview details for.
+     * @return true if overview details need to be printed
+     */
+    public boolean shouldPrintOverview(VariableElement field) {
+        if (!configuration.nocomment) {
+            if(!utils.getBody(field).isEmpty() ||
+                    writer.hasSerializationOverviewTags(field))
+                return true;
+        }
+        if (utils.isDeprecated(field))
+            return true;
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter;
+import jdk.javadoc.internal.doclets.toolkit.taglets.TagletManager;
+import jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter;
+
+
+/**
+ * Generate serialized form for Serializable/Externalizable methods.
+ * Documentation denoted by the <code>serialData</code> tag is processed.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Joe Fialli
+ * @author Bhavesh Patel (Modified)
+ */
+public class HtmlSerialMethodWriter extends MethodWriterImpl implements
+        SerializedFormWriter.SerialMethodWriter{
+
+    public HtmlSerialMethodWriter(SubWriterHolderWriter writer, TypeElement  typeElement) {
+        super(writer, typeElement);
+    }
+
+    /**
+     * 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(ExecutableElement 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(ExecutableElement 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(ExecutableElement 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(ExecutableElement member, Content methodsContentTree) {
+        Content tagContent = new ContentBuilder();
+        TagletManager tagletManager =
+            configuration.tagletManager;
+        TagletWriter.genTagOutput(tagletManager, member,
+            tagletManager.getSerializedFormTaglets(),
+            writer.getTagletWriterInstance(false), tagContent);
+        Content dlTags = new HtmlTree(HtmlTag.DL);
+        dlTags.addContent(tagContent);
+        methodsContentTree.addContent(dlTags);
+        if (name(member).compareTo("writeExternal") == 0
+                && utils.getSerialDataTrees(member).isEmpty()) {
+            serialWarning(member, "doclet.MissingSerialDataTag",
+                utils.getFullyQualifiedName(member.getEnclosingElement()), name(member));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkFactoryImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.util.List;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.doclets.toolkit.util.links.LinkFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo;
+
+import static jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl.Kind.MEMBER_TYPE_PARAMS;
+
+/**
+ * A factory that returns a link given the information about it.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class LinkFactoryImpl extends LinkFactory {
+
+    private final HtmlDocletWriter m_writer;
+
+    public LinkFactoryImpl(HtmlDocletWriter writer) {
+        m_writer = writer;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content newContent() {
+        return new ContentBuilder();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getClassLink(LinkInfo linkInfo) {
+        Configuration configuration = m_writer.configuration;
+        Utils utils = configuration.utils;
+        LinkInfoImpl classLinkInfo = (LinkInfoImpl) linkInfo;
+        boolean noLabel = linkInfo.label == null || linkInfo.label.isEmpty();
+        TypeElement typeElement = classLinkInfo.typeElement;
+        // 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 = "";
+        if (classLinkInfo.where == null || classLinkInfo.where.length() == 0) {
+            boolean isTypeLink = classLinkInfo.type != null &&
+                     utils.isTypeVariable(utils.getComponentType(classLinkInfo.type));
+            title = getClassToolTip(typeElement, isTypeLink);
+        }
+        Content label = classLinkInfo.getClassLinkLabel(m_writer.configuration);
+
+        Content link = new ContentBuilder();
+        if (utils.isIncluded(typeElement)) {
+            if (configuration.isGeneratedDoc(typeElement)) {
+                DocPath filename = getPath(classLinkInfo);
+                if (linkInfo.linkToSelf ||
+                                !(DocPath.forName(utils, typeElement)).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(
+                typeElement.getQualifiedName().toString(), 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}
+     */
+    @Override
+    protected Content getTypeParameterLink(LinkInfo linkInfo, TypeMirror 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);
+    }
+
+    @Override
+    protected Content getTypeAnnotationLink(LinkInfo linkInfo, AnnotationMirror annotation) {
+        throw new RuntimeException("Not implemented yet!");
+    }
+
+    @Override
+    public Content getTypeAnnotationLinks(LinkInfo linkInfo) {
+        Utils utils = ((LinkInfoImpl)linkInfo).utils;
+        ContentBuilder links = new ContentBuilder();
+        List<? extends AnnotationMirror> annotations;
+        if (utils.isAnnotated(linkInfo.type)) {
+            annotations = linkInfo.type.getAnnotationMirrors();
+        } else if (utils.isTypeVariable(linkInfo.type)) {
+            // TODO: use the context for now, and special case for Receiver_Types,
+            // which takes the default case.
+            switch (((LinkInfoImpl)linkInfo).context) {
+                case MEMBER_TYPE_PARAMS:
+                case EXECUTABLE_MEMBER_PARAM:
+                case CLASS_SIGNATURE:
+                    Element element = utils.typeUtils.asElement(linkInfo.type);
+                    annotations = element.getAnnotationMirrors();
+                    break;
+                default:
+                    annotations = linkInfo.type.getAnnotationMirrors();
+                    break;
+            }
+
+        } else {
+            return links;
+        }
+
+        if (annotations.isEmpty())
+            return links;
+
+        List<Content> annos = m_writer.getAnnotations(0, annotations, false, linkInfo.isJava5DeclarationLocation);
+
+        boolean isFirst = true;
+        for (Content anno : annos) {
+            if (!isFirst) {
+                links.addContent(" ");
+            }
+            links.addContent(anno);
+            isFirst = false;
+        }
+        if (!annos.isEmpty()) {
+            links.addContent(" ");
+        }
+
+        return links;
+    }
+
+    /**
+     * Given a class, return the appropriate tool tip.
+     *
+     * @param typeElement the class to get the tool tip for.
+     * @return the tool tip for the appropriate class.
+     */
+    private String getClassToolTip(TypeElement typeElement, boolean isTypeLink) {
+        Configuration configuration = m_writer.configuration;
+        Utils utils = configuration.utils;
+        if (isTypeLink) {
+            return configuration.getText("doclet.Href_Type_Param_Title",
+                    utils.getSimpleName(typeElement));
+        } else if (utils.isInterface(typeElement)){
+            return configuration.getText("doclet.Href_Interface_Title",
+                utils.getPackageName(utils.containingPackage(typeElement)));
+        } else if (utils.isAnnotationType(typeElement)) {
+            return configuration.getText("doclet.Href_Annotation_Title",
+                utils.getPackageName(utils.containingPackage(typeElement)));
+        } else if (utils.isEnum(typeElement)) {
+            return configuration.getText("doclet.Href_Enum_Title",
+                utils.getPackageName(utils.containingPackage(typeElement)));
+        } else {
+            return configuration.getText("doclet.Href_Class_Title",
+                utils.getPackageName(utils.containingPackage(typeElement)));
+        }
+    }
+
+    /**
+     * Return path to the given file name in the given package. So if the name
+     * passed is "Object.html" and the name of the package is "java.lang", and
+     * if the relative path is "../.." then returned string will be
+     * "../../java/lang/Object.html"
+     *
+     * @param linkInfo the information about the link.
+     */
+    private DocPath getPath(LinkInfoImpl linkInfo) {
+        if (linkInfo.context == LinkInfoImpl.Kind.PACKAGE_FRAME) {
+            //Not really necessary to do this but we want to be consistent
+            //with 1.4.2 output.
+            return DocPath.forName(linkInfo.utils, linkInfo.typeElement);
+        }
+        return m_writer.pathToRoot.resolve(DocPath.forClass(linkInfo.utils, linkInfo.typeElement));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkInfoImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,450 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo;
+
+
+/**
+ *  <p><b>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.</b>
+ */
+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.
+         */
+        EXECUTABLE_ELEMENT_COPY,
+
+        /**
+         * Method "specified by" link.
+         */
+        METHOD_SPECIFIED_BY,
+
+        /**
+         * Method "overrides" link.
+         */
+        METHOD_OVERRIDES,
+
+        /**
+         * Annotation link.
+         */
+        ANNOTATION,
+
+        /**
+         * The header for field documentation copied from parent.
+         */
+        VARIABLE_ELEMENT_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_COPY,
+
+        /**
+         * A receiver type
+         */
+        RECEIVER_TYPE
+    }
+
+    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 = "";
+    public  final Utils utils;
+    /**
+     * Construct a LinkInfo object.
+     *
+     * @param configuration the configuration data for the doclet
+     * @param context    the context of the link.
+     * @param ee   the member to link to.
+     */
+    public LinkInfoImpl(ConfigurationImpl configuration, Kind context, ExecutableElement ee) {
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        this.executableElement = ee;
+        setContext(context);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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 typeElement   the class to link to.
+     */
+    public LinkInfoImpl(ConfigurationImpl configuration, Kind context, TypeElement typeElement) {
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        this.typeElement = typeElement;
+        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, TypeMirror type) {
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        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 EXECUTABLE_ELEMENT_COPY:
+            case VARIABLE_ELEMENT_COPY:
+            case PROPERTY_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:
+            case RECEIVER_TYPE:
+                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 &&
+            utils.isTypeVariable(type) &&
+            utils.isExecutableElement(utils.asTypeElement(type).getEnclosingElement())) {
+                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.
+     */
+    @Override
+    public boolean isLinkable() {
+        return configuration.utils.isLinkable(typeElement);
+    }
+
+    @Override
+    public String toString() {
+        return "LinkInfoImpl{" +
+                "context=" + context +
+                ", where=" + where +
+                ", styleName=" + styleName +
+                ", target=" + target +
+                super.toString() + '}';
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/LinkOutputImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import jdk.javadoc.internal.doclets.toolkit.util.links.LinkOutput;
+
+/**
+ * Stores output of a link.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+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();
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,457 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.MethodWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.ImplementedMethods;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * Writes method documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Jamie Ho (rewrite)
+ * @author Bhavesh Patel (Modified)
+ */
+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 typeElement the class being documented.
+     */
+    public MethodWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    /**
+     * Construct a new MethodWriterImpl.
+     *
+     * @param writer The writer for the class that the methods belong to.
+     */
+    public MethodWriterImpl(SubWriterHolderWriter writer) {
+        super(writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMemberSummaryHeader(TypeElement typeElement, Content memberSummaryTree) {
+        memberSummaryTree.addContent(HtmlConstants.START_OF_METHOD_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMethodDetailsTreeHeader(TypeElement typeElement, 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}
+     */
+    @Override
+    public Content getMethodDocTreeHeader(ExecutableElement 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(name(method));
+        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
+     */
+    @Override
+    public Content getSignature(ExecutableElement 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(name(method));
+            writer.addSrcLink(method, methodName, pre);
+        } else {
+            addName(name(method), pre);
+        }
+        int indent = pre.charCount() - annotationLength;
+        addParameters(method, pre, indent);
+        addExceptions(method, pre, indent);
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addDeprecated(ExecutableElement method, Content methodDocTree) {
+        addDeprecatedInfo(method, methodDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addComments(TypeMirror holderType, ExecutableElement method, Content methodDocTree) {
+        TypeElement holder = utils.asTypeElement(holderType);
+        if (!utils.getBody(method).isEmpty()) {
+            if (holder.equals(typeElement) ||
+                    !(utils.isPublic(holder) ||
+                    utils.isLinkable(holder))) {
+                writer.addInlineComment(method, methodDocTree);
+            } else {
+                Content link =
+                        writer.getDocLink(LinkInfoImpl.Kind.EXECUTABLE_ELEMENT_COPY,
+                        holder, method,
+                        utils.isIncluded(holder)
+                                ? utils.getSimpleName(holder)
+                                : utils.getFullyQualifiedName(holder),
+                            false);
+                Content codelLink = HtmlTree.CODE(link);
+                Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel,
+                        utils.isClass(holder)
+                                ? writer.descfrmClassLabel
+                                : writer.descfrmInterfaceLabel);
+                descfrmLabel.addContent(writer.getSpace());
+                descfrmLabel.addContent(codelLink);
+                methodDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
+                writer.addInlineComment(method, methodDocTree);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addTags(ExecutableElement method, Content methodDocTree) {
+        writer.addTagsInfo(method, methodDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMethodDetails(Content methodDetailsTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(methodDetailsTree));
+            return htmlTree;
+        }
+        return getMemberTree(methodDetailsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMethodDoc(Content methodDocTree,
+            boolean isLastContent) {
+        return getMemberTree(methodDocTree, isLastContent);
+    }
+
+    /**
+     * Close the writer.
+     */
+    @Override
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryLabel(Content memberTree) {
+        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+                writer.getResource("doclet.Method_Summary"));
+        memberTree.addContent(label);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableSummary() {
+        return configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Method_Summary"),
+                configuration.getText("doclet.methods"));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getCaption() {
+        return configuration.getResource("doclet.Methods");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(writer.getModifierTypeHeader(),
+        configuration.getText("doclet.0_and_1",
+                   configuration.getText("doclet.Method"),
+                   configuration.getText("doclet.Description")));
+        return header;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.METHOD_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+        inheritedTree.addContent(writer.getMarkerAnchor(
+                SectionName.METHODS_INHERITANCE, configuration.getClassName(typeElement)));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+        Content classLink = writer.getPreQualifiedClassLink(
+                LinkInfoImpl.Kind.MEMBER, typeElement, false);
+        Content label = new StringContent(utils.isClass(typeElement)
+                ? 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}
+     */
+    @Override
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        ExecutableElement meth = (ExecutableElement)member;
+        addModifierAndType(meth, utils.getReturnType(meth), tdSummaryType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected static void addOverridden(HtmlDocletWriter writer,
+            TypeMirror overriddenType, ExecutableElement method, Content dl) {
+        if (writer.configuration.nocomment) {
+            return;
+        }
+        Utils utils = writer.configuration().utils;
+        TypeElement holder = utils.getEnclosingTypeElement(method);
+        if (!(utils.isPublic(holder) ||
+            utils.isLinkable(holder))) {
+            //This is an implementation detail that should not be documented.
+            return;
+        }
+        if (utils.isIncluded(holder) && ! utils.isIncluded(method)) {
+            //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 (utils.isAbstract(holder) && utils.isAbstract(method)){
+                //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.getSimpleName().toString();
+            Content methlink = writer.getLink(
+                    new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER,
+                    holder)
+                    .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,
+            ExecutableElement method, Content dl) {
+        if (writer.configuration.nocomment) {
+            return;
+        }
+        Utils utils = writer.utils;
+        ImplementedMethods implementedMethodsFinder =
+                new ImplementedMethods(method, writer.configuration);
+        SortedSet<ExecutableElement> implementedMethods =
+                new TreeSet<>(utils.makeOverrideUseComparator());
+        implementedMethods.addAll(implementedMethodsFinder.build());
+        for (ExecutableElement implementedMeth : implementedMethods) {
+            TypeMirror intfac = implementedMethodsFinder.getMethodHolder(implementedMeth);
+            intfac = utils.getDeclaredType(utils.getEnclosingTypeElement(method), intfac);
+            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.getSimpleName().toString(), 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(ExecutableElement method, Content htmltree) {
+        TypeMirror type = utils.getReturnType(method);
+        if (type != null) {
+            Content linkContent = writer.getLink(
+                    new LinkInfoImpl(configuration, LinkInfoImpl.Kind.RETURN_TYPE, type));
+            htmltree.addContent(linkContent);
+            htmltree.addContent(writer.getSpace());
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            if (typeElement == null) {
+                return writer.getHyperLink(
+                        SectionName.METHOD_SUMMARY,
+                        writer.getResource("doclet.navMethod"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.METHODS_INHERITANCE,
+                        configuration.getClassName(typeElement), writer.getResource("doclet.navMethod"));
+            }
+        } else {
+            return writer.getResource("doclet.navMethod");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/NestedClassWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,241 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+
+/**
+ * Writes nested class documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Jamie Ho (rewrite)
+ * @author Bhavesh Patel (Modified)
+ */
+public class NestedClassWriterImpl extends AbstractMemberWriter
+    implements MemberSummaryWriter {
+
+    public NestedClassWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    public NestedClassWriterImpl(SubWriterHolderWriter writer) {
+        super(writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(HtmlConstants.START_OF_NESTED_CLASS_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * Close the writer.
+     */
+    @Override
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryLabel(Content memberTree) {
+        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+                writer.getResource("doclet.Nested_Class_Summary"));
+        memberTree.addContent(label);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableSummary() {
+        return configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Nested_Class_Summary"),
+                configuration.getText("doclet.nested_classes"));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getCaption() {
+        return configuration.getResource("doclet.Nested_Classes");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<String> getSummaryTableHeader(Element member) {
+        if (utils.isInterface(member)) {
+            return Arrays.asList(writer.getModifierTypeHeader(),
+                configuration.getText("doclet.0_and_1",
+                    configuration.getText("doclet.Interface"),
+                    configuration.getText("doclet.Description")));
+
+        } else {
+            return Arrays.asList(writer.getModifierTypeHeader(),
+                configuration.getText("doclet.0_and_1",
+                    configuration.getText("doclet.Class"),
+                    configuration.getText("doclet.Description")));
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.NESTED_CLASS_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+        inheritedTree.addContent(writer.getMarkerAnchor(
+                SectionName.NESTED_CLASSES_INHERITANCE,
+                utils.getFullyQualifiedName(typeElement)));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+        Content classLink = writer.getPreQualifiedClassLink(
+                LinkInfoImpl.Kind.MEMBER, typeElement, false);
+        Content label = new StringContent(utils.isInterface(typeElement)
+                ? 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}
+     */
+    @Override
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
+            Content tdSummary) {
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getLink(new LinkInfoImpl(configuration, context, (TypeElement)member)));
+        Content code = HtmlTree.CODE(memberLink);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
+        linksTree.addContent(
+                writer.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
+                        (TypeElement)member)));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        addModifierAndType(member, null, tdSummaryType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getDeprecatedLink(Element member) {
+        return writer.getQualifiedClassLink(LinkInfoImpl.Kind.MEMBER, member);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            if (typeElement == null) {
+                return writer.getHyperLink(
+                        SectionName.NESTED_CLASS_SUMMARY,
+                        writer.getResource("doclet.navNested"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.NESTED_CLASSES_INHERITANCE,
+                        utils.getFullyQualifiedName(typeElement), writer.getResource("doclet.navNested"));
+            }
+        } else {
+            return writer.getResource("doclet.navNested");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addNavDetailLink(boolean link, Content liNav) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageFrameWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,213 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * 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.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class PackageFrameWriter extends HtmlDocletWriter {
+
+    /**
+     * The package being documented.
+     */
+    private PackageElement packageElement;
+
+    /**
+     * The classes to be documented.  Use this to filter out classes
+     * that will not be documented.
+     */
+    private SortedSet<TypeElement> documentedClasses;
+
+    /**
+     * Constructor to construct PackageFrameWriter object and to generate
+     * "package-frame.html" file in the respective package directory.
+     * For example for package "java.lang" this will generate file
+     * "package-frame.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 packageElement PackageElement under consideration.
+     */
+    public PackageFrameWriter(ConfigurationImpl configuration, PackageElement packageElement)
+            throws IOException {
+        super(configuration, DocPath.forPackage(packageElement).resolve(DocPaths.PACKAGE_FRAME));
+        this.packageElement = packageElement;
+        if (utils.getSpecifiedPackages().isEmpty()) {
+            documentedClasses = new TreeSet<>(utils.makeGeneralPurposeComparator());
+            documentedClasses.addAll(configuration.root.getIncludedClasses());
+        }
+    }
+
+    /**
+     * Generate a package summary page for the left-hand bottom frame. Construct
+     * the PackageFrameWriter object and then uses it generate the file.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @param packageElement The package for which "pacakge-frame.html" is to be generated.
+     */
+    public static void generate(ConfigurationImpl configuration, PackageElement packageElement) {
+        PackageFrameWriter packgen;
+        try {
+            packgen = new PackageFrameWriter(configuration, packageElement);
+            String pkgName = configuration.utils.getPackageName(packageElement);
+            HtmlTree body = packgen.getBody(false, packgen.getWindowTitle(pkgName));
+            Content pkgNameContent = new StringContent(pkgName);
+            HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+                    ? HtmlTree.MAIN()
+                    : body;
+            Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
+                    packgen.getTargetPackageLink(packageElement, "classFrame", pkgNameContent));
+            htmlTree.addContent(heading);
+            HtmlTree div = new HtmlTree(HtmlTag.DIV);
+            div.addStyle(HtmlStyle.indexContainer);
+            packgen.addClassListing(div);
+            htmlTree.addContent(div);
+            if (configuration.allowTag(HtmlTag.MAIN)) {
+                body.addContent(htmlTree);
+            }
+            packgen.printHtmlDocument(
+                    configuration.metakeywords.getMetaKeywords(packageElement), false, body);
+            packgen.close();
+        } catch (IOException exc) {
+            configuration.standardmessage.error(
+                    "doclet.exception_encountered",
+                    exc.toString(), DocPaths.PACKAGE_FRAME.getPath());
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Add class listing for all the classes in this package. Divide class
+     * listing as per the class kind and generate separate listing for
+     * Classes, Interfaces, Exceptions and Errors.
+     *
+     * @param contentTree the content tree to which the listing will be added
+     */
+    protected void addClassListing(HtmlTree contentTree) {
+        Configuration config = configuration;
+        if (utils.isIncluded(packageElement)) {
+            addClassKindListing(utils.getInterfaces(packageElement),
+                getResource("doclet.Interfaces"), contentTree);
+            addClassKindListing(utils.getOrdinaryClasses(packageElement),
+                getResource("doclet.Classes"), contentTree);
+            addClassKindListing(utils.getEnums(packageElement),
+                getResource("doclet.Enums"), contentTree);
+            addClassKindListing(utils.getExceptions(packageElement),
+                getResource("doclet.Exceptions"), contentTree);
+            addClassKindListing(utils.getErrors(packageElement),
+                getResource("doclet.Errors"), contentTree);
+            addClassKindListing(utils.getAnnotationTypes(packageElement),
+                getResource("doclet.AnnotationTypes"), contentTree);
+        } else {
+            addClassKindListing(config.typeElementCatalog.interfaces(packageElement),
+                getResource("doclet.Interfaces"), contentTree);
+            addClassKindListing(config.typeElementCatalog.ordinaryClasses(packageElement),
+                getResource("doclet.Classes"), contentTree);
+            addClassKindListing(config.typeElementCatalog.enums(packageElement),
+                getResource("doclet.Enums"), contentTree);
+            addClassKindListing(config.typeElementCatalog.exceptions(packageElement),
+                getResource("doclet.Exceptions"), contentTree);
+            addClassKindListing(config.typeElementCatalog.errors(packageElement),
+                getResource("doclet.Errors"), contentTree);
+            addClassKindListing(config.typeElementCatalog.annotationTypes(packageElement),
+                getResource("doclet.AnnotationTypes"), contentTree);
+        }
+    }
+
+    /**
+     * Add specific class kind listing. Also add label to the listing.
+     *
+     * @param arr Array of specific class kinds, namely Class or Interface or Exception or Error
+     * @param labelContent content tree of the label to be added
+     * @param contentTree the content tree to which the class kind listing will be added
+     */
+    protected void addClassKindListing(Iterable<TypeElement> list, Content labelContent,
+            HtmlTree contentTree) {
+        SortedSet<TypeElement> tset = utils.filterOutPrivateClasses(list, configuration.javafx);
+        if(!tset.isEmpty()) {
+            boolean printedHeader = false;
+            HtmlTree htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+                    ? HtmlTree.SECTION()
+                    : contentTree;
+            HtmlTree ul = new HtmlTree(HtmlTag.UL);
+            ul.setTitle(labelContent);
+            for (TypeElement typeElement : tset) {
+                if (documentedClasses != null && !documentedClasses.contains(typeElement)) {
+                    continue;
+                }
+                if (!utils.isCoreClass(typeElement) || !configuration.isGeneratedDoc(typeElement)) {
+                    continue;
+                }
+                if (!printedHeader) {
+                    Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING,
+                                                       true, labelContent);
+                    htmlTree.addContent(heading);
+                    printedHeader = true;
+                }
+                Content arr_i_name = new StringContent(utils.getSimpleName(typeElement));
+                if (utils.isInterface(typeElement))
+                    arr_i_name = HtmlTree.SPAN(HtmlStyle.interfaceName, arr_i_name);
+                Content link = getLink(new LinkInfoImpl(configuration,
+                                                        LinkInfoImpl.Kind.PACKAGE_FRAME, typeElement).label(arr_i_name).target("classFrame"));
+                Content li = HtmlTree.LI(link);
+                ul.addContent(li);
+            }
+            htmlTree.addContent(ul);
+            if (configuration.allowTag(HtmlTag.SECTION)) {
+                contentTree.addContent(htmlTree);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexFrameWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,176 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.IOException;
+import java.util.Collection;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * Generate the package index for the left-hand frame in the generated output.
+ * A click on the package name in this frame will update the page in the bottom
+ * left hand frame with the listing of contents of the clicked package.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+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<PackageElement> packages, String text,
+            String tableSummary, Content body) {
+        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+                packagesLabel);
+        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+                ? HtmlTree.MAIN(HtmlStyle.indexContainer, heading)
+                : HtmlTree.DIV(HtmlStyle.indexContainer, heading);
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.setTitle(packagesLabel);
+        for (PackageElement aPackage : packages) {
+            // Do not list the package if -nodeprecated option is set and the
+            // package is marked as deprecated.
+            if (aPackage != null &&
+                (!(configuration.nodeprecated && utils.isDeprecated(aPackage)))) {
+                ul.addContent(getPackage(aPackage));
+            }
+        }
+        htmlTree.addContent(ul);
+        body.addContent(htmlTree);
+    }
+
+    /**
+     * Returns each package name as a separate link.
+     *
+     * @param pe PackageElement
+     * @return content for the package link
+     */
+    protected Content getPackage(PackageElement pe) {
+        Content packageLinkContent;
+        Content packageLabel;
+        if (pe.isUnnamed()) {
+            packageLabel = new StringContent("<unnamed package>");
+            packageLinkContent = getHyperLink(DocPaths.PACKAGE_FRAME,
+                    packageLabel, "", "packageFrame");
+        } else {
+            packageLabel = getPackageLabel(pe.getQualifiedName().toString());
+            packageLinkContent = getHyperLink(pathString(pe,
+                     DocPaths.PACKAGE_FRAME), packageLabel, "",
+                    "packageFrame");
+        }
+        Content li = HtmlTree.LI(packageLinkContent);
+        return li;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addNavigationBarHeader(Content body) {
+        Content headerContent;
+        if (configuration.packagesheader.length() > 0) {
+            headerContent = new RawHtml(replaceDocRootDir(configuration.packagesheader));
+        } else {
+            headerContent = new RawHtml(replaceDocRootDir(configuration.header));
+        }
+        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+                HtmlStyle.bar, headerContent);
+        body.addContent(heading);
+    }
+
+    /**
+     * Do nothing as there is no overview information in this page.
+     */
+    protected void addOverviewHeader(Content body) {
+    }
+
+    /**
+     * Adds "All Classes" link for the top of the left-hand frame page to the
+     * documentation tree.
+     *
+     * @param ul the Content object to which the "All Classes" link should be added
+     */
+    protected void addAllClassesLink(Content ul) {
+        Content linkContent = getHyperLink(DocPaths.ALLCLASSES_FRAME,
+                allclassesLabel, "", "packageFrame");
+        Content li = HtmlTree.LI(linkContent);
+        ul.addContent(li);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addNavigationBarFooter(Content body) {
+        Content p = HtmlTree.P(getSpace());
+        body.addContent(p);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageIndexWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,274 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.Group;
+
+/**
+ * Generate the package index page "overview-summary.html" for the right-hand
+ * frame. A click on the package name on this page will update the same frame
+ * with the "package-summary.html" file for the clicked package.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class PackageIndexWriter extends AbstractPackageIndexWriter {
+
+    /**
+     * Root of the program structure. Used for "overview" documentation.
+     */
+    private DocletEnvironment root;
+
+    /**
+     * Map representing the group of packages as specified on the command line.
+     *
+     * @see Group
+     */
+    private Map<String, SortedSet<PackageElement>> groupPackageMap;
+
+    /**
+     * List to store the order groups as specified on the command line.
+     */
+    private List<String> groupList;
+
+    /**
+     * HTML tree for main tag.
+     */
+    private HtmlTree htmlTree = HtmlTree.MAIN();
+
+    /**
+     * Construct the PackageIndexWriter. Also constructs the grouping
+     * information as provided on the command line by "-group" option. Stores
+     * the order of groups specified by the user.
+     *
+     * @see Group
+     */
+    public PackageIndexWriter(ConfigurationImpl configuration, DocPath filename) throws IOException {
+        super(configuration, filename);
+        this.root = configuration.root;
+        groupPackageMap = configuration.group.groupPackages(packages);
+        groupList = configuration.group.getGroupList();
+    }
+
+    /**
+     * Generate the package index page for the right-hand frame.
+     *
+     * @param configuration the current configuration of the doclet.
+     */
+    public static void generate(ConfigurationImpl configuration) {
+        PackageIndexWriter packgen;
+        DocPath filename = DocPaths.OVERVIEW_SUMMARY;
+        try {
+            packgen = new PackageIndexWriter(configuration, filename);
+            packgen.buildPackageIndexFile("doclet.Window_Overview_Summary", true);
+            packgen.close();
+        } catch (IOException exc) {
+            configuration.standardmessage.error(
+                        "doclet.exception_encountered",
+                        exc.toString(), filename);
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Depending upon the grouping information and their titles, add
+     * separate table indices for each package group.
+     *
+     * @param body the documentation tree to which the index will be added
+     */
+    protected void addIndex(Content body) {
+        for (String groupname : groupList) {
+            SortedSet<PackageElement> list = groupPackageMap.get(groupname);
+            if (list != null && !list.isEmpty()) {
+                addIndexContents(list,
+                                 groupname, configuration.getText("doclet.Member_Table_Summary",
+                                                                  groupname, configuration.getText("doclet.packages")), body);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected void addPackagesList(Collection<PackageElement> packages, String text,
+            String tableSummary, Content body) {
+        Content table = (configuration.isOutputHtml5())
+                ? HtmlTree.TABLE(HtmlStyle.overviewSummary, getTableCaption(new RawHtml(text)))
+                : HtmlTree.TABLE(HtmlStyle.overviewSummary, tableSummary, getTableCaption(new RawHtml(text)));
+        table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
+        Content tbody = new HtmlTree(HtmlTag.TBODY);
+        addPackagesList(packages, tbody);
+        table.addContent(tbody);
+        Content div = HtmlTree.DIV(HtmlStyle.contentContainer, table);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            htmlTree.addContent(div);
+        } else {
+            body.addContent(div);
+        }
+    }
+
+    /**
+     * Adds list of packages in the index table. Generate link to each package.
+     *
+     * @param packages Packages to which link is to be generated
+     * @param tbody the documentation tree to which the list will be added
+     */
+    protected void addPackagesList(Collection<PackageElement> packages, Content tbody) {
+        boolean altColor = true;
+        for (PackageElement pkg : packages) {
+            if (!pkg.isUnnamed()) {
+                if (!(configuration.nodeprecated && utils.isDeprecated(pkg))) {
+                    Content packageLinkContent = getPackageLink(pkg, getPackageName(pkg));
+                    Content tdPackage = HtmlTree.TD(HtmlStyle.colFirst, packageLinkContent);
+                    HtmlTree tdSummary = new HtmlTree(HtmlTag.TD);
+                    tdSummary.addStyle(HtmlStyle.colLast);
+                    addSummaryComment(pkg, tdSummary);
+                    HtmlTree tr = HtmlTree.TR(tdPackage);
+                    tr.addContent(tdSummary);
+                    tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+                    tbody.addContent(tr);
+                }
+            }
+            altColor = !altColor;
+        }
+    }
+
+    /**
+     * Adds the overview summary comment for this documentation. Add one line
+     * summary at the top of the page and generate a link to the description,
+     * which is added at the end of this page.
+     *
+     * @param body the documentation tree to which the overview header will be added
+     */
+    protected void addOverviewHeader(Content body) {
+        addConfigurationTitle(body);
+        if (!utils.getBody(configuration.overviewElement).isEmpty()) {
+            HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV);
+            subTitleDiv.addStyle(HtmlStyle.subTitle);
+            addSummaryComment(configuration.overviewElement, subTitleDiv);
+            Content div = HtmlTree.DIV(HtmlStyle.header, subTitleDiv);
+            Content see = seeLabel;
+            see.addContent(" ");
+            Content descPara = HtmlTree.P(see);
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.OVERVIEW_DESCRIPTION),
+                    descriptionLabel, "", "");
+            descPara.addContent(descLink);
+            div.addContent(descPara);
+            if (configuration.allowTag(HtmlTag.MAIN)) {
+                htmlTree.addContent(div);
+            } else {
+                body.addContent(div);
+            }
+        }
+    }
+
+    /**
+     * Adds the overview comment as provided in the file specified by the
+     * "-overview" option on the command line.
+     *
+     * @param htmltree the documentation tree to which the overview comment will
+     *                 be added
+     */
+    protected void addOverviewComment(Content htmltree) {
+        if (!utils.getBody(configuration.overviewElement).isEmpty()) {
+            htmltree.addContent(getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION));
+            addInlineComment(configuration.overviewElement, htmltree);
+        }
+    }
+
+    /**
+     * Adds the tag information as provided in the file specified by the
+     * "-overview" option on the command line.
+     *
+     * @param body the documentation tree to which the overview will be added
+     */
+    protected void addOverview(Content body) throws IOException {
+        HtmlTree div = new HtmlTree(HtmlTag.DIV);
+        div.addStyle(HtmlStyle.contentContainer);
+        addOverviewComment(div);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            htmlTree.addContent(div);
+            body.addContent(htmlTree);
+        } else {
+            body.addContent(div);
+        }
+    }
+
+    /**
+     * Adds the top text (from the -top option), the upper
+     * navigation bar, and then the title (from the"-title"
+     * option), at the top of page.
+     *
+     * @param body the documentation tree to which the navigation bar header will be added
+     */
+    protected void addNavigationBarHeader(Content body) {
+        Content htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+                ? HtmlTree.HEADER()
+                : body;
+        addTop(htmlTree);
+        addNavLinks(true, htmlTree);
+        if (configuration.allowTag(HtmlTag.HEADER)) {
+            body.addContent(htmlTree);
+        }
+    }
+
+    /**
+     * Adds the lower navigation bar and the bottom text
+     * (from the -bottom option) at the bottom of page.
+     *
+     * @param body the documentation tree to which the navigation bar footer will be added
+     */
+    protected void addNavigationBarFooter(Content body) {
+        Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+                ? HtmlTree.FOOTER()
+                : body;
+        addNavLinks(false, htmlTree);
+        addBottom(htmlTree);
+        if (configuration.allowTag(HtmlTag.FOOTER)) {
+            body.addContent(htmlTree);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageTreeWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * Class to generate Tree page for a package. The name of the file generated is
+ * "package-tree.html" and it is generated in the respective package directory.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class PackageTreeWriter extends AbstractTreeWriter {
+
+    /**
+     * Package for which tree is to be generated.
+     */
+    protected PackageElement packageElement;
+
+    /**
+     * The previous package name in the alpha-order list.
+     */
+    protected PackageElement prev;
+
+    /**
+     * The next package name in the alpha-order list.
+     */
+    protected PackageElement next;
+
+    /**
+     * Constructor.
+     * @param configuration the configuration
+     * @param path the docpath to generate files into
+     * @param packageElement the current package
+     * @param prev the previous package
+     * @param next the next package
+     * @throws IOException
+     * @throws DocletAbortException
+     */
+    public PackageTreeWriter(ConfigurationImpl configuration,
+                             DocPath path,
+                             PackageElement packageElement,
+                             PackageElement prev, PackageElement next)
+                      throws IOException {
+        super(configuration, path,
+              new ClassTree(configuration.typeElementCatalog.allClasses(packageElement), configuration));
+        this.packageElement = packageElement;
+        this.prev = prev;
+        this.next = next;
+    }
+
+    /**
+     * Construct a PackageTreeWriter object and then use it to generate the
+     * package tree page.
+     *
+     * @param configuration the configuration for this run.
+     * @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,
+                                PackageElement pkg, PackageElement prev,
+                                PackageElement 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.
+     * @throws java.io.IOException
+     */
+    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(packageElement));
+        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, true);
+        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 packageName = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement);
+        String title = packageName + " " + 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(packageElement, 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(packageElement, 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;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageUseWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassUseMapper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+/**
+ * Generate package usage information.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert G. Field
+ * @author Bhavesh Patel (Modified)
+ */
+public class PackageUseWriter extends SubWriterHolderWriter {
+
+    final PackageElement packageElement;
+    final SortedMap<String, Set<TypeElement>> usingPackageToUsedClasses = new TreeMap<>();
+    protected HtmlTree mainTree = HtmlTree.MAIN();
+
+    /**
+     * Constructor.
+     *
+     * @param filename the file to be generated.
+     * @throws IOException
+     * @throws DocletAbortException
+     */
+    public PackageUseWriter(ConfigurationImpl configuration,
+                            ClassUseMapper mapper, DocPath filename,
+                            PackageElement pkgElement) throws IOException {
+        super(configuration, DocPath.forPackage(pkgElement).resolve(filename));
+        this.packageElement = pkgElement;
+
+        // by examining all classes in this package, find what packages
+        // use these classes - produce a map between using package and
+        // used classes.
+        for (TypeElement usedClass : utils.getEnclosedTypeElements(pkgElement)) {
+            Set<TypeElement> usingClasses = mapper.classToClass.get(usedClass);
+            if (usingClasses != null) {
+                for (TypeElement usingClass : usingClasses) {
+                    PackageElement usingPackage = utils.containingPackage(usingClass);
+                    Set<TypeElement> usedClasses = usingPackageToUsedClasses
+                            .get(utils.getPackageName(usingPackage));
+                    if (usedClasses == null) {
+                        usedClasses = new TreeSet<>(utils.makeGeneralPurposeComparator());
+                        usingPackageToUsedClasses.put(utils.getPackageName(usingPackage),
+                                                      usedClasses);
+                    }
+                    usedClasses.add(usedClass);
+                }
+            }
+        }
+    }
+
+    /**
+     * Generate a class page.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @param mapper        the mapping of the class usage.
+     * @param pkgElement    the package being documented.
+     */
+    public static void generate(ConfigurationImpl configuration,
+                                ClassUseMapper mapper, PackageElement pkgElement) {
+        PackageUseWriter pkgusegen;
+        DocPath filename = DocPaths.PACKAGE_USE;
+        try {
+            pkgusegen = new PackageUseWriter(configuration, mapper, filename, pkgElement);
+            pkgusegen.generatePackageUseFile();
+            pkgusegen.close();
+        } catch (IOException exc) {
+            configuration.standardmessage.error(
+                "doclet.exception_encountered",
+                exc.toString(), filename);
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Generate the package use list.
+     */
+    protected void generatePackageUseFile() throws IOException {
+        HtmlTree body = getPackageUseHeader();
+        HtmlTree div = new HtmlTree(HtmlTag.DIV);
+        div.addStyle(HtmlStyle.contentContainer);
+        if (usingPackageToUsedClasses.isEmpty()) {
+            div.addContent(getResource("doclet.ClassUse_No.usage.of.0", utils.getPackageName(packageElement)));
+        } else {
+            addPackageUse(div);
+        }
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(div);
+            body.addContent(mainTree);
+        } else {
+            body.addContent(div);
+        }
+        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);
+    }
+
+    /**
+     * Add the package use information.
+     *
+     * @param contentTree the content tree to which the package use information will be added
+     */
+    protected void addPackageUse(Content contentTree) throws IOException {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        if (configuration.packages.size() > 1) {
+            addPackageList(ul);
+        }
+        addClassList(ul);
+        contentTree.addContent(ul);
+    }
+
+    /**
+     * Add the list of packages that use the given package.
+     *
+     * @param contentTree the content tree to which the package list will be added
+     */
+    protected void addPackageList(Content contentTree) throws IOException {
+        Content caption = getTableCaption(configuration.getResource(
+                "doclet.ClassUse_Packages.that.use.0",
+                getPackageLink(packageElement, utils.getPackageName(packageElement))));
+        Content table = (configuration.isOutputHtml5())
+                ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+                : HtmlTree.TABLE(HtmlStyle.useSummary, useTableSummary, caption);
+        table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
+        Content tbody = new HtmlTree(HtmlTag.TBODY);
+        boolean altColor = true;
+        for (String pkgname: usingPackageToUsedClasses.keySet()) {
+            PackageElement pkg = utils.elementUtils.getPackageElement(pkgname);
+            HtmlTree tr = new HtmlTree(HtmlTag.TR);
+            tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+            altColor = !altColor;
+            addPackageUse(pkg, tr);
+            tbody.addContent(tr);
+        }
+        table.addContent(tbody);
+        Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+        contentTree.addContent(li);
+    }
+
+    /**
+     * Add the list of classes that use the given package.
+     *
+     * @param contentTree the content tree to which the class list will be added
+     */
+    protected void addClassList(Content contentTree) throws IOException {
+        List<String> classTableHeader = Arrays.asList(
+            configuration.getText("doclet.0_and_1",
+                    configuration.getText("doclet.Class"),
+                    configuration.getText("doclet.Description")));
+        for (String packageName : usingPackageToUsedClasses.keySet()) {
+            PackageElement usingPackage = utils.elementUtils.getPackageElement(packageName);
+            HtmlTree li = new HtmlTree(HtmlTag.LI);
+            li.addStyle(HtmlStyle.blockList);
+            if (usingPackage != null) {
+                li.addContent(getMarkerAnchor(utils.getPackageName(usingPackage)));
+            }
+            String tableSummary = configuration.getText("doclet.Use_Table_Summary",
+                                                        configuration.getText("doclet.classes"));
+            Content caption = getTableCaption(configuration.getResource(
+                    "doclet.ClassUse_Classes.in.0.used.by.1",
+                    getPackageLink(packageElement, utils.getPackageName(packageElement)),
+                    getPackageLink(usingPackage, utils.getPackageName(usingPackage))));
+            Content table = (configuration.isOutputHtml5())
+                    ? HtmlTree.TABLE(HtmlStyle.useSummary, caption)
+                    : HtmlTree.TABLE(HtmlStyle.useSummary, tableSummary, caption);
+            table.addContent(getSummaryTableHeader(classTableHeader, "col"));
+            Content tbody = new HtmlTree(HtmlTag.TBODY);
+            boolean altColor = true;
+            for (TypeElement te : usingPackageToUsedClasses.get(packageName)) {
+                HtmlTree tr = new HtmlTree(HtmlTag.TR);
+                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+                altColor = !altColor;
+                addClassRow(te, usingPackage, tr);
+                tbody.addContent(tr);
+            }
+            table.addContent(tbody);
+            li.addContent(table);
+            contentTree.addContent(li);
+        }
+    }
+
+    /**
+     * Add a row for the class that uses the given package.
+     *
+     * @param usedClass the class that uses the given package
+     * @param pkg  the package to which the class belongs
+     * @param contentTree the content tree to which the row will be added
+     */
+    protected void addClassRow(TypeElement usedClass, PackageElement pkg,
+            Content contentTree) {
+        DocPath dp = pathString(usedClass,
+                DocPaths.CLASS_USE.resolve(DocPath.forName(utils, usedClass)));
+        StringContent stringContent = new StringContent(utils.getSimpleName(usedClass));
+        Content td = HtmlTree.TD(HtmlStyle.colOne,
+                getHyperLink(dp.fragment(getPackageAnchorName(pkg)), stringContent));
+        addIndexComment(usedClass, td);
+        contentTree.addContent(td);
+    }
+
+    /**
+     * Add the package use information.
+     *
+     * @param pkg the package that used the given package
+     * @param contentTree the content tree to which the information will be added
+     */
+    protected void addPackageUse(PackageElement pkg, Content contentTree) throws IOException {
+        Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
+                getHyperLink(utils.getPackageName(pkg),
+                new StringContent(utils.getPackageName(pkg))));
+        contentTree.addContent(tdFirst);
+        HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
+        tdLast.addStyle(HtmlStyle.colLast);
+        if (pkg != null && !pkg.isUnnamed()) {
+            addSummaryComment(pkg, tdLast);
+        } else {
+            tdLast.addContent(getSpace());
+        }
+        contentTree.addContent(tdLast);
+    }
+
+    /**
+     * Get the header for the package use listing.
+     *
+     * @return a content tree representing the package use header
+     */
+    protected HtmlTree getPackageUseHeader() {
+        String packageText = configuration.getText("doclet.Package");
+        String name = packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement);
+        String title = configuration.getText("doclet.Window_ClassUse_Header", packageText, name);
+        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);
+        }
+        ContentBuilder headContent = new ContentBuilder();
+        headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
+        headContent.addContent(new HtmlTree(HtmlTag.BR));
+        headContent.addContent(name);
+        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+                HtmlStyle.title, headContent);
+        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(div);
+        } else {
+            bodyTree.addContent(div);
+        }
+        return bodyTree;
+    }
+
+    /**
+     * 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 use link.
+     *
+     * @return a content tree for the use link
+     */
+    protected Content getNavLinkClassUse() {
+        Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel);
+        return li;
+    }
+
+    /**
+     * Get the tree link.
+     *
+     * @return a content tree for the tree link
+     */
+    protected Content getNavLinkTree() {
+        Content linkContent = getHyperLink(DocPaths.PACKAGE_TREE,
+                treeLabel);
+        Content li = HtmlTree.LI(linkContent);
+        return li;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PackageWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,377 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+
+/**
+ * Class to generate file for each package contents in the right-hand
+ * frame. This will list all the Class Kinds in the package. A click on any
+ * class-kind will update the frame with the clicked class-kind page.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class PackageWriterImpl extends HtmlDocletWriter
+    implements PackageSummaryWriter {
+
+    /**
+     * The prev package name in the alpha-order list.
+     */
+    protected PackageElement prev;
+
+    /**
+     * The next package name in the alpha-order list.
+     */
+    protected PackageElement next;
+
+    /**
+     * The package being documented.
+     */
+    protected PackageElement packageElement;
+
+    /**
+     * 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 packageElement    PackageElement under consideration.
+     * @param prev          Previous package in the sorted array.
+     * @param next            Next package in the sorted array.
+     */
+    public PackageWriterImpl(ConfigurationImpl configuration,
+            PackageElement packageElement, PackageElement prev, PackageElement next)
+            throws IOException {
+        super(configuration, DocPath
+                .forPackage(packageElement)
+                .resolve(DocPaths.PACKAGE_SUMMARY));
+        this.prev = prev;
+        this.next = next;
+        this.packageElement = packageElement;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getPackageHeader(String heading) {
+        HtmlTree bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageElement)));
+        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(packageElement, 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 (!utils.getBody(packageElement).isEmpty() && !configuration.nocomment) {
+            HtmlTree docSummaryDiv = new HtmlTree(HtmlTag.DIV);
+            docSummaryDiv.addStyle(HtmlStyle.docSummary);
+            addSummaryComment(packageElement, 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) {
+        List<? extends DocTree> deprs = utils.getBlockTags(packageElement, DocTree.Kind.DEPRECATED);
+        if (utils.isDeprecated(packageElement)) {
+            CommentHelper ch = utils.getCommentHelper(packageElement);
+            HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
+            deprDiv.addStyle(HtmlStyle.deprecatedContent);
+            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            deprDiv.addContent(deprPhrase);
+            if (!deprs.isEmpty()) {
+                List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
+                if (!commentTags.isEmpty()) {
+                    addInlineDeprecatedComment(packageElement, deprs.get(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(SortedSet<TypeElement> classes, String label,
+            String tableSummary, List<String> tableHeader, Content summaryContentTree) {
+        if(!classes.isEmpty()) {
+            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);
+            boolean altColor = false;
+            for (TypeElement klass : classes) {
+                altColor = !altColor;
+                if (!utils.isCoreClass(klass) ||
+                    !configuration.isGeneratedDoc(klass)) {
+                    continue;
+                }
+                Content classContent = getLink(new LinkInfoImpl(
+                        configuration, LinkInfoImpl.Kind.PACKAGE, klass));
+                Content tdClass = HtmlTree.TD(HtmlStyle.colFirst, classContent);
+                HtmlTree tr = HtmlTree.TR(tdClass);
+                tr.addStyle(altColor ? HtmlStyle.altColor : HtmlStyle.rowColor);
+
+                HtmlTree tdClassDescription = new HtmlTree(HtmlTag.TD);
+                tdClassDescription.addStyle(HtmlStyle.colLast);
+                if (utils.isDeprecated(klass)) {
+                    tdClassDescription.addContent(deprecatedLabel);
+                    List<? extends DocTree> tags = utils.getDeprecatedTrees(klass);
+                    if (!tags.isEmpty()) {
+                        addSummaryDeprecatedComment(klass, tags.get(0), tdClassDescription);
+                    }
+                } else {
+                    addSummaryComment(klass, 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 (!utils.getBody(packageElement).isEmpty()) {
+            packageContentTree.addContent(
+                    getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION));
+            Content h2Content = new StringContent(
+                    configuration.getText("doclet.Package_Description",
+                    packageElement.isUnnamed() ? "" : utils.getPackageName(packageElement)));
+            Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true, h2Content);
+            if (configuration.allowTag(HtmlTag.SECTION)) {
+                sectionTree.addContent(heading);
+                addInlineComment(packageElement, sectionTree);
+            } else {
+                packageContentTree.addContent(heading);
+                addInlineComment(packageElement, packageContentTree);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addPackageTags(Content packageContentTree) {
+        Content htmlTree = (configuration.allowTag(HtmlTag.SECTION))
+                ? sectionTree
+                : packageContentTree;
+        addTagsInfo(packageElement, 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(packageElement),
+                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(packageElement, 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(packageElement, 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;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,369 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.PropertyWriter;
+
+
+/**
+ * Writes property documentation in HTML format.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Jamie Ho (rewrite)
+ * @author Bhavesh Patel (Modified)
+ */
+public class PropertyWriterImpl extends AbstractMemberWriter
+    implements PropertyWriter, MemberSummaryWriter {
+
+    public PropertyWriterImpl(SubWriterHolderWriter writer, TypeElement typeElement) {
+        super(writer, typeElement);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree) {
+        memberSummaryTree.addContent(HtmlConstants.START_OF_PROPERTY_SUMMARY);
+        Content memberTree = writer.getMemberTreeHeader();
+        writer.addSummaryHeader(this, typeElement, memberTree);
+        return memberTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        writer.addMemberTree(memberSummaryTree, memberTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getPropertyDetailsTreeHeader(TypeElement typeElement,
+            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}
+     */
+    @Override
+    public Content getPropertyDocTreeHeader(ExecutableElement property,
+            Content propertyDetailsTree) {
+        propertyDetailsTree.addContent(
+                writer.getMarkerAnchor(name(property)));
+        Content propertyDocTree = writer.getMemberTreeHeader();
+        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
+        heading.addContent(utils.getPropertyLabel(name(property)));
+        propertyDocTree.addContent(heading);
+        return propertyDocTree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getSignature(ExecutableElement property) {
+        Content pre = new HtmlTree(HtmlTag.PRE);
+        writer.addAnnotationInfo(property, pre);
+        addModifiers(property, pre);
+        Content propertylink = writer.getLink(new LinkInfoImpl(
+                configuration, LinkInfoImpl.Kind.MEMBER,
+                utils.getReturnType(property)));
+        pre.addContent(propertylink);
+        pre.addContent(" ");
+        if (configuration.linksource) {
+            Content propertyName = new StringContent(name(property));
+            writer.addSrcLink(property, propertyName, pre);
+        } else {
+            addName(name(property), pre);
+        }
+        return pre;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addDeprecated(ExecutableElement property, Content propertyDocTree) {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addComments(ExecutableElement property, Content propertyDocTree) {
+        TypeElement holder = (TypeElement)property.getEnclosingElement();
+        if (!utils.getBody(property).isEmpty()) {
+            if (holder.equals(typeElement) ||
+                    (!utils.isPublic(holder) || utils.isLinkable(holder))) {
+                writer.addInlineComment(property, propertyDocTree);
+            } else {
+                Content link =
+                        writer.getDocLink(LinkInfoImpl.Kind.PROPERTY_COPY,
+                        holder, property,
+                        utils.isIncluded(holder)
+                                ? holder.toString() : utils.getFullyQualifiedName(holder),
+                            false);
+                Content codeLink = HtmlTree.CODE(link);
+                Content descfrmLabel = HtmlTree.SPAN(HtmlStyle.descfrmTypeLabel,
+                        utils.isClass(holder)
+                                ? writer.descfrmClassLabel
+                                : writer.descfrmInterfaceLabel);
+                descfrmLabel.addContent(writer.getSpace());
+                descfrmLabel.addContent(codeLink);
+                propertyDocTree.addContent(HtmlTree.DIV(HtmlStyle.block, descfrmLabel));
+                writer.addInlineComment(property, propertyDocTree);
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addTags(ExecutableElement property, Content propertyDocTree) {
+        writer.addTagsInfo(property, propertyDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getPropertyDetails(Content propertyDetailsTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(propertyDetailsTree));
+            return htmlTree;
+        }
+        return getMemberTree(propertyDetailsTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getPropertyDoc(Content propertyDocTree,
+            boolean isLastContent) {
+        return getMemberTree(propertyDocTree, isLastContent);
+    }
+
+    /**
+     * Close the writer.
+     */
+    @Override
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryLabel(Content memberTree) {
+        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
+                writer.getResource("doclet.Property_Summary"));
+        memberTree.addContent(label);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getTableSummary() {
+        return configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Property_Summary"),
+                configuration.getText("doclet.properties"));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public Content getCaption() {
+        return configuration.getResource("doclet.Properties");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public List<String> getSummaryTableHeader(Element member) {
+        List<String> header = Arrays.asList(configuration.getText("doclet.Type"),
+                configuration.getText("doclet.0_and_1",
+                        configuration.getText("doclet.Property"),
+                        configuration.getText("doclet.Description")));
+        return header;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addSummaryAnchor(TypeElement typeElement, Content memberTree) {
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.PROPERTY_SUMMARY));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryAnchor(TypeElement typeElement, Content inheritedTree) {
+        inheritedTree.addContent(writer.getMarkerAnchor(
+                SectionName.PROPERTIES_INHERITANCE,
+                configuration.getClassName(typeElement)));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void addInheritedSummaryLabel(TypeElement typeElement, Content inheritedTree) {
+        Content classLink = writer.getPreQualifiedClassLink(
+                LinkInfoImpl.Kind.MEMBER, typeElement, false);
+        Content label = new StringContent(
+                utils.isClass(typeElement)
+                       ? 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}
+     */
+    @Override
+    protected void addSummaryLink(LinkInfoImpl.Kind context, TypeElement typeElement, Element member,
+            Content tdSummary) {
+        Content memberLink = HtmlTree.SPAN(HtmlStyle.memberNameLink,
+                writer.getDocLink(context, typeElement,
+                member,
+                utils.getPropertyLabel(name(member)),
+                false,
+                true));
+
+        Content code = HtmlTree.CODE(memberLink);
+        tdSummary.addContent(code);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addInheritedSummaryLink(TypeElement typeElement, Element member, Content linksTree) {
+        String mname = name(member);
+        Content content = writer.getDocLink(LinkInfoImpl.Kind.MEMBER, typeElement, member,
+                utils.isProperty(mname) ? utils.getPropertyName(mname) : mname,
+                false, true);
+        linksTree.addContent(content);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected void addSummaryType(Element member, Content tdSummaryType) {
+        addModifierAndType(member, utils.getReturnType((ExecutableElement)member), tdSummaryType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getDeprecatedLink(Element member) {
+        return writer.getDocLink(LinkInfoImpl.Kind.MEMBER, member,
+                utils.getFullyQualifiedName(member));
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    protected Content getNavSummaryLink(TypeElement typeElement, boolean link) {
+        if (link) {
+            if (typeElement == null) {
+                return writer.getHyperLink(
+                SectionName.PROPERTY_SUMMARY,
+                writer.getResource("doclet.navProperty"));
+            } else {
+                return writer.getHyperLink(
+                SectionName.PROPERTIES_INHERITANCE,
+                configuration.getClassName(typeElement), writer.getResource("doclet.navProperty"));
+            }
+        } else {
+            return writer.getResource("doclet.navProperty");
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    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"));
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SearchIndexItem.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,122 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+/**
+ * Index item for search.
+ *
+ *  <p><b>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.</b>
+ */
+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();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SectionName.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013, 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 jdk.javadoc.internal.doclets.formats.html;
+
+/**
+ * Enum representing various section names of generated API documentation.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+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;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SerializedFormWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,301 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter.SerialFieldWriter;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter.SerialMethodWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+/**
+ * Generate the Serialized Form Information Page.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+public class SerializedFormWriterImpl extends SubWriterHolderWriter
+    implements SerializedFormWriter {
+
+    Set<TypeElement> visibleClasses;
+
+    /**
+     * HTML tree for main tag.
+     */
+    private HtmlTree mainTree = HtmlTree.MAIN();
+
+    /**
+     * @param configuration the configuration data for the doclet
+     * @throws IOException
+     * @throws DocletAbortException
+     */
+    public SerializedFormWriterImpl(ConfigurationImpl configuration)
+            throws IOException {
+        super(configuration, DocPaths.SERIALIZED_FORM);
+        visibleClasses = configuration.root.getIncludedClasses();
+    }
+
+    /**
+     * Get the given header.
+     *
+     * @param header the header to write
+     * @return the body content tree
+     */
+    public Content getHeader(String header) {
+        HtmlTree bodyTree = getBody(true, getWindowTitle(header));
+        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.HEADER))
+                ? HtmlTree.HEADER()
+                : bodyTree;
+        addTop(htmlTree);
+        addNavLinks(true, htmlTree);
+        if (configuration.allowTag(HtmlTag.HEADER)) {
+            bodyTree.addContent(htmlTree);
+        }
+        Content h1Content = new StringContent(header);
+        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
+                HtmlStyle.title, h1Content);
+        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(div);
+        } else {
+            bodyTree.addContent(div);
+        }
+        return bodyTree;
+    }
+
+    /**
+     * Get the serialized form summaries header.
+     *
+     * @return the serialized form summary header tree
+     */
+    public Content getSerializedSummariesHeader() {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        return ul;
+    }
+
+    /**
+     * Get the package serialized form header.
+     *
+     * @return the package serialized form header tree
+     */
+    public Content getPackageSerializedHeader() {
+        HtmlTree htmlTree;
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            htmlTree = HtmlTree.SECTION();
+        } else {
+            htmlTree = new HtmlTree(HtmlTag.LI);
+            htmlTree.addStyle(HtmlStyle.blockList);
+        }
+        return htmlTree;
+    }
+
+    /**
+     * Get the given package header.
+     *
+     * @param packageName the package header to write
+     * @return a content tree for the package header
+     */
+    public Content getPackageHeader(String packageName) {
+        Content heading = HtmlTree.HEADING(HtmlConstants.PACKAGE_HEADING, true,
+                packageLabel);
+        heading.addContent(getSpace());
+        heading.addContent(packageName);
+        return heading;
+    }
+
+    /**
+     * Get the serialized class header.
+     *
+     * @return a content tree for the serialized class header
+     */
+    public Content getClassSerializedHeader() {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        return ul;
+    }
+
+    /**
+     * Checks if a class is generated and is visible.
+     *
+     * @param typeElement the class being processed.
+     * @return true if the class, that is being processed, is generated and is visible.
+     */
+    public boolean isVisibleClass(TypeElement typeElement) {
+        return visibleClasses.contains(typeElement) && configuration.isGeneratedDoc(typeElement);
+    }
+
+    /**
+     * Get the serializable class heading.
+     *
+     * @param typeElement the class being processed
+     * @return a content tree for the class header
+     */
+    public Content getClassHeader(TypeElement typeElement) {
+        Content classLink = (isVisibleClass(typeElement))
+                ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.DEFAULT, typeElement)
+                        .label(configuration.getClassName(typeElement)))
+                : new StringContent(utils.getFullyQualifiedName(typeElement));
+        Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(
+                utils.getFullyQualifiedName(typeElement)));
+        Content superClassLink = typeElement.getSuperclass() != null
+                ? getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.SERIALIZED_FORM,
+                        typeElement.getSuperclass()))
+                : null;
+
+        //Print the heading.
+        Content className = superClassLink == null ?
+            configuration.getResource(
+            "doclet.Class_0_implements_serializable", classLink) :
+            configuration.getResource(
+            "doclet.Class_0_extends_implements_serializable", classLink,
+            superClassLink);
+        li.addContent(HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
+                className));
+        return li;
+    }
+
+    /**
+     * Get the serial UID info header.
+     *
+     * @return a content tree for the serial uid info header
+     */
+    public Content getSerialUIDInfoHeader() {
+        HtmlTree dl = new HtmlTree(HtmlTag.DL);
+        dl.addStyle(HtmlStyle.nameValue);
+        return dl;
+    }
+
+    /**
+     * Adds the serial UID info.
+     *
+     * @param header the header that will show up before the UID.
+     * @param serialUID the serial UID to print.
+     * @param serialUidTree the serial UID content tree to which the serial UID
+     *                      content will be added
+     */
+    public void addSerialUIDInfo(String header, String serialUID,
+            Content serialUidTree) {
+        Content headerContent = new StringContent(header);
+        serialUidTree.addContent(HtmlTree.DT(headerContent));
+        Content serialContent = new StringContent(serialUID);
+        serialUidTree.addContent(HtmlTree.DD(serialContent));
+    }
+
+    /**
+     * Get the class serialize content header.
+     *
+     * @return a content tree for the class serialize content header
+     */
+    public Content getClassContentHeader() {
+        HtmlTree ul = new HtmlTree(HtmlTag.UL);
+        ul.addStyle(HtmlStyle.blockList);
+        return ul;
+    }
+
+    /**
+     * Get the serialized content tree section.
+     *
+     * @param serializedTreeContent the serialized content tree to be added
+     * @return a div content tree
+     */
+    public Content getSerializedContent(Content serializedTreeContent) {
+        HtmlTree divContent = HtmlTree.DIV(HtmlStyle.serializedFormContainer,
+                serializedTreeContent);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(divContent);
+            return mainTree;
+        } else {
+            return divContent;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void addPackageSerializedTree(Content serializedSummariesTree,
+            Content packageSerializedTree) {
+        serializedSummariesTree.addContent((configuration.allowTag(HtmlTag.SECTION))
+                ? HtmlTree.LI(HtmlStyle.blockList, packageSerializedTree)
+                : packageSerializedTree);
+    }
+
+    /**
+     * Add the footer.
+     *
+     * @param serializedTree the serialized tree to be added
+     */
+    public void addFooter(Content serializedTree) {
+        Content htmlTree = (configuration.allowTag(HtmlTag.FOOTER))
+                ? HtmlTree.FOOTER()
+                : serializedTree;
+        addNavLinks(false, htmlTree);
+        addBottom(htmlTree);
+        if (configuration.allowTag(HtmlTag.FOOTER)) {
+            serializedTree.addContent(htmlTree);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void printDocument(Content serializedTree) throws IOException {
+        printHtmlDocument(null, true, serializedTree);
+    }
+
+    /**
+     * Return an instance of a SerialFieldWriter.
+     *
+     * @return an instance of a SerialFieldWriter.
+     */
+    public SerialFieldWriter getSerialFieldWriter(TypeElement typeElement) {
+        return new HtmlSerialFieldWriter(this, typeElement);
+    }
+
+    /**
+     * Return an instance of a SerialMethodWriter.
+     *
+     * @return an instance of a SerialMethodWriter.
+     */
+    public SerialMethodWriter getSerialMethodWriter(TypeElement typeElement) {
+        return new HtmlSerialMethodWriter(this, typeElement);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SingleIndexWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,156 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder;
+
+
+/**
+ * Generate only one index file for all the Member Names with Indexing in
+ * Unicode Order. The name of the generated file is "index-all.html" and it is
+ * generated in current or the destination directory.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see java.lang.Character
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class SingleIndexWriter extends AbstractIndexWriter {
+
+    private Set<Character> elements;
+
+    /**
+     * Construct the SingleIndexWriter with filename "index-all.html" and the
+     * {@link IndexBuilder}
+     *
+     * @param filename     Name of the index file to be generated.
+     * @param indexbuilder Unicode based Index from {@link IndexBuilder}
+     */
+    public SingleIndexWriter(ConfigurationImpl configuration,
+                             DocPath filename,
+                             IndexBuilder indexbuilder) throws IOException {
+        super(configuration, filename, indexbuilder);
+    }
+
+    /**
+     * Generate single index file, for all Unicode characters.
+     *
+     * @param indexbuilder IndexBuilder built by {@link IndexBuilder}
+     * @throws DocletAbortException
+     */
+    public static void generate(ConfigurationImpl configuration,
+                                IndexBuilder indexbuilder) {
+        SingleIndexWriter indexgen;
+        DocPath filename = DocPaths.INDEX_ALL;
+        try {
+            indexgen = new SingleIndexWriter(configuration,
+                                             filename, indexbuilder);
+            indexgen.generateIndexFile();
+            indexgen.close();
+        } catch (IOException exc) {
+            configuration.standardmessage.error(
+                        "doclet.exception_encountered",
+                        exc.toString(), filename);
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Generate the contents of each index file, with Header, Footer,
+     * Member Field, Method and Constructor Description.
+     */
+    protected void generateIndexFile() throws IOException {
+        String title = configuration.getText("doclet.Window_Single_Index");
+        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);
+        }
+        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
+        divTree.addStyle(HtmlStyle.contentContainer);
+        elements = new TreeSet<>(indexbuilder.getIndexMap().keySet());
+        elements.addAll(configuration.tagSearchIndexKeys);
+        addLinksForIndexes(divTree);
+        for (Character unicode : elements) {
+            if (configuration.tagSearchIndexMap.get(unicode) == null) {
+                addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
+            } else if (indexbuilder.getMemberList(unicode) == null) {
+                addSearchContents(unicode, configuration.tagSearchIndexMap.get(unicode), divTree);
+            } else {
+                addContents(unicode, indexbuilder.getMemberList(unicode),
+                        configuration.tagSearchIndexMap.get(unicode), divTree);
+            }
+        }
+        addLinksForIndexes(divTree);
+        body.addContent((configuration.allowTag(HtmlTag.MAIN))
+                ? HtmlTree.MAIN(divTree)
+                : divTree);
+        if (configuration.allowTag(HtmlTag.FOOTER)) {
+            htmlTree = HtmlTree.FOOTER();
+        }
+        addNavLinks(false, htmlTree);
+        addBottom(htmlTree);
+        if (configuration.allowTag(HtmlTag.FOOTER)) {
+            body.addContent(htmlTree);
+        }
+        createSearchIndexFiles();
+        printHtmlDocument(null, true, body);
+    }
+
+    /**
+     * Add links for all the Index Files per unicode character.
+     *
+     * @param contentTree the content tree to which the links for indexes will be added
+     */
+    protected void addLinksForIndexes(Content contentTree) {
+        for (Object ch : elements) {
+            String unicode = ch.toString();
+            contentTree.addContent(
+                    getHyperLink(getNameForIndex(unicode),
+                            new StringContent(unicode)));
+            contentTree.addContent(getSpace());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SourceToHTMLConverter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,295 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.tools.FileObject;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.formats.html.markup.DocType;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlDocument;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * Converts Java Source Code to HTML.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class SourceToHTMLConverter {
+
+    /**
+     * The number of trailing blank lines at the end of the page.
+     * This is inserted so that anchors at the bottom of small pages
+     * can be reached.
+     */
+    private static final int NUM_BLANK_LINES = 60;
+
+    /**
+     * New line to be added to the documentation.
+     */
+    private static final String NEW_LINE = DocletConstants.NL;
+
+    private final ConfigurationImpl configuration;
+    private final Utils utils;
+
+    private final DocletEnvironment rootDoc;
+
+    private DocPath outputdir;
+
+    /**
+     * Relative path from the documentation root to the file that is being
+     * generated.
+     */
+    private DocPath relativePath = DocPath.empty;
+
+    private SourceToHTMLConverter(ConfigurationImpl configuration, DocletEnvironment rd,
+            DocPath outputdir) {
+        this.configuration  = configuration;
+        this.utils = configuration.utils;
+        this.rootDoc = rd;
+        this.outputdir = outputdir;
+    }
+
+    /**
+     * Translate the TypeElements in the given DocletEnvironment to HTML representation.
+     *
+     * @param configuration the configuration.
+     * @param root the DocletEnvironment to convert.
+     * @param outputdir the name of the directory to output to.
+     */
+    public static void convertRoot(ConfigurationImpl configuration, DocletEnvironment root,
+            DocPath outputdir) {
+        new SourceToHTMLConverter(configuration, root, outputdir).generate();
+    }
+
+    void generate() {
+        if (rootDoc == null || outputdir == null) {
+            return;
+        }
+        for (PackageElement pkg : utils.getSpecifiedPackages()) {
+            // If -nodeprecated option is set and the package is marked as deprecated,
+            // do not convert the package files to HTML.
+            if (!(configuration.nodeprecated && utils.isDeprecated(pkg)))
+                convertPackage(pkg, outputdir);
+        }
+        for (TypeElement te : utils.getSpecifiedClasses()) {
+            // If -nodeprecated option is set and the class is marked as deprecated
+            // or the containing package is deprecated, do not convert the
+            // package files to HTML.
+            if (!(configuration.nodeprecated &&
+                  (utils.isDeprecated(te) || utils.isDeprecated(utils.containingPackage(te)))))
+                convertClass(te, outputdir);
+        }
+    }
+
+    /**
+     * Convert the Classes in the given Package to an HTML.
+     *
+     * @param pkg the Package to convert.
+     * @param outputdir the name of the directory to output to.
+     */
+    public void convertPackage(PackageElement pkg, DocPath outputdir) {
+        if (pkg == null) {
+            return;
+        }
+        for (Element te : utils.getAllClasses(pkg)) {
+            // If -nodeprecated option is set and the class is marked as deprecated,
+            // do not convert the package files to HTML. We do not check for
+            // containing package deprecation since it is already check in
+            // the calling method above.
+            if (!(configuration.nodeprecated && utils.isDeprecated(te)))
+                convertClass((TypeElement)te, outputdir);
+        }
+    }
+
+    /**
+     * Convert the given Class to an HTML.
+     *
+     * @param te the class to convert.
+     * @param outputdir the name of the directory to output to.
+     */
+    public void convertClass(TypeElement te, DocPath outputdir) {
+        if (te == null) {
+            return;
+        }
+        try {
+            FileObject fo = utils.getFileObject(te);
+            if (fo == null)
+                return;
+            Reader r = fo.openReader(true);
+            int lineno = 1;
+            String line;
+            relativePath = DocPaths.SOURCE_OUTPUT
+                    .resolve(DocPath.forPackage(utils, te))
+                    .invert();
+            Content body = getHeader();
+            Content pre = new HtmlTree(HtmlTag.PRE);
+            try (LineNumberReader reader = new LineNumberReader(r)) {
+                while ((line = reader.readLine()) != null) {
+                    addLineNo(pre, lineno);
+                    addLine(pre, line, lineno);
+                    lineno++;
+                }
+            }
+            addBlankLines(pre);
+            Content div = HtmlTree.DIV(HtmlStyle.sourceContainer, pre);
+            body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(div) : div);
+            writeToFile(body, outputdir.resolve(DocPath.forClass(utils, te)));
+        } catch (IOException e) {
+            throw new DocletAbortException(e);
+        }
+    }
+
+    /**
+     * Write the output to the file.
+     *
+     * @param body the documentation content to be written to the file.
+     * @param path the path for the file.
+     */
+    private void writeToFile(Content body, DocPath path) throws IOException {
+        Content htmlDocType = configuration.isOutputHtml5()
+                ? DocType.HTML5
+                : DocType.TRANSITIONAL;
+        Content head = new HtmlTree(HtmlTag.HEAD);
+        head.addContent(HtmlTree.TITLE(new StringContent(
+                configuration.getText("doclet.Window_Source_title"))));
+        head.addContent(getStyleSheetProperties());
+        Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
+                head, body);
+        Content htmlDocument = new HtmlDocument(htmlDocType, htmlTree);
+        configuration.message.notice("doclet.Generating_0", path.getPath());
+        DocFile df = DocFile.createFileForOutput(configuration, path);
+        try (Writer w = df.openWriter()) {
+            htmlDocument.write(w, true);
+        }
+
+    }
+
+    /**
+     * Returns a link to the stylesheet file.
+     *
+     * @return an HtmlTree for the lINK tag which provides the stylesheet location
+     */
+    public HtmlTree getStyleSheetProperties() {
+        String filename = configuration.stylesheetfile;
+        DocPath stylesheet;
+        if (filename.length() > 0) {
+            DocFile file = DocFile.createFileForInput(configuration, filename);
+            stylesheet = DocPath.create(file.getName());
+        } else {
+            stylesheet = DocPaths.STYLESHEET;
+        }
+        DocPath p = relativePath.resolve(stylesheet);
+        HtmlTree link = HtmlTree.LINK("stylesheet", "text/css", p.getPath(), "Style");
+        return link;
+    }
+
+    /**
+     * Get the header.
+     *
+     * @return the header content for the HTML file
+     */
+    private static Content getHeader() {
+        return new HtmlTree(HtmlTag.BODY);
+    }
+
+    /**
+     * Add the line numbers for the source code.
+     *
+     * @param pre the content tree to which the line number will be added
+     * @param lineno The line number
+     */
+    private static void addLineNo(Content pre, int lineno) {
+        HtmlTree span = new HtmlTree(HtmlTag.SPAN);
+        span.addStyle(HtmlStyle.sourceLineNo);
+        if (lineno < 10) {
+            span.addContent("00" + Integer.toString(lineno));
+        } else if (lineno < 100) {
+            span.addContent("0" + Integer.toString(lineno));
+        } else {
+            span.addContent(Integer.toString(lineno));
+        }
+        pre.addContent(span);
+    }
+
+    /**
+     * Add a line from source to the HTML file that is generated.
+     *
+     * @param pre the content tree to which the line will be added.
+     * @param line the string to format.
+     * @param currentLineNo the current number.
+     */
+    private void addLine(Content pre, String line, int currentLineNo) {
+        if (line != null) {
+            Content anchor = HtmlTree.A(configuration.htmlVersion,
+                    "line." + Integer.toString(currentLineNo),
+                    new StringContent(utils.replaceTabs(line)));
+            pre.addContent(anchor);
+            pre.addContent(NEW_LINE);
+        }
+    }
+
+    /**
+     * Add trailing blank lines at the end of the page.
+     *
+     * @param pre the content tree to which the blank lines will be added.
+     */
+    private static void addBlankLines(Content pre) {
+        for (int i = 0; i < NUM_BLANK_LINES; i++) {
+            pre.addContent(NEW_LINE);
+        }
+    }
+
+    /**
+     * Given a <code>Doc</code>, return an anchor name for it.
+     *
+     * @param d the <code>Doc</code> to check.
+     * @return the name of the anchor.
+     */
+    public static String getAnchorName(Utils utils, Element e) {
+        return "line." + utils.getLineNumber(e);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SplitIndexWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,218 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Set;
+import java.util.TreeSet;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.IndexBuilder;
+
+
+/**
+ * Generate Separate Index Files for all the member names with Indexing in
+ * Unicode Order. This will create "index-files" directory in the current or
+ * destination directory and will generate separate file for each unicode index.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see java.lang.Character
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class SplitIndexWriter extends AbstractIndexWriter {
+
+    /**
+     * Previous unicode character index in the built index.
+     */
+    protected int prev;
+
+    /**
+     * Next unicode character in the built index.
+     */
+    protected int next;
+
+    private List<Character> indexElements;
+
+    /**
+     * Construct the SplitIndexWriter. Uses path to this file and relative path
+     * from this file.
+     *
+     * @param path       Path to the file which is getting generated.
+     * @param indexbuilder Unicode based Index from {@link IndexBuilder}
+     */
+    public SplitIndexWriter(ConfigurationImpl configuration,
+                            DocPath path,
+                            IndexBuilder indexbuilder,
+                            Collection<Character> elements,
+                            int prev, int next) throws IOException {
+        super(configuration, path, indexbuilder);
+        this.indexElements = new ArrayList<>(elements);
+        this.prev = prev;
+        this.next = next;
+    }
+
+    /**
+     * Generate separate index files, for each Unicode character, listing all
+     * the members starting with the particular unicode character.
+     *
+     * @param indexbuilder IndexBuilder built by {@link IndexBuilder}
+     * @throws DocletAbortException
+     */
+    public static void generate(ConfigurationImpl configuration,
+                                IndexBuilder indexbuilder) {
+        SplitIndexWriter indexgen;
+        DocPath filename = DocPath.empty;
+        DocPath path = DocPaths.INDEX_FILES;
+        try {
+            Set<Character> keys = new TreeSet<>(indexbuilder.getIndexMap().keySet());
+            keys.addAll(configuration.tagSearchIndexKeys);
+            ListIterator<Character> li = new ArrayList<>(keys).listIterator();
+            while (li.hasNext()) {
+                Object ch = li.next();
+                filename = DocPaths.indexN(li.nextIndex());
+                indexgen = new SplitIndexWriter(configuration,
+                        path.resolve(filename),
+                        indexbuilder, keys, li.previousIndex(), li.nextIndex());
+                indexgen.generateIndexFile((Character) ch);
+                if (!li.hasNext()) {
+                    indexgen.createSearchIndexFiles();
+                }
+                indexgen.close();
+            }
+        } catch (IOException exc) {
+            configuration.standardmessage.error(
+                        "doclet.exception_encountered",
+                        exc.toString(), filename.getPath());
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Generate the contents of each index file, with Header, Footer,
+     * Member Field, Method and Constructor Description.
+     *
+     * @param unicode Unicode character referring to the character for the
+     * index.
+     */
+    protected void generateIndexFile(Character unicode) throws IOException {
+        String title = configuration.getText("doclet.Window_Split_Index",
+                unicode.toString());
+        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);
+        }
+        HtmlTree divTree = new HtmlTree(HtmlTag.DIV);
+        divTree.addStyle(HtmlStyle.contentContainer);
+        addLinksForIndexes(divTree);
+        if (configuration.tagSearchIndexMap.get(unicode) == null) {
+            addContents(unicode, indexbuilder.getMemberList(unicode), divTree);
+        } else if (indexbuilder.getMemberList(unicode) == null) {
+            addSearchContents(unicode, configuration.tagSearchIndexMap.get(unicode), divTree);
+        } else {
+            addContents(unicode, indexbuilder.getMemberList(unicode),
+                    configuration.tagSearchIndexMap.get(unicode), divTree);
+        }
+        addLinksForIndexes(divTree);
+        body.addContent((configuration.allowTag(HtmlTag.MAIN)) ? HtmlTree.MAIN(divTree) : divTree);
+        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 links for all the Index Files per unicode character.
+     *
+     * @param contentTree the content tree to which the links for indexes will be added
+     */
+    protected void addLinksForIndexes(Content contentTree) {
+        for (int i = 0; i < indexElements.size(); i++) {
+            int j = i + 1;
+            contentTree.addContent(getHyperLink(DocPaths.indexN(j),
+                    new StringContent(indexElements.get(i).toString())));
+            contentTree.addContent(getSpace());
+        }
+    }
+
+    /**
+     * Get link to the previous unicode character.
+     *
+     * @return a content tree for the link
+     */
+    public Content getNavLinkPrevious() {
+        Content prevletterLabel = getResource("doclet.Prev_Letter");
+        if (prev == -1) {
+            return HtmlTree.LI(prevletterLabel);
+        }
+        else {
+            Content prevLink = getHyperLink(DocPaths.indexN(prev),
+                    prevletterLabel);
+            return HtmlTree.LI(prevLink);
+        }
+    }
+
+    /**
+     * Get link to the next unicode character.
+     *
+     * @return a content tree for the link
+     */
+    public Content getNavLinkNext() {
+        Content nextletterLabel = getResource("doclet.Next_Letter");
+        if (next == -1) {
+            return HtmlTree.LI(nextletterLabel);
+        }
+        else {
+            Content nextLink = getHyperLink(DocPaths.indexN(next),
+                    nextletterLabel);
+            return HtmlTree.LI(nextLink);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/SubWriterHolderWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,368 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.MethodTypes;
+
+/**
+ * This abstract class exists to provide functionality needed in the
+ * the formatting of member information.  Since AbstractSubWriter and its
+ * subclasses control this, they would be the logical place to put this.
+ * However, because each member type has its own subclass, subclassing
+ * can not be used effectively to change formatting.  The concrete
+ * class subclass of this class can be subclassed to change formatting.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see AbstractMemberWriter
+ * @see ClassWriterImpl
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
+
+    /**
+     * The HTML tree for main tag.
+     */
+    protected HtmlTree mainTree = HtmlTree.MAIN();
+
+    public SubWriterHolderWriter(ConfigurationImpl configuration, DocPath filename)
+            throws IOException {
+        super(configuration, filename);
+    }
+
+    /**
+     * Add the summary header.
+     *
+     * @param mw the writer for the member being documented
+     * @param typeElement the te to be documented
+     * @param memberTree the content tree to which the summary header will be added
+     */
+    public void addSummaryHeader(AbstractMemberWriter mw, TypeElement typeElement,
+            Content memberTree) {
+        mw.addSummaryAnchor(typeElement, memberTree);
+        mw.addSummaryLabel(memberTree);
+    }
+
+    /**
+     * Get the summary table.
+     *
+     * @param mw the writer for the member being documented
+     * @param typeElement the te to be documented
+     * @param tableContents list of summary table contents
+     * @param showTabs true if the table needs to show tabs
+     * @return the content tree for the summary table
+     */
+    public Content getSummaryTableTree(AbstractMemberWriter mw, TypeElement typeElement,
+            List<Content> tableContents, boolean showTabs) {
+        Content caption;
+        if (showTabs) {
+            caption = getTableCaption(mw.methodTypes);
+            generateMethodTypesScript(mw.typeMap, mw.methodTypes);
+        }
+        else {
+            caption = getTableCaption(mw.getCaption());
+        }
+        Content table = (configuration.isOutputHtml5())
+                ? HtmlTree.TABLE(HtmlStyle.memberSummary, caption)
+                : HtmlTree.TABLE(HtmlStyle.memberSummary, mw.getTableSummary(), caption);
+        table.addContent(getSummaryTableHeader(mw.getSummaryTableHeader(typeElement), "col"));
+        for (Content tableContent : tableContents) {
+            table.addContent(tableContent);
+        }
+        return table;
+    }
+
+    /**
+     * Get the summary table caption.
+     *
+     * @param methodTypes set comprising of method types to show as table caption
+     * @return the caption for the summary table
+     */
+    public Content getTableCaption(Set<MethodTypes> methodTypes) {
+        Content tabbedCaption = new HtmlTree(HtmlTag.CAPTION);
+        for (MethodTypes type : methodTypes) {
+            Content captionSpan;
+            Content span;
+            if (type.isDefaultTab()) {
+                captionSpan = HtmlTree.SPAN(configuration.getResource(type.resourceKey()));
+                span = HtmlTree.SPAN(type.tabId(),
+                        HtmlStyle.activeTableTab, captionSpan);
+            } else {
+                captionSpan = HtmlTree.SPAN(getMethodTypeLinks(type));
+                span = HtmlTree.SPAN(type.tabId(),
+                        HtmlStyle.tableTab, captionSpan);
+            }
+            Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, getSpace());
+            span.addContent(tabSpan);
+            tabbedCaption.addContent(span);
+        }
+        return tabbedCaption;
+    }
+
+    /**
+     * Get the method type links for the table caption.
+     *
+     * @param methodType the method type to be displayed as link
+     * @return the content tree for the method type link
+     */
+    public Content getMethodTypeLinks(MethodTypes methodType) {
+        String jsShow = "javascript:show(" + methodType.value() +");";
+        HtmlTree link = HtmlTree.A(jsShow, configuration.getResource(methodType.resourceKey()));
+        return link;
+    }
+
+    /**
+     * Add the inherited summary header.
+     *
+     * @param mw the writer for the member being documented
+     * @param typeElement the te to be documented
+     * @param inheritedTree the content tree to which the inherited summary header will be added
+     */
+    public void addInheritedSummaryHeader(AbstractMemberWriter mw, TypeElement typeElement,
+            Content inheritedTree) {
+        mw.addInheritedSummaryAnchor(typeElement, inheritedTree);
+        mw.addInheritedSummaryLabel(typeElement, inheritedTree);
+    }
+
+    /**
+     * Add the index comment.
+     *
+     * @param member the member being documented
+     * @param contentTree the content tree to which the comment will be added
+     */
+    protected void addIndexComment(Element member, Content contentTree) {
+        List<? extends DocTree> tags = utils.getFirstSentenceTrees(member);
+        addIndexComment(member, tags, contentTree);
+    }
+
+    /**
+     * Add the index comment.
+     *
+     * @param member the member being documented
+     * @param firstSentenceTags the first sentence tags for the member to be documented
+     * @param tdSummary the content tree to which the comment will be added
+     */
+    protected void addIndexComment(Element member, List<? extends DocTree> firstSentenceTags,
+            Content tdSummary) {
+        List<? extends DocTree> deprs = utils.getBlockTags(member, DocTree.Kind.DEPRECATED);
+        Content div;
+        if (utils.isDeprecated(member)) {
+            Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+            div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
+            div.addContent(getSpace());
+            if (!deprs.isEmpty()) {
+                addInlineDeprecatedComment(member, deprs.get(0), div);
+            }
+            tdSummary.addContent(div);
+            return;
+        } else {
+            Element te = member.getEnclosingElement();
+            if (te != null &&  utils.isTypeElement(te) && utils.isDeprecated(te)) {
+                Content deprLabel = HtmlTree.SPAN(HtmlStyle.deprecatedLabel, deprecatedPhrase);
+                div = HtmlTree.DIV(HtmlStyle.block, deprLabel);
+                div.addContent(getSpace());
+                tdSummary.addContent(div);
+            }
+        }
+        addSummaryComment(member, firstSentenceTags, tdSummary);
+    }
+
+    /**
+     * Add the summary type for the member.
+     *
+     * @param mw the writer for the member being documented
+     * @param member the member to be documented
+     * @param tdSummaryType the content tree to which the type will be added
+     */
+    public void addSummaryType(AbstractMemberWriter mw, Element member, Content tdSummaryType) {
+        mw.addSummaryType(member, tdSummaryType);
+    }
+
+    /**
+     * Add the summary link for the member.
+     *
+     * @param mw the writer for the member being documented
+     * @param member the member to be documented
+     * @param contentTree the content tree to which the link will be added
+     */
+    public void addSummaryLinkComment(AbstractMemberWriter mw, Element member, Content contentTree) {
+        List<? extends DocTree> tags = utils.getFirstSentenceTrees(member);
+        addSummaryLinkComment(mw, member, tags, contentTree);
+    }
+
+    /**
+     * Add the summary link comment.
+     *
+     * @param mw the writer for the member being documented
+     * @param member the member being documented
+     * @param firstSentenceTags the first sentence tags for the member to be documented
+     * @param tdSummary the content tree to which the comment will be added
+     */
+    public void addSummaryLinkComment(AbstractMemberWriter mw,
+            Element member, List<? extends DocTree> firstSentenceTags, Content tdSummary) {
+        addIndexComment(member, firstSentenceTags, tdSummary);
+    }
+
+    /**
+     * Add the inherited member summary.
+     *
+     * @param mw the writer for the member being documented
+     * @param typeElement the class being documented
+     * @param member the member being documented
+     * @param isFirst true if its the first link being documented
+     * @param linksTree the content tree to which the summary will be added
+     */
+    public void addInheritedMemberSummary(AbstractMemberWriter mw, TypeElement typeElement,
+            Element member, boolean isFirst, Content linksTree) {
+        if (! isFirst) {
+            linksTree.addContent(", ");
+        }
+        mw.addInheritedSummaryLink(typeElement, member, linksTree);
+    }
+
+    /**
+     * Get the document content header tree
+     *
+     * @return a content tree the document content header
+     */
+    public Content getContentHeader() {
+        HtmlTree div = new HtmlTree(HtmlTag.DIV);
+        div.addStyle(HtmlStyle.contentContainer);
+        return div;
+    }
+
+    /**
+     * Add the class content tree.
+     *
+     * @param contentTree content tree to which the class content will be added
+     * @param classContentTree class content tree which will be added to the content tree
+     */
+    public void addClassContentTree(Content contentTree, Content classContentTree) {
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            mainTree.addContent(classContentTree);
+            contentTree.addContent(mainTree);
+        } else {
+            contentTree.addContent(classContentTree);
+        }
+    }
+
+    /**
+     * Add the annotation content tree.
+     *
+     * @param contentTree content tree to which the annotation content will be added
+     * @param annotationContentTree annotation content tree which will be added to the content tree
+     */
+    public void addAnnotationContentTree(Content contentTree, Content annotationContentTree) {
+        addClassContentTree(contentTree, annotationContentTree);
+    }
+
+    /**
+     * Get the member header tree
+     *
+     * @return a content tree the member header
+     */
+    public Content getMemberTreeHeader() {
+        HtmlTree li = new HtmlTree(HtmlTag.LI);
+        li.addStyle(HtmlStyle.blockList);
+        return li;
+    }
+
+    /**
+     * Add the member tree.
+     *
+     * @param memberSummaryTree the content tree representing the member summary
+     * @param memberTree the content tree representing the member
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree) {
+        if (configuration.allowTag(HtmlTag.SECTION)) {
+            HtmlTree htmlTree = HtmlTree.SECTION(getMemberTree(memberTree));
+            memberSummaryTree.addContent(htmlTree);
+        } else {
+            memberSummaryTree.addContent(getMemberTree(memberTree));
+        }
+    }
+
+    /**
+     * Get the member tree
+     *
+     * @param contentTree the tree used to generate the complete member tree
+     * @return a content tree for the member
+     */
+    public Content getMemberTree(Content contentTree) {
+        Content ul = HtmlTree.UL(HtmlStyle.blockList, contentTree);
+        return ul;
+    }
+
+    /**
+     * Get the member summary tree
+     *
+     * @param contentTree the tree used to generate the member summary tree
+     * @return a content tree for the member summary
+     */
+    public Content getMemberSummaryTree(Content contentTree) {
+        return getMemberTree(HtmlStyle.summary, contentTree);
+    }
+
+    /**
+     * Get the member details tree
+     *
+     * @param contentTree the tree used to generate the member details tree
+     * @return a content tree for the member details
+     */
+    public Content getMemberDetailsTree(Content contentTree) {
+        return getMemberTree(HtmlStyle.details, contentTree);
+    }
+
+    /**
+     * Get the member tree
+     *
+     * @param style the style class to be added to the content tree
+     * @param contentTree the tree used to generate the complete member tree
+     */
+    public Content getMemberTree(HtmlStyle style, Content contentTree) {
+        Content div = HtmlTree.DIV(style, getMemberTree(contentTree));
+        return div;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,445 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.util.List;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.SimpleElementVisitor9;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.IndexTree;
+import com.sun.tools.javac.util.DefinedBy;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.ContentBuilder;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.builders.SerializedFormBuilder;
+import jdk.javadoc.internal.doclets.toolkit.taglets.TagletWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocLink;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+import jdk.javadoc.internal.doclets.toolkit.util.MessageRetriever;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * The taglet writer that writes HTML.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public class TagletWriterImpl extends TagletWriter {
+
+    private final HtmlDocletWriter htmlWriter;
+    private final ConfigurationImpl configuration;
+    private final Utils utils;
+
+    public TagletWriterImpl(HtmlDocletWriter htmlWriter, boolean isFirstSentence) {
+        super(isFirstSentence);
+        this.htmlWriter = htmlWriter;
+        configuration = htmlWriter.configuration;
+        this.utils = configuration.utils;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getOutputInstance() {
+        return new ContentBuilder();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content codeTagOutput(Element element, DocTree tag) {
+        CommentHelper ch = utils.getCommentHelper(element);
+        String str = utils.normalizeNewlines(ch.getText(tag));
+        StringContent content = new StringContent(str);
+        Content result = HtmlTree.CODE(content);
+        return result;
+    }
+
+    protected Content indexTagOutput(Element element, DocTree tag) {
+        CommentHelper ch = utils.getCommentHelper(element);
+        IndexTree itt = (IndexTree)tag;
+
+        String tagText =  ch.getText(itt.getSearchTerm());
+        if (tagText.charAt(0) == '"' && tagText.charAt(tagText.length() - 1) == '"') {
+            tagText = tagText.substring(1, tagText.length() - 1);
+        }
+        String desc = ch.getText(itt.getDescription());
+
+        String anchorName = htmlWriter.getName(tagText);
+        Content result = HtmlTree.A_ID(anchorName, new StringContent(tagText));
+        if (configuration.createindex && !tagText.isEmpty()) {
+            SearchIndexItem si = new SearchIndexItem();
+            si.setLabel(tagText);
+            si.setDescription(desc);
+            new SimpleElementVisitor9<Void, Void>() {
+                @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+                public Void visitPackage(PackageElement e, Void p) {
+                    si.setUrl(DocPath.forPackage(e).getPath()
+                            + "/" + DocPaths.PACKAGE_SUMMARY.getPath() + "#" + anchorName);
+                    si.setHolder(utils.getSimpleName(element));
+                    return null;
+                }
+
+                @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+                public Void visitType(TypeElement e, Void p) {
+                    si.setUrl(DocPath.forClass(utils, e).getPath() + "#" + anchorName);
+                    si.setHolder(utils.getFullyQualifiedName(e));
+                    return null;
+                }
+
+                @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+                public Void visitVariable(VariableElement e, Void p) {
+                    TypeElement te = utils.getEnclosingTypeElement(e);
+                    si.setUrl(DocPath.forClass(utils, te).getPath() + "#" + anchorName);
+                    si.setHolder(utils.getFullyQualifiedName(e) + "." + utils.getSimpleName(e));
+                    return null;
+                }
+
+                @Override @DefinedBy(DefinedBy.Api.LANGUAGE_MODEL)
+                protected Void defaultAction(Element e, Void p) {
+                    TypeElement te = utils.getEnclosingTypeElement(e);
+                    si.setUrl(DocPath.forClass(utils, te).getPath() + "#" + anchorName);
+                    si.setHolder(utils.getFullyQualifiedName(e));
+                    return null;
+                }
+            }.visit(element);
+            si.setCategory(configuration.getResource("doclet.SearchTags").toString());
+            configuration.tagSearchIndex.add(si);
+        }
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getDocRootOutput() {
+        String path;
+        if (htmlWriter.pathToRoot.isEmpty())
+            path = ".";
+        else
+            path = htmlWriter.pathToRoot.getPath();
+        return new StringContent(path);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content deprecatedTagOutput(Element element) {
+        ContentBuilder result = new ContentBuilder();
+        CommentHelper ch = utils.getCommentHelper(element);
+        List<? extends DocTree> deprs = utils.getBlockTags(element, DocTree.Kind.DEPRECATED);
+        if (utils.isTypeElement(element)) {
+            if (utils.isDeprecated(element)) {
+                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
+                        new StringContent(configuration.getText("doclet.Deprecated"))));
+                result.addContent(RawHtml.nbsp);
+                if (!deprs.isEmpty()) {
+                    List<? extends DocTree> commentTags = ch.getDescription(configuration, deprs.get(0));
+                    if (!commentTags.isEmpty()) {
+                        result.addContent(commentTagsToOutput(null, element, commentTags, false));
+                    }
+                }
+            }
+        } else {
+            if (utils.isDeprecated(element)) {
+                result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
+                        new StringContent(configuration.getText("doclet.Deprecated"))));
+                result.addContent(RawHtml.nbsp);
+                if (!deprs.isEmpty()) {
+                    List<? extends DocTree> bodyTags = ch.getBody(configuration, deprs.get(0));
+                    Content body = commentTagsToOutput(null, element, bodyTags, false);
+                    if (!body.isEmpty())
+                        result.addContent(HtmlTree.SPAN(HtmlStyle.deprecationComment, body));
+                }
+            } else {
+                if (utils.isDeprecated(utils.getEnclosingTypeElement(element))) {
+                    result.addContent(HtmlTree.SPAN(HtmlStyle.deprecatedLabel,
+                            new StringContent(configuration.getText("doclet.Deprecated"))));
+                    result.addContent(RawHtml.nbsp);
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    protected Content literalTagOutput(Element element, DocTree tag) {
+        CommentHelper ch = utils.getCommentHelper(element);
+        Content result = new StringContent(utils.normalizeNewlines(ch.getText(tag)));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public MessageRetriever getMsgRetriever() {
+        return configuration.message;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getParamHeader(String header) {
+        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.paramLabel,
+                new StringContent(header)));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content paramTagOutput(Element element, DocTree paramTag, String paramName) {
+        ContentBuilder body = new ContentBuilder();
+        CommentHelper ch = utils.getCommentHelper(element);
+        body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
+        body.addContent(" - ");
+        List<? extends DocTree> description = ch.getDescription(configuration, paramTag);
+        body.addContent(htmlWriter.commentTagsToContent(paramTag, element, description, false));
+        HtmlTree result = HtmlTree.DD(body);
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content propertyTagOutput(Element element, DocTree tag, String prefix) {
+        Content body = new ContentBuilder();
+        CommentHelper ch = utils.getCommentHelper(element);
+        body.addContent(new RawHtml(prefix));
+        body.addContent(" ");
+        body.addContent(HtmlTree.CODE(new RawHtml(ch.getText(tag))));
+        body.addContent(".");
+        Content result = HtmlTree.P(body);
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content returnTagOutput(Element element, DocTree returnTag) {
+        ContentBuilder result = new ContentBuilder();
+        CommentHelper ch = utils.getCommentHelper(element);
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.returnLabel,
+                new StringContent(configuration.getText("doclet.Returns")))));
+        result.addContent(HtmlTree.DD(htmlWriter.commentTagsToContent(
+                returnTag, element, ch.getDescription(configuration, returnTag), false)));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content seeTagOutput(Element holder, List<? extends DocTree> seeTags) {
+        ContentBuilder body = new ContentBuilder();
+        if (!seeTags.isEmpty()) {
+            for (DocTree dt : seeTags) {
+                appendSeparatorIfNotEmpty(body);
+                body.addContent(htmlWriter.seeTagToContent(holder, dt));
+            }
+        }
+        if (utils.isVariableElement(holder) && ((VariableElement)holder).getConstantValue() != null &&
+                htmlWriter instanceof ClassWriterImpl) {
+            //Automatically add link to constant values page for constant fields.
+            appendSeparatorIfNotEmpty(body);
+            DocPath constantsPath =
+                    htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
+            String whichConstant =
+                    ((ClassWriterImpl) htmlWriter).getTypeElement().getQualifiedName() + "." +
+                    utils.getSimpleName(holder);
+            DocLink link = constantsPath.fragment(whichConstant);
+            body.addContent(htmlWriter.getHyperLink(link,
+                    new StringContent(configuration.getText("doclet.Constants_Summary"))));
+        }
+        if (utils.isClass(holder) && utils.isSerializable((TypeElement)holder)) {
+            //Automatically add link to serialized form page for serializable classes.
+            if (SerializedFormBuilder.serialInclude(utils, holder) &&
+                      SerializedFormBuilder.serialInclude(utils, utils.containingPackage(holder))) {
+                appendSeparatorIfNotEmpty(body);
+                DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
+                DocLink link = serialPath.fragment(utils.getFullyQualifiedName(holder));
+                body.addContent(htmlWriter.getHyperLink(link,
+                        new StringContent(configuration.getText("doclet.Serialized_Form"))));
+            }
+        }
+        if (body.isEmpty())
+            return body;
+
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.seeLabel,
+                new StringContent(configuration.getText("doclet.See_Also")))));
+        result.addContent(HtmlTree.DD(body));
+        return result;
+
+    }
+
+    private void appendSeparatorIfNotEmpty(ContentBuilder body) {
+        if (!body.isEmpty()) {
+            body.addContent(", ");
+            body.addContent(DocletConstants.NL);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header) {
+        CommentHelper ch = utils.getCommentHelper(element);
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
+        ContentBuilder body = new ContentBuilder();
+        boolean many = false;
+        for (DocTree simpleTag : simpleTags) {
+            if (many) {
+                body.addContent(", ");
+            }
+            List<? extends DocTree> bodyTags = ch.getBody(configuration, simpleTag);
+            body.addContent(htmlWriter.commentTagsToContent(simpleTag, element, bodyTags, false));
+            many = true;
+        }
+        result.addContent(HtmlTree.DD(body));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content simpleTagOutput(Element element, DocTree simpleTag, String header) {
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.simpleTagLabel, new RawHtml(header))));
+        CommentHelper ch = utils.getCommentHelper(element);
+        List<? extends DocTree> description = ch.getDescription(configuration, simpleTag);
+        Content body = htmlWriter.commentTagsToContent(simpleTag, element, description, false);
+        result.addContent(HtmlTree.DD(body));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getThrowsHeader() {
+        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.throwsLabel,
+                new StringContent(configuration.getText("doclet.Throws"))));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content throwsTagOutput(Element element, DocTree throwsTag) {
+        ContentBuilder body = new ContentBuilder();
+        CommentHelper ch = utils.getCommentHelper(element);
+        Element exception = ch.getException(configuration, throwsTag);
+        Content excName;
+        if (exception == null) {
+            excName = new RawHtml(ch.getExceptionName(throwsTag).toString());
+        } else if (exception.asType() == null) {
+            excName = new RawHtml(utils.getFullyQualifiedName(exception));
+        } else {
+            LinkInfoImpl link = new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
+                                                 exception.asType());
+            link.excludeTypeBounds = true;
+            excName = htmlWriter.getLink(link);
+        }
+        body.addContent(HtmlTree.CODE(excName));
+        List<? extends DocTree> description = ch.getDescription(configuration, throwsTag);
+        Content desc = htmlWriter.commentTagsToContent(throwsTag, element, description, false);
+        if (desc != null && !desc.isEmpty()) {
+            body.addContent(" - ");
+            body.addContent(desc);
+        }
+        HtmlTree result = HtmlTree.DD(body);
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content throwsTagOutput(TypeMirror throwsType) {
+        HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink(
+                new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))));
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content valueTagOutput(VariableElement field, String constantVal, boolean includeLink) {
+        return includeLink ?
+            htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field,
+                constantVal, false) : new RawHtml(constantVal);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content commentTagsToOutput(DocTree holderTag, List<? extends DocTree> tags) {
+        return commentTagsToOutput(holderTag, null, tags, false);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content commentTagsToOutput(Element holder, List<? extends DocTree> tags) {
+        return commentTagsToOutput(null, holder, tags, false);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content commentTagsToOutput(DocTree holderTag,
+        Element holder, List<? extends DocTree> tags, boolean isFirstSentence) {
+        return htmlWriter.commentTagsToContent(holderTag, holder,
+                tags, isFirstSentence);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Configuration configuration() {
+        return configuration;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TreeWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,206 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.IOException;
+import java.util.SortedSet;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlConstants;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlStyle;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTag;
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.StringContent;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+/**
+ * Generate Class Hierarchy page for all the Classes in this run.  Use
+ * ClassTree for building the Tree. The name of
+ * the generated file is "overview-tree.html" and it is generated in the
+ * current or the destination directory.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class TreeWriter extends AbstractTreeWriter {
+
+    /**
+     * Packages in this run.
+     */
+    SortedSet<PackageElement> packages;
+
+    /**
+     * True if there are no packages specified on the command line,
+     * False otherwise.
+     */
+    private boolean classesonly;
+
+    /**
+     * Constructor to construct TreeWriter object.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @param filename String filename
+     * @param classtree the tree being built.
+     */
+    public TreeWriter(ConfigurationImpl configuration,
+            DocPath filename, ClassTree classtree) throws IOException {
+        super(configuration, filename, classtree);
+        packages = configuration.packages;
+        classesonly = packages.isEmpty();
+    }
+
+    /**
+     * Create a TreeWriter object and use it to generate the
+     * "overview-tree.html" file.
+     *
+     * @param classtree the class tree being documented.
+     * @throws  DocletAbortException
+     */
+    public static void generate(ConfigurationImpl configuration,
+                                ClassTree classtree) {
+        TreeWriter treegen;
+        DocPath filename = DocPaths.OVERVIEW_TREE;
+        try {
+            treegen = new TreeWriter(configuration, filename, classtree);
+            treegen.generateTreeFile();
+            treegen.close();
+        } catch (IOException exc) {
+            configuration.standardmessage.error(
+                        "doclet.exception_encountered",
+                        exc.toString(), filename);
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    /**
+     * Generate the interface hierarchy and class hierarchy.
+     */
+    public void generateTreeFile() throws IOException {
+        HtmlTree body = getTreeHeader();
+        Content headContent = getResource("doclet.Hierarchy_For_All_Packages");
+        Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, false,
+                HtmlStyle.title, headContent);
+        Content div = HtmlTree.DIV(HtmlStyle.header, heading);
+        addPackageTreeLinks(div);
+        HtmlTree htmlTree = (configuration.allowTag(HtmlTag.MAIN))
+                ? HtmlTree.MAIN()
+                : body;
+        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, true);
+        htmlTree.addContent(divTree);
+        if (configuration.allowTag(HtmlTag.MAIN)) {
+            body.addContent(htmlTree);
+        }
+        if (configuration.allowTag(HtmlTag.FOOTER)) {
+            htmlTree = HtmlTree.FOOTER();
+        } else {
+            htmlTree = body;
+        }
+        addNavLinks(false, htmlTree);
+        addBottom(htmlTree);
+        if (configuration.allowTag(HtmlTag.FOOTER)) {
+            body.addContent(htmlTree);
+        }
+        printHtmlDocument(null, true, body);
+    }
+
+    /**
+     * Add the links to all the package tree files.
+     *
+     * @param contentTree the content tree to which the links will be added
+     */
+    protected void addPackageTreeLinks(Content contentTree) {
+        //Do nothing if only unnamed package is used
+        if (isUnnamedPackage()) {
+            return;
+        }
+        if (!classesonly) {
+            Content span = HtmlTree.SPAN(HtmlStyle.packageHierarchyLabel,
+                    getResource("doclet.Package_Hierarchies"));
+            contentTree.addContent(span);
+            HtmlTree ul = new HtmlTree(HtmlTag.UL);
+            ul.addStyle(HtmlStyle.horizontal);
+            int i = 0;
+            for (PackageElement pkg : packages) {
+                // If the package name length is 0 or if -nodeprecated option
+                // is set and the package is marked as deprecated, do not include
+                // the page in the list of package hierarchies.
+                if (pkg.isUnnamed() ||
+                        (configuration.nodeprecated && utils.isDeprecated(pkg))) {
+                    i++;
+                    continue;
+                }
+                DocPath link = pathString(pkg, DocPaths.PACKAGE_TREE);
+                Content li = HtmlTree.LI(getHyperLink(link,
+                        new StringContent(utils.getPackageName(pkg))));
+                if (i < packages.size() - 1) {
+                    li.addContent(", ");
+                }
+                ul.addContent(li);
+                i++;
+            }
+            contentTree.addContent(ul);
+        }
+    }
+
+    /**
+     * Get the tree header.
+     *
+     * @return a content tree for the tree header
+     */
+    protected HtmlTree getTreeHeader() {
+        String title = 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;
+    }
+
+    private boolean isUnnamedPackage() {
+        return packages.size() == 1 && packages.first().isUnnamed();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/WriterFactoryImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.formats.html;
+
+import java.io.IOException;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeFieldWriter;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeOptionalMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
+import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
+import jdk.javadoc.internal.doclets.toolkit.ConstantsSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter;
+import jdk.javadoc.internal.doclets.toolkit.WriterFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+import static jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap.Kind.*;
+
+/**
+ * The factory that returns HTML writers.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class WriterFactoryImpl implements WriterFactory {
+
+    private final ConfigurationImpl configuration;
+    public WriterFactoryImpl(ConfigurationImpl configuration) {
+        this.configuration = configuration;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ConstantsSummaryWriter getConstantsSummaryWriter() throws Exception {
+        return new ConstantsSummaryWriterImpl(configuration);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public PackageSummaryWriter getPackageSummaryWriter(PackageElement packageElement,
+            PackageElement prevPkg, PackageElement nextPkg) throws Exception {
+        return new PackageWriterImpl(configuration, packageElement, prevPkg, nextPkg);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ClassWriter getClassWriter(TypeElement typeElement, TypeElement prevClass,
+            TypeElement nextClass, ClassTree classTree) throws IOException {
+        return new ClassWriterImpl(configuration, typeElement, prevClass, nextClass, classTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AnnotationTypeWriter getAnnotationTypeWriter(TypeElement annotationType,
+            TypeMirror prevType, TypeMirror nextType) throws Exception {
+        return new AnnotationTypeWriterImpl(configuration, annotationType, prevType, nextType);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AnnotationTypeFieldWriter
+            getAnnotationTypeFieldWriter(AnnotationTypeWriter annotationTypeWriter) throws Exception {
+        TypeElement te = annotationTypeWriter.getAnnotationTypeElement();
+        return new AnnotationTypeFieldWriterImpl(
+            (SubWriterHolderWriter) annotationTypeWriter, te);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AnnotationTypeOptionalMemberWriter
+            getAnnotationTypeOptionalMemberWriter(
+        AnnotationTypeWriter annotationTypeWriter) throws Exception {
+        TypeElement te = annotationTypeWriter.getAnnotationTypeElement();
+        return new AnnotationTypeOptionalMemberWriterImpl(
+            (SubWriterHolderWriter) annotationTypeWriter, te);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AnnotationTypeRequiredMemberWriter
+            getAnnotationTypeRequiredMemberWriter(AnnotationTypeWriter annotationTypeWriter) throws Exception {
+        TypeElement te = annotationTypeWriter.getAnnotationTypeElement();
+        return new AnnotationTypeRequiredMemberWriterImpl(
+            (SubWriterHolderWriter) annotationTypeWriter, te);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public EnumConstantWriterImpl getEnumConstantWriter(ClassWriter classWriter)
+            throws Exception {
+        return new EnumConstantWriterImpl((SubWriterHolderWriter) classWriter,
+                classWriter.getTypeElement());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public FieldWriterImpl getFieldWriter(ClassWriter classWriter)
+            throws Exception {
+        return new FieldWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getTypeElement());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public PropertyWriterImpl getPropertyWriter(ClassWriter classWriter)
+            throws Exception {
+        return new PropertyWriterImpl((SubWriterHolderWriter) classWriter,
+                classWriter.getTypeElement());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public MethodWriterImpl getMethodWriter(ClassWriter classWriter)
+            throws Exception {
+        return new MethodWriterImpl((SubWriterHolderWriter) classWriter, classWriter.getTypeElement());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public ConstructorWriterImpl getConstructorWriter(ClassWriter classWriter)
+            throws Exception {
+        return new ConstructorWriterImpl((SubWriterHolderWriter) classWriter,
+                classWriter.getTypeElement());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public MemberSummaryWriter getMemberSummaryWriter(
+            ClassWriter classWriter, VisibleMemberMap.Kind memberType)
+            throws Exception {
+        switch (memberType) {
+            case CONSTRUCTORS:
+                return getConstructorWriter(classWriter);
+            case ENUM_CONSTANTS:
+                return getEnumConstantWriter(classWriter);
+            case FIELDS:
+                return getFieldWriter(classWriter);
+            case PROPERTIES:
+                return getPropertyWriter(classWriter);
+            case INNER_CLASSES:
+                return new NestedClassWriterImpl((SubWriterHolderWriter)
+                    classWriter, classWriter.getTypeElement());
+            case METHODS:
+                return getMethodWriter(classWriter);
+            default:
+                return null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public MemberSummaryWriter getMemberSummaryWriter(
+        AnnotationTypeWriter annotationTypeWriter, VisibleMemberMap.Kind memberType)
+    throws Exception {
+        switch (memberType) {
+            case ANNOTATION_TYPE_FIELDS:
+                return (AnnotationTypeFieldWriterImpl)
+                    getAnnotationTypeFieldWriter(annotationTypeWriter);
+            case ANNOTATION_TYPE_MEMBER_OPTIONAL:
+                return (AnnotationTypeOptionalMemberWriterImpl)
+                    getAnnotationTypeOptionalMemberWriter(annotationTypeWriter);
+            case ANNOTATION_TYPE_MEMBER_REQUIRED:
+                return (AnnotationTypeRequiredMemberWriterImpl)
+                    getAnnotationTypeRequiredMemberWriter(annotationTypeWriter);
+            default:
+                return null;
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public SerializedFormWriter getSerializedFormWriter() throws Exception {
+        return new SerializedFormWriterImpl(configuration);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/Comment.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+
+/**
+ * Class for generating a comment for HTML pages of javadoc output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class Comment extends Content {
+
+    private String commentText;
+
+    /**
+     * Constructor to construct a Comment object.
+     *
+     * @param comment comment text for the comment
+     */
+    public Comment(String comment) {
+        commentText = nullCheck(comment);
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param content content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(Content content) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param stringContent string content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(String stringContent) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEmpty() {
+        return commentText.isEmpty();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        if (!atNewline)
+            out.write(DocletConstants.NL);
+        out.write("<!-- ");
+        out.write(commentText);
+        out.write(" -->" + DocletConstants.NL);
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/ContentBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,96 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * A sequence of Content nodes.
+ */
+public class ContentBuilder extends Content {
+    protected List<Content> contents = Collections.<Content>emptyList();
+
+    @Override
+    public void addContent(Content content) {
+        nullCheck(content);
+        ensureMutableContents();
+        if (content instanceof ContentBuilder) {
+            contents.addAll(((ContentBuilder) content).contents);
+        } else
+            contents.add(content);
+    }
+
+    @Override
+    public void addContent(String text) {
+        if (text.isEmpty())
+            return;
+        ensureMutableContents();
+        Content c = contents.isEmpty() ? null : contents.get(contents.size() - 1);
+        StringContent sc;
+        if (c != null && c instanceof StringContent) {
+            sc = (StringContent) c;
+        } else {
+            contents.add(sc = new StringContent());
+        }
+        sc.addContent(text);
+    }
+
+    @Override
+    public boolean write(Writer writer, boolean atNewline) throws IOException {
+        for (Content content: contents) {
+            atNewline = content.write(writer, atNewline);
+        }
+        return atNewline;
+    }
+
+    @Override
+    public boolean isEmpty() {
+        for (Content content: contents) {
+            if (!content.isEmpty())
+                return false;
+        }
+        return true;
+    }
+
+    @Override
+    public int charCount() {
+        int n = 0;
+        for (Content c : contents)
+            n += c.charCount();
+        return n;
+    }
+
+    private void ensureMutableContents() {
+        if (contents.isEmpty())
+            contents = new ArrayList<>();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/DocType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+
+/**
+ * Class for generating document type for HTML pages of javadoc output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class DocType extends Content {
+
+    private String docType;
+
+    public static final DocType TRANSITIONAL =
+            new DocType("Transitional", "http://www.w3.org/TR/html4/loose.dtd");
+
+    public static final DocType HTML5 = new DocType();
+
+    /**
+     * Constructor to construct a DocType object.
+     *
+     * @param type the doctype to be added
+     * @param dtd the dtd of the doctype
+     */
+    private DocType(String type, String dtd) {
+        docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " + type +
+                "//EN\" \"" + dtd + "\">" + DocletConstants.NL;
+    }
+
+    /**
+     * Constructor to construct a DocType object.
+     */
+    private DocType() {
+        docType = "<!DOCTYPE HTML>" + DocletConstants.NL;
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param content content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(Content content) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param stringContent string content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(String stringContent) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEmpty() {
+        return (docType.length() == 0);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        out.write(docType);
+        return true; // guaranteed by constructor
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlAttr.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * Enum representing HTML tag attributes.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public enum HtmlAttr {
+    ALT,
+    CLASS,
+    CLEAR,
+    COLS,
+    CONTENT,
+    DISABLED,
+    HREF,
+    HTTP_EQUIV("http-equiv"),
+    ID,
+    LANG,
+    NAME,
+    ONLOAD,
+    REL,
+    ROLE,
+    ROWS,
+    SCOPE,
+    SCROLLING,
+    SRC,
+    SUMMARY,
+    TARGET,
+    TITLE,
+    TYPE,
+    VALUE,
+    WIDTH;
+
+    private final String value;
+
+    public enum Role {
+
+        BANNER,
+        CONTENTINFO,
+        MAIN,
+        NAVIGATION,
+        REGION;
+
+        private final String role;
+
+        Role() {
+            role = Utils.toLowerCase(name());
+        }
+
+        public String toString() {
+            return role;
+        }
+    }
+
+    HtmlAttr() {
+        this.value = Utils.toLowerCase(name());
+    }
+
+    HtmlAttr(String name) {
+        this.value = name;
+    }
+
+    public String toString() {
+        return value;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlConstants.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,223 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * Stores constants for Html Doclet.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class HtmlConstants {
+
+    /**
+     * Marker to identify start of top navigation bar.
+     */
+    public static final Content START_OF_TOP_NAVBAR =
+            new Comment("========= START OF TOP NAVBAR =======");
+
+    /**
+     * Marker to identify start of bottom navigation bar.
+     */
+    public static final Content START_OF_BOTTOM_NAVBAR =
+            new Comment("======= START OF BOTTOM NAVBAR ======");
+
+    /**
+     * Marker to identify end of top navigation bar.
+     */
+    public static final Content END_OF_TOP_NAVBAR =
+            new Comment("========= END OF TOP NAVBAR =========");
+
+    /**
+     * Marker to identify end of bottom navigation bar.
+     */
+    public static final Content END_OF_BOTTOM_NAVBAR =
+            new Comment("======== END OF BOTTOM NAVBAR =======");
+
+    /**
+     * Marker to identify start of class data.
+     */
+    public static final Content START_OF_CLASS_DATA =
+            new Comment("======== START OF CLASS DATA ========");
+
+    /**
+     * Marker to identify end of class data.
+     */
+    public static final Content END_OF_CLASS_DATA =
+            new Comment("========= END OF CLASS DATA =========");
+
+    /**
+     * Marker to identify start of nested class summary.
+     */
+    public static final Content START_OF_NESTED_CLASS_SUMMARY =
+            new Comment("======== NESTED CLASS SUMMARY ========");
+
+    /**
+     * Marker to identify start of annotation type optional member summary.
+     */
+    public static final Content START_OF_ANNOTATION_TYPE_OPTIONAL_MEMBER_SUMMARY =
+            new Comment("=========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY ===========");
+
+    /**
+     * Marker to identify start of annotation type required member summary.
+     */
+    public static final Content START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY =
+            new Comment("=========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY ===========");
+
+    /**
+     * Marker to identify start of annotation type required member summary.
+     */
+    public static final Content START_OF_ANNOTATION_TYPE_FIELD_SUMMARY =
+            new Comment("=========== ANNOTATION TYPE FIELD SUMMARY ===========");
+
+    /**
+     * Marker to identify start of constructor summary.
+     */
+    public static final Content START_OF_CONSTRUCTOR_SUMMARY =
+            new Comment("======== CONSTRUCTOR SUMMARY ========");
+
+    /**
+     * Marker to identify start of enum constants summary.
+     */
+    public static final Content START_OF_ENUM_CONSTANT_SUMMARY =
+            new Comment("=========== ENUM CONSTANT SUMMARY ===========");
+
+    /**
+     * Marker to identify start of field summary.
+     */
+    public static final Content START_OF_FIELD_SUMMARY =
+            new Comment("=========== FIELD SUMMARY ===========");
+
+    /**
+     * Marker to identify start of properties summary.
+     */
+    public static final Content START_OF_PROPERTY_SUMMARY =
+            new Comment("=========== PROPERTY SUMMARY ===========");
+
+    /**
+     * Marker to identify start of method summary.
+     */
+    public static final Content START_OF_METHOD_SUMMARY =
+            new Comment("========== METHOD SUMMARY ===========");
+
+    /**
+     * Marker to identify start of annotation type details.
+     */
+    public static final Content START_OF_ANNOTATION_TYPE_DETAILS =
+            new Comment("============ ANNOTATION TYPE MEMBER DETAIL ===========");
+
+    /**
+     * Marker to identify start of annotation type field details.
+     */
+    public static final Content START_OF_ANNOTATION_TYPE_FIELD_DETAILS =
+            new Comment("============ ANNOTATION TYPE FIELD DETAIL ===========");
+
+    /**
+     * Marker to identify start of method details.
+     */
+    public static final Content START_OF_METHOD_DETAILS =
+            new Comment("============ METHOD DETAIL ==========");
+
+    /**
+     * Marker to identify start of field details.
+     */
+    public static final Content START_OF_FIELD_DETAILS =
+            new Comment("============ FIELD DETAIL ===========");
+
+    /**
+     * Marker to identify start of property details.
+     */
+    public static final Content START_OF_PROPERTY_DETAILS =
+            new Comment("============ PROPERTY DETAIL ===========");
+
+    /**
+     * Marker to identify start of constructor details.
+     */
+    public static final Content START_OF_CONSTRUCTOR_DETAILS =
+            new Comment("========= CONSTRUCTOR DETAIL ========");
+
+    /**
+     * Marker to identify start of enum constants details.
+     */
+    public static final Content START_OF_ENUM_CONSTANT_DETAILS =
+            new Comment("============ ENUM CONSTANT DETAIL ===========");
+
+    /**
+     * Html tag for the page title heading.
+     */
+    public static final HtmlTag TITLE_HEADING = HtmlTag.H1;
+
+    /**
+     * Html tag for the class page title heading.
+     */
+    public static final HtmlTag CLASS_PAGE_HEADING = HtmlTag.H2;
+
+    /**
+     * Html tag for the content heading.
+     */
+    public static final HtmlTag CONTENT_HEADING = HtmlTag.H2;
+
+    /**
+     * Html tag for the package name heading.
+     */
+    public static final HtmlTag PACKAGE_HEADING = HtmlTag.H2;
+
+    /**
+     * Html tag for the member summary heading.
+     */
+    public static final HtmlTag SUMMARY_HEADING = HtmlTag.H3;
+
+    /**
+     * Html tag for the inherited member summary heading.
+     */
+    public static final HtmlTag INHERITED_SUMMARY_HEADING = HtmlTag.H3;
+
+    /**
+     * Html tag for the member details heading.
+     */
+    public static final HtmlTag DETAILS_HEADING = HtmlTag.H3;
+
+    /**
+     * Html tag for the serialized member heading.
+     */
+    public static final HtmlTag SERIALIZED_MEMBER_HEADING = HtmlTag.H3;
+
+    /**
+     * Html tag for the member heading.
+     */
+    public static final HtmlTag MEMBER_HEADING = HtmlTag.H4;
+
+    /**
+     * Default charset for HTML.
+     */
+    public static final String HTML_DEFAULT_CHARSET = "utf-8";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,361 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.formats.html.ConfigurationImpl;
+import jdk.javadoc.internal.doclets.formats.html.SectionName;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocLink;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+
+
+/**
+ * Class for the Html Format Code Generation specific to JavaDoc.
+ * This Class contains methods related to the Html Code Generation which
+ * are used by the Sub-Classes in the package jdk.javadoc.internal.tool.standard.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Robert Field
+ */
+public abstract class HtmlDocWriter extends HtmlWriter {
+
+    public static final String CONTENT_TYPE = "text/html";
+
+    DocPath pathToRoot;
+
+    /**
+     * Constructor. Initializes the destination file name through the super
+     * class HtmlWriter.
+     *
+     * @param filename String file name.
+     */
+    public HtmlDocWriter(Configuration configuration, DocPath filename)
+            throws IOException {
+        super(configuration, filename);
+        this.pathToRoot = filename.parent().invert();
+        configuration.message.notice("doclet.Generating_0",
+            DocFile.createFileForOutput(configuration, filename).getPath());
+    }
+
+    /**
+     * Accessor for configuration.
+     */
+    public abstract Configuration configuration();
+
+    public Content getHyperLink(DocPath link, String label) {
+        return getHyperLink(link, new StringContent(label), false, "", "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param where      Position of the link in the file. Character '#' is not
+     *                   needed.
+     * @param label      Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(String where,
+                               Content label) {
+        return getHyperLink(getDocLink(where), label, "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param sectionName      The section name to which the link will be created.
+     * @param label            Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(SectionName sectionName,
+                               Content label) {
+        return getHyperLink(getDocLink(sectionName), label, "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param sectionName      The section name combined with where to which the link
+     *                         will be created.
+     * @param where            The fragment combined with sectionName to which the link
+     *                         will be created.
+     * @param label            Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(SectionName sectionName, String where,
+                               Content label) {
+        return getHyperLink(getDocLink(sectionName, where), label, "", "");
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param where      Position of the link in the file.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(String where) {
+        return DocLink.fragment(getName(where));
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param sectionName      The section name to which the link will be created.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(SectionName sectionName) {
+        return DocLink.fragment(sectionName.getName());
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param sectionName      The section name combined with where to which the link
+     *                         will be created.
+     * @param where            The fragment combined with sectionName to which the link
+     *                         will be created.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(SectionName sectionName, String where) {
+        return DocLink.fragment(sectionName.getName() + getName(where));
+    }
+
+    /**
+     * Convert the name to a valid HTML name.
+     *
+     * @param name the name that needs to be converted to valid HTML name.
+     * @return a valid HTML name string.
+     */
+    public String getName(String name) {
+        StringBuilder sb = new StringBuilder();
+        char ch;
+        /* The HTML 4 spec at http://www.w3.org/TR/html4/types.html#h-6.2 mentions
+         * that the name/id should begin with a letter followed by other valid characters.
+         * The HTML 5 spec (draft) is more permissive on names/ids where the only restriction
+         * is that it should be at least one character long and should not contain spaces.
+         * The spec draft is @ http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute.
+         *
+         * For HTML 4, we need to check for non-characters at the beginning of the name and
+         * substitute it accordingly, "_" and "$" can appear at the beginning of a member name.
+         * The method substitutes "$" with "Z:Z:D" and will prefix "_" with "Z:Z".
+         */
+        for (int i = 0; i < name.length(); i++) {
+            ch = name.charAt(i);
+            switch (ch) {
+                case '(':
+                case ')':
+                case '<':
+                case '>':
+                case ',':
+                    sb.append('-');
+                    break;
+                case ' ':
+                case '[':
+                    break;
+                case ']':
+                    sb.append(":A");
+                    break;
+                // Any appearance of $ needs to be substituted with ":D" and not with hyphen
+                // since a field name "P$$ and a method P(), both valid member names, can end
+                // up as "P--". A member name beginning with $ needs to be substituted with
+                // "Z:Z:D".
+                case '$':
+                    if (i == 0)
+                        sb.append("Z:Z");
+                    sb.append(":D");
+                    break;
+                // A member name beginning with _ needs to be prefixed with "Z:Z" since valid anchor
+                // names can only begin with a letter.
+                case '_':
+                    if (i == 0)
+                        sb.append("Z:Z");
+                    sb.append(ch);
+                    break;
+                default:
+                    sb.append(ch);
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Get Html hyperlink.
+     *
+     * @param link       path of the file.
+     * @param label      Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(DocPath link, Content label) {
+        return getHyperLink(link, label, "", "");
+    }
+
+    public Content getHyperLink(DocLink link, Content label) {
+        return getHyperLink(link, label, "", "");
+    }
+
+    public Content getHyperLink(DocPath link,
+                               Content label, boolean strong,
+                               String stylename, String title, String target) {
+        return getHyperLink(new DocLink(link), label, strong,
+                stylename, title, target);
+    }
+
+    public Content getHyperLink(DocLink link,
+                               Content label, boolean strong,
+                               String stylename, String title, String target) {
+        Content body = label;
+        if (strong) {
+            body = HtmlTree.SPAN(HtmlStyle.typeNameLink, body);
+        }
+        if (stylename != null && stylename.length() != 0) {
+            HtmlTree t = new HtmlTree(HtmlTag.FONT, body);
+            t.addAttr(HtmlAttr.CLASS, stylename);
+            body = t;
+        }
+        HtmlTree l = HtmlTree.A(link.toString(), body);
+        if (title != null && title.length() != 0) {
+            l.addAttr(HtmlAttr.TITLE, title);
+        }
+        if (target != null && target.length() != 0) {
+            l.addAttr(HtmlAttr.TARGET, target);
+        }
+        return l;
+    }
+
+    /**
+     * Get Html Hyper Link.
+     *
+     * @param link       String name of the file.
+     * @param label      Tag for the link.
+     * @param title      String that describes the link's content for accessibility.
+     * @param target     Target frame.
+     * @return a content tree for the hyper link.
+     */
+    public Content getHyperLink(DocPath link, Content label, String title, String target) {
+        return getHyperLink(new DocLink(link), label, title, target);
+    }
+
+    public Content getHyperLink(DocLink link, Content label, String title, String target) {
+        HtmlTree anchor = HtmlTree.A(link.toString(), label);
+        if (title != null && title.length() != 0) {
+            anchor.addAttr(HtmlAttr.TITLE, title);
+        }
+        if (target != null && target.length() != 0) {
+            anchor.addAttr(HtmlAttr.TARGET, target);
+        }
+        return anchor;
+    }
+
+    /**
+     * Get the enclosed name of the package
+     *
+     * @param te  TypeElement
+     * @return the name
+     */
+    public String getEnclosingPackageName(TypeElement te) {
+
+        PackageElement encl = configuration.utils.containingPackage(te);
+        return (encl.isUnnamed()) ? "" : (encl.getQualifiedName() + ".");
+    }
+
+    public boolean getMemberDetailsListPrinted() {
+        return memberDetailsListPrinted;
+    }
+
+    /**
+     * Print the frames version of the Html file header.
+     * Called only when generating an HTML frames file.
+     *
+     * @param title Title of this HTML document
+     * @param configuration the configuration object
+     * @param body the body content tree to be added to the HTML document
+     */
+    public void printFramesDocument(String title, ConfigurationImpl configuration,
+            HtmlTree 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));
+        Content windowTitle = HtmlTree.TITLE(new StringContent(title));
+        head.addContent(windowTitle);
+        Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
+                (configuration.charset.length() > 0) ?
+                        configuration.charset : HtmlConstants.HTML_DEFAULT_CHARSET);
+        head.addContent(meta);
+        head.addContent(getStyleSheetProperties(configuration));
+        head.addContent(getFramesJavaScript());
+        Content htmlTree = HtmlTree.HTML(configuration.getLocale().getLanguage(),
+                head, body);
+        Content htmlDocument = new HtmlDocument(htmlDocType,
+                htmlComment, htmlTree);
+        write(htmlDocument);
+    }
+
+    /**
+     * Returns a link to the stylesheet file.
+     *
+     * @return an HtmlTree for the lINK tag which provides the stylesheet location
+     */
+    public HtmlTree getStyleSheetProperties(ConfigurationImpl configuration) {
+        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");
+        return link;
+    }
+
+    protected Comment getGeneratedBy(boolean timestamp) {
+        String text = "Generated by javadoc"; // marker string, deliberately not localized
+        if (timestamp) {
+            Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
+            Date today = calendar.getTime();
+            text += " ("+ configuration.getDocletSpecificBuildDate() + ") on " + today;
+        }
+        return new Comment(text);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlDocument.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.*;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+/**
+ * Class for generating an HTML document for javadoc output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class HtmlDocument extends Content {
+
+    private List<Content> docContent = Collections.<Content>emptyList();
+
+    /**
+     * Constructor to construct an HTML document.
+     *
+     * @param docType document type for the HTML document
+     * @param docComment comment for the document
+     * @param htmlTree HTML tree of the document
+     */
+    public HtmlDocument(Content docType, Content docComment, Content htmlTree) {
+        docContent = new ArrayList<>();
+        addContent(nullCheck(docType));
+        addContent(nullCheck(docComment));
+        addContent(nullCheck(htmlTree));
+    }
+
+    /**
+     * Constructor to construct an HTML document.
+     *
+     * @param docType document type for the HTML document
+     * @param htmlTree HTML tree of the document
+     */
+    public HtmlDocument(Content docType, Content htmlTree) {
+        docContent = new ArrayList<>();
+        addContent(nullCheck(docType));
+        addContent(nullCheck(htmlTree));
+    }
+
+    /**
+     * Adds content for the HTML document.
+     *
+     * @param htmlContent html content to be added
+     */
+    public final void addContent(Content htmlContent) {
+        if (htmlContent.isValid())
+            docContent.add(htmlContent);
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param stringContent string content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(String stringContent) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEmpty() {
+        return (docContent.isEmpty());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean write(Writer out,  boolean atNewline) throws IOException {
+        for (Content c : docContent)
+            atNewline = c.write(out, atNewline);
+        return atNewline;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlStyle.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+/**
+ * Enum representing HTML styles. The name map to values in the CSS file.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public enum HtmlStyle {
+    aboutLanguage,
+    activeTableTab,
+    altColor,
+    bar,
+    block,
+    blockList,
+    blockListLast,
+    bottomNav,
+    circle,
+    classUseContainer,
+    colFirst,
+    colLast,
+    colOne,
+    constantsSummary,
+    constantValuesContainer,
+    contentContainer,
+    deprecatedContent,
+    deprecatedLabel,
+    deprecatedSummary,
+    deprecationComment,
+    description,
+    descfrmTypeLabel,
+    details,
+    docSummary,
+    emphasizedPhrase,
+    fixedNav,
+    header,
+    horizontal,
+    footer,
+    indexContainer,
+    indexNav,
+    inheritance,
+    interfaceName,
+    leftContainer,
+    leftTop,
+    leftBottom,
+    legalCopy,
+    mainContainer,
+    memberNameLabel,
+    memberNameLink,
+    memberSummary,
+    nameValue,
+    navBarCell1Rev,
+    navList,
+    navListSearch,
+    overrideSpecifyLabel,
+    overviewSummary,
+    packageHierarchyLabel,
+    paramLabel,
+    returnLabel,
+    rightContainer,
+    rightIframe,
+    rowColor,
+    searchTagLink,
+    seeLabel,
+    serializedFormContainer,
+    simpleTagLabel,
+    skipNav,
+    sourceContainer,
+    sourceLineNo,
+    subNav,
+    subNavList,
+    subTitle,
+    summary,
+    tabEnd,
+    tableTab,
+    throwsLabel,
+    title,
+    topNav,
+    typeNameLabel,
+    typeNameLink,
+    typeSummary,
+    useSummary
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * Enum representing HTML tags.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public enum HtmlTag {
+    A(BlockType.INLINE, EndTag.END),
+    BLOCKQUOTE,
+    BODY(BlockType.OTHER, EndTag.END),
+    BR(BlockType.INLINE, EndTag.NOEND),
+    CAPTION,
+    CENTER(HtmlVersion.HTML4),
+    CODE(BlockType.INLINE, EndTag.END),
+    DD,
+    DIR(HtmlVersion.HTML4),
+    DIV,
+    DL,
+    DT,
+    EM(BlockType.INLINE, EndTag.END),
+    FONT(HtmlVersion.HTML4, BlockType.INLINE, EndTag.END),
+    FOOTER(HtmlVersion.HTML5),
+    H1,
+    H2,
+    H3,
+    H4,
+    H5,
+    H6,
+    HEAD(BlockType.OTHER, EndTag.END),
+    HEADER(HtmlVersion.HTML5),
+    HR(BlockType.BLOCK, EndTag.NOEND),
+    HTML(BlockType.OTHER, EndTag.END),
+    I(BlockType.INLINE, EndTag.END),
+    IFRAME(BlockType.OTHER, EndTag.END),
+    IMG(BlockType.INLINE, EndTag.NOEND),
+    INPUT(BlockType.BLOCK, EndTag.NOEND),
+    LI,
+    LISTING,
+    LINK(BlockType.OTHER, EndTag.NOEND),
+    MAIN(HtmlVersion.HTML5),
+    MENU,
+    META(BlockType.OTHER, EndTag.NOEND),
+    NAV(HtmlVersion.HTML5),
+    NOSCRIPT(BlockType.OTHER, EndTag.END),
+    OL,
+    P,
+    PRE,
+    SCRIPT(BlockType.OTHER, EndTag.END),
+    SECTION(HtmlVersion.HTML5),
+    SMALL(BlockType.INLINE, EndTag.END),
+    SPAN(BlockType.INLINE, EndTag.END),
+    STRONG(BlockType.INLINE, EndTag.END),
+    SUB(BlockType.INLINE, EndTag.END),
+    TABLE,
+    TBODY,
+    TD,
+    TH,
+    TITLE(BlockType.OTHER, EndTag.END),
+    TR,
+    TT(HtmlVersion.HTML4, BlockType.INLINE, EndTag.END),
+    UL;
+
+    public final BlockType blockType;
+    public final EndTag endTag;
+    public final String value;
+    public final HtmlVersion htmlVersion;
+
+    /**
+     * Enum representing the type of HTML element.
+     */
+    public static enum BlockType {
+        BLOCK,
+        INLINE,
+        OTHER
+    }
+
+    /**
+     * Enum representing HTML end tag requirement.
+     */
+    public static enum EndTag {
+        END,
+        NOEND
+    }
+
+    HtmlTag() {
+        this(HtmlVersion.ALL, BlockType.BLOCK, EndTag.END);
+    }
+
+    HtmlTag(HtmlVersion htmlVersion) {
+        this(htmlVersion, BlockType.BLOCK, EndTag.END);
+    }
+
+    HtmlTag(BlockType blockType, EndTag endTag ) {
+        this(HtmlVersion.ALL, blockType, endTag);
+    }
+
+    HtmlTag(HtmlVersion htmlVersion, BlockType blockType, EndTag endTag ) {
+        this.htmlVersion = htmlVersion;
+        this.blockType = blockType;
+        this.endTag = endTag;
+        this.value = Utils.toLowerCase(name());
+    }
+
+    /**
+     * Returns true if the end tag is required. This is specific to the standard
+     * doclet and does not exactly resemble the W3C specifications.
+     *
+     * @return true if end tag needs to be displayed else return false
+     */
+    public boolean endTagRequired() {
+        return (endTag == EndTag.END);
+    }
+
+    /**
+     * Returns true if the tag is allowed in the output HTML version of this javadoc run.
+     *
+     * @param htmlVer the output HTML version for this javadoc run
+     * @return true if the tag is allowed
+     */
+    public boolean allowTag(HtmlVersion htmlVer) {
+        return (this.htmlVersion == HtmlVersion.ALL || this.htmlVersion == htmlVer);
+    }
+
+    public String toString() {
+        return value;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlTree.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,978 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.nio.charset.Charset;
+import java.util.ArrayList;
+import java.util.BitSet;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import jdk.javadoc.internal.doclets.formats.html.markup.HtmlAttr.Role;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+
+/**
+ * Class for generating HTML tree for javadoc output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class HtmlTree extends Content {
+
+    private HtmlTag htmlTag;
+    private Map<HtmlAttr,String> attrs = Collections.<HtmlAttr,String>emptyMap();
+    private List<Content> content = Collections.<Content>emptyList();
+    public static final Content EMPTY = new StringContent("");
+
+    /**
+     * Constructor to construct HtmlTree object.
+     *
+     * @param tag HTML tag for the HtmlTree object
+     */
+    public HtmlTree(HtmlTag tag) {
+        htmlTag = nullCheck(tag);
+    }
+
+    /**
+     * Constructor to construct HtmlTree object.
+     *
+     * @param tag HTML tag for the HtmlTree object
+     * @param contents contents to be added to the tree
+     */
+    public HtmlTree(HtmlTag tag, Content... contents) {
+        this(tag);
+        for (Content content: contents)
+            addContent(content);
+    }
+
+    /**
+     * Adds an attribute for the HTML tag.
+     *
+     * @param attrName name of the attribute
+     * @param attrValue value of the attribute
+     */
+    public void addAttr(HtmlAttr attrName, String attrValue) {
+        if (attrs.isEmpty())
+            attrs = new LinkedHashMap<>(3);
+        attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue));
+    }
+
+    public void setTitle(Content body) {
+        addAttr(HtmlAttr.TITLE, stripHtml(body));
+    }
+
+    public void setRole(Role role) {
+        addAttr(HtmlAttr.ROLE, role.toString());
+    }
+
+    /**
+     * Adds a style for the HTML tag.
+     *
+     * @param style style to be added
+     */
+    public void addStyle(HtmlStyle style) {
+        addAttr(HtmlAttr.CLASS, style.toString());
+    }
+
+    /**
+     * Adds content for the HTML tag.
+     *
+     * @param tagContent tag content to be added
+     */
+    public void addContent(Content tagContent) {
+        if (tagContent instanceof ContentBuilder) {
+            for (Content content: ((ContentBuilder)tagContent).contents) {
+                addContent(content);
+            }
+        }
+        else if (tagContent == HtmlTree.EMPTY || tagContent.isValid()) {
+            if (content.isEmpty())
+                content = new ArrayList<>();
+            content.add(tagContent);
+        }
+    }
+
+    /**
+     * This method adds a string content to the htmltree. If the last content member
+     * added is a StringContent, append the string to that StringContent or else
+     * create a new StringContent and add it to the html tree.
+     *
+     * @param stringContent string content that needs to be added
+     */
+    public void addContent(String stringContent) {
+        if (!content.isEmpty()) {
+            Content lastContent = content.get(content.size() - 1);
+            if (lastContent instanceof StringContent)
+                lastContent.addContent(stringContent);
+            else
+                addContent(new StringContent(stringContent));
+        }
+        else
+            addContent(new StringContent(stringContent));
+    }
+
+    public int charCount() {
+        int n = 0;
+        for (Content c : content)
+            n += c.charCount();
+        return n;
+    }
+
+    /**
+     * Given a string, escape all special html characters and
+     * return the result.
+     *
+     * @param s The string to check.
+     * @return the original string with all of the HTML characters escaped.
+     */
+    private static String escapeHtmlChars(String s) {
+        for (int i = 0; i < s.length(); i++) {
+            char ch = s.charAt(i);
+            switch (ch) {
+                // only start building a new string if we need to
+                case '<': case '>': case '&':
+                    StringBuilder sb = new StringBuilder(s.substring(0, i));
+                    for ( ; i < s.length(); i++) {
+                        ch = s.charAt(i);
+                        switch (ch) {
+                            case '<': sb.append("&lt;");  break;
+                            case '>': sb.append("&gt;");  break;
+                            case '&': sb.append("&amp;"); break;
+                            default:  sb.append(ch);      break;
+                        }
+                    }
+                    return sb.toString();
+            }
+        }
+        return s;
+    }
+
+    /**
+     * A set of ASCII URI characters to be left unencoded.
+     */
+    public static final BitSet NONENCODING_CHARS = new BitSet(256);
+
+    static {
+        // alphabetic characters
+        for (int i = 'a'; i <= 'z'; i++) {
+            NONENCODING_CHARS.set(i);
+        }
+        for (int i = 'A'; i <= 'Z'; i++) {
+            NONENCODING_CHARS.set(i);
+        }
+        // numeric characters
+        for (int i = '0'; i <= '9'; i++) {
+            NONENCODING_CHARS.set(i);
+        }
+        // Reserved characters as per RFC 3986. These are set of delimiting characters.
+        String noEnc = ":/?#[]@!$&'()*+,;=";
+        // Unreserved characters as per RFC 3986 which should not be percent encoded.
+        noEnc += "-._~";
+        for (int i = 0; i < noEnc.length(); i++) {
+            NONENCODING_CHARS.set(noEnc.charAt(i));
+        }
+    }
+
+    private static String encodeURL(String url) {
+        StringBuilder sb = new StringBuilder();
+        for (byte c : url.getBytes(Charset.forName("UTF-8"))) {
+            if (NONENCODING_CHARS.get(c & 0xFF)) {
+                sb.append((char) c);
+            } else {
+                sb.append(String.format("%%%02X", c & 0xFF));
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Generates an HTML anchor tag.
+     *
+     * @param ref reference url for the anchor tag
+     * @param body content for the anchor tag
+     * @return an HtmlTree object
+     */
+    public static HtmlTree A(String ref, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body));
+        htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref));
+        return htmltree;
+    }
+
+    /**
+     * Generates an HTML anchor tag with an id or a name attribute and content.
+     *
+     * @param htmlVersion the version of the generated HTML
+     * @param attr name or id attribute for the anchor tag
+     * @param body content for the anchor tag
+     * @return an HtmlTree object
+     */
+    public static HtmlTree A(HtmlVersion htmlVersion, String attr, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.A);
+        htmltree.addAttr((htmlVersion == HtmlVersion.HTML4)
+                ? HtmlAttr.NAME
+                : HtmlAttr.ID,
+                nullCheck(attr));
+        htmltree.addContent(nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates an HTML anchor tag with id attribute and a body.
+     *
+     * @param id id for the anchor tag
+     * @param body body for the anchor tag
+     * @return an HtmlTree object
+     */
+    public static HtmlTree A_ID(String id, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.A);
+        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
+        htmltree.addContent(nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a CAPTION tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the CAPTION tag
+     */
+    public static HtmlTree CAPTION(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.CAPTION, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a CODE tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the CODE tag
+     */
+    public static HtmlTree CODE(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.CODE, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a DD tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the DD tag
+     */
+    public static HtmlTree DD(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.DD, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a DL tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the DL tag
+     */
+    public static HtmlTree DL(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.DL, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a DIV tag with the style class attributes. It also encloses
+     * a content.
+     *
+     * @param styleClass stylesheet class for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the DIV tag
+     */
+    public static HtmlTree DIV(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.DIV, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a DIV tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the DIV tag
+     */
+    public static HtmlTree DIV(Content body) {
+        return DIV(null, body);
+    }
+
+    /**
+     * Generates a DT tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the DT tag
+     */
+    public static HtmlTree DT(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.DT, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a FOOTER tag with role attribute.
+     *
+     * @return an HtmlTree object for the FOOTER tag
+     */
+    public static HtmlTree FOOTER() {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.FOOTER);
+        htmltree.setRole(Role.CONTENTINFO);
+        return htmltree;
+    }
+
+    /**
+     * Generates a HEADER tag with role attribute.
+     *
+     * @return an HtmlTree object for the HEADER tag
+     */
+    public static HtmlTree HEADER() {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.HEADER);
+        htmltree.setRole(Role.BANNER);
+        return htmltree;
+    }
+
+    /**
+     * Generates a heading tag (h1 to h6) with the title and style class attributes. It also encloses
+     * a content.
+     *
+     * @param headingTag the heading tag to be generated
+     * @param printTitle true if title for the tag needs to be printed else false
+     * @param styleClass stylesheet class for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the tag
+     */
+    public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle,
+            HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(headingTag, nullCheck(body));
+        if (printTitle)
+            htmltree.setTitle(body);
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a heading tag (h1 to h6) with style class attribute. It also encloses
+     * a content.
+     *
+     * @param headingTag the heading tag to be generated
+     * @param styleClass stylesheet class for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the tag
+     */
+    public static HtmlTree HEADING(HtmlTag headingTag, HtmlStyle styleClass, Content body) {
+        return HEADING(headingTag, false, styleClass, body);
+    }
+
+    /**
+     * Generates a heading tag (h1 to h6) with the title attribute. It also encloses
+     * a content.
+     *
+     * @param headingTag the heading tag to be generated
+     * @param printTitle true if the title for the tag needs to be printed else false
+     * @param body content for the tag
+     * @return an HtmlTree object for the tag
+     */
+    public static HtmlTree HEADING(HtmlTag headingTag, boolean printTitle, Content body) {
+        return HEADING(headingTag, printTitle, null, body);
+    }
+
+    /**
+     * Generates a heading tag (h1 to h6)  with some content.
+     *
+     * @param headingTag the heading tag to be generated
+     * @param body content for the tag
+     * @return an HtmlTree object for the tag
+     */
+    public static HtmlTree HEADING(HtmlTag headingTag, Content body) {
+        return HEADING(headingTag, false, null, body);
+    }
+
+    /**
+     * Generates an HTML tag with lang attribute. It also adds head and body
+     * content to the HTML tree.
+     *
+     * @param lang language for the HTML document
+     * @param head head for the HTML tag
+     * @param body body for the HTML tag
+     * @return an HtmlTree object for the HTML tag
+     */
+    public static HtmlTree HTML(String lang, Content head, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.HTML, nullCheck(head), nullCheck(body));
+        htmltree.addAttr(HtmlAttr.LANG, nullCheck(lang));
+        return htmltree;
+    }
+
+    /**
+     * Generates a IFRAME tag.
+     *
+     * @param src the url of the document to be shown in the frame
+     * @param name specifies the name of the frame
+     * @param title the title for the frame
+     * @return an HtmlTree object for the IFRAME tag
+     */
+    public static HtmlTree IFRAME(String src, String name, String title) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.IFRAME);
+        htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
+        htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
+        htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
+        return htmltree;
+    }
+
+    /**
+     * Generates a INPUT tag with some id.
+     *
+     * @param type the type of input
+     * @param id id for the tag
+     * @return an HtmlTree object for the INPUT tag
+     */
+    public static HtmlTree INPUT(String type, String id) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.INPUT);
+        htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type));
+        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
+        htmltree.addAttr(HtmlAttr.VALUE, " ");
+        htmltree.addAttr(HtmlAttr.DISABLED, "disabled");
+        return htmltree;
+    }
+
+    /**
+     * Generates a LI tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the LI tag
+     */
+    public static HtmlTree LI(Content body) {
+        return LI(null, body);
+    }
+
+    /**
+     * Generates a LI tag with some content.
+     *
+     * @param styleClass style for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the LI tag
+     */
+    public static HtmlTree LI(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.LI, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a LINK tag with the rel, type, href and title attributes.
+     *
+     * @param rel relevance of the link
+     * @param type type of link
+     * @param href the path for the link
+     * @param title title for the link
+     * @return an HtmlTree object for the LINK tag
+     */
+    public static HtmlTree LINK(String rel, String type, String href, String title) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.LINK);
+        htmltree.addAttr(HtmlAttr.REL, nullCheck(rel));
+        htmltree.addAttr(HtmlAttr.TYPE, nullCheck(type));
+        htmltree.addAttr(HtmlAttr.HREF, nullCheck(href));
+        htmltree.addAttr(HtmlAttr.TITLE, nullCheck(title));
+        return htmltree;
+    }
+
+    /**
+     * Generates a MAIN tag with role attribute.
+     *
+     * @return an HtmlTree object for the MAIN tag
+     */
+    public static HtmlTree MAIN() {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.MAIN);
+        htmltree.setRole(Role.MAIN);
+        return htmltree;
+    }
+
+    /**
+     * Generates a MAIN tag with role attribute and some content.
+     *
+     * @param body content of the MAIN tag
+     * @return an HtmlTree object for the MAIN tag
+     */
+    public static HtmlTree MAIN(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.MAIN, nullCheck(body));
+        htmltree.setRole(Role.MAIN);
+        return htmltree;
+    }
+
+    /**
+     * Generates a MAIN tag with role attribute, style attribute and some content.
+     *
+     * @param styleClass style of the MAIN tag
+     * @param body content of the MAIN tag
+     * @return an HtmlTree object for the MAIN tag
+     */
+    public static HtmlTree MAIN(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = HtmlTree.MAIN(body);
+        if (styleClass != null) {
+            htmltree.addStyle(styleClass);
+        }
+        return htmltree;
+    }
+
+    /**
+     * Generates a META tag with the http-equiv, content and charset attributes.
+     *
+     * @param httpEquiv http equiv attribute for the META tag
+     * @param content type of content
+     * @param charSet character set used
+     * @return an HtmlTree object for the META tag
+     */
+    public static HtmlTree META(String httpEquiv, String content, String charSet) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.META);
+        String contentCharset = content + "; charset=" + charSet;
+        htmltree.addAttr(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv));
+        htmltree.addAttr(HtmlAttr.CONTENT, contentCharset);
+        return htmltree;
+    }
+
+    /**
+     * Generates a META tag with the name and content attributes.
+     *
+     * @param name name attribute
+     * @param content type of content
+     * @return an HtmlTree object for the META tag
+     */
+    public static HtmlTree META(String name, String content) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.META);
+        htmltree.addAttr(HtmlAttr.NAME, nullCheck(name));
+        htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content));
+        return htmltree;
+    }
+
+    /**
+     * Generates a NAV tag with the role attribute.
+     *
+     * @return an HtmlTree object for the NAV tag
+     */
+    public static HtmlTree NAV() {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.NAV);
+        htmltree.setRole(Role.NAVIGATION);
+        return htmltree;
+    }
+
+    /**
+     * Generates a NOSCRIPT tag with some content.
+     *
+     * @param body content of the noscript tag
+     * @return an HtmlTree object for the NOSCRIPT tag
+     */
+    public static HtmlTree NOSCRIPT(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.NOSCRIPT, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a P tag with some content.
+     *
+     * @param body content of the Paragraph tag
+     * @return an HtmlTree object for the P tag
+     */
+    public static HtmlTree P(Content body) {
+        return P(null, body);
+    }
+
+    /**
+     * Generates a P tag with some content.
+     *
+     * @param styleClass style of the Paragraph tag
+     * @param body content of the Paragraph tag
+     * @return an HtmlTree object for the P tag
+     */
+    public static HtmlTree P(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.P, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a SCRIPT tag with the type and src attributes.
+     *
+     * @param type type of link
+     * @param src the path for the script
+     * @return an HtmlTree object for the SCRIPT tag
+     */
+    public static HtmlTree SCRIPT(String src) {
+        HtmlTree htmltree = HtmlTree.SCRIPT();
+        htmltree.addAttr(HtmlAttr.SRC, nullCheck(src));
+        return htmltree;
+    }
+
+    /**
+     * Generates a SCRIPT tag with the type attribute.
+     *
+     * @return an HtmlTree object for the SCRIPT tag
+     */
+    public static HtmlTree SCRIPT() {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.SCRIPT);
+        htmltree.addAttr(HtmlAttr.TYPE, "text/javascript");
+        return htmltree;
+    }
+
+    /**
+     * Generates a SECTION tag with role attribute.
+     *
+     * @return an HtmlTree object for the SECTION tag
+     */
+    public static HtmlTree SECTION() {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.SECTION);
+        htmltree.setRole(Role.REGION);
+        return htmltree;
+    }
+
+    /**
+     * Generates a SECTION tag with role attribute and some content.
+     *
+     * @param body content of the section tag
+     * @return an HtmlTree object for the SECTION tag
+     */
+    public static HtmlTree SECTION(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.SECTION, nullCheck(body));
+        htmltree.setRole(Role.REGION);
+        return htmltree;
+    }
+
+    /**
+     * Generates a SMALL tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the SMALL tag
+     */
+    public static HtmlTree SMALL(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.SMALL, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a SPAN tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the SPAN tag
+     */
+    public static HtmlTree SPAN(Content body) {
+        return SPAN(null, body);
+    }
+
+    /**
+     * Generates a SPAN tag with style class attribute and some content.
+     *
+     * @param styleClass style class for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the SPAN tag
+     */
+    public static HtmlTree SPAN(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a SPAN tag with id and style class attributes. It also encloses
+     * a content.
+     *
+     * @param id the id for the tag
+     * @param styleClass stylesheet class for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the SPAN tag
+     */
+    public static HtmlTree SPAN(String id, HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.SPAN, nullCheck(body));
+        htmltree.addAttr(HtmlAttr.ID, nullCheck(id));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a Table tag with style class and summary attributes and some content.
+     *
+     * @param styleClass style of the table
+     * @param summary summary for the table
+     * @param body content for the table
+     * @return an HtmlTree object for the TABLE tag
+     */
+    public static HtmlTree TABLE(HtmlStyle styleClass, String summary, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        htmltree.addAttr(HtmlAttr.SUMMARY, nullCheck(summary));
+        return htmltree;
+    }
+
+    /**
+     * Generates a Table tag with style class attribute and some content.
+     *
+     * @param styleClass style of the table
+     * @param body content for the table
+     * @return an HtmlTree object for the TABLE tag
+     */
+    public static HtmlTree TABLE(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.TABLE, nullCheck(body));
+        if (styleClass != null) {
+            htmltree.addStyle(styleClass);
+        }
+        return htmltree;
+    }
+
+    /**
+     * Generates a TD tag with style class attribute and some content.
+     *
+     * @param styleClass style for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the TD tag
+     */
+    public static HtmlTree TD(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.TD, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        return htmltree;
+    }
+
+    /**
+     * Generates a TD tag for an HTML table with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the TD tag
+     */
+    public static HtmlTree TD(Content body) {
+        return TD(null, body);
+    }
+
+    /**
+     * Generates a TH tag with style class and scope attributes and some content.
+     *
+     * @param styleClass style for the tag
+     * @param scope scope of the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the TH tag
+     */
+    public static HtmlTree TH(HtmlStyle styleClass, String scope, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.TH, nullCheck(body));
+        if (styleClass != null)
+            htmltree.addStyle(styleClass);
+        htmltree.addAttr(HtmlAttr.SCOPE, nullCheck(scope));
+        return htmltree;
+    }
+
+    /**
+     * Generates a TH tag with scope attribute and some content.
+     *
+     * @param scope scope of the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the TH tag
+     */
+    public static HtmlTree TH(String scope, Content body) {
+        return TH(null, scope, body);
+    }
+
+    /**
+     * Generates a TITLE tag with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the TITLE tag
+     */
+    public static HtmlTree TITLE(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.TITLE, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a TR tag for an HTML table with some content.
+     *
+     * @param body content for the tag
+     * @return an HtmlTree object for the TR tag
+     */
+    public static HtmlTree TR(Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.TR, nullCheck(body));
+        return htmltree;
+    }
+
+    /**
+     * Generates a UL tag with the style class attribute and some content.
+     *
+     * @param styleClass style for the tag
+     * @param body content for the tag
+     * @return an HtmlTree object for the UL tag
+     */
+    public static HtmlTree UL(HtmlStyle styleClass, Content body) {
+        HtmlTree htmltree = new HtmlTree(HtmlTag.UL, nullCheck(body));
+        htmltree.addStyle(nullCheck(styleClass));
+        return htmltree;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEmpty() {
+        return (!hasContent() && !hasAttrs());
+    }
+
+    /**
+     * Returns true if the HTML tree has content.
+     *
+     * @return true if the HTML tree has content else return false
+     */
+    public boolean hasContent() {
+        return (!content.isEmpty());
+    }
+
+    /**
+     * Returns true if the HTML tree has attributes.
+     *
+     * @return true if the HTML tree has attributes else return false
+     */
+    public boolean hasAttrs() {
+        return (!attrs.isEmpty());
+    }
+
+    /**
+     * Returns true if the HTML tree has a specific attribute.
+     *
+     * @param attrName name of the attribute to check within the HTML tree
+     * @return true if the HTML tree has the specified attribute else return false
+     */
+    public boolean hasAttr(HtmlAttr attrName) {
+        return (attrs.containsKey(attrName));
+    }
+
+    /**
+     * Returns true if the HTML tree is valid. This check is more specific to
+     * standard doclet and not exactly similar to W3C specifications. But it
+     * ensures HTML validation.
+     *
+     * @return true if the HTML tree is valid
+     */
+    public boolean isValid() {
+        switch (htmlTag) {
+            case A :
+                return (hasAttr(HtmlAttr.NAME) || hasAttr(HtmlAttr.ID) || (hasAttr(HtmlAttr.HREF) && hasContent()));
+            case BR :
+                return (!hasContent() && (!hasAttrs() || hasAttr(HtmlAttr.CLEAR)));
+            case IFRAME :
+                return (hasAttr(HtmlAttr.SRC) && !hasContent());
+            case HR :
+            case INPUT:
+                return (!hasContent());
+            case IMG :
+                return (hasAttr(HtmlAttr.SRC) && hasAttr(HtmlAttr.ALT) && !hasContent());
+            case LINK :
+                return (hasAttr(HtmlAttr.HREF) && !hasContent());
+            case META :
+                return (hasAttr(HtmlAttr.CONTENT) && !hasContent());
+            case SCRIPT :
+                return ((hasAttr(HtmlAttr.TYPE) && hasAttr(HtmlAttr.SRC) && !hasContent()) ||
+                        (hasAttr(HtmlAttr.TYPE) && hasContent()));
+            default :
+                return hasContent();
+        }
+    }
+
+    /**
+     * Returns true if the element is an inline element.
+     *
+     * @return true if the HTML tag is an inline element
+     */
+    public boolean isInline() {
+        return (htmlTag.blockType == HtmlTag.BlockType.INLINE);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        if (!isInline() && !atNewline)
+            out.write(DocletConstants.NL);
+        String tagString = htmlTag.toString();
+        out.write("<");
+        out.write(tagString);
+        Iterator<HtmlAttr> iterator = attrs.keySet().iterator();
+        HtmlAttr key;
+        String value;
+        while (iterator.hasNext()) {
+            key = iterator.next();
+            value = attrs.get(key);
+            out.write(" ");
+            out.write(key.toString());
+            if (!value.isEmpty()) {
+                out.write("=\"");
+                out.write(value);
+                out.write("\"");
+            }
+        }
+        out.write(">");
+        boolean nl = false;
+        for (Content c : content)
+            nl = c.write(out, nl);
+        if (htmlTag.endTagRequired()) {
+            out.write("</");
+            out.write(tagString);
+            out.write(">");
+        }
+        if (!isInline()) {
+            out.write(DocletConstants.NL);
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    /**
+     * Given a Content node, strips all html characters and
+     * return the result.
+     *
+     * @param body The content node to check.
+     * @return the plain text from the content node
+     *
+     */
+    private static String stripHtml(Content body) {
+        String rawString = body.toString();
+        // remove HTML tags
+        rawString = rawString.replaceAll("\\<.*?>", " ");
+        // consolidate multiple spaces between a word to a single space
+        rawString = rawString.replaceAll("\\b\\s{2,}\\b", " ");
+        // remove extra whitespaces
+        return rawString.trim();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlVersion.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+/**
+ * Enum representing the version of HTML generated by javadoc.
+ *
+ * @author Bhavesh Patel
+ */
+public enum HtmlVersion {
+    HTML4,
+    HTML5,
+    ALL
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/HtmlWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,515 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.*;
+import java.util.*;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPath;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+import jdk.javadoc.internal.doclets.toolkit.util.MethodTypes;
+
+
+/**
+ * Class for the Html format code generation.
+ * Initializes PrintWriter with FileWriter, to enable print
+ * related methods to generate the code to the named File through FileWriter.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Bhavesh Patel (Modified)
+ */
+public class HtmlWriter {
+
+    /**
+     * The window title of this file
+     */
+    protected String winTitle;
+
+    /**
+     * The configuration
+     */
+    protected Configuration configuration;
+
+    /**
+     * The flag to indicate whether a member details list is printed or not.
+     */
+    protected boolean memberDetailsListPrinted;
+
+    /**
+     * Header for tables displaying packages and description..
+     */
+    protected final List<String> packageTableHeader;
+
+    /**
+     * Summary for use tables displaying class and package use.
+     */
+    protected final String useTableSummary;
+
+    /**
+     * Column header for class docs displaying Modifier and Type header.
+     */
+    protected final String modifierTypeHeader;
+
+    public final Content overviewLabel;
+
+    public final Content defaultPackageLabel;
+
+    public final Content packageLabel;
+
+    public final Content useLabel;
+
+    public final Content prevLabel;
+
+    public final Content nextLabel;
+
+    public final Content prevclassLabel;
+
+    public final Content nextclassLabel;
+
+    public final Content summaryLabel;
+
+    public final Content detailLabel;
+
+    public final Content framesLabel;
+
+    public final Content noframesLabel;
+
+    public final Content treeLabel;
+
+    public final Content classLabel;
+
+    public final Content deprecatedLabel;
+
+    public final Content deprecatedPhrase;
+
+    public final Content allclassesLabel;
+
+    public final Content allpackagesLabel;
+
+    public final Content indexLabel;
+
+    public final Content helpLabel;
+
+    public final Content seeLabel;
+
+    public final Content descriptionLabel;
+
+    public final Content prevpackageLabel;
+
+    public final Content nextpackageLabel;
+
+    public final Content packagesLabel;
+
+    public final Content methodDetailsLabel;
+
+    public final Content annotationTypeDetailsLabel;
+
+    public final Content fieldDetailsLabel;
+
+    public final Content propertyDetailsLabel;
+
+    public final Content constructorDetailsLabel;
+
+    public final Content enumConstantsDetailsLabel;
+
+    public final Content specifiedByLabel;
+
+    public final Content overridesLabel;
+
+    public final Content descfrmClassLabel;
+
+    public final Content descfrmInterfaceLabel;
+
+    private final Writer writer;
+
+    protected Content script;
+
+
+    /**
+     * Constructor.
+     *
+     * @param path The directory path to be created for this file
+     *             or null if none to be created.
+     * @exception IOException Exception raised by the FileWriter is passed on
+     * to next level.
+     * @exception UnsupportedEncodingException Exception raised by the
+     * OutputStreamWriter is passed on to next level.
+     */
+    public HtmlWriter(Configuration configuration, DocPath path)
+            throws IOException, UnsupportedEncodingException {
+        writer = DocFile.createFileForOutput(configuration, path).openWriter();
+        this.configuration = configuration;
+        this.memberDetailsListPrinted = false;
+        packageTableHeader = new ArrayList<>();
+        packageTableHeader.add(configuration.getText("doclet.Package"));
+        packageTableHeader.add(configuration.getText("doclet.Description"));
+        useTableSummary = configuration.getText("doclet.Use_Table_Summary",
+                configuration.getText("doclet.packages"));
+        modifierTypeHeader = configuration.getText("doclet.0_and_1",
+                configuration.getText("doclet.Modifier"),
+                configuration.getText("doclet.Type"));
+        overviewLabel = getResource("doclet.Overview");
+        defaultPackageLabel = new StringContent(DocletConstants.DEFAULT_PACKAGE_NAME);
+        packageLabel = getResource("doclet.Package");
+        useLabel = getResource("doclet.navClassUse");
+        prevLabel = getResource("doclet.Prev");
+        nextLabel = getResource("doclet.Next");
+        prevclassLabel = getNonBreakResource("doclet.Prev_Class");
+        nextclassLabel = getNonBreakResource("doclet.Next_Class");
+        summaryLabel = getResource("doclet.Summary");
+        detailLabel = getResource("doclet.Detail");
+        framesLabel = getResource("doclet.Frames");
+        noframesLabel = getNonBreakResource("doclet.No_Frames");
+        treeLabel = getResource("doclet.Tree");
+        classLabel = getResource("doclet.Class");
+        deprecatedLabel = getResource("doclet.navDeprecated");
+        deprecatedPhrase = getResource("doclet.Deprecated");
+        allclassesLabel = getNonBreakResource("doclet.All_Classes");
+        allpackagesLabel = getNonBreakResource("doclet.All_Packages");
+        indexLabel = getResource("doclet.Index");
+        helpLabel = getResource("doclet.Help");
+        seeLabel = getResource("doclet.See");
+        descriptionLabel = getResource("doclet.Description");
+        prevpackageLabel = getNonBreakResource("doclet.Prev_Package");
+        nextpackageLabel = getNonBreakResource("doclet.Next_Package");
+        packagesLabel = getResource("doclet.Packages");
+        methodDetailsLabel = getResource("doclet.Method_Detail");
+        annotationTypeDetailsLabel = getResource("doclet.Annotation_Type_Member_Detail");
+        fieldDetailsLabel = getResource("doclet.Field_Detail");
+        propertyDetailsLabel = getResource("doclet.Property_Detail");
+        constructorDetailsLabel = getResource("doclet.Constructor_Detail");
+        enumConstantsDetailsLabel = getResource("doclet.Enum_Constant_Detail");
+        specifiedByLabel = getResource("doclet.Specified_By");
+        overridesLabel = getResource("doclet.Overrides");
+        descfrmClassLabel = getResource("doclet.Description_From_Class");
+        descfrmInterfaceLabel = getResource("doclet.Description_From_Interface");
+    }
+
+    public void write(Content c) throws IOException {
+        c.write(writer, true);
+    }
+
+    public void close() throws IOException {
+        writer.close();
+    }
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @return a content tree for the text
+     */
+    public Content getResource(String key) {
+        return configuration.getResource(key);
+    }
+
+    /**
+     * Get the configuration string as a content, replacing spaces
+     * with non-breaking spaces.
+     *
+     * @param key the key to look for in the configuration file
+     * @return a content tree for the text
+     */
+    public Content getNonBreakResource(String key) {
+        String text = configuration.getText(key);
+        Content c = configuration.newContent();
+        int start = 0;
+        int p;
+        while ((p = text.indexOf(" ", start)) != -1) {
+            c.addContent(text.substring(start, p));
+            c.addContent(RawHtml.nbsp);
+            start = p + 1;
+        }
+        c.addContent(text.substring(start));
+        return c;
+    }
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @param o   string or content argument added to configuration text
+     * @return a content tree for the text
+     */
+    public Content getResource(String key, Object o) {
+        return configuration.getResource(key, o);
+    }
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @param o1  string or content argument added to configuration text
+     * @param o2  string or content argument added to configuration text
+     * @return a content tree for the text
+     */
+    public Content getResource(String key, Object o0, Object o1) {
+        return configuration.getResource(key, o0, o1);
+    }
+
+    /**
+     * Returns an HtmlTree for the SCRIPT tag.
+     *
+     * @return an HtmlTree for the SCRIPT tag
+     */
+    protected HtmlTree getWinTitleScript(){
+        HtmlTree script = HtmlTree.SCRIPT();
+        if(winTitle != null && winTitle.length() > 0) {
+            String scriptCode = "<!--" + DocletConstants.NL +
+                    "    try {" + DocletConstants.NL +
+                    "        if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL +
+                    "            parent.document.title=\"" + escapeJavaScriptChars(winTitle) + "\";" + DocletConstants.NL +
+                    "        }" + DocletConstants.NL +
+                    "    }" + DocletConstants.NL +
+                    "    catch(err) {" + DocletConstants.NL +
+                    "    }" + DocletConstants.NL +
+                    "//-->" + DocletConstants.NL;
+            RawHtml scriptContent = new RawHtml(scriptCode);
+            script.addContent(scriptContent);
+        }
+        return script;
+    }
+
+    /**
+     * Returns a String with escaped special JavaScript characters.
+     *
+     * @param s String that needs to be escaped
+     * @return a valid escaped JavaScript string
+     */
+    private static String escapeJavaScriptChars(String s) {
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < s.length(); i++) {
+            char ch = s.charAt(i);
+            switch (ch) {
+                case '\b':
+                    sb.append("\\b");
+                    break;
+                case '\t':
+                    sb.append("\\t");
+                    break;
+                case '\n':
+                    sb.append("\\n");
+                    break;
+                case '\f':
+                    sb.append("\\f");
+                    break;
+                case '\r':
+                    sb.append("\\r");
+                    break;
+                case '"':
+                    sb.append("\\\"");
+                    break;
+                case '\'':
+                    sb.append("\\\'");
+                    break;
+                case '\\':
+                    sb.append("\\\\");
+                    break;
+                default:
+                    if (ch < 32 || ch >= 127) {
+                        sb.append(String.format("\\u%04X", (int)ch));
+                    } else {
+                        sb.append(ch);
+                    }
+                    break;
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
+     * Returns a content tree for the SCRIPT tag for the main page(index.html).
+     *
+     * @return a content for the SCRIPT tag
+     */
+    protected Content getFramesJavaScript() {
+        HtmlTree script = HtmlTree.SCRIPT();
+        String scriptCode = DocletConstants.NL +
+                "    targetPage = \"\" + window.location.search;" + DocletConstants.NL +
+                "    if (targetPage != \"\" && targetPage != \"undefined\")" + DocletConstants.NL +
+                "        targetPage = targetPage.substring(1);" + DocletConstants.NL +
+                "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL +
+                "        targetPage = \"undefined\";" + DocletConstants.NL +
+                "    function validURL(url) {" + DocletConstants.NL +
+                "        try {" + DocletConstants.NL +
+                "            url = decodeURIComponent(url);" + DocletConstants.NL +
+                "        }" + DocletConstants.NL +
+                "        catch (error) {" + DocletConstants.NL +
+                "            return false;" + DocletConstants.NL +
+                "        }" + DocletConstants.NL +
+                "        var pos = url.indexOf(\".html\");" + DocletConstants.NL +
+                "        if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL +
+                "            return false;" + DocletConstants.NL +
+                "        var allowNumber = false;" + DocletConstants.NL +
+                "        var allowSep = false;" + DocletConstants.NL +
+                "        var seenDot = false;" + DocletConstants.NL +
+                "        for (var i = 0; i < url.length - 5; i++) {" + DocletConstants.NL +
+                "            var ch = url.charAt(i);" + DocletConstants.NL +
+                "            if ('a' <= ch && ch <= 'z' ||" + DocletConstants.NL +
+                "                    'A' <= ch && ch <= 'Z' ||" + DocletConstants.NL +
+                "                    ch == '$' ||" + DocletConstants.NL +
+                "                    ch == '_' ||" + DocletConstants.NL +
+                "                    ch.charCodeAt(0) > 127) {" + DocletConstants.NL +
+                "                allowNumber = true;" + DocletConstants.NL +
+                "                allowSep = true;" + DocletConstants.NL +
+                "            } else if ('0' <= ch && ch <= '9'" + DocletConstants.NL +
+                "                    || ch == '-') {" + DocletConstants.NL +
+                "                if (!allowNumber)" + DocletConstants.NL +
+                "                     return false;" + DocletConstants.NL +
+                "            } else if (ch == '/' || ch == '.') {" + DocletConstants.NL +
+                "                if (!allowSep)" + DocletConstants.NL +
+                "                    return false;" + DocletConstants.NL +
+                "                allowNumber = false;" + DocletConstants.NL +
+                "                allowSep = false;" + DocletConstants.NL +
+                "                if (ch == '.')" + DocletConstants.NL +
+                "                     seenDot = true;" + DocletConstants.NL +
+                "                if (ch == '/' && seenDot)" + DocletConstants.NL +
+                "                     return false;" + DocletConstants.NL +
+                "            } else {" + DocletConstants.NL +
+                "                return false;"+ DocletConstants.NL +
+                "            }" + DocletConstants.NL +
+                "        }" + DocletConstants.NL +
+                "        return true;" + DocletConstants.NL +
+                "    }" + DocletConstants.NL;
+        RawHtml scriptContent = new RawHtml(scriptCode);
+        script.addContent(scriptContent);
+        return script;
+    }
+
+    /**
+     * Returns an HtmlTree for the BODY tag.
+     *
+     * @param includeScript  set true if printing windowtitle script
+     * @param title title for the window
+     * @return an HtmlTree for the BODY tag
+     */
+    public HtmlTree getBody(boolean includeScript, String title) {
+        HtmlTree body = new HtmlTree(HtmlTag.BODY);
+        // Set window title string which is later printed
+        this.winTitle = title;
+        // Don't print windowtitle script for overview-frame, allclasses-frame
+        // and package-frame
+        if (includeScript) {
+            this.script = getWinTitleScript();
+            body.addContent(script);
+            Content noScript = HtmlTree.NOSCRIPT(
+                    HtmlTree.DIV(getResource("doclet.No_Script_Message")));
+            body.addContent(noScript);
+        }
+        return body;
+    }
+
+    /**
+     * Generated javascript variables for the document.
+     *
+     * @param typeMap map comprising of method and type relationship
+     * @param methodTypes set comprising of all methods types for this class
+     */
+    public void generateMethodTypesScript(Map<String,Integer> typeMap,
+            Set<MethodTypes> methodTypes) {
+        String sep = "";
+        StringBuilder vars = new StringBuilder("var methods = {");
+        for (Map.Entry<String,Integer> entry : typeMap.entrySet()) {
+            vars.append(sep);
+            sep = ",";
+            vars.append("\"")
+                    .append(entry.getKey())
+                    .append("\":")
+                    .append(entry.getValue());
+        }
+        vars.append("};").append(DocletConstants.NL);
+        sep = "";
+        vars.append("var tabs = {");
+        for (MethodTypes entry : methodTypes) {
+            vars.append(sep);
+            sep = ",";
+            vars.append(entry.value())
+                    .append(":")
+                    .append("[")
+                    .append("\"")
+                    .append(entry.tabId())
+                    .append("\"")
+                    .append(sep)
+                    .append("\"")
+                    .append(configuration.getText(entry.resourceKey()))
+                    .append("\"]");
+        }
+        vars.append("};")
+                .append(DocletConstants.NL);
+        addStyles(HtmlStyle.altColor, vars);
+        addStyles(HtmlStyle.rowColor, vars);
+        addStyles(HtmlStyle.tableTab, vars);
+        addStyles(HtmlStyle.activeTableTab, vars);
+        script.addContent(new RawHtml(vars.toString()));
+    }
+
+    /**
+     * Adds javascript style variables to the document.
+     *
+     * @param style style to be added as a javascript variable
+     * @param vars variable string to which the style variable will be added
+     */
+    public void addStyles(HtmlStyle style, StringBuilder vars) {
+        vars.append("var ").append(style).append(" = \"").append(style)
+                .append("\";").append(DocletConstants.NL);
+    }
+
+    /**
+     * Returns an HtmlTree for the TITLE tag.
+     *
+     * @return an HtmlTree for the TITLE tag
+     */
+    public HtmlTree getTitle() {
+        HtmlTree title = HtmlTree.TITLE(new StringContent(winTitle));
+        return title;
+    }
+
+    public String codeText(String text) {
+        return "<code>" + text + "</code>";
+    }
+
+    /**
+     * Return "&#38;nbsp;", non-breaking space.
+     */
+    public Content getSpace() {
+        return RawHtml.nbsp;
+    }
+
+    /*
+     * Returns a header for Modifier and Type column of a table.
+     */
+    public String getModifierTypeHeader() {
+        return modifierTypeHeader;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/RawHtml.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+
+/**
+ * Class for generating raw HTML content to be added to HTML pages of javadoc output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class RawHtml extends Content {
+
+    private String rawHtmlContent;
+
+    public static final Content nbsp = new RawHtml("&nbsp;");
+
+    /**
+     * Constructor to construct a RawHtml object.
+     *
+     * @param rawHtml raw HTML text to be added
+     */
+    public RawHtml(String rawHtml) {
+        rawHtmlContent = nullCheck(rawHtml);
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param content content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(Content content) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param stringContent string content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    public void addContent(String stringContent) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEmpty() {
+        return rawHtmlContent.isEmpty();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString() {
+        return rawHtmlContent;
+    }
+
+    private enum State { TEXT, ENTITY, TAG, STRING }
+
+    @Override
+    public int charCount() {
+        return charCount(rawHtmlContent);
+    }
+
+    static int charCount(String htmlText) {
+        State state = State.TEXT;
+        int count = 0;
+        for (int i = 0; i < htmlText.length(); i++) {
+            char c = htmlText.charAt(i);
+            switch (state) {
+                case TEXT:
+                    switch (c) {
+                        case '<':
+                            state = State.TAG;
+                            break;
+                        case '&':
+                            state = State.ENTITY;
+                            count++;
+                            break;
+                        default:
+                            count++;
+                    }
+                    break;
+
+                case ENTITY:
+                    if (!Character.isLetterOrDigit(c))
+                        state = State.TEXT;
+                    break;
+
+                case TAG:
+                    switch (c) {
+                        case '"':
+                            state = State.STRING;
+                            break;
+                        case '>':
+                            state = State.TEXT;
+                            break;
+                    }
+                    break;
+
+                case STRING:
+                    switch (c) {
+                        case '"':
+                            state = State.TAG;
+                            break;
+                    }
+            }
+        }
+        return count;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        out.write(rawHtmlContent);
+        return rawHtmlContent.endsWith(DocletConstants.NL);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/StringContent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.formats.html.markup;
+
+import java.io.IOException;
+import java.io.Writer;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+
+/**
+ * Class for generating string content for HTML tags of javadoc output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class StringContent extends Content {
+
+    private StringBuilder stringContent;
+
+    /**
+     * Constructor to construct StringContent object.
+     */
+    public StringContent() {
+        stringContent = new StringBuilder();
+    }
+
+    /**
+     * Constructor to construct StringContent object with some initial content.
+     *
+     * @param initialContent initial content for the object
+     */
+    public StringContent(String initialContent) {
+        stringContent = new StringBuilder();
+        appendChars(initialContent);
+    }
+
+    /**
+     * This method is not supported by the class.
+     *
+     * @param content content that needs to be added
+     * @throws DocletAbortException this method will always throw a
+     *                              DocletAbortException because it
+     *                              is not supported.
+     */
+    @Override
+    public void addContent(Content content) {
+        throw new DocletAbortException("not supported");
+    }
+
+    /**
+     * Adds content for the StringContent object.  The method escapes
+     * HTML characters for the string content that is added.
+     *
+     * @param strContent string content to be added
+     */
+    @Override
+    public void addContent(String strContent) {
+        appendChars(strContent);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean isEmpty() {
+        return (stringContent.length() == 0);
+    }
+
+    @Override
+    public int charCount() {
+        return RawHtml.charCount(stringContent.toString());
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString() {
+        return stringContent.toString();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        String s = stringContent.toString();
+        out.write(s);
+        return s.endsWith(DocletConstants.NL);
+    }
+
+    private void appendChars(String s) {
+        for (int i = 0; i < s.length(); i++) {
+            char ch = s.charAt(i);
+            switch (ch) {
+                case '<': stringContent.append("&lt;");  break;
+                case '>': stringContent.append("&gt;");  break;
+                case '&': stringContent.append("&amp;"); break;
+                default:  stringContent.append(ch);      break;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2007, 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.
+ */
+
+/**
+    This package contains classes that write HTML markup tags.
+
+    <p><b>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.</b>
+ */
+
+package jdk.javadoc.internal.doclets.formats.html.markup;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 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.
+ */
+
+/**
+ * This is the default HTML doclet provided with the JDK.
+ *
+ * <p>
+ * <b>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.</b>
+ */
+package jdk.javadoc.internal.doclets.formats.html;
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/glass.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/external/jquery/jquery.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,9789 @@
+/*!
+ * jQuery JavaScript Library v1.10.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03T13:48Z
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+	// The deferred used on DOM ready
+	readyList,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// Support: IE<10
+	// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+	core_strundefined = typeof undefined,
+
+	// Use the correct document accordingly with window argument (sandbox)
+	location = window.location,
+	document = window.document,
+	docElem = document.documentElement,
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// [[Class]] -> type pairs
+	class2type = {},
+
+	// List of deleted data cache ids, so we can reuse them
+	core_deletedIds = [],
+
+	core_version = "1.10.2",
+
+	// Save a reference to some core methods
+	core_concat = core_deletedIds.concat,
+	core_push = core_deletedIds.push,
+	core_slice = core_deletedIds.slice,
+	core_indexOf = core_deletedIds.indexOf,
+	core_toString = class2type.toString,
+	core_hasOwn = class2type.hasOwnProperty,
+	core_trim = core_version.trim,
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Used for matching numbers
+	core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+	// Used for splitting on whitespace
+	core_rnotwhite = /\S+/g,
+
+	// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([\da-z])/gi,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	},
+
+	// The ready event handler
+	completed = function( event ) {
+
+		// readyState === "complete" is good enough for us to call the dom ready in oldIE
+		if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+			detach();
+			jQuery.ready();
+		}
+	},
+	// Clean-up method for dom ready events
+	detach = function() {
+		if ( document.addEventListener ) {
+			document.removeEventListener( "DOMContentLoaded", completed, false );
+			window.removeEventListener( "load", completed, false );
+
+		} else {
+			document.detachEvent( "onreadystatechange", completed );
+			window.detachEvent( "onload", completed );
+		}
+	};
+
+jQuery.fn = jQuery.prototype = {
+	// The current version of jQuery being used
+	jquery: core_version,
+
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+
+					// scripts is true for back-compat
+					jQuery.merge( this, jQuery.parseHTML(
+						match[1],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return core_slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+		ret.context = this.context;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Add the callback
+		jQuery.ready.promise().done( fn );
+
+		return this;
+	},
+
+	slice: function() {
+		return this.pushStack( core_slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: core_push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var src, copyIsArray, copy, name, options, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+
+		// Abort if there are pending holds or we're already ready
+		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+			return;
+		}
+
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( !document.body ) {
+			return setTimeout( jQuery.ready );
+		}
+
+		// Remember that the DOM is ready
+		jQuery.isReady = true;
+
+		// If a normal DOM Ready event fired, decrement, and wait if need be
+		if ( wait !== true && --jQuery.readyWait > 0 ) {
+			return;
+		}
+
+		// If there are functions bound, to execute
+		readyList.resolveWith( document, [ jQuery ] );
+
+		// Trigger any bound ready events
+		if ( jQuery.fn.trigger ) {
+			jQuery( document ).trigger("ready").off("ready");
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		/* jshint eqeqeq: false */
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return String( obj );
+		}
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ core_toString.call(obj) ] || "object" :
+			typeof obj;
+	},
+
+	isPlainObject: function( obj ) {
+		var key;
+
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!core_hasOwn.call(obj, "constructor") &&
+				!core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Support: IE<9
+		// Handle iteration over inherited properties before own properties.
+		if ( jQuery.support.ownLast ) {
+			for ( key in obj ) {
+				return core_hasOwn.call( obj, key );
+			}
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+		for ( key in obj ) {}
+
+		return key === undefined || core_hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		var name;
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	// data: string of html
+	// context (optional): If specified, the fragment will be created in this context, defaults to document
+	// keepScripts (optional): If true, will include scripts passed in the html string
+	parseHTML: function( data, context, keepScripts ) {
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		if ( typeof context === "boolean" ) {
+			keepScripts = context;
+			context = false;
+		}
+		context = context || document;
+
+		var parsed = rsingleTag.exec( data ),
+			scripts = !keepScripts && [];
+
+		// Single tag
+		if ( parsed ) {
+			return [ context.createElement( parsed[1] ) ];
+		}
+
+		parsed = jQuery.buildFragment( [ data ], context, scripts );
+		if ( scripts ) {
+			jQuery( scripts ).remove();
+		}
+		return jQuery.merge( [], parsed.childNodes );
+	},
+
+	parseJSON: function( data ) {
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		if ( data === null ) {
+			return data;
+		}
+
+		if ( typeof data === "string" ) {
+
+			// Make sure leading/trailing whitespace is removed (IE can't handle it)
+			data = jQuery.trim( data );
+
+			if ( data ) {
+				// Make sure the incoming data is actual JSON
+				// Logic borrowed from http://json.org/json2.js
+				if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+					.replace( rvalidtokens, "]" )
+					.replace( rvalidbraces, "")) ) {
+
+					return ( new Function( "return " + data ) )();
+				}
+			}
+		}
+
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && jQuery.trim( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	// args is for internal usage only
+	each: function( obj, callback, args ) {
+		var value,
+			i = 0,
+			length = obj.length,
+			isArray = isArraylike( obj );
+
+		if ( args ) {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+		function( text ) {
+			return text == null ?
+				"" :
+				core_trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				( text + "" ).replace( rtrim, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArraylike( Object(arr) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				core_push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		var len;
+
+		if ( arr ) {
+			if ( core_indexOf ) {
+				return core_indexOf.call( arr, elem, i );
+			}
+
+			len = arr.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in arr && arr[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var l = second.length,
+			i = first.length,
+			j = 0;
+
+		if ( typeof l === "number" ) {
+			for ( ; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var retVal,
+			ret = [],
+			i = 0,
+			length = elems.length;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value,
+			i = 0,
+			length = elems.length,
+			isArray = isArraylike( elems ),
+			ret = [];
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return core_concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var args, proxy, tmp;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = core_slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Multifunctional method to get and set values of a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+		var i = 0,
+			length = elems.length,
+			bulk = key == null;
+
+		// Sets many values
+		if ( jQuery.type( key ) === "object" ) {
+			chainable = true;
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+			}
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			chainable = true;
+
+			if ( !jQuery.isFunction( value ) ) {
+				raw = true;
+			}
+
+			if ( bulk ) {
+				// Bulk operations run against the entire set
+				if ( raw ) {
+					fn.call( elems, value );
+					fn = null;
+
+				// ...except when executing function values
+				} else {
+					bulk = fn;
+					fn = function( elem, key, value ) {
+						return bulk.call( jQuery( elem ), value );
+					};
+				}
+			}
+
+			if ( fn ) {
+				for ( ; i < length; i++ ) {
+					fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+				}
+			}
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations.
+	// Note: this method belongs to the css module but it's needed here for the support module.
+	// If support gets modularized, this method should be moved back to the css module.
+	swap: function( elem, options, callback, args ) {
+		var ret, name,
+			old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.apply( elem, args || [] );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+		return ret;
+	}
+});
+
+jQuery.ready.promise = function( obj ) {
+	if ( !readyList ) {
+
+		readyList = jQuery.Deferred();
+
+		// Catch cases where $(document).ready() is called after the browser event has already occurred.
+		// we once tried to use readyState "interactive" here, but it caused issues like the one
+		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			setTimeout( jQuery.ready );
+
+		// Standards-based browsers support DOMContentLoaded
+		} else if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", completed, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", completed, false );
+
+		// If IE event model is used
+		} else {
+			// Ensure firing before onload, maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", completed );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", completed );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var top = false;
+
+			try {
+				top = window.frameElement == null && document.documentElement;
+			} catch(e) {}
+
+			if ( top && top.doScroll ) {
+				(function doScrollCheck() {
+					if ( !jQuery.isReady ) {
+
+						try {
+							// Use the trick by Diego Perini
+							// http://javascript.nwbox.com/IEContentLoaded/
+							top.doScroll("left");
+						} catch(e) {
+							return setTimeout( doScrollCheck, 50 );
+						}
+
+						// detach all dom ready events
+						detach();
+
+						// and execute any waiting functions
+						jQuery.ready();
+					}
+				})();
+			}
+		}
+	}
+	return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+	var length = obj.length,
+		type = jQuery.type( obj );
+
+	if ( jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	if ( obj.nodeType === 1 && length ) {
+		return true;
+	}
+
+	return type === "array" || type !== "function" &&
+		( length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.10.2
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03
+ */
+(function( window, undefined ) {
+
+var i,
+	support,
+	cachedruns,
+	Expr,
+	getText,
+	isXML,
+	compile,
+	outermostContext,
+	sortInput,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + -(new Date()),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	hasDuplicate = false,
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+		return 0;
+	},
+
+	// General-purpose constants
+	strundefined = typeof undefined,
+	MAX_NEGATIVE = 1 << 31,
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf if we can't use a native one
+	indexOf = arr.indexOf || function( elem ) {
+		var i = 0,
+			len = this.length;
+		for ( ; i < len; i++ ) {
+			if ( this[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+	// http://www.w3.org/TR/css3-syntax/#characters
+	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+	// Loosely modeled on CSS identifier characters
+	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = characterEncoding.replace( "w", "w#" ),
+
+	// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+		"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+	// Prefer arguments quoted,
+	//   then not containing pseudos/brackets,
+	//   then attribute selectors/non-parenthetical expressions,
+	//   then anything else
+	// These preferences are here to reduce the number of selectors
+	//   needing tokenize in the PSEUDO preFilter
+	pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rsibling = new RegExp( whitespace + "*[+~]" ),
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
+		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rescape = /'|\\/g,
+
+	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			// BMP codepoint
+			high < 0 ?
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	};
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var match, elem, m, nodeType,
+		// QSA vars
+		i, groups, old, nid, newContext, newSelector;
+
+	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+		setDocument( context );
+	}
+
+	context = context || document;
+	results = results || [];
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( documentIsHTML && !seed ) {
+
+		// Shortcuts
+		if ( (match = rquickExpr.exec( selector )) ) {
+			// Speed-up: Sizzle("#ID")
+			if ( (m = match[1]) ) {
+				if ( nodeType === 9 ) {
+					elem = context.getElementById( m );
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE, Opera, and Webkit return items
+						// by name instead of ID
+						if ( elem.id === m ) {
+							results.push( elem );
+							return results;
+						}
+					} else {
+						return results;
+					}
+				} else {
+					// Context is not a document
+					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+						contains( context, elem ) && elem.id === m ) {
+						results.push( elem );
+						return results;
+					}
+				}
+
+			// Speed-up: Sizzle("TAG")
+			} else if ( match[2] ) {
+				push.apply( results, context.getElementsByTagName( selector ) );
+				return results;
+
+			// Speed-up: Sizzle(".CLASS")
+			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+				push.apply( results, context.getElementsByClassName( m ) );
+				return results;
+			}
+		}
+
+		// QSA path
+		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+			nid = old = expando;
+			newContext = context;
+			newSelector = nodeType === 9 && selector;
+
+			// qSA works strangely on Element-rooted queries
+			// We can work around this by specifying an extra ID on the root
+			// and working up from there (Thanks to Andrew Dupont for the technique)
+			// IE 8 doesn't work on object elements
+			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+				groups = tokenize( selector );
+
+				if ( (old = context.getAttribute("id")) ) {
+					nid = old.replace( rescape, "\\$&" );
+				} else {
+					context.setAttribute( "id", nid );
+				}
+				nid = "[id='" + nid + "'] ";
+
+				i = groups.length;
+				while ( i-- ) {
+					groups[i] = nid + toSelector( groups[i] );
+				}
+				newContext = rsibling.test( selector ) && context.parentNode || context;
+				newSelector = groups.join(",");
+			}
+
+			if ( newSelector ) {
+				try {
+					push.apply( results,
+						newContext.querySelectorAll( newSelector )
+					);
+					return results;
+				} catch(qsaError) {
+				} finally {
+					if ( !old ) {
+						context.removeAttribute("id");
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key += " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+	var div = document.createElement("div");
+
+	try {
+		return !!fn( div );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( div.parentNode ) {
+			div.parentNode.removeChild( div );
+		}
+		// release memory in IE
+		div = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = attrs.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			( ~b.sourceIndex || MAX_NEGATIVE ) -
+			( ~a.sourceIndex || MAX_NEGATIVE );
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var doc = node ? node.ownerDocument || node : preferredDoc,
+		parent = doc.defaultView;
+
+	// If no document and documentElement is available, return
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Set our document
+	document = doc;
+	docElem = doc.documentElement;
+
+	// Support tests
+	documentIsHTML = !isXML( doc );
+
+	// Support: IE>8
+	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
+	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+	// IE6-8 do not support the defaultView property so parent will be undefined
+	if ( parent && parent.attachEvent && parent !== parent.top ) {
+		parent.attachEvent( "onbeforeunload", function() {
+			setDocument();
+		});
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+	support.attributes = assert(function( div ) {
+		div.className = "i";
+		return !div.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( div ) {
+		div.appendChild( doc.createComment("") );
+		return !div.getElementsByTagName("*").length;
+	});
+
+	// Check if getElementsByClassName can be trusted
+	support.getElementsByClassName = assert(function( div ) {
+		div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+		// Support: Safari<4
+		// Catch class over-caching
+		div.firstChild.className = "i";
+		// Support: Opera<10
+		// Catch gEBCN failure to find non-leading classes
+		return div.getElementsByClassName("i").length === 2;
+	});
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( div ) {
+		docElem.appendChild( div ).id = expando;
+		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+				var m = context.getElementById( id );
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== strundefined ) {
+				return context.getElementsByTagName( tag );
+			}
+		} :
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See http://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( div ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// http://bugs.jquery.com/ticket/12359
+			div.innerHTML = "<select><option selected=''></option></select>";
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !div.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+		});
+
+		assert(function( div ) {
+
+			// Support: Opera 10-12/IE8
+			// ^= $= *= and empty values
+			// Should not select anything
+			// Support: Windows 8 Native Apps
+			// The type attribute is restricted during .innerHTML assignment
+			var input = doc.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			div.appendChild( input ).setAttribute( "t", "" );
+
+			if ( div.querySelectorAll("[t^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":enabled").length ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			div.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( div ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( div, "div" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( div, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+
+	// Element contains another
+	// Purposefully does not implement inclusive descendent
+	// As in, an element does not contain itself
+	contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = docElem.compareDocumentPosition ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+		if ( compare ) {
+			// Disconnected nodes
+			if ( compare & 1 ||
+				(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+				// Choose the first element that is related to our preferred document
+				if ( a === doc || contains(preferredDoc, a) ) {
+					return -1;
+				}
+				if ( b === doc || contains(preferredDoc, b) ) {
+					return 1;
+				}
+
+				// Maintain original order
+				return sortInput ?
+					( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+					0;
+			}
+
+			return compare & 4 ? -1 : 1;
+		}
+
+		// Not directly comparable, sort on existence of method
+		return a.compareDocumentPosition ? -1 : 1;
+	} :
+	function( a, b ) {
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Parentless nodes are either documents or disconnected
+		} else if ( !aup || !bup ) {
+			return a === doc ? -1 :
+				b === doc ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch(e) {}
+	}
+
+	return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val === undefined ?
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null :
+		val;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		for ( ; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (see #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[5] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] && match[4] !== undefined ) {
+				match[2] = match[4];
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, outerCache, node, diff, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+							// Seek `elem` from a previously-cached index
+							outerCache = parent[ expando ] || (parent[ expando ] = {});
+							cache = outerCache[ type ] || [];
+							nodeIndex = cache[0] === dirruns && cache[1];
+							diff = cache[0] === dirruns && cache[2];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						// Use previously-cached element index if available
+						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+							diff = cache[1];
+
+						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+						} else {
+							// Use the same loop as above to seek `elem` from the start
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+									// Cache the index of each encountered element
+									if ( useCache ) {
+										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+									}
+
+									if ( node === elem ) {
+										break;
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf.call( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": function( elem ) {
+			return elem.disabled === false;
+		},
+
+		"disabled": function( elem ) {
+			return elem.disabled === true;
+		},
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+			//   not comment, processing instructions, or others
+			// Thanks to Diego Perini for the nodeName shortcut
+			//   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( tokens = [] );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		checkNonElements = base && dir === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var data, cache, outerCache,
+				dirkey = dirruns + " " + doneName;
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+						if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+							if ( (data = cache[1]) === true || data === cachedruns ) {
+								return data === true;
+							}
+						} else {
+							cache = outerCache[ dir ] = [ dirkey ];
+							cache[1] = matcher( elem, context, xml ) || cachedruns;
+							if ( cache[1] === true ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf.call( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	// A counter to specify which element is currently being matched
+	var matcherCachedRuns = 0,
+		bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, expandContext ) {
+			var elem, j, matcher,
+				setMatched = [],
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				outermost = expandContext != null,
+				contextBackup = outermostContext,
+				// We must always have either seed elements or context
+				elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+			if ( outermost ) {
+				outermostContext = context !== document && context;
+				cachedruns = matcherCachedRuns;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+			for ( ; (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context, xml ) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+						cachedruns = ++matcherCachedRuns;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// Apply set filters to unmatched elements
+			matchedCount += i;
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !group ) {
+			group = tokenize( selector );
+		}
+		i = group.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( group[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+	}
+	return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function select( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		match = tokenize( selector );
+
+	if ( !seed ) {
+		// Try to minimize operations if there is only one group
+		if ( match.length === 1 ) {
+
+			// Take a shortcut and set the context if the root selector is an ID
+			tokens = match[0] = match[0].slice( 0 );
+			if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+					support.getById && context.nodeType === 9 && documentIsHTML &&
+					Expr.relative[ tokens[1].type ] ) {
+
+				context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+				if ( !context ) {
+					return results;
+				}
+				selector = selector.slice( tokens.shift().value.length );
+			}
+
+			// Fetch a seed set for right-to-left matching
+			i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+			while ( i-- ) {
+				token = tokens[i];
+
+				// Abort if we hit a combinator
+				if ( Expr.relative[ (type = token.type) ] ) {
+					break;
+				}
+				if ( (find = Expr.find[ type ]) ) {
+					// Search, expanding context for leading sibling combinators
+					if ( (seed = find(
+						token.matches[0].replace( runescape, funescape ),
+						rsibling.test( tokens[0].type ) && context.parentNode || context
+					)) ) {
+
+						// If seed is empty or no tokens remain, we can return early
+						tokens.splice( i, 1 );
+						selector = seed.length && toSelector( tokens );
+						if ( !selector ) {
+							push.apply( results, seed );
+							return results;
+						}
+
+						break;
+					}
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function
+	// Provide `match` to avoid retokenization if we modified the selector above
+	compile( selector, match )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		rsibling.test( selector )
+	);
+	return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+	// Should return 1, but returns 4 (following)
+	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+	div.innerHTML = "<a href='#'></a>";
+	return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+	div.innerHTML = "<input/>";
+	div.firstChild.setAttribute( "value", "" );
+	return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+	return div.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return (val = elem.getAttributeNode( name )) && val.specified ?
+				val.value :
+				elem[ name ] === true ? name.toLowerCase() : null;
+		}
+	});
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+	var object = optionsCache[ options ] = {};
+	jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	});
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		( optionsCache[ options ] || createOptions( options ) ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = !options.once && [],
+		// Fire callbacks
+		fire = function( data ) {
+			memory = options.memory && data;
+			fired = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			firing = true;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+					memory = false; // To prevent further calls using add
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( stack ) {
+					if ( stack.length ) {
+						fire( stack.shift() );
+					}
+				} else if ( memory ) {
+					list = [];
+				} else {
+					self.disable();
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					// First, we save the current length
+					var start = list.length;
+					(function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							var type = jQuery.type( arg );
+							if ( type === "function" ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.length && type !== "string" ) {
+								// Inspect recursively
+								add( arg );
+							}
+						});
+					})( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away
+					} else if ( memory ) {
+						firingStart = start;
+						fire( memory );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					jQuery.each( arguments, function( _, arg ) {
+						var index;
+						while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+							list.splice( index, 1 );
+							// Handle firing indexes
+							if ( firing ) {
+								if ( index <= firingLength ) {
+									firingLength--;
+								}
+								if ( index <= firingIndex ) {
+									firingIndex--;
+								}
+							}
+						}
+					});
+				}
+				return this;
+			},
+			// Check if a given callback is in the list.
+			// If no argument is given, return whether or not list has callbacks attached.
+			has: function( fn ) {
+				return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				firingLength = 0;
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory ) {
+					self.disable();
+				}
+				return this;
+			},
+			// Is it locked?
+			locked: function() {
+				return !stack;
+			},
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( list && ( !fired || stack ) ) {
+					args = args || [];
+					args = [ context, args.slice ? args.slice() : args ];
+					if ( firing ) {
+						stack.push( args );
+					} else {
+						fire( args );
+					}
+				}
+				return this;
+			},
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!fired;
+			}
+		};
+
+	return self;
+};
+jQuery.extend({
+
+	Deferred: function( func ) {
+		var tuples = [
+				// action, add listener, listener list, final state
+				[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+				[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+				[ "notify", "progress", jQuery.Callbacks("memory") ]
+			],
+			state = "pending",
+			promise = {
+				state: function() {
+					return state;
+				},
+				always: function() {
+					deferred.done( arguments ).fail( arguments );
+					return this;
+				},
+				then: function( /* fnDone, fnFail, fnProgress */ ) {
+					var fns = arguments;
+					return jQuery.Deferred(function( newDefer ) {
+						jQuery.each( tuples, function( i, tuple ) {
+							var action = tuple[ 0 ],
+								fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+							// deferred[ done | fail | progress ] for forwarding actions to newDefer
+							deferred[ tuple[1] ](function() {
+								var returned = fn && fn.apply( this, arguments );
+								if ( returned && jQuery.isFunction( returned.promise ) ) {
+									returned.promise()
+										.done( newDefer.resolve )
+										.fail( newDefer.reject )
+										.progress( newDefer.notify );
+								} else {
+									newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+								}
+							});
+						});
+						fns = null;
+					}).promise();
+				},
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					return obj != null ? jQuery.extend( obj, promise ) : promise;
+				}
+			},
+			deferred = {};
+
+		// Keep pipe for back-compat
+		promise.pipe = promise.then;
+
+		// Add list-specific methods
+		jQuery.each( tuples, function( i, tuple ) {
+			var list = tuple[ 2 ],
+				stateString = tuple[ 3 ];
+
+			// promise[ done | fail | progress ] = list.add
+			promise[ tuple[1] ] = list.add;
+
+			// Handle state
+			if ( stateString ) {
+				list.add(function() {
+					// state = [ resolved | rejected ]
+					state = stateString;
+
+				// [ reject_list | resolve_list ].disable; progress_list.lock
+				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+			}
+
+			// deferred[ resolve | reject | notify ]
+			deferred[ tuple[0] ] = function() {
+				deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+				return this;
+			};
+			deferred[ tuple[0] + "With" ] = list.fireWith;
+		});
+
+		// Make the deferred a promise
+		promise.promise( deferred );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( subordinate /* , ..., subordinateN */ ) {
+		var i = 0,
+			resolveValues = core_slice.call( arguments ),
+			length = resolveValues.length,
+
+			// the count of uncompleted subordinates
+			remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+			// the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+			// Update function for both resolve and progress values
+			updateFunc = function( i, contexts, values ) {
+				return function( value ) {
+					contexts[ i ] = this;
+					values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+					if( values === progressValues ) {
+						deferred.notifyWith( contexts, values );
+					} else if ( !( --remaining ) ) {
+						deferred.resolveWith( contexts, values );
+					}
+				};
+			},
+
+			progressValues, progressContexts, resolveContexts;
+
+		// add listeners to Deferred subordinates; treat others as resolved
+		if ( length > 1 ) {
+			progressValues = new Array( length );
+			progressContexts = new Array( length );
+			resolveContexts = new Array( length );
+			for ( ; i < length; i++ ) {
+				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+					resolveValues[ i ].promise()
+						.done( updateFunc( i, resolveContexts, resolveValues ) )
+						.fail( deferred.reject )
+						.progress( updateFunc( i, progressContexts, progressValues ) );
+				} else {
+					--remaining;
+				}
+			}
+		}
+
+		// if we're not waiting on anything, resolve the master
+		if ( !remaining ) {
+			deferred.resolveWith( resolveContexts, resolveValues );
+		}
+
+		return deferred.promise();
+	}
+});
+jQuery.support = (function( support ) {
+
+	var all, a, input, select, fragment, opt, eventName, isSupported, i,
+		div = document.createElement("div");
+
+	// Setup
+	div.setAttribute( "className", "t" );
+	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+	// Finish early in limited (non-browser) environments
+	all = div.getElementsByTagName("*") || [];
+	a = div.getElementsByTagName("a")[ 0 ];
+	if ( !a || !a.style || !all.length ) {
+		return support;
+	}
+
+	// First batch of tests
+	select = document.createElement("select");
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName("input")[ 0 ];
+
+	a.style.cssText = "top:1px;float:left;opacity:.5";
+
+	// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+	support.getSetAttribute = div.className !== "t";
+
+	// IE strips leading whitespace when .innerHTML is used
+	support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+	// Make sure that tbody elements aren't automatically inserted
+	// IE will insert them into empty tables
+	support.tbody = !div.getElementsByTagName("tbody").length;
+
+	// Make sure that link elements get serialized correctly by innerHTML
+	// This requires a wrapper element in IE
+	support.htmlSerialize = !!div.getElementsByTagName("link").length;
+
+	// Get the style information from getAttribute
+	// (IE uses .cssText instead)
+	support.style = /top/.test( a.getAttribute("style") );
+
+	// Make sure that URLs aren't manipulated
+	// (IE normalizes it by default)
+	support.hrefNormalized = a.getAttribute("href") === "/a";
+
+	// Make sure that element opacity exists
+	// (IE uses filter instead)
+	// Use a regex to work around a WebKit issue. See #5145
+	support.opacity = /^0.5/.test( a.style.opacity );
+
+	// Verify style float existence
+	// (IE uses styleFloat instead of cssFloat)
+	support.cssFloat = !!a.style.cssFloat;
+
+	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+	support.checkOn = !!input.value;
+
+	// Make sure that a selected-by-default option has a working selected property.
+	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+	support.optSelected = opt.selected;
+
+	// Tests for enctype support on a form (#6743)
+	support.enctype = !!document.createElement("form").enctype;
+
+	// Makes sure cloning an html5 element does not cause problems
+	// Where outerHTML is undefined, this still works
+	support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
+
+	// Will be defined later
+	support.inlineBlockNeedsLayout = false;
+	support.shrinkWrapBlocks = false;
+	support.pixelPosition = false;
+	support.deleteExpando = true;
+	support.noCloneEvent = true;
+	support.reliableMarginRight = true;
+	support.boxSizingReliable = true;
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Support: IE<9
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	// Check if we can trust getAttribute("value")
+	input = document.createElement("input");
+	input.setAttribute( "value", "" );
+	support.input = input.getAttribute( "value" ) === "";
+
+	// Check if an input maintains its value after becoming a radio
+	input.value = "t";
+	input.setAttribute( "type", "radio" );
+	support.radioValue = input.value === "t";
+
+	// #11217 - WebKit loses check when the name is after the checked attribute
+	input.setAttribute( "checked", "t" );
+	input.setAttribute( "name", "t" );
+
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( input );
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Support: IE<9
+	// Opera does not clone events (and typeof div.attachEvent === undefined).
+	// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+	if ( div.attachEvent ) {
+		div.attachEvent( "onclick", function() {
+			support.noCloneEvent = false;
+		});
+
+		div.cloneNode( true ).click();
+	}
+
+	// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
+	// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+	for ( i in { submit: true, change: true, focusin: true }) {
+		div.setAttribute( eventName = "on" + i, "t" );
+
+		support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
+	}
+
+	div.style.backgroundClip = "content-box";
+	div.cloneNode( true ).style.backgroundClip = "";
+	support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+	// Support: IE<9
+	// Iteration over object's inherited properties before its own.
+	for ( i in jQuery( support ) ) {
+		break;
+	}
+	support.ownLast = i !== "0";
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, marginDiv, tds,
+			divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		container = document.createElement("div");
+		container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+		body.appendChild( container ).appendChild( div );
+
+		// Support: IE8
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+		tds = div.getElementsByTagName("td");
+		tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+		isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+		tds[ 0 ].style.display = "";
+		tds[ 1 ].style.display = "none";
+
+		// Support: IE8
+		// Check if empty table cells still have offsetWidth/Height
+		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+		// Check box-sizing and margin behavior.
+		div.innerHTML = "";
+		div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+
+		// Workaround failing boxSizing test due to offsetWidth returning wrong value
+		// with some non-1 values of body zoom, ticket #13543
+		jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
+			support.boxSizing = div.offsetWidth === 4;
+		});
+
+		// Use window.getComputedStyle because jsdom on node.js will break without it.
+		if ( window.getComputedStyle ) {
+			support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+			support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+			// Check if div with explicit width and no margin-right incorrectly
+			// gets computed margin-right based on width of container. (#3333)
+			// Fails in WebKit before Feb 2011 nightlies
+			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+			marginDiv = div.appendChild( document.createElement("div") );
+			marginDiv.style.cssText = div.style.cssText = divReset;
+			marginDiv.style.marginRight = marginDiv.style.width = "0";
+			div.style.width = "1px";
+
+			support.reliableMarginRight =
+				!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+		}
+
+		if ( typeof div.style.zoom !== core_strundefined ) {
+			// Support: IE<8
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			div.innerHTML = "";
+			div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+			// Support: IE6
+			// Check if elements with layout shrink-wrap their children
+			div.style.display = "block";
+			div.innerHTML = "<div></div>";
+			div.firstChild.style.width = "5px";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+			if ( support.inlineBlockNeedsLayout ) {
+				// Prevent IE 6 from affecting layout for positioned elements #11048
+				// Prevent IE from shrinking the body in IE 7 mode #12869
+				// Support: IE<8
+				body.style.zoom = 1;
+			}
+		}
+
+		body.removeChild( container );
+
+		// Null elements to avoid leaks in IE
+		container = div = tds = marginDiv = null;
+	});
+
+	// Null elements to avoid leaks in IE
+	all = select = fragment = opt = a = input = null;
+
+	return support;
+})({});
+
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ){
+	if ( !jQuery.acceptData( elem ) ) {
+		return;
+	}
+
+	var ret, thisCache,
+		internalKey = jQuery.expando,
+
+		// We have to handle DOM nodes and JS objects differently because IE6-7
+		// can't GC object references properly across the DOM-JS boundary
+		isNode = elem.nodeType,
+
+		// Only DOM nodes need the global jQuery cache; JS object data is
+		// attached directly to the object so GC can occur automatically
+		cache = isNode ? jQuery.cache : elem,
+
+		// Only defining an ID for JS objects if its cache already exists allows
+		// the code to shortcut on the same path as a DOM node with no cache
+		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+	// Avoid doing any more work than we need to when trying to get data on an
+	// object that has no data at all
+	if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
+		return;
+	}
+
+	if ( !id ) {
+		// Only DOM nodes need a new unique ID for each element since their data
+		// ends up in the global cache
+		if ( isNode ) {
+			id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
+		} else {
+			id = internalKey;
+		}
+	}
+
+	if ( !cache[ id ] ) {
+		// Avoid exposing jQuery metadata on plain JS objects when the object
+		// is serialized using JSON.stringify
+		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
+	}
+
+	// An object can be passed to jQuery.data instead of a key/value pair; this gets
+	// shallow copied over onto the existing cache
+	if ( typeof name === "object" || typeof name === "function" ) {
+		if ( pvt ) {
+			cache[ id ] = jQuery.extend( cache[ id ], name );
+		} else {
+			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+		}
+	}
+
+	thisCache = cache[ id ];
+
+	// jQuery data() is stored in a separate object inside the object's internal data
+	// cache in order to avoid key collisions between internal data and user-defined
+	// data.
+	if ( !pvt ) {
+		if ( !thisCache.data ) {
+			thisCache.data = {};
+		}
+
+		thisCache = thisCache.data;
+	}
+
+	if ( data !== undefined ) {
+		thisCache[ jQuery.camelCase( name ) ] = data;
+	}
+
+	// Check for both converted-to-camel and non-converted data property names
+	// If a data property was specified
+	if ( typeof name === "string" ) {
+
+		// First Try to find as-is property data
+		ret = thisCache[ name ];
+
+		// Test for null|undefined property data
+		if ( ret == null ) {
+
+			// Try to find the camelCased property
+			ret = thisCache[ jQuery.camelCase( name ) ];
+		}
+	} else {
+		ret = thisCache;
+	}
+
+	return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+	if ( !jQuery.acceptData( elem ) ) {
+		return;
+	}
+
+	var thisCache, i,
+		isNode = elem.nodeType,
+
+		// See jQuery.data for more information
+		cache = isNode ? jQuery.cache : elem,
+		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+	// If there is already no cache entry for this object, there is no
+	// purpose in continuing
+	if ( !cache[ id ] ) {
+		return;
+	}
+
+	if ( name ) {
+
+		thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+		if ( thisCache ) {
+
+			// Support array or space separated string names for data keys
+			if ( !jQuery.isArray( name ) ) {
+
+				// try the string as a key before any manipulation
+				if ( name in thisCache ) {
+					name = [ name ];
+				} else {
+
+					// split the camel cased version by spaces unless a key with the spaces exists
+					name = jQuery.camelCase( name );
+					if ( name in thisCache ) {
+						name = [ name ];
+					} else {
+						name = name.split(" ");
+					}
+				}
+			} else {
+				// If "name" is an array of keys...
+				// When data is initially created, via ("key", "val") signature,
+				// keys will be converted to camelCase.
+				// Since there is no way to tell _how_ a key was added, remove
+				// both plain key and camelCase key. #12786
+				// This will only penalize the array argument path.
+				name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+			}
+
+			i = name.length;
+			while ( i-- ) {
+				delete thisCache[ name[i] ];
+			}
+
+			// If there is no data left in the cache, we want to continue
+			// and let the cache object itself get destroyed
+			if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
+				return;
+			}
+		}
+	}
+
+	// See jQuery.data for more information
+	if ( !pvt ) {
+		delete cache[ id ].data;
+
+		// Don't destroy the parent cache unless the internal data object
+		// had been the only thing left in it
+		if ( !isEmptyDataObject( cache[ id ] ) ) {
+			return;
+		}
+	}
+
+	// Destroy the cache
+	if ( isNode ) {
+		jQuery.cleanData( [ elem ], true );
+
+	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+	/* jshint eqeqeq: false */
+	} else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+		/* jshint eqeqeq: true */
+		delete cache[ id ];
+
+	// When all else fails, null
+	} else {
+		cache[ id ] = null;
+	}
+}
+
+jQuery.extend({
+	cache: {},
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"applet": true,
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data ) {
+		return internalData( elem, name, data );
+	},
+
+	removeData: function( elem, name ) {
+		return internalRemoveData( elem, name );
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return internalData( elem, name, data, true );
+	},
+
+	_removeData: function( elem, name ) {
+		return internalRemoveData( elem, name, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		// Do not set data on non-element because it will not be cleared (#8335).
+		if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
+			return false;
+		}
+
+		var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+		// nodes accept data unless otherwise specified; rejection can be conditional
+		return !noData || noData !== true && elem.getAttribute("classid") === noData;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var attrs, name,
+			data = null,
+			i = 0,
+			elem = this[0];
+
+		// Special expections of .data basically thwart jQuery.access,
+		// so implement the relevant behavior ourselves
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = jQuery.data( elem );
+
+				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+					attrs = elem.attributes;
+					for ( ; i < attrs.length; i++ ) {
+						name = attrs[i].name;
+
+						if ( name.indexOf("data-") === 0 ) {
+							name = jQuery.camelCase( name.slice(5) );
+
+							dataAttr( elem, name, data[ name ] );
+						}
+					}
+					jQuery._data( elem, "parsedAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		return arguments.length > 1 ?
+
+			// Sets one value
+			this.each(function() {
+				jQuery.data( this, key, value );
+			}) :
+
+			// Gets one value
+			// Try to fetch any internally stored data first
+			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+					data === "false" ? false :
+					data === "null" ? null :
+					// Only convert to a number if it doesn't change the string
+					+data + "" === data ? +data :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+						data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+	var name;
+	for ( name in obj ) {
+
+		// if the public data object is empty, the private is still empty
+		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+			continue;
+		}
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+jQuery.extend({
+	queue: function( elem, type, data ) {
+		var queue;
+
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			queue = jQuery._data( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !queue || jQuery.isArray(data) ) {
+					queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+				} else {
+					queue.push( data );
+				}
+			}
+			return queue || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			startLength = queue.length,
+			fn = queue.shift(),
+			hooks = jQuery._queueHooks( elem, type ),
+			next = function() {
+				jQuery.dequeue( elem, type );
+			};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+			startLength--;
+		}
+
+		if ( fn ) {
+
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			// clear up the last queue stop function
+			delete hooks.stop;
+			fn.call( elem, next, hooks );
+		}
+
+		if ( !startLength && hooks ) {
+			hooks.empty.fire();
+		}
+	},
+
+	// not intended for public consumption - generates a queueHooks object, or returns the current one
+	_queueHooks: function( elem, type ) {
+		var key = type + "queueHooks";
+		return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+			empty: jQuery.Callbacks("once memory").add(function() {
+				jQuery._removeData( elem, type + "queue" );
+				jQuery._removeData( elem, key );
+			})
+		});
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[0], type );
+		}
+
+		return data === undefined ?
+			this :
+			this.each(function() {
+				var queue = jQuery.queue( this, type, data );
+
+				// ensure a hooks for this queue
+				jQuery._queueHooks( this, type );
+
+				if ( type === "fx" && queue[0] !== "inprogress" ) {
+					jQuery.dequeue( this, type );
+				}
+			});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function( next, hooks ) {
+			var timeout = setTimeout( next, time );
+			hooks.stop = function() {
+				clearTimeout( timeout );
+			};
+		});
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, obj ) {
+		var tmp,
+			count = 1,
+			defer = jQuery.Deferred(),
+			elements = this,
+			i = this.length,
+			resolve = function() {
+				if ( !( --count ) ) {
+					defer.resolveWith( elements, [ elements ] );
+				}
+			};
+
+		if ( typeof type !== "string" ) {
+			obj = type;
+			type = undefined;
+		}
+		type = type || "fx";
+
+		while( i-- ) {
+			tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+			if ( tmp && tmp.empty ) {
+				count++;
+				tmp.empty.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise( obj );
+	}
+});
+var nodeHook, boolHook,
+	rclass = /[\t\r\n\f]/g,
+	rreturn = /\r/g,
+	rfocusable = /^(?:input|select|textarea|button|object)$/i,
+	rclickable = /^(?:a|area)$/i,
+	ruseDefault = /^(?:checked|selected)$/i,
+	getSetAttribute = jQuery.support.getSetAttribute,
+	getSetInput = jQuery.support.input;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classes, elem, cur, clazz, j,
+			i = 0,
+			len = this.length,
+			proceed = typeof value === "string" && value;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call( this, j, this.className ) );
+			});
+		}
+
+		if ( proceed ) {
+			// The disjunction here is for better compressibility (see removeClass)
+			classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+			for ( ; i < len; i++ ) {
+				elem = this[ i ];
+				cur = elem.nodeType === 1 && ( elem.className ?
+					( " " + elem.className + " " ).replace( rclass, " " ) :
+					" "
+				);
+
+				if ( cur ) {
+					j = 0;
+					while ( (clazz = classes[j++]) ) {
+						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+							cur += clazz + " ";
+						}
+					}
+					elem.className = jQuery.trim( cur );
+
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classes, elem, cur, clazz, j,
+			i = 0,
+			len = this.length,
+			proceed = arguments.length === 0 || typeof value === "string" && value;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call( this, j, this.className ) );
+			});
+		}
+		if ( proceed ) {
+			classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+			for ( ; i < len; i++ ) {
+				elem = this[ i ];
+				// This expression is here for better compressibility (see addClass)
+				cur = elem.nodeType === 1 && ( elem.className ?
+					( " " + elem.className + " " ).replace( rclass, " " ) :
+					""
+				);
+
+				if ( cur ) {
+					j = 0;
+					while ( (clazz = classes[j++]) ) {
+						// Remove *all* instances
+						while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+							cur = cur.replace( " " + clazz + " ", " " );
+						}
+					}
+					elem.className = value ? jQuery.trim( cur ) : "";
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value;
+
+		if ( typeof stateVal === "boolean" && type === "string" ) {
+			return stateVal ? this.addClass( value ) : this.removeClass( value );
+		}
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( i ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					classNames = value.match( core_rnotwhite ) || [];
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space separated list
+					if ( self.hasClass( className ) ) {
+						self.removeClass( className );
+					} else {
+						self.addClass( className );
+					}
+				}
+
+			// Toggle whole class name
+			} else if ( type === core_strundefined || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// If the element has a class name or if we're passed "false",
+				// then remove the whole classname (if there was one, the above saved it).
+				// Otherwise bring back whatever was previously saved (if anything),
+				// falling back to the empty string if nothing was stored.
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ",
+			i = 0,
+			l = this.length;
+		for ( ; i < l; i++ ) {
+			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var ret, hooks, isFunction,
+			elem = this[0];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+					// handle most common string cases
+					ret.replace(rreturn, "") :
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, jQuery( this ).val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// Use proper attribute retrieval(#6932, #12072)
+				var val = jQuery.find.attr( elem, "value" );
+				return val != null ?
+					val :
+					elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, option,
+					options = elem.options,
+					index = elem.selectedIndex,
+					one = elem.type === "select-one" || index < 0,
+					values = one ? null : [],
+					max = one ? index + 1 : options.length,
+					i = index < 0 ?
+						max :
+						one ? index : 0;
+
+				// Loop through all the selected options
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// oldIE doesn't update selected after form reset (#2551)
+					if ( ( option.selected || i === index ) &&
+							// Don't return options that are disabled or in a disabled optgroup
+							( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+							( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var optionSet, option,
+					options = elem.options,
+					values = jQuery.makeArray( value ),
+					i = options.length;
+
+				while ( i-- ) {
+					option = options[ i ];
+					if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
+						optionSet = true;
+					}
+				}
+
+				// force browsers to behave consistently when non-matching value is set
+				if ( !optionSet ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attr: function( elem, name, value ) {
+		var hooks, ret,
+			nType = elem.nodeType;
+
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === core_strundefined ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		// All attributes are lowercase
+		// Grab necessary hook if one is defined
+		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+			name = name.toLowerCase();
+			hooks = jQuery.attrHooks[ name ] ||
+				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+
+			} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, value + "" );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+			ret = jQuery.find.attr( elem, name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret == null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var name, propName,
+			i = 0,
+			attrNames = value && value.match( core_rnotwhite );
+
+		if ( attrNames && elem.nodeType === 1 ) {
+			while ( (name = attrNames[i++]) ) {
+				propName = jQuery.propFix[ name ] || name;
+
+				// Boolean attributes get special treatment (#10870)
+				if ( jQuery.expr.match.bool.test( name ) ) {
+					// Set corresponding property to false
+					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+						elem[ propName ] = false;
+					// Support: IE<9
+					// Also clear defaultChecked/defaultSelected (if appropriate)
+					} else {
+						elem[ jQuery.camelCase( "default-" + name ) ] =
+							elem[ propName ] = false;
+					}
+
+				// See #9699 for explanation of this approach (setting first, then removal)
+				} else {
+					jQuery.attr( elem, name, "" );
+				}
+
+				elem.removeAttribute( getSetAttribute ? name : propName );
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to default in case type is set after value during creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		}
+	},
+
+	propFix: {
+		"for": "htmlFor",
+		"class": "className"
+	},
+
+	prop: function( elem, name, value ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+				ret :
+				( elem[ name ] = value );
+
+		} else {
+			return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+				ret :
+				elem[ name ];
+		}
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				// Use proper attribute retrieval(#12072)
+				var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+				return tabindex ?
+					parseInt( tabindex, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						-1;
+			}
+		}
+	}
+});
+
+// Hooks for boolean attributes
+boolHook = {
+	set: function( elem, value, name ) {
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+			// IE<8 needs the *property* name
+			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+		// Use defaultChecked and defaultSelected for oldIE
+		} else {
+			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+		}
+
+		return name;
+	}
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+	var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
+
+	jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
+		function( elem, name, isXML ) {
+			var fn = jQuery.expr.attrHandle[ name ],
+				ret = isXML ?
+					undefined :
+					/* jshint eqeqeq: false */
+					(jQuery.expr.attrHandle[ name ] = undefined) !=
+						getter( elem, name, isXML ) ?
+
+						name.toLowerCase() :
+						null;
+			jQuery.expr.attrHandle[ name ] = fn;
+			return ret;
+		} :
+		function( elem, name, isXML ) {
+			return isXML ?
+				undefined :
+				elem[ jQuery.camelCase( "default-" + name ) ] ?
+					name.toLowerCase() :
+					null;
+		};
+});
+
+// fix oldIE attroperties
+if ( !getSetInput || !getSetAttribute ) {
+	jQuery.attrHooks.value = {
+		set: function( elem, value, name ) {
+			if ( jQuery.nodeName( elem, "input" ) ) {
+				// Does not return so that setAttribute is also used
+				elem.defaultValue = value;
+			} else {
+				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
+				return nodeHook && nodeHook.set( elem, value, name );
+			}
+		}
+	};
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = {
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				elem.setAttributeNode(
+					(ret = elem.ownerDocument.createAttribute( name ))
+				);
+			}
+
+			ret.value = value += "";
+
+			// Break association with cloned elements by also using setAttribute (#9646)
+			return name === "value" || value === elem.getAttribute( name ) ?
+				value :
+				undefined;
+		}
+	};
+	jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
+		// Some attributes are constructed with empty-string values when not defined
+		function( elem, name, isXML ) {
+			var ret;
+			return isXML ?
+				undefined :
+				(ret = elem.getAttributeNode( name )) && ret.value !== "" ?
+					ret.value :
+					null;
+		};
+	jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret = elem.getAttributeNode( name );
+			return ret && ret.specified ?
+				ret.value :
+				undefined;
+		},
+		set: nodeHook.set
+	};
+
+	// Set contenteditable to false on removals(#10429)
+	// Setting to empty string throws an error as an invalid value
+	jQuery.attrHooks.contenteditable = {
+		set: function( elem, value, name ) {
+			nodeHook.set( elem, value === "" ? false : value, name );
+		}
+	};
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		};
+	});
+}
+
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !jQuery.support.hrefNormalized ) {
+	// href/src property should get the full normalized URL (#10299/#12915)
+	jQuery.each([ "href", "src" ], function( i, name ) {
+		jQuery.propHooks[ name ] = {
+			get: function( elem ) {
+				return elem.getAttribute( name, 4 );
+			}
+		};
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Note: IE uppercases css property names, but if we were to .toLowerCase()
+			// .cssText, that would destroy case senstitivity in URL's, like in "background"
+			return elem.style.cssText || undefined;
+		},
+		set: function( elem, value ) {
+			return ( elem.style.cssText = value + "" );
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	};
+}
+
+jQuery.each([
+	"tabIndex",
+	"readOnly",
+	"maxLength",
+	"cellSpacing",
+	"cellPadding",
+	"rowSpan",
+	"colSpan",
+	"useMap",
+	"frameBorder",
+	"contentEditable"
+], function() {
+	jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+	jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+			}
+		}
+	};
+	if ( !jQuery.support.checkOn ) {
+		jQuery.valHooks[ this ].get = function( elem ) {
+			// Support: Webkit
+			// "" is returned instead of "on" if a value isn't specified
+			return elem.getAttribute("value") === null ? "on" : elem.value;
+		};
+	}
+});
+var rformElems = /^(?:input|select|textarea)$/i,
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|contextmenu)|click/,
+	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+	rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+	return true;
+}
+
+function returnFalse() {
+	return false;
+}
+
+function safeActiveElement() {
+	try {
+		return document.activeElement;
+	} catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	global: {},
+
+	add: function( elem, types, handler, data, selector ) {
+		var tmp, events, t, handleObjIn,
+			special, eventHandle, handleObj,
+			handlers, type, namespaces, origType,
+			elemData = jQuery._data( elem );
+
+		// Don't attach events to noData or text/comment nodes (but allow plain objects)
+		if ( !elemData ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+			selector = handleObjIn.selector;
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		if ( !(events = elemData.events) ) {
+			events = elemData.events = {};
+		}
+		if ( !(eventHandle = elemData.handle) ) {
+			eventHandle = elemData.handle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+			eventHandle.elem = elem;
+		}
+
+		// Handle multiple events separated by a space
+		types = ( types || "" ).match( core_rnotwhite ) || [""];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tmp[1];
+			namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+			// There *must* be a type, no attaching namespace-only handlers
+			if ( !type ) {
+				continue;
+			}
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend({
+				type: type,
+				origType: origType,
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+				namespace: namespaces.join(".")
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			if ( !(handlers = events[ type ]) ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener/attachEvent if the special events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+		var j, handleObj, tmp,
+			origCount, t, events,
+			special, handlers, type,
+			namespaces, origType,
+			elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+		if ( !elemData || !(events = elemData.events) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = ( types || "" ).match( core_rnotwhite ) || [""];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tmp[1];
+			namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+			handlers = events[ type ] || [];
+			tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+			// Remove matching events
+			origCount = j = handlers.length;
+			while ( j-- ) {
+				handleObj = handlers[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					( !handler || handler.guid === handleObj.guid ) &&
+					( !tmp || tmp.test( handleObj.namespace ) ) &&
+					( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+					handlers.splice( j, 1 );
+
+					if ( handleObj.selector ) {
+						handlers.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( origCount && !handlers.length ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			delete elemData.handle;
+
+			// removeData also checks for emptiness and clears the expando if empty
+			// so use it instead of delete
+			jQuery._removeData( elem, "events" );
+		}
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		var handle, ontype, cur,
+			bubbleType, special, tmp, i,
+			eventPath = [ elem || document ],
+			type = core_hasOwn.call( event, "type" ) ? event.type : event,
+			namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+		cur = tmp = elem = elem || document;
+
+		// Don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf(".") >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+		ontype = type.indexOf(":") < 0 && "on" + type;
+
+		// Caller can pass in a jQuery.Event object, Object, or just an event type string
+		event = event[ jQuery.expando ] ?
+			event :
+			new jQuery.Event( type, typeof event === "object" && event );
+
+		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+		event.isTrigger = onlyHandlers ? 2 : 3;
+		event.namespace = namespaces.join(".");
+		event.namespace_re = event.namespace ?
+			new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+			null;
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		if ( !event.target ) {
+			event.target = elem;
+		}
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data == null ?
+			[ event ] :
+			jQuery.makeArray( data, [ event ] );
+
+		// Allow special events to draw outside the lines
+		special = jQuery.event.special[ type ] || {};
+		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+			return;
+		}
+
+		// Determine event propagation path in advance, per W3C events spec (#9951)
+		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+			bubbleType = special.delegateType || type;
+			if ( !rfocusMorph.test( bubbleType + type ) ) {
+				cur = cur.parentNode;
+			}
+			for ( ; cur; cur = cur.parentNode ) {
+				eventPath.push( cur );
+				tmp = cur;
+			}
+
+			// Only add window if we got to document (e.g., not plain obj or detached DOM)
+			if ( tmp === (elem.ownerDocument || document) ) {
+				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+			}
+		}
+
+		// Fire handlers on the event path
+		i = 0;
+		while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+			event.type = i > 1 ?
+				bubbleType :
+				special.bindType || type;
+
+			// jQuery handler
+			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+
+			// Native handler
+			handle = ontype && cur[ ontype ];
+			if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+				event.preventDefault();
+			}
+		}
+		event.type = type;
+
+		// If nobody prevented the default action, do it now
+		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+			if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+				jQuery.acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name name as the event.
+				// Can't use an .isFunction() check here because IE6/7 fails that test.
+				// Don't do default actions on window, that's where global variables be (#6170)
+				if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+					// Don't re-trigger an onFOO event when we call its FOO() method
+					tmp = elem[ ontype ];
+
+					if ( tmp ) {
+						elem[ ontype ] = null;
+					}
+
+					// Prevent re-triggering of the same event, since we already bubbled it above
+					jQuery.event.triggered = type;
+					try {
+						elem[ type ]();
+					} catch ( e ) {
+						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
+						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
+					}
+					jQuery.event.triggered = undefined;
+
+					if ( tmp ) {
+						elem[ ontype ] = tmp;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	dispatch: function( event ) {
+
+		// Make a writable jQuery.Event from the native event object
+		event = jQuery.event.fix( event );
+
+		var i, ret, handleObj, matched, j,
+			handlerQueue = [],
+			args = core_slice.call( arguments ),
+			handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+			special = jQuery.event.special[ event.type ] || {};
+
+		// Use the fix-ed jQuery.Event rather than the (read-only) native event
+		args[0] = event;
+		event.delegateTarget = this;
+
+		// Call the preDispatch hook for the mapped type, and let it bail if desired
+		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+			return;
+		}
+
+		// Determine handlers
+		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+		// Run delegates first; they may want to stop propagation beneath us
+		i = 0;
+		while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+			event.currentTarget = matched.elem;
+
+			j = 0;
+			while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+				// Triggered event must either 1) have no namespace, or
+				// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+				if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+					event.handleObj = handleObj;
+					event.data = handleObj.data;
+
+					ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+							.apply( matched.elem, args );
+
+					if ( ret !== undefined ) {
+						if ( (event.result = ret) === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+				}
+			}
+		}
+
+		// Call the postDispatch hook for the mapped type
+		if ( special.postDispatch ) {
+			special.postDispatch.call( this, event );
+		}
+
+		return event.result;
+	},
+
+	handlers: function( event, handlers ) {
+		var sel, handleObj, matches, i,
+			handlerQueue = [],
+			delegateCount = handlers.delegateCount,
+			cur = event.target;
+
+		// Find delegate handlers
+		// Black-hole SVG <use> instance trees (#13180)
+		// Avoid non-left-click bubbling in Firefox (#3861)
+		if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+			/* jshint eqeqeq: false */
+			for ( ; cur != this; cur = cur.parentNode || this ) {
+				/* jshint eqeqeq: true */
+
+				// Don't check non-elements (#13208)
+				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+				if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+					matches = [];
+					for ( i = 0; i < delegateCount; i++ ) {
+						handleObj = handlers[ i ];
+
+						// Don't conflict with Object.prototype properties (#13203)
+						sel = handleObj.selector + " ";
+
+						if ( matches[ sel ] === undefined ) {
+							matches[ sel ] = handleObj.needsContext ?
+								jQuery( sel, this ).index( cur ) >= 0 :
+								jQuery.find( sel, this, null, [ cur ] ).length;
+						}
+						if ( matches[ sel ] ) {
+							matches.push( handleObj );
+						}
+					}
+					if ( matches.length ) {
+						handlerQueue.push({ elem: cur, handlers: matches });
+					}
+				}
+			}
+		}
+
+		// Add the remaining (directly-bound) handlers
+		if ( delegateCount < handlers.length ) {
+			handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+		}
+
+		return handlerQueue;
+	},
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// Create a writable copy of the event object and normalize some properties
+		var i, prop, copy,
+			type = event.type,
+			originalEvent = event,
+			fixHook = this.fixHooks[ type ];
+
+		if ( !fixHook ) {
+			this.fixHooks[ type ] = fixHook =
+				rmouseEvent.test( type ) ? this.mouseHooks :
+				rkeyEvent.test( type ) ? this.keyHooks :
+				{};
+		}
+		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+		event = new jQuery.Event( originalEvent );
+
+		i = copy.length;
+		while ( i-- ) {
+			prop = copy[ i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Support: IE<9
+		// Fix target property (#1925)
+		if ( !event.target ) {
+			event.target = originalEvent.srcElement || document;
+		}
+
+		// Support: Chrome 23+, Safari?
+		// Target should not be a text node (#504, #13143)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// Support: IE<9
+		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+		event.metaKey = !!event.metaKey;
+
+		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+	},
+
+	// Includes some event props shared by KeyEvent and MouseEvent
+	props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+	fixHooks: {},
+
+	keyHooks: {
+		props: "char charCode key keyCode".split(" "),
+		filter: function( event, original ) {
+
+			// Add which for key events
+			if ( event.which == null ) {
+				event.which = original.charCode != null ? original.charCode : original.keyCode;
+			}
+
+			return event;
+		}
+	},
+
+	mouseHooks: {
+		props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+		filter: function( event, original ) {
+			var body, eventDoc, doc,
+				button = original.button,
+				fromElement = original.fromElement;
+
+			// Calculate pageX/Y if missing and clientX/Y available
+			if ( event.pageX == null && original.clientX != null ) {
+				eventDoc = event.target.ownerDocument || document;
+				doc = eventDoc.documentElement;
+				body = eventDoc.body;
+
+				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+			}
+
+			// Add relatedTarget, if necessary
+			if ( !event.relatedTarget && fromElement ) {
+				event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+			}
+
+			// Add which for click: 1 === left; 2 === middle; 3 === right
+			// Note: button is not normalized, so don't use it
+			if ( !event.which && button !== undefined ) {
+				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+			}
+
+			return event;
+		}
+	},
+
+	special: {
+		load: {
+			// Prevent triggered image.load events from bubbling to window.load
+			noBubble: true
+		},
+		focus: {
+			// Fire native event if possible so blur/focus sequence is correct
+			trigger: function() {
+				if ( this !== safeActiveElement() && this.focus ) {
+					try {
+						this.focus();
+						return false;
+					} catch ( e ) {
+						// Support: IE<9
+						// If we error on focus to hidden element (#1486, #12518),
+						// let .trigger() run the handlers
+					}
+				}
+			},
+			delegateType: "focusin"
+		},
+		blur: {
+			trigger: function() {
+				if ( this === safeActiveElement() && this.blur ) {
+					this.blur();
+					return false;
+				}
+			},
+			delegateType: "focusout"
+		},
+		click: {
+			// For checkbox, fire native event so checked state will be right
+			trigger: function() {
+				if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+					this.click();
+					return false;
+				}
+			},
+
+			// For cross-browser consistency, don't fire native .click() on links
+			_default: function( event ) {
+				return jQuery.nodeName( event.target, "a" );
+			}
+		},
+
+		beforeunload: {
+			postDispatch: function( event ) {
+
+				// Even when returnValue equals to undefined Firefox will still show alert
+				if ( event.result !== undefined ) {
+					event.originalEvent.returnValue = event.result;
+				}
+			}
+		}
+	},
+
+	simulate: function( type, elem, event, bubble ) {
+		// Piggyback on a donor event to simulate a different one.
+		// Fake originalEvent to avoid donor's stopPropagation, but if the
+		// simulated event prevents default then we do the same on the donor.
+		var e = jQuery.extend(
+			new jQuery.Event(),
+			event,
+			{
+				type: type,
+				isSimulated: true,
+				originalEvent: {}
+			}
+		);
+		if ( bubble ) {
+			jQuery.event.trigger( e, null, elem );
+		} else {
+			jQuery.event.dispatch.call( elem, e );
+		}
+		if ( e.isDefaultPrevented() ) {
+			event.preventDefault();
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		var name = "on" + type;
+
+		if ( elem.detachEvent ) {
+
+			// #8545, #7054, preventing memory leaks for custom events in IE6-8
+			// detachEvent needed property on element, by name of that event, to properly expose it to GC
+			if ( typeof elem[ name ] === core_strundefined ) {
+				elem[ name ] = null;
+			}
+
+			elem.detachEvent( name, handle );
+		}
+	};
+
+jQuery.Event = function( src, props ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !(this instanceof jQuery.Event) ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+			src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// Create a timestamp if incoming event doesn't have one
+	this.timeStamp = src && src.timeStamp || jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse,
+
+	preventDefault: function() {
+		var e = this.originalEvent;
+
+		this.isDefaultPrevented = returnTrue;
+		if ( !e ) {
+			return;
+		}
+
+		// If preventDefault exists, run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// Support: IE
+		// Otherwise set the returnValue property of the original event to false
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		var e = this.originalEvent;
+
+		this.isPropagationStopped = returnTrue;
+		if ( !e ) {
+			return;
+		}
+		// If stopPropagation exists, run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+
+		// Support: IE
+		// Set the cancelBubble property of the original event to true
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	}
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		delegateType: fix,
+		bindType: fix,
+
+		handle: function( event ) {
+			var ret,
+				target = this,
+				related = event.relatedTarget,
+				handleObj = event.handleObj;
+
+			// For mousenter/leave call the handler if related is outside the target.
+			// NB: No relatedTarget if the mouse left/entered the browser window
+			if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+				event.type = handleObj.origType;
+				ret = handleObj.handler.apply( this, arguments );
+				event.type = fix;
+			}
+			return ret;
+		}
+	};
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Lazy-add a submit handler when a descendant form may potentially be submitted
+			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+				// Node name check avoids a VML-related crash in IE (#9807)
+				var elem = e.target,
+					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+				if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+					jQuery.event.add( form, "submit._submit", function( event ) {
+						event._submit_bubble = true;
+					});
+					jQuery._data( form, "submitBubbles", true );
+				}
+			});
+			// return undefined since we don't need an event listener
+		},
+
+		postDispatch: function( event ) {
+			// If form was submitted by the user, bubble the event up the tree
+			if ( event._submit_bubble ) {
+				delete event._submit_bubble;
+				if ( this.parentNode && !event.isTrigger ) {
+					jQuery.event.simulate( "submit", this.parentNode, event, true );
+				}
+			}
+		},
+
+		teardown: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+			jQuery.event.remove( this, "._submit" );
+		}
+	};
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+	jQuery.event.special.change = {
+
+		setup: function() {
+
+			if ( rformElems.test( this.nodeName ) ) {
+				// IE doesn't fire change on a check/radio until blur; trigger it on click
+				// after a propertychange. Eat the blur-change in special.change.handle.
+				// This still fires onchange a second time for check/radio after blur.
+				if ( this.type === "checkbox" || this.type === "radio" ) {
+					jQuery.event.add( this, "propertychange._change", function( event ) {
+						if ( event.originalEvent.propertyName === "checked" ) {
+							this._just_changed = true;
+						}
+					});
+					jQuery.event.add( this, "click._change", function( event ) {
+						if ( this._just_changed && !event.isTrigger ) {
+							this._just_changed = false;
+						}
+						// Allow triggered, simulated change events (#11500)
+						jQuery.event.simulate( "change", this, event, true );
+					});
+				}
+				return false;
+			}
+			// Delegated event; lazy-add a change handler on descendant inputs
+			jQuery.event.add( this, "beforeactivate._change", function( e ) {
+				var elem = e.target;
+
+				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+					jQuery.event.add( elem, "change._change", function( event ) {
+						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+							jQuery.event.simulate( "change", this.parentNode, event, true );
+						}
+					});
+					jQuery._data( elem, "changeBubbles", true );
+				}
+			});
+		},
+
+		handle: function( event ) {
+			var elem = event.target;
+
+			// Swallow native change events from checkbox/radio, we already triggered them above
+			if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+				return event.handleObj.handler.apply( this, arguments );
+			}
+		},
+
+		teardown: function() {
+			jQuery.event.remove( this, "._change" );
+
+			return !rformElems.test( this.nodeName );
+		}
+	};
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler while someone wants focusin/focusout
+		var attaches = 0,
+			handler = function( event ) {
+				jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+			};
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( attaches++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			},
+			teardown: function() {
+				if ( --attaches === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+	});
+}
+
+jQuery.fn.extend({
+
+	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+		var type, origFn;
+
+		// Types can be a map of types/handlers
+		if ( typeof types === "object" ) {
+			// ( types-Object, selector, data )
+			if ( typeof selector !== "string" ) {
+				// ( types-Object, data )
+				data = data || selector;
+				selector = undefined;
+			}
+			for ( type in types ) {
+				this.on( type, selector, data, types[ type ], one );
+			}
+			return this;
+		}
+
+		if ( data == null && fn == null ) {
+			// ( types, fn )
+			fn = selector;
+			data = selector = undefined;
+		} else if ( fn == null ) {
+			if ( typeof selector === "string" ) {
+				// ( types, selector, fn )
+				fn = data;
+				data = undefined;
+			} else {
+				// ( types, data, fn )
+				fn = data;
+				data = selector;
+				selector = undefined;
+			}
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		} else if ( !fn ) {
+			return this;
+		}
+
+		if ( one === 1 ) {
+			origFn = fn;
+			fn = function( event ) {
+				// Can use an empty set, since event contains the info
+				jQuery().off( event );
+				return origFn.apply( this, arguments );
+			};
+			// Use same guid so caller can remove using origFn
+			fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+		}
+		return this.each( function() {
+			jQuery.event.add( this, types, fn, data, selector );
+		});
+	},
+	one: function( types, selector, data, fn ) {
+		return this.on( types, selector, data, fn, 1 );
+	},
+	off: function( types, selector, fn ) {
+		var handleObj, type;
+		if ( types && types.preventDefault && types.handleObj ) {
+			// ( event )  dispatched jQuery.Event
+			handleObj = types.handleObj;
+			jQuery( types.delegateTarget ).off(
+				handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+				handleObj.selector,
+				handleObj.handler
+			);
+			return this;
+		}
+		if ( typeof types === "object" ) {
+			// ( types-object [, selector] )
+			for ( type in types ) {
+				this.off( type, selector, types[ type ] );
+			}
+			return this;
+		}
+		if ( selector === false || typeof selector === "function" ) {
+			// ( types [, fn] )
+			fn = selector;
+			selector = undefined;
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		}
+		return this.each(function() {
+			jQuery.event.remove( this, types, fn, selector );
+		});
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+	triggerHandler: function( type, data ) {
+		var elem = this[0];
+		if ( elem ) {
+			return jQuery.event.trigger( type, data, elem, true );
+		}
+	}
+});
+var isSimple = /^.[^:#\[\.,]*$/,
+	rparentsprev = /^(?:parents|prev(?:Until|All))/,
+	rneedsContext = jQuery.expr.match.needsContext,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var i,
+			ret = [],
+			self = this,
+			len = self.length;
+
+		if ( typeof selector !== "string" ) {
+			return this.pushStack( jQuery( selector ).filter(function() {
+				for ( i = 0; i < len; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			}) );
+		}
+
+		for ( i = 0; i < len; i++ ) {
+			jQuery.find( selector, self[ i ], ret );
+		}
+
+		// Needed because $( selector, context ) becomes $( context ).find( selector )
+		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+		ret.selector = this.selector ? this.selector + " " + selector : selector;
+		return ret;
+	},
+
+	has: function( target ) {
+		var i,
+			targets = jQuery( target, this ),
+			len = targets.length;
+
+		return this.filter(function() {
+			for ( i = 0; i < len; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], true) );
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], false) );
+	},
+
+	is: function( selector ) {
+		return !!winnow(
+			this,
+
+			// If this is a positional/relative selector, check membership in the returned set
+			// so $("p:first").is("p:last") won't return true for a doc with two "p".
+			typeof selector === "string" && rneedsContext.test( selector ) ?
+				jQuery( selector ) :
+				selector || [],
+			false
+		).length;
+	},
+
+	closest: function( selectors, context ) {
+		var cur,
+			i = 0,
+			l = this.length,
+			ret = [],
+			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( ; i < l; i++ ) {
+			for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+				// Always skip document fragments
+				if ( cur.nodeType < 11 && (pos ?
+					pos.index(cur) > -1 :
+
+					// Don't pass non-elements to Sizzle
+					cur.nodeType === 1 &&
+						jQuery.find.matchesSelector(cur, selectors)) ) {
+
+					cur = ret.push( cur );
+					break;
+				}
+			}
+		}
+
+		return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context ) :
+				jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( jQuery.unique(all) );
+	},
+
+	addBack: function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter(selector)
+		);
+	}
+});
+
+function sibling( cur, dir ) {
+	do {
+		cur = cur[ dir ];
+	} while ( cur && cur.nodeType !== 1 );
+
+	return cur;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return sibling( elem, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return sibling( elem, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.merge( [], elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+
+		if ( name.slice( -5 ) !== "Until" ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		if ( this.length > 1 ) {
+			// Remove duplicates
+			if ( !guaranteedUnique[ name ] ) {
+				ret = jQuery.unique( ret );
+			}
+
+			// Reverse order for parents* and prev-derivatives
+			if ( rparentsprev.test( name ) ) {
+				ret = ret.reverse();
+			}
+		}
+
+		return this.pushStack( ret );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		var elem = elems[ 0 ];
+
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 && elem.nodeType === 1 ?
+			jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+			jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+				return elem.nodeType === 1;
+			}));
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep( elements, function( elem, i ) {
+			/* jshint -W018 */
+			return !!qualifier.call( elem, i, elem ) !== not;
+		});
+
+	}
+
+	if ( qualifier.nodeType ) {
+		return jQuery.grep( elements, function( elem ) {
+			return ( elem === qualifier ) !== not;
+		});
+
+	}
+
+	if ( typeof qualifier === "string" ) {
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter( qualifier, elements, not );
+		}
+
+		qualifier = jQuery.filter( qualifier, elements );
+	}
+
+	return jQuery.grep( elements, function( elem ) {
+		return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
+	});
+}
+function createSafeFragment( document ) {
+	var list = nodeNames.split( "|" ),
+		safeFrag = document.createDocumentFragment();
+
+	if ( safeFrag.createElement ) {
+		while ( list.length ) {
+			safeFrag.createElement(
+				list.pop()
+			);
+		}
+	}
+	return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+	rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+	rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnoInnerhtml = /<(?:script|style|link)/i,
+	manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptType = /^$|\/(?:java|ecma)script/i,
+	rscriptTypeMasked = /^true\/(.*)/,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+	// We have to close these tags to support XHTML (#13200)
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		area: [ 1, "<map>", "</map>" ],
+		param: [ 1, "<object>", "</object>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+		// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+		// unless wrapped in a div with non-breaking characters in front of it.
+		_default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>"  ]
+	},
+	safeFragment = createSafeFragment( document ),
+	fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+	text: function( value ) {
+		return jQuery.access( this, function( value ) {
+			return value === undefined ?
+				jQuery.text( this ) :
+				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+		}, null, value, arguments.length );
+	},
+
+	append: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.insertBefore( elem, target.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this );
+			}
+		});
+	},
+
+	after: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			}
+		});
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		var elem,
+			elems = selector ? jQuery.filter( selector, this ) : this,
+			i = 0;
+
+		for ( ; (elem = elems[i]) != null; i++ ) {
+
+			if ( !keepData && elem.nodeType === 1 ) {
+				jQuery.cleanData( getAll( elem ) );
+			}
+
+			if ( elem.parentNode ) {
+				if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+					setGlobalEval( getAll( elem, "script" ) );
+				}
+				elem.parentNode.removeChild( elem );
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		var elem,
+			i = 0;
+
+		for ( ; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( getAll( elem, false ) );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+
+			// If this is a select, ensure that it displays empty (#12336)
+			// Support: IE<9
+			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+				elem.options.length = 0;
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	html: function( value ) {
+		return jQuery.access( this, function( value ) {
+			var elem = this[0] || {},
+				i = 0,
+				l = this.length;
+
+			if ( value === undefined ) {
+				return elem.nodeType === 1 ?
+					elem.innerHTML.replace( rinlinejQuery, "" ) :
+					undefined;
+			}
+
+			// See if we can take a shortcut and just use innerHTML
+			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+				( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
+				( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+				!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+				value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+				try {
+					for (; i < l; i++ ) {
+						// Remove element nodes and prevent memory leaks
+						elem = this[i] || {};
+						if ( elem.nodeType === 1 ) {
+							jQuery.cleanData( getAll( elem, false ) );
+							elem.innerHTML = value;
+						}
+					}
+
+					elem = 0;
+
+				// If using innerHTML throws an exception, use the fallback method
+				} catch(e) {}
+			}
+
+			if ( elem ) {
+				this.empty().append( value );
+			}
+		}, null, value, arguments.length );
+	},
+
+	replaceWith: function() {
+		var
+			// Snapshot the DOM in case .domManip sweeps something relevant into its fragment
+			args = jQuery.map( this, function( elem ) {
+				return [ elem.nextSibling, elem.parentNode ];
+			}),
+			i = 0;
+
+		// Make the changes, replacing each context element with the new content
+		this.domManip( arguments, function( elem ) {
+			var next = args[ i++ ],
+				parent = args[ i++ ];
+
+			if ( parent ) {
+				// Don't use the snapshot next if it has moved (#13810)
+				if ( next && next.parentNode !== parent ) {
+					next = this.nextSibling;
+				}
+				jQuery( this ).remove();
+				parent.insertBefore( elem, next );
+			}
+		// Allow new content to include elements from the context set
+		}, true );
+
+		// Force removal if there was no new content (e.g., from empty arguments)
+		return i ? this : this.remove();
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, callback, allowIntersection ) {
+
+		// Flatten any nested arrays
+		args = core_concat.apply( [], args );
+
+		var first, node, hasScripts,
+			scripts, doc, fragment,
+			i = 0,
+			l = this.length,
+			set = this,
+			iNoClone = l - 1,
+			value = args[0],
+			isFunction = jQuery.isFunction( value );
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+			return this.each(function( index ) {
+				var self = set.eq( index );
+				if ( isFunction ) {
+					args[0] = value.call( this, index, self.html() );
+				}
+				self.domManip( args, callback, allowIntersection );
+			});
+		}
+
+		if ( l ) {
+			fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
+			first = fragment.firstChild;
+
+			if ( fragment.childNodes.length === 1 ) {
+				fragment = first;
+			}
+
+			if ( first ) {
+				scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+				hasScripts = scripts.length;
+
+				// Use the original fragment for the last item instead of the first because it can end up
+				// being emptied incorrectly in certain situations (#8070).
+				for ( ; i < l; i++ ) {
+					node = fragment;
+
+					if ( i !== iNoClone ) {
+						node = jQuery.clone( node, true, true );
+
+						// Keep references to cloned scripts for later restoration
+						if ( hasScripts ) {
+							jQuery.merge( scripts, getAll( node, "script" ) );
+						}
+					}
+
+					callback.call( this[i], node, i );
+				}
+
+				if ( hasScripts ) {
+					doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+					// Reenable scripts
+					jQuery.map( scripts, restoreScript );
+
+					// Evaluate executable scripts on first document insertion
+					for ( i = 0; i < hasScripts; i++ ) {
+						node = scripts[ i ];
+						if ( rscriptType.test( node.type || "" ) &&
+							!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+							if ( node.src ) {
+								// Hope ajax is available...
+								jQuery._evalUrl( node.src );
+							} else {
+								jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+							}
+						}
+					}
+				}
+
+				// Fix #11809: Avoid leaking memory
+				fragment = first = null;
+			}
+		}
+
+		return this;
+	}
+});
+
+// Support: IE<8
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+	return jQuery.nodeName( elem, "table" ) &&
+		jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
+
+		elem.getElementsByTagName("tbody")[0] ||
+			elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+		elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+	elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
+	return elem;
+}
+function restoreScript( elem ) {
+	var match = rscriptTypeMasked.exec( elem.type );
+	if ( match ) {
+		elem.type = match[1];
+	} else {
+		elem.removeAttribute("type");
+	}
+	return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+	var elem,
+		i = 0;
+	for ( ; (elem = elems[i]) != null; i++ ) {
+		jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+	}
+}
+
+function cloneCopyEvent( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var type, i, l,
+		oldData = jQuery._data( src ),
+		curData = jQuery._data( dest, oldData ),
+		events = oldData.events;
+
+	if ( events ) {
+		delete curData.handle;
+		curData.events = {};
+
+		for ( type in events ) {
+			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+				jQuery.event.add( dest, type, events[ type ][ i ] );
+			}
+		}
+	}
+
+	// make the cloned public data object a copy from the original
+	if ( curData.data ) {
+		curData.data = jQuery.extend( {}, curData.data );
+	}
+}
+
+function fixCloneNodeIssues( src, dest ) {
+	var nodeName, e, data;
+
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	nodeName = dest.nodeName.toLowerCase();
+
+	// IE6-8 copies events bound via attachEvent when using cloneNode.
+	if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
+		data = jQuery._data( dest );
+
+		for ( e in data.events ) {
+			jQuery.removeEvent( dest, e, data.handle );
+		}
+
+		// Event data gets referenced instead of copied if the expando gets copied too
+		dest.removeAttribute( jQuery.expando );
+	}
+
+	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+	if ( nodeName === "script" && dest.text !== src.text ) {
+		disableScript( dest ).text = src.text;
+		restoreScript( dest );
+
+	// IE6-10 improperly clones children of object elements using classid.
+	// IE10 throws NoModificationAllowedError if parent is null, #12132.
+	} else if ( nodeName === "object" ) {
+		if ( dest.parentNode ) {
+			dest.outerHTML = src.outerHTML;
+		}
+
+		// This path appears unavoidable for IE9. When cloning an object
+		// element in IE9, the outerHTML strategy above is not sufficient.
+		// If the src has innerHTML and the destination does not,
+		// copy the src.innerHTML into the dest.innerHTML. #10324
+		if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+			dest.innerHTML = src.innerHTML;
+		}
+
+	} else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+
+		dest.defaultChecked = dest.checked = src.checked;
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.defaultSelected = dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+}
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var elems,
+			i = 0,
+			ret = [],
+			insert = jQuery( selector ),
+			last = insert.length - 1;
+
+		for ( ; i <= last; i++ ) {
+			elems = i === last ? this : this.clone(true);
+			jQuery( insert[i] )[ original ]( elems );
+
+			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+			core_push.apply( ret, elems.get() );
+		}
+
+		return this.pushStack( ret );
+	};
+});
+
+function getAll( context, tag ) {
+	var elems, elem,
+		i = 0,
+		found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
+			typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
+			undefined;
+
+	if ( !found ) {
+		for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+			if ( !tag || jQuery.nodeName( elem, tag ) ) {
+				found.push( elem );
+			} else {
+				jQuery.merge( found, getAll( elem, tag ) );
+			}
+		}
+	}
+
+	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+		jQuery.merge( [ context ], found ) :
+		found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+	if ( manipulation_rcheckableType.test( elem.type ) ) {
+		elem.defaultChecked = elem.checked;
+	}
+}
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var destElements, node, clone, i, srcElements,
+			inPage = jQuery.contains( elem.ownerDocument, elem );
+
+		if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+			clone = elem.cloneNode( true );
+
+		// IE<=8 does not properly clone detached, unknown element nodes
+		} else {
+			fragmentDiv.innerHTML = elem.outerHTML;
+			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+		}
+
+		if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+			// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+			destElements = getAll( clone );
+			srcElements = getAll( elem );
+
+			// Fix all IE cloning issues
+			for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+				// Ensure that the destination node is not null; Fixes #9587
+				if ( destElements[i] ) {
+					fixCloneNodeIssues( node, destElements[i] );
+				}
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			if ( deepDataAndEvents ) {
+				srcElements = srcElements || getAll( elem );
+				destElements = destElements || getAll( clone );
+
+				for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+					cloneCopyEvent( node, destElements[i] );
+				}
+			} else {
+				cloneCopyEvent( elem, clone );
+			}
+		}
+
+		// Preserve script evaluation history
+		destElements = getAll( clone, "script" );
+		if ( destElements.length > 0 ) {
+			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+		}
+
+		destElements = srcElements = node = null;
+
+		// Return the cloned set
+		return clone;
+	},
+
+	buildFragment: function( elems, context, scripts, selection ) {
+		var j, elem, contains,
+			tmp, tag, tbody, wrap,
+			l = elems.length,
+
+			// Ensure a safe fragment
+			safe = createSafeFragment( context ),
+
+			nodes = [],
+			i = 0;
+
+		for ( ; i < l; i++ ) {
+			elem = elems[ i ];
+
+			if ( elem || elem === 0 ) {
+
+				// Add nodes directly
+				if ( jQuery.type( elem ) === "object" ) {
+					jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+				// Convert non-html into a text node
+				} else if ( !rhtml.test( elem ) ) {
+					nodes.push( context.createTextNode( elem ) );
+
+				// Convert html into DOM nodes
+				} else {
+					tmp = tmp || safe.appendChild( context.createElement("div") );
+
+					// Deserialize a standard representation
+					tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+					wrap = wrapMap[ tag ] || wrapMap._default;
+
+					tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+					// Descend through wrappers to the right content
+					j = wrap[0];
+					while ( j-- ) {
+						tmp = tmp.lastChild;
+					}
+
+					// Manually add leading whitespace removed by IE
+					if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+						nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+					}
+
+					// Remove IE's autoinserted <tbody> from table fragments
+					if ( !jQuery.support.tbody ) {
+
+						// String was a <table>, *may* have spurious <tbody>
+						elem = tag === "table" && !rtbody.test( elem ) ?
+							tmp.firstChild :
+
+							// String was a bare <thead> or <tfoot>
+							wrap[1] === "<table>" && !rtbody.test( elem ) ?
+								tmp :
+								0;
+
+						j = elem && elem.childNodes.length;
+						while ( j-- ) {
+							if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+								elem.removeChild( tbody );
+							}
+						}
+					}
+
+					jQuery.merge( nodes, tmp.childNodes );
+
+					// Fix #12392 for WebKit and IE > 9
+					tmp.textContent = "";
+
+					// Fix #12392 for oldIE
+					while ( tmp.firstChild ) {
+						tmp.removeChild( tmp.firstChild );
+					}
+
+					// Remember the top-level container for proper cleanup
+					tmp = safe.lastChild;
+				}
+			}
+		}
+
+		// Fix #11356: Clear elements from fragment
+		if ( tmp ) {
+			safe.removeChild( tmp );
+		}
+
+		// Reset defaultChecked for any radios and checkboxes
+		// about to be appended to the DOM in IE 6/7 (#8060)
+		if ( !jQuery.support.appendChecked ) {
+			jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+		}
+
+		i = 0;
+		while ( (elem = nodes[ i++ ]) ) {
+
+			// #4087 - If origin and destination elements are the same, and this is
+			// that element, do not do anything
+			if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+				continue;
+			}
+
+			contains = jQuery.contains( elem.ownerDocument, elem );
+
+			// Append to fragment
+			tmp = getAll( safe.appendChild( elem ), "script" );
+
+			// Preserve script evaluation history
+			if ( contains ) {
+				setGlobalEval( tmp );
+			}
+
+			// Capture executables
+			if ( scripts ) {
+				j = 0;
+				while ( (elem = tmp[ j++ ]) ) {
+					if ( rscriptType.test( elem.type || "" ) ) {
+						scripts.push( elem );
+					}
+				}
+			}
+		}
+
+		tmp = null;
+
+		return safe;
+	},
+
+	cleanData: function( elems, /* internal */ acceptData ) {
+		var elem, type, id, data,
+			i = 0,
+			internalKey = jQuery.expando,
+			cache = jQuery.cache,
+			deleteExpando = jQuery.support.deleteExpando,
+			special = jQuery.event.special;
+
+		for ( ; (elem = elems[i]) != null; i++ ) {
+
+			if ( acceptData || jQuery.acceptData( elem ) ) {
+
+				id = elem[ internalKey ];
+				data = id && cache[ id ];
+
+				if ( data ) {
+					if ( data.events ) {
+						for ( type in data.events ) {
+							if ( special[ type ] ) {
+								jQuery.event.remove( elem, type );
+
+							// This is a shortcut to avoid jQuery.event.remove's overhead
+							} else {
+								jQuery.removeEvent( elem, type, data.handle );
+							}
+						}
+					}
+
+					// Remove cache only if it was not already removed by jQuery.event.remove
+					if ( cache[ id ] ) {
+
+						delete cache[ id ];
+
+						// IE does not allow us to delete expando properties from nodes,
+						// nor does it have a removeAttribute function on Document nodes;
+						// we must handle all of these cases
+						if ( deleteExpando ) {
+							delete elem[ internalKey ];
+
+						} else if ( typeof elem.removeAttribute !== core_strundefined ) {
+							elem.removeAttribute( internalKey );
+
+						} else {
+							elem[ internalKey ] = null;
+						}
+
+						core_deletedIds.push( id );
+					}
+				}
+			}
+		}
+	},
+
+	_evalUrl: function( url ) {
+		return jQuery.ajax({
+			url: url,
+			type: "GET",
+			dataType: "script",
+			async: false,
+			global: false,
+			"throws": true
+		});
+	}
+});
+jQuery.fn.extend({
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append( this );
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		var isFunction = jQuery.isFunction( html );
+
+		return this.each(function(i) {
+			jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	}
+});
+var iframe, getStyles, curCSS,
+	ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity\s*=\s*([^)]*)/,
+	rposition = /^(top|right|bottom|left)$/,
+	// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+	// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+	rmargin = /^margin/,
+	rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+	rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+	rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+	elemdisplay = { BODY: "block" },
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssNormalTransform = {
+		letterSpacing: 0,
+		fontWeight: 400
+	},
+
+	cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+	// shortcut for names that are not vendor prefixed
+	if ( name in style ) {
+		return name;
+	}
+
+	// check for vendor prefixed names
+	var capName = name.charAt(0).toUpperCase() + name.slice(1),
+		origName = name,
+		i = cssPrefixes.length;
+
+	while ( i-- ) {
+		name = cssPrefixes[ i ] + capName;
+		if ( name in style ) {
+			return name;
+		}
+	}
+
+	return origName;
+}
+
+function isHidden( elem, el ) {
+	// isHidden might be called from jQuery#filter function;
+	// in that case, element will be second argument
+	elem = el || elem;
+	return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+	var display, elem, hidden,
+		values = [],
+		index = 0,
+		length = elements.length;
+
+	for ( ; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+
+		values[ index ] = jQuery._data( elem, "olddisplay" );
+		display = elem.style.display;
+		if ( show ) {
+			// Reset the inline display of this element to learn if it is
+			// being hidden by cascaded rules or not
+			if ( !values[ index ] && display === "none" ) {
+				elem.style.display = "";
+			}
+
+			// Set elements which have been overridden with display: none
+			// in a stylesheet to whatever the default browser style is
+			// for such an element
+			if ( elem.style.display === "" && isHidden( elem ) ) {
+				values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+			}
+		} else {
+
+			if ( !values[ index ] ) {
+				hidden = isHidden( elem );
+
+				if ( display && display !== "none" || !hidden ) {
+					jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+				}
+			}
+		}
+	}
+
+	// Set the display of most of the elements in a second loop
+	// to avoid the constant reflow
+	for ( index = 0; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+			elem.style.display = show ? values[ index ] || "" : "none";
+		}
+	}
+
+	return elements;
+}
+
+jQuery.fn.extend({
+	css: function( name, value ) {
+		return jQuery.access( this, function( elem, name, value ) {
+			var len, styles,
+				map = {},
+				i = 0;
+
+			if ( jQuery.isArray( name ) ) {
+				styles = getStyles( elem );
+				len = name.length;
+
+				for ( ; i < len; i++ ) {
+					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+				}
+
+				return map;
+			}
+
+			return value !== undefined ?
+				jQuery.style( elem, name, value ) :
+				jQuery.css( elem, name );
+		}, name, value, arguments.length > 1 );
+	},
+	show: function() {
+		return showHide( this, true );
+	},
+	hide: function() {
+		return showHide( this );
+	},
+	toggle: function( state ) {
+		if ( typeof state === "boolean" ) {
+			return state ? this.show() : this.hide();
+		}
+
+		return this.each(function() {
+			if ( isHidden( this ) ) {
+				jQuery( this ).show();
+			} else {
+				jQuery( this ).hide();
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity" );
+					return ret === "" ? "1" : ret;
+				}
+			}
+		}
+	},
+
+	// Don't automatically add "px" to these possibly-unitless properties
+	cssNumber: {
+		"columnCount": true,
+		"fillOpacity": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"order": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, hooks,
+			origName = jQuery.camelCase( name ),
+			style = elem.style;
+
+		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+		// gets hook for the prefixed version
+		// followed by the unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// convert relative number strings (+= or -=) to relative numbers. #7345
+			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+				value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( value == null || type === "number" && isNaN( value ) ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+			// but it would mean to define eight (for every problematic property) identical functions
+			if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+				style[ name ] = "inherit";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra, styles ) {
+		var num, val, hooks,
+			origName = jQuery.camelCase( name );
+
+		// Make sure that we're working with the right name
+		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+		// gets hook for the prefixed version
+		// followed by the unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks ) {
+			val = hooks.get( elem, true, extra );
+		}
+
+		// Otherwise, if a way to get the computed value exists, use that
+		if ( val === undefined ) {
+			val = curCSS( elem, name, styles );
+		}
+
+		//convert "normal" to computed value
+		if ( val === "normal" && name in cssNormalTransform ) {
+			val = cssNormalTransform[ name ];
+		}
+
+		// Return, converting to number if forced or a qualifier was provided and val looks numeric
+		if ( extra === "" || extra ) {
+			num = parseFloat( val );
+			return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+		}
+		return val;
+	}
+});
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+	getStyles = function( elem ) {
+		return window.getComputedStyle( elem, null );
+	};
+
+	curCSS = function( elem, name, _computed ) {
+		var width, minWidth, maxWidth,
+			computed = _computed || getStyles( elem ),
+
+			// getPropertyValue is only needed for .css('filter') in IE9, see #12537
+			ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+			style = elem.style;
+
+		if ( computed ) {
+
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+
+			// A tribute to the "awesome hack by Dean Edwards"
+			// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+			// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+			// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+			if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+				// Remember the original values
+				width = style.width;
+				minWidth = style.minWidth;
+				maxWidth = style.maxWidth;
+
+				// Put in the new values to get a computed value out
+				style.minWidth = style.maxWidth = style.width = ret;
+				ret = computed.width;
+
+				// Revert the changed values
+				style.width = width;
+				style.minWidth = minWidth;
+				style.maxWidth = maxWidth;
+			}
+		}
+
+		return ret;
+	};
+} else if ( document.documentElement.currentStyle ) {
+	getStyles = function( elem ) {
+		return elem.currentStyle;
+	};
+
+	curCSS = function( elem, name, _computed ) {
+		var left, rs, rsLeft,
+			computed = _computed || getStyles( elem ),
+			ret = computed ? computed[ name ] : undefined,
+			style = elem.style;
+
+		// Avoid setting ret to empty string here
+		// so we don't default to auto
+		if ( ret == null && style && style[ name ] ) {
+			ret = style[ name ];
+		}
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		// but not position css attributes, as those are proportional to the parent element instead
+		// and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+			// Remember the original values
+			left = style.left;
+			rs = elem.runtimeStyle;
+			rsLeft = rs && rs.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				rs.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : ret;
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				rs.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+	var matches = rnumsplit.exec( value );
+	return matches ?
+		// Guard against undefined "subtract", e.g., when used as in cssHooks
+		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+		value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+	var i = extra === ( isBorderBox ? "border" : "content" ) ?
+		// If we already have the right measurement, avoid augmentation
+		4 :
+		// Otherwise initialize for horizontal or vertical properties
+		name === "width" ? 1 : 0,
+
+		val = 0;
+
+	for ( ; i < 4; i += 2 ) {
+		// both box models exclude margin, so add it if we want it
+		if ( extra === "margin" ) {
+			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+		}
+
+		if ( isBorderBox ) {
+			// border-box includes padding, so remove it if we want content
+			if ( extra === "content" ) {
+				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+			}
+
+			// at this point, extra isn't border nor margin, so remove border
+			if ( extra !== "margin" ) {
+				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		} else {
+			// at this point, extra isn't content, so add padding
+			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+			// at this point, extra isn't content nor padding, so add border
+			if ( extra !== "padding" ) {
+				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		}
+	}
+
+	return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+	// Start with offset property, which is equivalent to the border-box value
+	var valueIsBorderBox = true,
+		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		styles = getStyles( elem ),
+		isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+	// some non-html elements return undefined for offsetWidth, so check for null/undefined
+	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+	if ( val <= 0 || val == null ) {
+		// Fall back to computed then uncomputed css if necessary
+		val = curCSS( elem, name, styles );
+		if ( val < 0 || val == null ) {
+			val = elem.style[ name ];
+		}
+
+		// Computed unit is not pixels. Stop here and return.
+		if ( rnumnonpx.test(val) ) {
+			return val;
+		}
+
+		// we need the check for style in case a browser which returns unreliable values
+		// for getComputedStyle silently falls back to the reliable elem.style
+		valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+		// Normalize "", auto, and prepare for extra
+		val = parseFloat( val ) || 0;
+	}
+
+	// use the active box-sizing model to add/subtract irrelevant styles
+	return ( val +
+		augmentWidthOrHeight(
+			elem,
+			name,
+			extra || ( isBorderBox ? "border" : "content" ),
+			valueIsBorderBox,
+			styles
+		)
+	) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+	var doc = document,
+		display = elemdisplay[ nodeName ];
+
+	if ( !display ) {
+		display = actualDisplay( nodeName, doc );
+
+		// If the simple way fails, read from inside an iframe
+		if ( display === "none" || !display ) {
+			// Use the already-created iframe if possible
+			iframe = ( iframe ||
+				jQuery("<iframe frameborder='0' width='0' height='0'/>")
+				.css( "cssText", "display:block !important" )
+			).appendTo( doc.documentElement );
+
+			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+			doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+			doc.write("<!doctype html><html><body>");
+			doc.close();
+
+			display = actualDisplay( nodeName, doc );
+			iframe.detach();
+		}
+
+		// Store the correct default display
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+	var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+		display = jQuery.css( elem[0], "display" );
+	elem.remove();
+	return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			if ( computed ) {
+				// certain elements can have dimension info if we invisibly show them
+				// however, it must have a current display style that would benefit from this
+				return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+					jQuery.swap( elem, cssShow, function() {
+						return getWidthOrHeight( elem, name, extra );
+					}) :
+					getWidthOrHeight( elem, name, extra );
+			}
+		},
+
+		set: function( elem, value, extra ) {
+			var styles = extra && getStyles( elem );
+			return setPositiveNumber( elem, value, extra ?
+				augmentWidthOrHeight(
+					elem,
+					name,
+					extra,
+					jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+					styles
+				) : 0
+			);
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+				( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style,
+				currentStyle = elem.currentStyle,
+				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+				filter = currentStyle && currentStyle.filter || style.filter || "";
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+			// if value === "", then remove inline opacity #12685
+			if ( ( value >= 1 || value === "" ) &&
+					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+					style.removeAttribute ) {
+
+				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+				// if "filter:" is present at all, clearType is disabled, we want to avoid this
+				// style.removeAttribute is IE Only, but so apparently is this code path...
+				style.removeAttribute( "filter" );
+
+				// if there is no filter style applied in a css rule or unset inline opacity, we are done
+				if ( value === "" || currentStyle && !currentStyle.filter ) {
+					return;
+				}
+			}
+
+			// otherwise, set new filter values
+			style.filter = ralpha.test( filter ) ?
+				filter.replace( ralpha, opacity ) :
+				filter + " " + opacity;
+		}
+	};
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+	if ( !jQuery.support.reliableMarginRight ) {
+		jQuery.cssHooks.marginRight = {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+					// Work around by temporarily setting element display to inline-block
+					return jQuery.swap( elem, { "display": "inline-block" },
+						curCSS, [ elem, "marginRight" ] );
+				}
+			}
+		};
+	}
+
+	// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+	// getComputedStyle returns percent when specified for top/left/bottom/right
+	// rather than make the css module depend on the offset module, we just check for it here
+	if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+		jQuery.each( [ "top", "left" ], function( i, prop ) {
+			jQuery.cssHooks[ prop ] = {
+				get: function( elem, computed ) {
+					if ( computed ) {
+						computed = curCSS( elem, prop );
+						// if curCSS returns percentage, fallback to offset
+						return rnumnonpx.test( computed ) ?
+							jQuery( elem ).position()[ prop ] + "px" :
+							computed;
+					}
+				}
+			};
+		});
+	}
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		// Support: Opera <= 12.12
+		// Opera reports offsetWidths and offsetHeights less than zero on some elements
+		return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+			(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+	margin: "",
+	padding: "",
+	border: "Width"
+}, function( prefix, suffix ) {
+	jQuery.cssHooks[ prefix + suffix ] = {
+		expand: function( value ) {
+			var i = 0,
+				expanded = {},
+
+				// assumes a single number if not a string
+				parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+			for ( ; i < 4; i++ ) {
+				expanded[ prefix + cssExpand[ i ] + suffix ] =
+					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+			}
+
+			return expanded;
+		}
+	};
+
+	if ( !rmargin.test( prefix ) ) {
+		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+	}
+});
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+	rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+	serializeArray: function() {
+		return this.map(function(){
+			// Can add propHook for "elements" to filter or add form elements
+			var elements = jQuery.prop( this, "elements" );
+			return elements ? jQuery.makeArray( elements ) : this;
+		})
+		.filter(function(){
+			var type = this.type;
+			// Use .is(":disabled") so that fieldset[disabled] works
+			return this.name && !jQuery( this ).is( ":disabled" ) &&
+				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+				( this.checked || !manipulation_rcheckableType.test( type ) );
+		})
+		.map(function( i, elem ){
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val ){
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).get();
+	}
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+	var prefix,
+		s = [],
+		add = function( key, value ) {
+			// If value is a function, invoke it and return its value
+			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+		};
+
+	// Set traditional to true for jQuery <= 1.3.2 behavior.
+	if ( traditional === undefined ) {
+		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+	}
+
+	// If an array was passed in, assume that it is an array of form elements.
+	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+		// Serialize the form elements
+		jQuery.each( a, function() {
+			add( this.name, this.value );
+		});
+
+	} else {
+		// If traditional, encode the "old" way (the way 1.3.2 or older
+		// did it), otherwise encode params recursively.
+		for ( prefix in a ) {
+			buildParams( prefix, a[ prefix ], traditional, add );
+		}
+	}
+
+	// Return the resulting serialization
+	return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+	var name;
+
+	if ( jQuery.isArray( obj ) ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// Item is non-scalar (array or object), encode its numeric index.
+				buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
+		// Serialize object item.
+		for ( name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		return arguments.length > 0 ?
+			this.on( name, null, data, fn ) :
+			this.trigger( name );
+	};
+});
+
+jQuery.fn.extend({
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	},
+
+	bind: function( types, data, fn ) {
+		return this.on( types, null, data, fn );
+	},
+	unbind: function( types, fn ) {
+		return this.off( types, null, fn );
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.on( types, selector, data, fn );
+	},
+	undelegate: function( selector, types, fn ) {
+		// ( namespace ) or ( selector, types [, fn] )
+		return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+	}
+});
+var
+	// Document location
+	ajaxLocParts,
+	ajaxLocation,
+	ajax_nonce = jQuery.now(),
+
+	ajax_rquery = /\?/,
+	rhash = /#.*$/,
+	rts = /([?&])_=[^&]*/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+	ajaxLocation = location.href;
+} catch( e ) {
+	// Use the href attribute of an A element
+	// since IE will modify it given document.location
+	ajaxLocation = document.createElement( "a" );
+	ajaxLocation.href = "";
+	ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		var dataType,
+			i = 0,
+			dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+		if ( jQuery.isFunction( func ) ) {
+			// For each dataType in the dataTypeExpression
+			while ( (dataType = dataTypes[i++]) ) {
+				// Prepend if requested
+				if ( dataType[0] === "+" ) {
+					dataType = dataType.slice( 1 ) || "*";
+					(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+				// Otherwise append
+				} else {
+					(structure[ dataType ] = structure[ dataType ] || []).push( func );
+				}
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+	var inspected = {},
+		seekingTransport = ( structure === transports );
+
+	function inspect( dataType ) {
+		var selected;
+		inspected[ dataType ] = true;
+		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+			if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+				options.dataTypes.unshift( dataTypeOrTransport );
+				inspect( dataTypeOrTransport );
+				return false;
+			} else if ( seekingTransport ) {
+				return !( selected = dataTypeOrTransport );
+			}
+		});
+		return selected;
+	}
+
+	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var deep, key,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+	for ( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+
+	return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+	if ( typeof url !== "string" && _load ) {
+		return _load.apply( this, arguments );
+	}
+
+	var selector, response, type,
+		self = this,
+		off = url.indexOf(" ");
+
+	if ( off >= 0 ) {
+		selector = url.slice( off, url.length );
+		url = url.slice( 0, off );
+	}
+
+	// If it's a function
+	if ( jQuery.isFunction( params ) ) {
+
+		// We assume that it's the callback
+		callback = params;
+		params = undefined;
+
+	// Otherwise, build a param string
+	} else if ( params && typeof params === "object" ) {
+		type = "POST";
+	}
+
+	// If we have elements to modify, make the request
+	if ( self.length > 0 ) {
+		jQuery.ajax({
+			url: url,
+
+			// if "type" variable is undefined, then "GET" method will be used
+			type: type,
+			dataType: "html",
+			data: params
+		}).done(function( responseText ) {
+
+			// Save response for use in complete callback
+			response = arguments;
+
+			self.html( selector ?
+
+				// If a selector was specified, locate the right elements in a dummy div
+				// Exclude scripts to avoid IE 'Permission Denied' errors
+				jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+				// Otherwise use the full result
+				responseText );
+
+		}).complete( callback && function( jqXHR, status ) {
+			self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+		});
+	}
+
+	return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+	jQuery.fn[ type ] = function( fn ){
+		return this.on( type, fn );
+	};
+});
+
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {},
+
+	ajaxSettings: {
+		url: ajaxLocation,
+		type: "GET",
+		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+		global: true,
+		processData: true,
+		async: true,
+		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		throws: false,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			"*": allTypes,
+			text: "text/plain",
+			html: "text/html",
+			xml: "application/xml, text/xml",
+			json: "application/json, text/javascript"
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText",
+			json: "responseJSON"
+		},
+
+		// Data converters
+		// Keys separate source (or catchall "*") and destination types with a single space
+		converters: {
+
+			// Convert anything to text
+			"* text": String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			url: true,
+			context: true
+		}
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		return settings ?
+
+			// Building a settings object
+			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+			// Extending ajaxSettings
+			ajaxExtend( jQuery.ajaxSettings, target );
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Cross-domain detection vars
+			parts,
+			// Loop variable
+			i,
+			// URL without anti-cache param
+			cacheURL,
+			// Response headers as string
+			responseHeadersString,
+			// timeout handle
+			timeoutTimer,
+
+			// To know if global events are to be dispatched
+			fireGlobals,
+
+			transport,
+			// Response headers
+			responseHeaders,
+			// Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+			// Callbacks context
+			callbackContext = s.context || s,
+			// Context for global events is callbackContext if it is a DOM node or jQuery collection
+			globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+				jQuery( callbackContext ) :
+				jQuery.event,
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery.Callbacks("once memory"),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+			// The jqXHR state
+			state = 0,
+			// Default abort message
+			strAbort = "canceled",
+			// Fake xhr
+			jqXHR = {
+				readyState: 0,
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while ( (match = rheaders.exec( responseHeadersString )) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match == null ? null : match;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					var lname = name.toLowerCase();
+					if ( !state ) {
+						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( !state ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Status-dependent callbacks
+				statusCode: function( map ) {
+					var code;
+					if ( map ) {
+						if ( state < 2 ) {
+							for ( code in map ) {
+								// Lazy-add the new callback in a way that preserves old ones
+								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+							}
+						} else {
+							// Execute the appropriate callbacks
+							jqXHR.always( map[ jqXHR.status ] );
+						}
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					var finalText = statusText || strAbort;
+					if ( transport ) {
+						transport.abort( finalText );
+					}
+					done( 0, finalText );
+					return this;
+				}
+			};
+
+		// Attach deferreds
+		deferred.promise( jqXHR ).complete = completeDeferred.add;
+		jqXHR.success = jqXHR.done;
+		jqXHR.error = jqXHR.fail;
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// Handle falsy url in the settings object (#10093: consistency with old signature)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+		// Alias method option to type as per ticket #12004
+		s.type = options.method || options.type || s.method || s.type;
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+		// A cross-domain request is in order when we have a protocol:host:port mismatch
+		if ( s.crossDomain == null ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefilter, stop there
+		if ( state === 2 ) {
+			return jqXHR;
+		}
+
+		// We can fire global events as of now if asked to
+		fireGlobals = s.global;
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger("ajaxStart");
+		}
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Save the URL in case we're toying with the If-Modified-Since
+		// and/or If-None-Match header later on
+		cacheURL = s.url;
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+				s.url = rts.test( cacheURL ) ?
+
+					// If there is already a '_' parameter, set its value
+					cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+					// Otherwise add one to the end
+					cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+			}
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			if ( jQuery.lastModified[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+			}
+			if ( jQuery.etag[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+			// Abort if not done already and return
+			return jqXHR.abort();
+		}
+
+		// aborting is no longer a cancellation
+		strAbort = "abort";
+
+		// Install callbacks on deferreds
+		for ( i in { success: 1, error: 1, complete: 1 } ) {
+			jqXHR[ i ]( s[ i ] );
+		}
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = setTimeout(function() {
+					jqXHR.abort("timeout");
+				}, s.timeout );
+			}
+
+			try {
+				state = 1;
+				transport.send( requestHeaders, done );
+			} catch ( e ) {
+				// Propagate exception as error if not done
+				if ( state < 2 ) {
+					done( -1, e );
+				// Simply rethrow otherwise
+				} else {
+					throw e;
+				}
+			}
+		}
+
+		// Callback for when everything is done
+		function done( status, nativeStatusText, responses, headers ) {
+			var isSuccess, success, error, response, modified,
+				statusText = nativeStatusText;
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			// Determine if successful
+			isSuccess = status >= 200 && status < 300 || status === 304;
+
+			// Get response data
+			if ( responses ) {
+				response = ajaxHandleResponses( s, jqXHR, responses );
+			}
+
+			// Convert no matter what (that way responseXXX fields are always set)
+			response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+			// If successful, handle type chaining
+			if ( isSuccess ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+					modified = jqXHR.getResponseHeader("Last-Modified");
+					if ( modified ) {
+						jQuery.lastModified[ cacheURL ] = modified;
+					}
+					modified = jqXHR.getResponseHeader("etag");
+					if ( modified ) {
+						jQuery.etag[ cacheURL ] = modified;
+					}
+				}
+
+				// if no content
+				if ( status === 204 || s.type === "HEAD" ) {
+					statusText = "nocontent";
+
+				// if not modified
+				} else if ( status === 304 ) {
+					statusText = "notmodified";
+
+				// If we have data, let's convert it
+				} else {
+					statusText = response.state;
+					success = response.data;
+					error = response.error;
+					isSuccess = !error;
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if ( status || !statusText ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+					[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger("ajaxStop");
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	}
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		return jQuery.ajax({
+			url: url,
+			type: method,
+			dataType: type,
+			data: data,
+			success: callback
+		});
+	};
+});
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+	var firstDataType, ct, finalDataType, type,
+		contents = s.contents,
+		dataTypes = s.dataTypes;
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+	var conv2, current, conv, tmp, prev,
+		converters = {},
+		// Work with a copy of dataTypes in case we need to modify it for conversion
+		dataTypes = s.dataTypes.slice();
+
+	// Create converters map with lowercased keys
+	if ( dataTypes[ 1 ] ) {
+		for ( conv in s.converters ) {
+			converters[ conv.toLowerCase() ] = s.converters[ conv ];
+		}
+	}
+
+	current = dataTypes.shift();
+
+	// Convert to each sequential dataType
+	while ( current ) {
+
+		if ( s.responseFields[ current ] ) {
+			jqXHR[ s.responseFields[ current ] ] = response;
+		}
+
+		// Apply the dataFilter if provided
+		if ( !prev && isSuccess && s.dataFilter ) {
+			response = s.dataFilter( response, s.dataType );
+		}
+
+		prev = current;
+		current = dataTypes.shift();
+
+		if ( current ) {
+
+			// There's only work to do if current dataType is non-auto
+			if ( current === "*" ) {
+
+				current = prev;
+
+			// Convert response if prev dataType is non-auto and differs from current
+			} else if ( prev !== "*" && prev !== current ) {
+
+				// Seek a direct converter
+				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+				// If none found, seek a pair
+				if ( !conv ) {
+					for ( conv2 in converters ) {
+
+						// If conv2 outputs current
+						tmp = conv2.split( " " );
+						if ( tmp[ 1 ] === current ) {
+
+							// If prev can be converted to accepted input
+							conv = converters[ prev + " " + tmp[ 0 ] ] ||
+								converters[ "* " + tmp[ 0 ] ];
+							if ( conv ) {
+								// Condense equivalence converters
+								if ( conv === true ) {
+									conv = converters[ conv2 ];
+
+								// Otherwise, insert the intermediate dataType
+								} else if ( converters[ conv2 ] !== true ) {
+									current = tmp[ 0 ];
+									dataTypes.unshift( tmp[ 1 ] );
+								}
+								break;
+							}
+						}
+					}
+				}
+
+				// Apply converter (if not an equivalence)
+				if ( conv !== true ) {
+
+					// Unless errors are allowed to bubble, catch and return them
+					if ( conv && s[ "throws" ] ) {
+						response = conv( response );
+					} else {
+						try {
+							response = conv( response );
+						} catch ( e ) {
+							return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+						}
+					}
+				}
+			}
+		}
+	}
+
+	return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /(?:java|ecma)script/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.head || jQuery("head")[0] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement("script");
+
+				script.async = true;
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( script.parentNode ) {
+							script.parentNode.removeChild( script );
+						}
+
+						// Dereference the script
+						script = null;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+
+				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+				// Use native DOM manipulation to avoid our domManip AJAX trickery
+				head.insertBefore( script, head.firstChild );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( undefined, true );
+				}
+			}
+		};
+	}
+});
+var oldCallbacks = [],
+	rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
+		this[ callback ] = true;
+		return callback;
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var callbackName, overwritten, responseContainer,
+		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+			"url" :
+			typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+		);
+
+	// Handle iff the expected data type is "jsonp" or we have a parameter to set
+	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+		// Get callback name, remembering preexisting value associated with it
+		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+			s.jsonpCallback() :
+			s.jsonpCallback;
+
+		// Insert callback into url or form data
+		if ( jsonProp ) {
+			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+		} else if ( s.jsonp !== false ) {
+			s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+		}
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( callbackName + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Install callback
+		overwritten = window[ callbackName ];
+		window[ callbackName ] = function() {
+			responseContainer = arguments;
+		};
+
+		// Clean-up function (fires after converters)
+		jqXHR.always(function() {
+			// Restore preexisting value
+			window[ callbackName ] = overwritten;
+
+			// Save back as free
+			if ( s[ callbackName ] ) {
+				// make sure that re-using the options doesn't screw things around
+				s.jsonpCallback = originalSettings.jsonpCallback;
+
+				// save the callback name for future use
+				oldCallbacks.push( callbackName );
+			}
+
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+				overwritten( responseContainer[ 0 ] );
+			}
+
+			responseContainer = overwritten = undefined;
+		});
+
+		// Delegate to script
+		return "script";
+	}
+});
+var xhrCallbacks, xhrSupported,
+	xhrId = 0,
+	// #5280: Internet Explorer will keep connections alive if we don't abort on unload
+	xhrOnUnloadAbort = window.ActiveXObject && function() {
+		// Abort all pending requests
+		var key;
+		for ( key in xhrCallbacks ) {
+			xhrCallbacks[ key ]( undefined, true );
+		}
+	};
+
+// Functions to create xhrs
+function createStandardXHR() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch( e ) {}
+}
+
+function createActiveXHR() {
+	try {
+		return new window.ActiveXObject("Microsoft.XMLHTTP");
+	} catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		return !this.isLocal && createStandardXHR() || createActiveXHR();
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	createStandardXHR;
+
+// Determine support properties
+xhrSupported = jQuery.ajaxSettings.xhr();
+jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = jQuery.support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// Get a new xhr
+					var handle, i,
+						xhr = s.xhr();
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Apply custom fields if provided
+					if ( s.xhrFields ) {
+						for ( i in s.xhrFields ) {
+							xhr[ i ] = s.xhrFields[ i ];
+						}
+					}
+
+					// Override mime type if needed
+					if ( s.mimeType && xhr.overrideMimeType ) {
+						xhr.overrideMimeType( s.mimeType );
+					}
+
+					// X-Requested-With header
+					// For cross-domain requests, seeing as conditions for a preflight are
+					// akin to a jigsaw puzzle, we simply never set it to be sure.
+					// (it can always be set on a per-request basis or even using ajaxSetup)
+					// For same-domain requests, won't change header if already provided.
+					if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+						headers["X-Requested-With"] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						for ( i in headers ) {
+							xhr.setRequestHeader( i, headers[ i ] );
+						}
+					} catch( err ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+						var status, responseHeaders, statusText, responses;
+
+						// Firefox throws exceptions when accessing properties
+						// of an xhr when a network error occurred
+						// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+						try {
+
+							// Was never called and is aborted or complete
+							if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+								// Only called once
+								callback = undefined;
+
+								// Do not keep as active anymore
+								if ( handle ) {
+									xhr.onreadystatechange = jQuery.noop;
+									if ( xhrOnUnloadAbort ) {
+										delete xhrCallbacks[ handle ];
+									}
+								}
+
+								// If it's an abort
+								if ( isAbort ) {
+									// Abort it manually if needed
+									if ( xhr.readyState !== 4 ) {
+										xhr.abort();
+									}
+								} else {
+									responses = {};
+									status = xhr.status;
+									responseHeaders = xhr.getAllResponseHeaders();
+
+									// When requesting binary data, IE6-9 will throw an exception
+									// on any attempt to access responseText (#11426)
+									if ( typeof xhr.responseText === "string" ) {
+										responses.text = xhr.responseText;
+									}
+
+									// Firefox throws an exception when accessing
+									// statusText for faulty cross-domain requests
+									try {
+										statusText = xhr.statusText;
+									} catch( e ) {
+										// We normalize with Webkit giving an empty statusText
+										statusText = "";
+									}
+
+									// Filter status for non standard behaviors
+
+									// If the request is local and we have data: assume a success
+									// (success with no data won't get notified, that's the best we
+									// can do given current implementations)
+									if ( !status && s.isLocal && !s.crossDomain ) {
+										status = responses.text ? 200 : 404;
+									// IE - #1450: sometimes returns 1223 when it should be 204
+									} else if ( status === 1223 ) {
+										status = 204;
+									}
+								}
+							}
+						} catch( firefoxAccessException ) {
+							if ( !isAbort ) {
+								complete( -1, firefoxAccessException );
+							}
+						}
+
+						// Call complete if needed
+						if ( responses ) {
+							complete( status, statusText, responses, responseHeaders );
+						}
+					};
+
+					if ( !s.async ) {
+						// if we're in sync mode we fire the callback
+						callback();
+					} else if ( xhr.readyState === 4 ) {
+						// (IE6 & IE7) if it's in cache and has been
+						// retrieved directly we need to fire the callback
+						setTimeout( callback );
+					} else {
+						handle = ++xhrId;
+						if ( xhrOnUnloadAbort ) {
+							// Create the active xhrs callbacks list if needed
+							// and attach the unload handler
+							if ( !xhrCallbacks ) {
+								xhrCallbacks = {};
+								jQuery( window ).unload( xhrOnUnloadAbort );
+							}
+							// Add to list of active xhrs callbacks
+							xhrCallbacks[ handle ] = callback;
+						}
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback( undefined, true );
+					}
+				}
+			};
+		}
+	});
+}
+var fxNow, timerId,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+	rrun = /queueHooks$/,
+	animationPrefilters = [ defaultPrefilter ],
+	tweeners = {
+		"*": [function( prop, value ) {
+			var tween = this.createTween( prop, value ),
+				target = tween.cur(),
+				parts = rfxnum.exec( value ),
+				unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+				// Starting value computation is required for potential unit mismatches
+				start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+					rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+				scale = 1,
+				maxIterations = 20;
+
+			if ( start && start[ 3 ] !== unit ) {
+				// Trust units reported by jQuery.css
+				unit = unit || start[ 3 ];
+
+				// Make sure we update the tween properties later on
+				parts = parts || [];
+
+				// Iteratively approximate from a nonzero starting point
+				start = +target || 1;
+
+				do {
+					// If previous iteration zeroed out, double until we get *something*
+					// Use a string for doubling factor so we don't accidentally see scale as unchanged below
+					scale = scale || ".5";
+
+					// Adjust and apply
+					start = start / scale;
+					jQuery.style( tween.elem, prop, start + unit );
+
+				// Update scale, tolerating zero or NaN from tween.cur()
+				// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+				} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+			}
+
+			// Update tween properties
+			if ( parts ) {
+				start = tween.start = +start || +target || 0;
+				tween.unit = unit;
+				// If a +=/-= token was provided, we're doing a relative animation
+				tween.end = parts[ 1 ] ?
+					start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+					+parts[ 2 ];
+			}
+
+			return tween;
+		}]
+	};
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	setTimeout(function() {
+		fxNow = undefined;
+	});
+	return ( fxNow = jQuery.now() );
+}
+
+function createTween( value, prop, animation ) {
+	var tween,
+		collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+		index = 0,
+		length = collection.length;
+	for ( ; index < length; index++ ) {
+		if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+			// we're done with this property
+			return tween;
+		}
+	}
+}
+
+function Animation( elem, properties, options ) {
+	var result,
+		stopped,
+		index = 0,
+		length = animationPrefilters.length,
+		deferred = jQuery.Deferred().always( function() {
+			// don't match elem in the :animated selector
+			delete tick.elem;
+		}),
+		tick = function() {
+			if ( stopped ) {
+				return false;
+			}
+			var currentTime = fxNow || createFxNow(),
+				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+				// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+				temp = remaining / animation.duration || 0,
+				percent = 1 - temp,
+				index = 0,
+				length = animation.tweens.length;
+
+			for ( ; index < length ; index++ ) {
+				animation.tweens[ index ].run( percent );
+			}
+
+			deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+			if ( percent < 1 && length ) {
+				return remaining;
+			} else {
+				deferred.resolveWith( elem, [ animation ] );
+				return false;
+			}
+		},
+		animation = deferred.promise({
+			elem: elem,
+			props: jQuery.extend( {}, properties ),
+			opts: jQuery.extend( true, { specialEasing: {} }, options ),
+			originalProperties: properties,
+			originalOptions: options,
+			startTime: fxNow || createFxNow(),
+			duration: options.duration,
+			tweens: [],
+			createTween: function( prop, end ) {
+				var tween = jQuery.Tween( elem, animation.opts, prop, end,
+						animation.opts.specialEasing[ prop ] || animation.opts.easing );
+				animation.tweens.push( tween );
+				return tween;
+			},
+			stop: function( gotoEnd ) {
+				var index = 0,
+					// if we are going to the end, we want to run all the tweens
+					// otherwise we skip this part
+					length = gotoEnd ? animation.tweens.length : 0;
+				if ( stopped ) {
+					return this;
+				}
+				stopped = true;
+				for ( ; index < length ; index++ ) {
+					animation.tweens[ index ].run( 1 );
+				}
+
+				// resolve when we played the last frame
+				// otherwise, reject
+				if ( gotoEnd ) {
+					deferred.resolveWith( elem, [ animation, gotoEnd ] );
+				} else {
+					deferred.rejectWith( elem, [ animation, gotoEnd ] );
+				}
+				return this;
+			}
+		}),
+		props = animation.props;
+
+	propFilter( props, animation.opts.specialEasing );
+
+	for ( ; index < length ; index++ ) {
+		result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+		if ( result ) {
+			return result;
+		}
+	}
+
+	jQuery.map( props, createTween, animation );
+
+	if ( jQuery.isFunction( animation.opts.start ) ) {
+		animation.opts.start.call( elem, animation );
+	}
+
+	jQuery.fx.timer(
+		jQuery.extend( tick, {
+			elem: elem,
+			anim: animation,
+			queue: animation.opts.queue
+		})
+	);
+
+	// attach callbacks from options
+	return animation.progress( animation.opts.progress )
+		.done( animation.opts.done, animation.opts.complete )
+		.fail( animation.opts.fail )
+		.always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+	var index, name, easing, value, hooks;
+
+	// camelCase, specialEasing and expand cssHook pass
+	for ( index in props ) {
+		name = jQuery.camelCase( index );
+		easing = specialEasing[ name ];
+		value = props[ index ];
+		if ( jQuery.isArray( value ) ) {
+			easing = value[ 1 ];
+			value = props[ index ] = value[ 0 ];
+		}
+
+		if ( index !== name ) {
+			props[ name ] = value;
+			delete props[ index ];
+		}
+
+		hooks = jQuery.cssHooks[ name ];
+		if ( hooks && "expand" in hooks ) {
+			value = hooks.expand( value );
+			delete props[ name ];
+
+			// not quite $.extend, this wont overwrite keys already present.
+			// also - reusing 'index' from above because we have the correct "name"
+			for ( index in value ) {
+				if ( !( index in props ) ) {
+					props[ index ] = value[ index ];
+					specialEasing[ index ] = easing;
+				}
+			}
+		} else {
+			specialEasing[ name ] = easing;
+		}
+	}
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+	tweener: function( props, callback ) {
+		if ( jQuery.isFunction( props ) ) {
+			callback = props;
+			props = [ "*" ];
+		} else {
+			props = props.split(" ");
+		}
+
+		var prop,
+			index = 0,
+			length = props.length;
+
+		for ( ; index < length ; index++ ) {
+			prop = props[ index ];
+			tweeners[ prop ] = tweeners[ prop ] || [];
+			tweeners[ prop ].unshift( callback );
+		}
+	},
+
+	prefilter: function( callback, prepend ) {
+		if ( prepend ) {
+			animationPrefilters.unshift( callback );
+		} else {
+			animationPrefilters.push( callback );
+		}
+	}
+});
+
+function defaultPrefilter( elem, props, opts ) {
+	/* jshint validthis: true */
+	var prop, value, toggle, tween, hooks, oldfire,
+		anim = this,
+		orig = {},
+		style = elem.style,
+		hidden = elem.nodeType && isHidden( elem ),
+		dataShow = jQuery._data( elem, "fxshow" );
+
+	// handle queue: false promises
+	if ( !opts.queue ) {
+		hooks = jQuery._queueHooks( elem, "fx" );
+		if ( hooks.unqueued == null ) {
+			hooks.unqueued = 0;
+			oldfire = hooks.empty.fire;
+			hooks.empty.fire = function() {
+				if ( !hooks.unqueued ) {
+					oldfire();
+				}
+			};
+		}
+		hooks.unqueued++;
+
+		anim.always(function() {
+			// doing this makes sure that the complete handler will be called
+			// before this completes
+			anim.always(function() {
+				hooks.unqueued--;
+				if ( !jQuery.queue( elem, "fx" ).length ) {
+					hooks.empty.fire();
+				}
+			});
+		});
+	}
+
+	// height/width overflow pass
+	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+		// Make sure that nothing sneaks out
+		// Record all 3 overflow attributes because IE does not
+		// change the overflow attribute when overflowX and
+		// overflowY are set to the same value
+		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+		// Set display property to inline-block for height/width
+		// animations on inline elements that are having width/height animated
+		if ( jQuery.css( elem, "display" ) === "inline" &&
+				jQuery.css( elem, "float" ) === "none" ) {
+
+			// inline-level elements accept inline-block;
+			// block-level elements need to be inline with layout
+			if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
+				style.display = "inline-block";
+
+			} else {
+				style.zoom = 1;
+			}
+		}
+	}
+
+	if ( opts.overflow ) {
+		style.overflow = "hidden";
+		if ( !jQuery.support.shrinkWrapBlocks ) {
+			anim.always(function() {
+				style.overflow = opts.overflow[ 0 ];
+				style.overflowX = opts.overflow[ 1 ];
+				style.overflowY = opts.overflow[ 2 ];
+			});
+		}
+	}
+
+
+	// show/hide pass
+	for ( prop in props ) {
+		value = props[ prop ];
+		if ( rfxtypes.exec( value ) ) {
+			delete props[ prop ];
+			toggle = toggle || value === "toggle";
+			if ( value === ( hidden ? "hide" : "show" ) ) {
+				continue;
+			}
+			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+		}
+	}
+
+	if ( !jQuery.isEmptyObject( orig ) ) {
+		if ( dataShow ) {
+			if ( "hidden" in dataShow ) {
+				hidden = dataShow.hidden;
+			}
+		} else {
+			dataShow = jQuery._data( elem, "fxshow", {} );
+		}
+
+		// store state if its toggle - enables .stop().toggle() to "reverse"
+		if ( toggle ) {
+			dataShow.hidden = !hidden;
+		}
+		if ( hidden ) {
+			jQuery( elem ).show();
+		} else {
+			anim.done(function() {
+				jQuery( elem ).hide();
+			});
+		}
+		anim.done(function() {
+			var prop;
+			jQuery._removeData( elem, "fxshow" );
+			for ( prop in orig ) {
+				jQuery.style( elem, prop, orig[ prop ] );
+			}
+		});
+		for ( prop in orig ) {
+			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+			if ( !( prop in dataShow ) ) {
+				dataShow[ prop ] = tween.start;
+				if ( hidden ) {
+					tween.end = tween.start;
+					tween.start = prop === "width" || prop === "height" ? 1 : 0;
+				}
+			}
+		}
+	}
+}
+
+function Tween( elem, options, prop, end, easing ) {
+	return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+	constructor: Tween,
+	init: function( elem, options, prop, end, easing, unit ) {
+		this.elem = elem;
+		this.prop = prop;
+		this.easing = easing || "swing";
+		this.options = options;
+		this.start = this.now = this.cur();
+		this.end = end;
+		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+	},
+	cur: function() {
+		var hooks = Tween.propHooks[ this.prop ];
+
+		return hooks && hooks.get ?
+			hooks.get( this ) :
+			Tween.propHooks._default.get( this );
+	},
+	run: function( percent ) {
+		var eased,
+			hooks = Tween.propHooks[ this.prop ];
+
+		if ( this.options.duration ) {
+			this.pos = eased = jQuery.easing[ this.easing ](
+				percent, this.options.duration * percent, 0, 1, this.options.duration
+			);
+		} else {
+			this.pos = eased = percent;
+		}
+		this.now = ( this.end - this.start ) * eased + this.start;
+
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		if ( hooks && hooks.set ) {
+			hooks.set( this );
+		} else {
+			Tween.propHooks._default.set( this );
+		}
+		return this;
+	}
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+	_default: {
+		get: function( tween ) {
+			var result;
+
+			if ( tween.elem[ tween.prop ] != null &&
+				(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+				return tween.elem[ tween.prop ];
+			}
+
+			// passing an empty string as a 3rd parameter to .css will automatically
+			// attempt a parseFloat and fallback to a string if the parse fails
+			// so, simple values such as "10px" are parsed to Float.
+			// complex values such as "rotate(1rad)" are returned as is.
+			result = jQuery.css( tween.elem, tween.prop, "" );
+			// Empty strings, null, undefined and "auto" are converted to 0.
+			return !result || result === "auto" ? 0 : result;
+		},
+		set: function( tween ) {
+			// use step hook for back compat - use cssHook if its there - use .style if its
+			// available and use plain properties where available
+			if ( jQuery.fx.step[ tween.prop ] ) {
+				jQuery.fx.step[ tween.prop ]( tween );
+			} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+			} else {
+				tween.elem[ tween.prop ] = tween.now;
+			}
+		}
+	}
+};
+
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+	set: function( tween ) {
+		if ( tween.elem.nodeType && tween.elem.parentNode ) {
+			tween.elem[ tween.prop ] = tween.now;
+		}
+	}
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+	var cssFn = jQuery.fn[ name ];
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return speed == null || typeof speed === "boolean" ?
+			cssFn.apply( this, arguments ) :
+			this.animate( genFx( name, true ), speed, easing, callback );
+	};
+});
+
+jQuery.fn.extend({
+	fadeTo: function( speed, to, easing, callback ) {
+
+		// show any hidden elements after setting opacity to 0
+		return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+			// animate to the value specified
+			.end().animate({ opacity: to }, speed, easing, callback );
+	},
+	animate: function( prop, speed, easing, callback ) {
+		var empty = jQuery.isEmptyObject( prop ),
+			optall = jQuery.speed( speed, easing, callback ),
+			doAnimation = function() {
+				// Operate on a copy of prop so per-property easing won't be lost
+				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+				// Empty animations, or finishing resolves immediately
+				if ( empty || jQuery._data( this, "finish" ) ) {
+					anim.stop( true );
+				}
+			};
+			doAnimation.finish = doAnimation;
+
+		return empty || optall.queue === false ?
+			this.each( doAnimation ) :
+			this.queue( optall.queue, doAnimation );
+	},
+	stop: function( type, clearQueue, gotoEnd ) {
+		var stopQueue = function( hooks ) {
+			var stop = hooks.stop;
+			delete hooks.stop;
+			stop( gotoEnd );
+		};
+
+		if ( typeof type !== "string" ) {
+			gotoEnd = clearQueue;
+			clearQueue = type;
+			type = undefined;
+		}
+		if ( clearQueue && type !== false ) {
+			this.queue( type || "fx", [] );
+		}
+
+		return this.each(function() {
+			var dequeue = true,
+				index = type != null && type + "queueHooks",
+				timers = jQuery.timers,
+				data = jQuery._data( this );
+
+			if ( index ) {
+				if ( data[ index ] && data[ index ].stop ) {
+					stopQueue( data[ index ] );
+				}
+			} else {
+				for ( index in data ) {
+					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+						stopQueue( data[ index ] );
+					}
+				}
+			}
+
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+					timers[ index ].anim.stop( gotoEnd );
+					dequeue = false;
+					timers.splice( index, 1 );
+				}
+			}
+
+			// start the next in the queue if the last step wasn't forced
+			// timers currently will call their complete callbacks, which will dequeue
+			// but only if they were gotoEnd
+			if ( dequeue || !gotoEnd ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	},
+	finish: function( type ) {
+		if ( type !== false ) {
+			type = type || "fx";
+		}
+		return this.each(function() {
+			var index,
+				data = jQuery._data( this ),
+				queue = data[ type + "queue" ],
+				hooks = data[ type + "queueHooks" ],
+				timers = jQuery.timers,
+				length = queue ? queue.length : 0;
+
+			// enable finishing flag on private data
+			data.finish = true;
+
+			// empty the queue first
+			jQuery.queue( this, type, [] );
+
+			if ( hooks && hooks.stop ) {
+				hooks.stop.call( this, true );
+			}
+
+			// look for any active animations, and finish them
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+					timers[ index ].anim.stop( true );
+					timers.splice( index, 1 );
+				}
+			}
+
+			// look for any animations in the old queue and finish them
+			for ( index = 0; index < length; index++ ) {
+				if ( queue[ index ] && queue[ index ].finish ) {
+					queue[ index ].finish.call( this );
+				}
+			}
+
+			// turn off finishing flag
+			delete data.finish;
+		});
+	}
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+	var which,
+		attrs = { height: type },
+		i = 0;
+
+	// if we include width, step value is 1 to do all cssExpand values,
+	// if we don't include width, step value is 2 to skip over Left and Right
+	includeWidth = includeWidth? 1 : 0;
+	for( ; i < 4 ; i += 2 - includeWidth ) {
+		which = cssExpand[ i ];
+		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+	}
+
+	if ( includeWidth ) {
+		attrs.opacity = attrs.width = type;
+	}
+
+	return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx("show"),
+	slideUp: genFx("hide"),
+	slideToggle: genFx("toggle"),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+		complete: fn || !fn && easing ||
+			jQuery.isFunction( speed ) && speed,
+		duration: speed,
+		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+	};
+
+	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+		opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+	// normalize opt.queue - true/undefined/null -> "fx"
+	if ( opt.queue == null || opt.queue === true ) {
+		opt.queue = "fx";
+	}
+
+	// Queueing
+	opt.old = opt.complete;
+
+	opt.complete = function() {
+		if ( jQuery.isFunction( opt.old ) ) {
+			opt.old.call( this );
+		}
+
+		if ( opt.queue ) {
+			jQuery.dequeue( this, opt.queue );
+		}
+	};
+
+	return opt;
+};
+
+jQuery.easing = {
+	linear: function( p ) {
+		return p;
+	},
+	swing: function( p ) {
+		return 0.5 - Math.cos( p*Math.PI ) / 2;
+	}
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+	var timer,
+		timers = jQuery.timers,
+		i = 0;
+
+	fxNow = jQuery.now();
+
+	for ( ; i < timers.length; i++ ) {
+		timer = timers[ i ];
+		// Checks the timer has not already been removed
+		if ( !timer() && timers[ i ] === timer ) {
+			timers.splice( i--, 1 );
+		}
+	}
+
+	if ( !timers.length ) {
+		jQuery.fx.stop();
+	}
+	fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+	if ( timer() && jQuery.timers.push( timer ) ) {
+		jQuery.fx.start();
+	}
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+	if ( !timerId ) {
+		timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+	}
+};
+
+jQuery.fx.stop = function() {
+	clearInterval( timerId );
+	timerId = null;
+};
+
+jQuery.fx.speeds = {
+	slow: 600,
+	fast: 200,
+	// Default speed
+	_default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+jQuery.fn.offset = function( options ) {
+	if ( arguments.length ) {
+		return options === undefined ?
+			this :
+			this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+	}
+
+	var docElem, win,
+		box = { top: 0, left: 0 },
+		elem = this[ 0 ],
+		doc = elem && elem.ownerDocument;
+
+	if ( !doc ) {
+		return;
+	}
+
+	docElem = doc.documentElement;
+
+	// Make sure it's not a disconnected DOM node
+	if ( !jQuery.contains( docElem, elem ) ) {
+		return box;
+	}
+
+	// If we don't have gBCR, just use 0,0 rather than error
+	// BlackBerry 5, iOS 3 (original iPhone)
+	if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
+		box = elem.getBoundingClientRect();
+	}
+	win = getWindow( doc );
+	return {
+		top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
+		left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+	};
+};
+
+jQuery.offset = {
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if ( options.top != null ) {
+			props.top = ( options.top - curOffset.top ) + curTop;
+		}
+		if ( options.left != null ) {
+			props.left = ( options.left - curOffset.left ) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+
+	position: function() {
+		if ( !this[ 0 ] ) {
+			return;
+		}
+
+		var offsetParent, offset,
+			parentOffset = { top: 0, left: 0 },
+			elem = this[ 0 ];
+
+		// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
+		if ( jQuery.css( elem, "position" ) === "fixed" ) {
+			// we assume that getBoundingClientRect is available when computed position is fixed
+			offset = elem.getBoundingClientRect();
+		} else {
+			// Get *real* offsetParent
+			offsetParent = this.offsetParent();
+
+			// Get correct offsets
+			offset = this.offset();
+			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+				parentOffset = offsetParent.offset();
+			}
+
+			// Add offsetParent borders
+			parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+			parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+		}
+
+		// Subtract parent offsets and element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		return {
+			top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || docElem;
+			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent || docElem;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+	var top = /Y/.test( prop );
+
+	jQuery.fn[ method ] = function( val ) {
+		return jQuery.access( this, function( elem, method, val ) {
+			var win = getWindow( elem );
+
+			if ( val === undefined ) {
+				return win ? (prop in win) ? win[ prop ] :
+					win.document.documentElement[ method ] :
+					elem[ method ];
+			}
+
+			if ( win ) {
+				win.scrollTo(
+					!top ? val : jQuery( win ).scrollLeft(),
+					top ? val : jQuery( win ).scrollTop()
+				);
+
+			} else {
+				elem[ method ] = val;
+			}
+		}, method, val, arguments.length, null );
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+		// margin is only for outerHeight, outerWidth
+		jQuery.fn[ funcName ] = function( margin, value ) {
+			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+			return jQuery.access( this, function( elem, type, value ) {
+				var doc;
+
+				if ( jQuery.isWindow( elem ) ) {
+					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+					// isn't a whole lot we can do. See pull request at this URL for discussion:
+					// https://github.com/jquery/jquery/pull/764
+					return elem.document.documentElement[ "client" + name ];
+				}
+
+				// Get document width or height
+				if ( elem.nodeType === 9 ) {
+					doc = elem.documentElement;
+
+					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+					// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+					return Math.max(
+						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+						elem.body[ "offset" + name ], doc[ "offset" + name ],
+						doc[ "client" + name ]
+					);
+				}
+
+				return value === undefined ?
+					// Get width or height on the element, requesting but not forcing parseFloat
+					jQuery.css( elem, type, extra ) :
+
+					// Set width or height on the element
+					jQuery.style( elem, type, value, extra );
+			}, type, chainable ? margin : undefined, chainable, null );
+		};
+	});
+});
+// Limit scope pollution from any deprecated API
+// (function() {
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+	return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// })();
+if ( typeof module === "object" && module && typeof module.exports === "object" ) {
+	// Expose jQuery as module.exports in loaders that implement the Node
+	// module pattern (including browserify). Do not create the global, since
+	// the user will be storing it themselves locally, and globals are frowned
+	// upon in the Node module world.
+	module.exports = jQuery;
+} else {
+	// Otherwise expose jQuery to the global object as usual
+	window.jQuery = window.$ = jQuery;
+
+	// Register as a named AMD module, since jQuery can be concatenated with other
+	// files that may use define, but not via a proper concatenation script that
+	// understands anonymous AMD modules. A named AMD is safest and most robust
+	// way to register. Lowercase jquery is used because AMD module names are
+	// derived from file names, and jQuery is normally delivered in a lowercase
+	// file name. Do this after creating the global so that if an AMD module wants
+	// to call noConflict to hide this version of jQuery, it will work.
+	if ( typeof define === "function" && define.amd ) {
+		define( "jquery", [], function () { return jQuery; } );
+	}
+}
+
+})( window );
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_flat_0_aaaaaa_40x100.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_flat_75_ffffff_40x100.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_glass_55_fbf9ee_1x400.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_glass_65_ffffff_1x400.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_glass_75_dadada_1x400.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_glass_75_e6e6e6_1x400.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_glass_95_fef1ec_1x400.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-icons_222222_256x240.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-icons_2e83ff_256x240.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-icons_454545_256x240.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-icons_888888_256x240.png has changed
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/images/ui-icons_cd0a0a_256x240.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-1.10.2.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,9789 @@
+/*!
+ * jQuery JavaScript Library v1.10.2
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03T13:48Z
+ */
+(function( window, undefined ) {
+
+// Can't do this because several apps including ASP.NET trace
+// the stack via arguments.caller.callee and Firefox dies if
+// you try to trace through "use strict" call chains. (#13335)
+// Support: Firefox 18+
+//"use strict";
+var
+	// The deferred used on DOM ready
+	readyList,
+
+	// A central reference to the root jQuery(document)
+	rootjQuery,
+
+	// Support: IE<10
+	// For `typeof xmlNode.method` instead of `xmlNode.method !== undefined`
+	core_strundefined = typeof undefined,
+
+	// Use the correct document accordingly with window argument (sandbox)
+	location = window.location,
+	document = window.document,
+	docElem = document.documentElement,
+
+	// Map over jQuery in case of overwrite
+	_jQuery = window.jQuery,
+
+	// Map over the $ in case of overwrite
+	_$ = window.$,
+
+	// [[Class]] -> type pairs
+	class2type = {},
+
+	// List of deleted data cache ids, so we can reuse them
+	core_deletedIds = [],
+
+	core_version = "1.10.2",
+
+	// Save a reference to some core methods
+	core_concat = core_deletedIds.concat,
+	core_push = core_deletedIds.push,
+	core_slice = core_deletedIds.slice,
+	core_indexOf = core_deletedIds.indexOf,
+	core_toString = class2type.toString,
+	core_hasOwn = class2type.hasOwnProperty,
+	core_trim = core_version.trim,
+
+	// Define a local copy of jQuery
+	jQuery = function( selector, context ) {
+		// The jQuery object is actually just the init constructor 'enhanced'
+		return new jQuery.fn.init( selector, context, rootjQuery );
+	},
+
+	// Used for matching numbers
+	core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+
+	// Used for splitting on whitespace
+	core_rnotwhite = /\S+/g,
+
+	// Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
+	rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+
+	// A simple way to check for HTML strings
+	// Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+	// Strict HTML recognition (#11290: must start with <)
+	rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
+
+	// Match a standalone tag
+	rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
+
+	// JSON RegExp
+	rvalidchars = /^[\],:{}\s]*$/,
+	rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+	rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
+	rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
+
+	// Matches dashed string for camelizing
+	rmsPrefix = /^-ms-/,
+	rdashAlpha = /-([\da-z])/gi,
+
+	// Used by jQuery.camelCase as callback to replace()
+	fcamelCase = function( all, letter ) {
+		return letter.toUpperCase();
+	},
+
+	// The ready event handler
+	completed = function( event ) {
+
+		// readyState === "complete" is good enough for us to call the dom ready in oldIE
+		if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
+			detach();
+			jQuery.ready();
+		}
+	},
+	// Clean-up method for dom ready events
+	detach = function() {
+		if ( document.addEventListener ) {
+			document.removeEventListener( "DOMContentLoaded", completed, false );
+			window.removeEventListener( "load", completed, false );
+
+		} else {
+			document.detachEvent( "onreadystatechange", completed );
+			window.detachEvent( "onload", completed );
+		}
+	};
+
+jQuery.fn = jQuery.prototype = {
+	// The current version of jQuery being used
+	jquery: core_version,
+
+	constructor: jQuery,
+	init: function( selector, context, rootjQuery ) {
+		var match, elem;
+
+		// HANDLE: $(""), $(null), $(undefined), $(false)
+		if ( !selector ) {
+			return this;
+		}
+
+		// Handle HTML strings
+		if ( typeof selector === "string" ) {
+			if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
+				// Assume that strings that start and end with <> are HTML and skip the regex check
+				match = [ null, selector, null ];
+
+			} else {
+				match = rquickExpr.exec( selector );
+			}
+
+			// Match html or make sure no context is specified for #id
+			if ( match && (match[1] || !context) ) {
+
+				// HANDLE: $(html) -> $(array)
+				if ( match[1] ) {
+					context = context instanceof jQuery ? context[0] : context;
+
+					// scripts is true for back-compat
+					jQuery.merge( this, jQuery.parseHTML(
+						match[1],
+						context && context.nodeType ? context.ownerDocument || context : document,
+						true
+					) );
+
+					// HANDLE: $(html, props)
+					if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
+						for ( match in context ) {
+							// Properties of context are called as methods if possible
+							if ( jQuery.isFunction( this[ match ] ) ) {
+								this[ match ]( context[ match ] );
+
+							// ...and otherwise set as attributes
+							} else {
+								this.attr( match, context[ match ] );
+							}
+						}
+					}
+
+					return this;
+
+				// HANDLE: $(#id)
+				} else {
+					elem = document.getElementById( match[2] );
+
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE and Opera return items
+						// by name instead of ID
+						if ( elem.id !== match[2] ) {
+							return rootjQuery.find( selector );
+						}
+
+						// Otherwise, we inject the element directly into the jQuery object
+						this.length = 1;
+						this[0] = elem;
+					}
+
+					this.context = document;
+					this.selector = selector;
+					return this;
+				}
+
+			// HANDLE: $(expr, $(...))
+			} else if ( !context || context.jquery ) {
+				return ( context || rootjQuery ).find( selector );
+
+			// HANDLE: $(expr, context)
+			// (which is just equivalent to: $(context).find(expr)
+			} else {
+				return this.constructor( context ).find( selector );
+			}
+
+		// HANDLE: $(DOMElement)
+		} else if ( selector.nodeType ) {
+			this.context = this[0] = selector;
+			this.length = 1;
+			return this;
+
+		// HANDLE: $(function)
+		// Shortcut for document ready
+		} else if ( jQuery.isFunction( selector ) ) {
+			return rootjQuery.ready( selector );
+		}
+
+		if ( selector.selector !== undefined ) {
+			this.selector = selector.selector;
+			this.context = selector.context;
+		}
+
+		return jQuery.makeArray( selector, this );
+	},
+
+	// Start with an empty selector
+	selector: "",
+
+	// The default length of a jQuery object is 0
+	length: 0,
+
+	toArray: function() {
+		return core_slice.call( this );
+	},
+
+	// Get the Nth element in the matched element set OR
+	// Get the whole matched element set as a clean array
+	get: function( num ) {
+		return num == null ?
+
+			// Return a 'clean' array
+			this.toArray() :
+
+			// Return just the object
+			( num < 0 ? this[ this.length + num ] : this[ num ] );
+	},
+
+	// Take an array of elements and push it onto the stack
+	// (returning the new matched element set)
+	pushStack: function( elems ) {
+
+		// Build a new jQuery matched element set
+		var ret = jQuery.merge( this.constructor(), elems );
+
+		// Add the old object onto the stack (as a reference)
+		ret.prevObject = this;
+		ret.context = this.context;
+
+		// Return the newly-formed element set
+		return ret;
+	},
+
+	// Execute a callback for every element in the matched set.
+	// (You can seed the arguments with an array of args, but this is
+	// only used internally.)
+	each: function( callback, args ) {
+		return jQuery.each( this, callback, args );
+	},
+
+	ready: function( fn ) {
+		// Add the callback
+		jQuery.ready.promise().done( fn );
+
+		return this;
+	},
+
+	slice: function() {
+		return this.pushStack( core_slice.apply( this, arguments ) );
+	},
+
+	first: function() {
+		return this.eq( 0 );
+	},
+
+	last: function() {
+		return this.eq( -1 );
+	},
+
+	eq: function( i ) {
+		var len = this.length,
+			j = +i + ( i < 0 ? len : 0 );
+		return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
+	},
+
+	map: function( callback ) {
+		return this.pushStack( jQuery.map(this, function( elem, i ) {
+			return callback.call( elem, i, elem );
+		}));
+	},
+
+	end: function() {
+		return this.prevObject || this.constructor(null);
+	},
+
+	// For internal use only.
+	// Behaves like an Array's method, not like a jQuery method.
+	push: core_push,
+	sort: [].sort,
+	splice: [].splice
+};
+
+// Give the init function the jQuery prototype for later instantiation
+jQuery.fn.init.prototype = jQuery.fn;
+
+jQuery.extend = jQuery.fn.extend = function() {
+	var src, copyIsArray, copy, name, options, clone,
+		target = arguments[0] || {},
+		i = 1,
+		length = arguments.length,
+		deep = false;
+
+	// Handle a deep copy situation
+	if ( typeof target === "boolean" ) {
+		deep = target;
+		target = arguments[1] || {};
+		// skip the boolean and the target
+		i = 2;
+	}
+
+	// Handle case when target is a string or something (possible in deep copy)
+	if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
+		target = {};
+	}
+
+	// extend jQuery itself if only one argument is passed
+	if ( length === i ) {
+		target = this;
+		--i;
+	}
+
+	for ( ; i < length; i++ ) {
+		// Only deal with non-null/undefined values
+		if ( (options = arguments[ i ]) != null ) {
+			// Extend the base object
+			for ( name in options ) {
+				src = target[ name ];
+				copy = options[ name ];
+
+				// Prevent never-ending loop
+				if ( target === copy ) {
+					continue;
+				}
+
+				// Recurse if we're merging plain objects or arrays
+				if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
+					if ( copyIsArray ) {
+						copyIsArray = false;
+						clone = src && jQuery.isArray(src) ? src : [];
+
+					} else {
+						clone = src && jQuery.isPlainObject(src) ? src : {};
+					}
+
+					// Never move original objects, clone them
+					target[ name ] = jQuery.extend( deep, clone, copy );
+
+				// Don't bring in undefined values
+				} else if ( copy !== undefined ) {
+					target[ name ] = copy;
+				}
+			}
+		}
+	}
+
+	// Return the modified object
+	return target;
+};
+
+jQuery.extend({
+	// Unique for each copy of jQuery on the page
+	// Non-digits removed to match rinlinejQuery
+	expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
+
+	noConflict: function( deep ) {
+		if ( window.$ === jQuery ) {
+			window.$ = _$;
+		}
+
+		if ( deep && window.jQuery === jQuery ) {
+			window.jQuery = _jQuery;
+		}
+
+		return jQuery;
+	},
+
+	// Is the DOM ready to be used? Set to true once it occurs.
+	isReady: false,
+
+	// A counter to track how many items to wait for before
+	// the ready event fires. See #6781
+	readyWait: 1,
+
+	// Hold (or release) the ready event
+	holdReady: function( hold ) {
+		if ( hold ) {
+			jQuery.readyWait++;
+		} else {
+			jQuery.ready( true );
+		}
+	},
+
+	// Handle when the DOM is ready
+	ready: function( wait ) {
+
+		// Abort if there are pending holds or we're already ready
+		if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
+			return;
+		}
+
+		// Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+		if ( !document.body ) {
+			return setTimeout( jQuery.ready );
+		}
+
+		// Remember that the DOM is ready
+		jQuery.isReady = true;
+
+		// If a normal DOM Ready event fired, decrement, and wait if need be
+		if ( wait !== true && --jQuery.readyWait > 0 ) {
+			return;
+		}
+
+		// If there are functions bound, to execute
+		readyList.resolveWith( document, [ jQuery ] );
+
+		// Trigger any bound ready events
+		if ( jQuery.fn.trigger ) {
+			jQuery( document ).trigger("ready").off("ready");
+		}
+	},
+
+	// See test/unit/core.js for details concerning isFunction.
+	// Since version 1.3, DOM methods and functions like alert
+	// aren't supported. They return false on IE (#2968).
+	isFunction: function( obj ) {
+		return jQuery.type(obj) === "function";
+	},
+
+	isArray: Array.isArray || function( obj ) {
+		return jQuery.type(obj) === "array";
+	},
+
+	isWindow: function( obj ) {
+		/* jshint eqeqeq: false */
+		return obj != null && obj == obj.window;
+	},
+
+	isNumeric: function( obj ) {
+		return !isNaN( parseFloat(obj) ) && isFinite( obj );
+	},
+
+	type: function( obj ) {
+		if ( obj == null ) {
+			return String( obj );
+		}
+		return typeof obj === "object" || typeof obj === "function" ?
+			class2type[ core_toString.call(obj) ] || "object" :
+			typeof obj;
+	},
+
+	isPlainObject: function( obj ) {
+		var key;
+
+		// Must be an Object.
+		// Because of IE, we also have to check the presence of the constructor property.
+		// Make sure that DOM nodes and window objects don't pass through, as well
+		if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
+			return false;
+		}
+
+		try {
+			// Not own constructor property must be Object
+			if ( obj.constructor &&
+				!core_hasOwn.call(obj, "constructor") &&
+				!core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
+				return false;
+			}
+		} catch ( e ) {
+			// IE8,9 Will throw exceptions on certain host objects #9897
+			return false;
+		}
+
+		// Support: IE<9
+		// Handle iteration over inherited properties before own properties.
+		if ( jQuery.support.ownLast ) {
+			for ( key in obj ) {
+				return core_hasOwn.call( obj, key );
+			}
+		}
+
+		// Own properties are enumerated firstly, so to speed up,
+		// if last one is own, then all properties are own.
+		for ( key in obj ) {}
+
+		return key === undefined || core_hasOwn.call( obj, key );
+	},
+
+	isEmptyObject: function( obj ) {
+		var name;
+		for ( name in obj ) {
+			return false;
+		}
+		return true;
+	},
+
+	error: function( msg ) {
+		throw new Error( msg );
+	},
+
+	// data: string of html
+	// context (optional): If specified, the fragment will be created in this context, defaults to document
+	// keepScripts (optional): If true, will include scripts passed in the html string
+	parseHTML: function( data, context, keepScripts ) {
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		if ( typeof context === "boolean" ) {
+			keepScripts = context;
+			context = false;
+		}
+		context = context || document;
+
+		var parsed = rsingleTag.exec( data ),
+			scripts = !keepScripts && [];
+
+		// Single tag
+		if ( parsed ) {
+			return [ context.createElement( parsed[1] ) ];
+		}
+
+		parsed = jQuery.buildFragment( [ data ], context, scripts );
+		if ( scripts ) {
+			jQuery( scripts ).remove();
+		}
+		return jQuery.merge( [], parsed.childNodes );
+	},
+
+	parseJSON: function( data ) {
+		// Attempt to parse using the native JSON parser first
+		if ( window.JSON && window.JSON.parse ) {
+			return window.JSON.parse( data );
+		}
+
+		if ( data === null ) {
+			return data;
+		}
+
+		if ( typeof data === "string" ) {
+
+			// Make sure leading/trailing whitespace is removed (IE can't handle it)
+			data = jQuery.trim( data );
+
+			if ( data ) {
+				// Make sure the incoming data is actual JSON
+				// Logic borrowed from http://json.org/json2.js
+				if ( rvalidchars.test( data.replace( rvalidescape, "@" )
+					.replace( rvalidtokens, "]" )
+					.replace( rvalidbraces, "")) ) {
+
+					return ( new Function( "return " + data ) )();
+				}
+			}
+		}
+
+		jQuery.error( "Invalid JSON: " + data );
+	},
+
+	// Cross-browser xml parsing
+	parseXML: function( data ) {
+		var xml, tmp;
+		if ( !data || typeof data !== "string" ) {
+			return null;
+		}
+		try {
+			if ( window.DOMParser ) { // Standard
+				tmp = new DOMParser();
+				xml = tmp.parseFromString( data , "text/xml" );
+			} else { // IE
+				xml = new ActiveXObject( "Microsoft.XMLDOM" );
+				xml.async = "false";
+				xml.loadXML( data );
+			}
+		} catch( e ) {
+			xml = undefined;
+		}
+		if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
+			jQuery.error( "Invalid XML: " + data );
+		}
+		return xml;
+	},
+
+	noop: function() {},
+
+	// Evaluates a script in a global context
+	// Workarounds based on findings by Jim Driscoll
+	// http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
+	globalEval: function( data ) {
+		if ( data && jQuery.trim( data ) ) {
+			// We use execScript on Internet Explorer
+			// We use an anonymous function so that context is window
+			// rather than jQuery in Firefox
+			( window.execScript || function( data ) {
+				window[ "eval" ].call( window, data );
+			} )( data );
+		}
+	},
+
+	// Convert dashed to camelCase; used by the css and data modules
+	// Microsoft forgot to hump their vendor prefix (#9572)
+	camelCase: function( string ) {
+		return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
+	},
+
+	nodeName: function( elem, name ) {
+		return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
+	},
+
+	// args is for internal usage only
+	each: function( obj, callback, args ) {
+		var value,
+			i = 0,
+			length = obj.length,
+			isArray = isArraylike( obj );
+
+		if ( args ) {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.apply( obj[ i ], args );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+
+		// A special, fast, case for the most common use of each
+		} else {
+			if ( isArray ) {
+				for ( ; i < length; i++ ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			} else {
+				for ( i in obj ) {
+					value = callback.call( obj[ i ], i, obj[ i ] );
+
+					if ( value === false ) {
+						break;
+					}
+				}
+			}
+		}
+
+		return obj;
+	},
+
+	// Use native String.trim function wherever possible
+	trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
+		function( text ) {
+			return text == null ?
+				"" :
+				core_trim.call( text );
+		} :
+
+		// Otherwise use our own trimming functionality
+		function( text ) {
+			return text == null ?
+				"" :
+				( text + "" ).replace( rtrim, "" );
+		},
+
+	// results is for internal usage only
+	makeArray: function( arr, results ) {
+		var ret = results || [];
+
+		if ( arr != null ) {
+			if ( isArraylike( Object(arr) ) ) {
+				jQuery.merge( ret,
+					typeof arr === "string" ?
+					[ arr ] : arr
+				);
+			} else {
+				core_push.call( ret, arr );
+			}
+		}
+
+		return ret;
+	},
+
+	inArray: function( elem, arr, i ) {
+		var len;
+
+		if ( arr ) {
+			if ( core_indexOf ) {
+				return core_indexOf.call( arr, elem, i );
+			}
+
+			len = arr.length;
+			i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+			for ( ; i < len; i++ ) {
+				// Skip accessing in sparse arrays
+				if ( i in arr && arr[ i ] === elem ) {
+					return i;
+				}
+			}
+		}
+
+		return -1;
+	},
+
+	merge: function( first, second ) {
+		var l = second.length,
+			i = first.length,
+			j = 0;
+
+		if ( typeof l === "number" ) {
+			for ( ; j < l; j++ ) {
+				first[ i++ ] = second[ j ];
+			}
+		} else {
+			while ( second[j] !== undefined ) {
+				first[ i++ ] = second[ j++ ];
+			}
+		}
+
+		first.length = i;
+
+		return first;
+	},
+
+	grep: function( elems, callback, inv ) {
+		var retVal,
+			ret = [],
+			i = 0,
+			length = elems.length;
+		inv = !!inv;
+
+		// Go through the array, only saving the items
+		// that pass the validator function
+		for ( ; i < length; i++ ) {
+			retVal = !!callback( elems[ i ], i );
+			if ( inv !== retVal ) {
+				ret.push( elems[ i ] );
+			}
+		}
+
+		return ret;
+	},
+
+	// arg is for internal usage only
+	map: function( elems, callback, arg ) {
+		var value,
+			i = 0,
+			length = elems.length,
+			isArray = isArraylike( elems ),
+			ret = [];
+
+		// Go through the array, translating each of the items to their
+		if ( isArray ) {
+			for ( ; i < length; i++ ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+
+		// Go through every key on the object,
+		} else {
+			for ( i in elems ) {
+				value = callback( elems[ i ], i, arg );
+
+				if ( value != null ) {
+					ret[ ret.length ] = value;
+				}
+			}
+		}
+
+		// Flatten any nested arrays
+		return core_concat.apply( [], ret );
+	},
+
+	// A global GUID counter for objects
+	guid: 1,
+
+	// Bind a function to a context, optionally partially applying any
+	// arguments.
+	proxy: function( fn, context ) {
+		var args, proxy, tmp;
+
+		if ( typeof context === "string" ) {
+			tmp = fn[ context ];
+			context = fn;
+			fn = tmp;
+		}
+
+		// Quick check to determine if target is callable, in the spec
+		// this throws a TypeError, but we will just return undefined.
+		if ( !jQuery.isFunction( fn ) ) {
+			return undefined;
+		}
+
+		// Simulated bind
+		args = core_slice.call( arguments, 2 );
+		proxy = function() {
+			return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
+		};
+
+		// Set the guid of unique handler to the same of original handler, so it can be removed
+		proxy.guid = fn.guid = fn.guid || jQuery.guid++;
+
+		return proxy;
+	},
+
+	// Multifunctional method to get and set values of a collection
+	// The value/s can optionally be executed if it's a function
+	access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
+		var i = 0,
+			length = elems.length,
+			bulk = key == null;
+
+		// Sets many values
+		if ( jQuery.type( key ) === "object" ) {
+			chainable = true;
+			for ( i in key ) {
+				jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
+			}
+
+		// Sets one value
+		} else if ( value !== undefined ) {
+			chainable = true;
+
+			if ( !jQuery.isFunction( value ) ) {
+				raw = true;
+			}
+
+			if ( bulk ) {
+				// Bulk operations run against the entire set
+				if ( raw ) {
+					fn.call( elems, value );
+					fn = null;
+
+				// ...except when executing function values
+				} else {
+					bulk = fn;
+					fn = function( elem, key, value ) {
+						return bulk.call( jQuery( elem ), value );
+					};
+				}
+			}
+
+			if ( fn ) {
+				for ( ; i < length; i++ ) {
+					fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
+				}
+			}
+		}
+
+		return chainable ?
+			elems :
+
+			// Gets
+			bulk ?
+				fn.call( elems ) :
+				length ? fn( elems[0], key ) : emptyGet;
+	},
+
+	now: function() {
+		return ( new Date() ).getTime();
+	},
+
+	// A method for quickly swapping in/out CSS properties to get correct calculations.
+	// Note: this method belongs to the css module but it's needed here for the support module.
+	// If support gets modularized, this method should be moved back to the css module.
+	swap: function( elem, options, callback, args ) {
+		var ret, name,
+			old = {};
+
+		// Remember the old values, and insert the new ones
+		for ( name in options ) {
+			old[ name ] = elem.style[ name ];
+			elem.style[ name ] = options[ name ];
+		}
+
+		ret = callback.apply( elem, args || [] );
+
+		// Revert the old values
+		for ( name in options ) {
+			elem.style[ name ] = old[ name ];
+		}
+
+		return ret;
+	}
+});
+
+jQuery.ready.promise = function( obj ) {
+	if ( !readyList ) {
+
+		readyList = jQuery.Deferred();
+
+		// Catch cases where $(document).ready() is called after the browser event has already occurred.
+		// we once tried to use readyState "interactive" here, but it caused issues like the one
+		// discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
+		if ( document.readyState === "complete" ) {
+			// Handle it asynchronously to allow scripts the opportunity to delay ready
+			setTimeout( jQuery.ready );
+
+		// Standards-based browsers support DOMContentLoaded
+		} else if ( document.addEventListener ) {
+			// Use the handy event callback
+			document.addEventListener( "DOMContentLoaded", completed, false );
+
+			// A fallback to window.onload, that will always work
+			window.addEventListener( "load", completed, false );
+
+		// If IE event model is used
+		} else {
+			// Ensure firing before onload, maybe late but safe also for iframes
+			document.attachEvent( "onreadystatechange", completed );
+
+			// A fallback to window.onload, that will always work
+			window.attachEvent( "onload", completed );
+
+			// If IE and not a frame
+			// continually check to see if the document is ready
+			var top = false;
+
+			try {
+				top = window.frameElement == null && document.documentElement;
+			} catch(e) {}
+
+			if ( top && top.doScroll ) {
+				(function doScrollCheck() {
+					if ( !jQuery.isReady ) {
+
+						try {
+							// Use the trick by Diego Perini
+							// http://javascript.nwbox.com/IEContentLoaded/
+							top.doScroll("left");
+						} catch(e) {
+							return setTimeout( doScrollCheck, 50 );
+						}
+
+						// detach all dom ready events
+						detach();
+
+						// and execute any waiting functions
+						jQuery.ready();
+					}
+				})();
+			}
+		}
+	}
+	return readyList.promise( obj );
+};
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
+	class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+function isArraylike( obj ) {
+	var length = obj.length,
+		type = jQuery.type( obj );
+
+	if ( jQuery.isWindow( obj ) ) {
+		return false;
+	}
+
+	if ( obj.nodeType === 1 && length ) {
+		return true;
+	}
+
+	return type === "array" || type !== "function" &&
+		( length === 0 ||
+		typeof length === "number" && length > 0 && ( length - 1 ) in obj );
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+/*!
+ * Sizzle CSS Selector Engine v1.10.2
+ * http://sizzlejs.com/
+ *
+ * Copyright 2013 jQuery Foundation, Inc. and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2013-07-03
+ */
+(function( window, undefined ) {
+
+var i,
+	support,
+	cachedruns,
+	Expr,
+	getText,
+	isXML,
+	compile,
+	outermostContext,
+	sortInput,
+
+	// Local document vars
+	setDocument,
+	document,
+	docElem,
+	documentIsHTML,
+	rbuggyQSA,
+	rbuggyMatches,
+	matches,
+	contains,
+
+	// Instance-specific data
+	expando = "sizzle" + -(new Date()),
+	preferredDoc = window.document,
+	dirruns = 0,
+	done = 0,
+	classCache = createCache(),
+	tokenCache = createCache(),
+	compilerCache = createCache(),
+	hasDuplicate = false,
+	sortOrder = function( a, b ) {
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+		return 0;
+	},
+
+	// General-purpose constants
+	strundefined = typeof undefined,
+	MAX_NEGATIVE = 1 << 31,
+
+	// Instance methods
+	hasOwn = ({}).hasOwnProperty,
+	arr = [],
+	pop = arr.pop,
+	push_native = arr.push,
+	push = arr.push,
+	slice = arr.slice,
+	// Use a stripped-down indexOf if we can't use a native one
+	indexOf = arr.indexOf || function( elem ) {
+		var i = 0,
+			len = this.length;
+		for ( ; i < len; i++ ) {
+			if ( this[i] === elem ) {
+				return i;
+			}
+		}
+		return -1;
+	},
+
+	booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
+
+	// Regular expressions
+
+	// Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace
+	whitespace = "[\\x20\\t\\r\\n\\f]",
+	// http://www.w3.org/TR/css3-syntax/#characters
+	characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
+
+	// Loosely modeled on CSS identifier characters
+	// An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors
+	// Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
+	identifier = characterEncoding.replace( "w", "w#" ),
+
+	// Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors
+	attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace +
+		"*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]",
+
+	// Prefer arguments quoted,
+	//   then not containing pseudos/brackets,
+	//   then attribute selectors/non-parenthetical expressions,
+	//   then anything else
+	// These preferences are here to reduce the number of selectors
+	//   needing tokenize in the PSEUDO preFilter
+	pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)",
+
+	// Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
+	rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
+
+	rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
+	rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
+
+	rsibling = new RegExp( whitespace + "*[+~]" ),
+	rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ),
+
+	rpseudo = new RegExp( pseudos ),
+	ridentifier = new RegExp( "^" + identifier + "$" ),
+
+	matchExpr = {
+		"ID": new RegExp( "^#(" + characterEncoding + ")" ),
+		"CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ),
+		"TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ),
+		"ATTR": new RegExp( "^" + attributes ),
+		"PSEUDO": new RegExp( "^" + pseudos ),
+		"CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
+			"*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
+			"*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
+		"bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
+		// For use in libraries implementing .is()
+		// We use this for POS matching in `select`
+		"needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
+			whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
+	},
+
+	rnative = /^[^{]+\{\s*\[native \w/,
+
+	// Easily-parseable/retrievable ID or TAG or CLASS selectors
+	rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+
+	rinputs = /^(?:input|select|textarea|button)$/i,
+	rheader = /^h\d$/i,
+
+	rescape = /'|\\/g,
+
+	// CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
+	runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
+	funescape = function( _, escaped, escapedWhitespace ) {
+		var high = "0x" + escaped - 0x10000;
+		// NaN means non-codepoint
+		// Support: Firefox
+		// Workaround erroneous numeric interpretation of +"0x"
+		return high !== high || escapedWhitespace ?
+			escaped :
+			// BMP codepoint
+			high < 0 ?
+				String.fromCharCode( high + 0x10000 ) :
+				// Supplemental Plane codepoint (surrogate pair)
+				String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
+	};
+
+// Optimize for push.apply( _, NodeList )
+try {
+	push.apply(
+		(arr = slice.call( preferredDoc.childNodes )),
+		preferredDoc.childNodes
+	);
+	// Support: Android<4.0
+	// Detect silently failing push.apply
+	arr[ preferredDoc.childNodes.length ].nodeType;
+} catch ( e ) {
+	push = { apply: arr.length ?
+
+		// Leverage slice if possible
+		function( target, els ) {
+			push_native.apply( target, slice.call(els) );
+		} :
+
+		// Support: IE<9
+		// Otherwise append directly
+		function( target, els ) {
+			var j = target.length,
+				i = 0;
+			// Can't trust NodeList.length
+			while ( (target[j++] = els[i++]) ) {}
+			target.length = j - 1;
+		}
+	};
+}
+
+function Sizzle( selector, context, results, seed ) {
+	var match, elem, m, nodeType,
+		// QSA vars
+		i, groups, old, nid, newContext, newSelector;
+
+	if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
+		setDocument( context );
+	}
+
+	context = context || document;
+	results = results || [];
+
+	if ( !selector || typeof selector !== "string" ) {
+		return results;
+	}
+
+	if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) {
+		return [];
+	}
+
+	if ( documentIsHTML && !seed ) {
+
+		// Shortcuts
+		if ( (match = rquickExpr.exec( selector )) ) {
+			// Speed-up: Sizzle("#ID")
+			if ( (m = match[1]) ) {
+				if ( nodeType === 9 ) {
+					elem = context.getElementById( m );
+					// Check parentNode to catch when Blackberry 4.6 returns
+					// nodes that are no longer in the document #6963
+					if ( elem && elem.parentNode ) {
+						// Handle the case where IE, Opera, and Webkit return items
+						// by name instead of ID
+						if ( elem.id === m ) {
+							results.push( elem );
+							return results;
+						}
+					} else {
+						return results;
+					}
+				} else {
+					// Context is not a document
+					if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) &&
+						contains( context, elem ) && elem.id === m ) {
+						results.push( elem );
+						return results;
+					}
+				}
+
+			// Speed-up: Sizzle("TAG")
+			} else if ( match[2] ) {
+				push.apply( results, context.getElementsByTagName( selector ) );
+				return results;
+
+			// Speed-up: Sizzle(".CLASS")
+			} else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) {
+				push.apply( results, context.getElementsByClassName( m ) );
+				return results;
+			}
+		}
+
+		// QSA path
+		if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
+			nid = old = expando;
+			newContext = context;
+			newSelector = nodeType === 9 && selector;
+
+			// qSA works strangely on Element-rooted queries
+			// We can work around this by specifying an extra ID on the root
+			// and working up from there (Thanks to Andrew Dupont for the technique)
+			// IE 8 doesn't work on object elements
+			if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) {
+				groups = tokenize( selector );
+
+				if ( (old = context.getAttribute("id")) ) {
+					nid = old.replace( rescape, "\\$&" );
+				} else {
+					context.setAttribute( "id", nid );
+				}
+				nid = "[id='" + nid + "'] ";
+
+				i = groups.length;
+				while ( i-- ) {
+					groups[i] = nid + toSelector( groups[i] );
+				}
+				newContext = rsibling.test( selector ) && context.parentNode || context;
+				newSelector = groups.join(",");
+			}
+
+			if ( newSelector ) {
+				try {
+					push.apply( results,
+						newContext.querySelectorAll( newSelector )
+					);
+					return results;
+				} catch(qsaError) {
+				} finally {
+					if ( !old ) {
+						context.removeAttribute("id");
+					}
+				}
+			}
+		}
+	}
+
+	// All others
+	return select( selector.replace( rtrim, "$1" ), context, results, seed );
+}
+
+/**
+ * Create key-value caches of limited size
+ * @returns {Function(string, Object)} Returns the Object data after storing it on itself with
+ *	property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
+ *	deleting the oldest entry
+ */
+function createCache() {
+	var keys = [];
+
+	function cache( key, value ) {
+		// Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
+		if ( keys.push( key += " " ) > Expr.cacheLength ) {
+			// Only keep the most recent entries
+			delete cache[ keys.shift() ];
+		}
+		return (cache[ key ] = value);
+	}
+	return cache;
+}
+
+/**
+ * Mark a function for special use by Sizzle
+ * @param {Function} fn The function to mark
+ */
+function markFunction( fn ) {
+	fn[ expando ] = true;
+	return fn;
+}
+
+/**
+ * Support testing using an element
+ * @param {Function} fn Passed the created div and expects a boolean result
+ */
+function assert( fn ) {
+	var div = document.createElement("div");
+
+	try {
+		return !!fn( div );
+	} catch (e) {
+		return false;
+	} finally {
+		// Remove from its parent by default
+		if ( div.parentNode ) {
+			div.parentNode.removeChild( div );
+		}
+		// release memory in IE
+		div = null;
+	}
+}
+
+/**
+ * Adds the same handler for all of the specified attrs
+ * @param {String} attrs Pipe-separated list of attributes
+ * @param {Function} handler The method that will be applied
+ */
+function addHandle( attrs, handler ) {
+	var arr = attrs.split("|"),
+		i = attrs.length;
+
+	while ( i-- ) {
+		Expr.attrHandle[ arr[i] ] = handler;
+	}
+}
+
+/**
+ * Checks document order of two siblings
+ * @param {Element} a
+ * @param {Element} b
+ * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
+ */
+function siblingCheck( a, b ) {
+	var cur = b && a,
+		diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
+			( ~b.sourceIndex || MAX_NEGATIVE ) -
+			( ~a.sourceIndex || MAX_NEGATIVE );
+
+	// Use IE sourceIndex if available on both nodes
+	if ( diff ) {
+		return diff;
+	}
+
+	// Check if b follows a
+	if ( cur ) {
+		while ( (cur = cur.nextSibling) ) {
+			if ( cur === b ) {
+				return -1;
+			}
+		}
+	}
+
+	return a ? 1 : -1;
+}
+
+/**
+ * Returns a function to use in pseudos for input types
+ * @param {String} type
+ */
+function createInputPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return name === "input" && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for buttons
+ * @param {String} type
+ */
+function createButtonPseudo( type ) {
+	return function( elem ) {
+		var name = elem.nodeName.toLowerCase();
+		return (name === "input" || name === "button") && elem.type === type;
+	};
+}
+
+/**
+ * Returns a function to use in pseudos for positionals
+ * @param {Function} fn
+ */
+function createPositionalPseudo( fn ) {
+	return markFunction(function( argument ) {
+		argument = +argument;
+		return markFunction(function( seed, matches ) {
+			var j,
+				matchIndexes = fn( [], seed.length, argument ),
+				i = matchIndexes.length;
+
+			// Match elements found at the specified indexes
+			while ( i-- ) {
+				if ( seed[ (j = matchIndexes[i]) ] ) {
+					seed[j] = !(matches[j] = seed[j]);
+				}
+			}
+		});
+	});
+}
+
+/**
+ * Detect xml
+ * @param {Element|Object} elem An element or a document
+ */
+isXML = Sizzle.isXML = function( elem ) {
+	// documentElement is verified for cases where it doesn't yet exist
+	// (such as loading iframes in IE - #4833)
+	var documentElement = elem && (elem.ownerDocument || elem).documentElement;
+	return documentElement ? documentElement.nodeName !== "HTML" : false;
+};
+
+// Expose support vars for convenience
+support = Sizzle.support = {};
+
+/**
+ * Sets document-related variables once based on the current document
+ * @param {Element|Object} [doc] An element or document object to use to set the document
+ * @returns {Object} Returns the current document
+ */
+setDocument = Sizzle.setDocument = function( node ) {
+	var doc = node ? node.ownerDocument || node : preferredDoc,
+		parent = doc.defaultView;
+
+	// If no document and documentElement is available, return
+	if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
+		return document;
+	}
+
+	// Set our document
+	document = doc;
+	docElem = doc.documentElement;
+
+	// Support tests
+	documentIsHTML = !isXML( doc );
+
+	// Support: IE>8
+	// If iframe document is assigned to "document" variable and if iframe has been reloaded,
+	// IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936
+	// IE6-8 do not support the defaultView property so parent will be undefined
+	if ( parent && parent.attachEvent && parent !== parent.top ) {
+		parent.attachEvent( "onbeforeunload", function() {
+			setDocument();
+		});
+	}
+
+	/* Attributes
+	---------------------------------------------------------------------- */
+
+	// Support: IE<8
+	// Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans)
+	support.attributes = assert(function( div ) {
+		div.className = "i";
+		return !div.getAttribute("className");
+	});
+
+	/* getElement(s)By*
+	---------------------------------------------------------------------- */
+
+	// Check if getElementsByTagName("*") returns only elements
+	support.getElementsByTagName = assert(function( div ) {
+		div.appendChild( doc.createComment("") );
+		return !div.getElementsByTagName("*").length;
+	});
+
+	// Check if getElementsByClassName can be trusted
+	support.getElementsByClassName = assert(function( div ) {
+		div.innerHTML = "<div class='a'></div><div class='a i'></div>";
+
+		// Support: Safari<4
+		// Catch class over-caching
+		div.firstChild.className = "i";
+		// Support: Opera<10
+		// Catch gEBCN failure to find non-leading classes
+		return div.getElementsByClassName("i").length === 2;
+	});
+
+	// Support: IE<10
+	// Check if getElementById returns elements by name
+	// The broken getElementById methods don't pick up programatically-set names,
+	// so use a roundabout getElementsByName test
+	support.getById = assert(function( div ) {
+		docElem.appendChild( div ).id = expando;
+		return !doc.getElementsByName || !doc.getElementsByName( expando ).length;
+	});
+
+	// ID find and filter
+	if ( support.getById ) {
+		Expr.find["ID"] = function( id, context ) {
+			if ( typeof context.getElementById !== strundefined && documentIsHTML ) {
+				var m = context.getElementById( id );
+				// Check parentNode to catch when Blackberry 4.6 returns
+				// nodes that are no longer in the document #6963
+				return m && m.parentNode ? [m] : [];
+			}
+		};
+		Expr.filter["ID"] = function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				return elem.getAttribute("id") === attrId;
+			};
+		};
+	} else {
+		// Support: IE6/7
+		// getElementById is not reliable as a find shortcut
+		delete Expr.find["ID"];
+
+		Expr.filter["ID"] =  function( id ) {
+			var attrId = id.replace( runescape, funescape );
+			return function( elem ) {
+				var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id");
+				return node && node.value === attrId;
+			};
+		};
+	}
+
+	// Tag
+	Expr.find["TAG"] = support.getElementsByTagName ?
+		function( tag, context ) {
+			if ( typeof context.getElementsByTagName !== strundefined ) {
+				return context.getElementsByTagName( tag );
+			}
+		} :
+		function( tag, context ) {
+			var elem,
+				tmp = [],
+				i = 0,
+				results = context.getElementsByTagName( tag );
+
+			// Filter out possible comments
+			if ( tag === "*" ) {
+				while ( (elem = results[i++]) ) {
+					if ( elem.nodeType === 1 ) {
+						tmp.push( elem );
+					}
+				}
+
+				return tmp;
+			}
+			return results;
+		};
+
+	// Class
+	Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
+		if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) {
+			return context.getElementsByClassName( className );
+		}
+	};
+
+	/* QSA/matchesSelector
+	---------------------------------------------------------------------- */
+
+	// QSA and matchesSelector support
+
+	// matchesSelector(:active) reports false when true (IE9/Opera 11.5)
+	rbuggyMatches = [];
+
+	// qSa(:focus) reports false when true (Chrome 21)
+	// We allow this because of a bug in IE8/9 that throws an error
+	// whenever `document.activeElement` is accessed on an iframe
+	// So, we allow :focus to pass through QSA all the time to avoid the IE error
+	// See http://bugs.jquery.com/ticket/13378
+	rbuggyQSA = [];
+
+	if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) {
+		// Build QSA regex
+		// Regex strategy adopted from Diego Perini
+		assert(function( div ) {
+			// Select is set to empty string on purpose
+			// This is to test IE's treatment of not explicitly
+			// setting a boolean content attribute,
+			// since its presence should be enough
+			// http://bugs.jquery.com/ticket/12359
+			div.innerHTML = "<select><option selected=''></option></select>";
+
+			// Support: IE8
+			// Boolean attributes and "value" are not treated correctly
+			if ( !div.querySelectorAll("[selected]").length ) {
+				rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
+			}
+
+			// Webkit/Opera - :checked should return selected option elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":checked").length ) {
+				rbuggyQSA.push(":checked");
+			}
+		});
+
+		assert(function( div ) {
+
+			// Support: Opera 10-12/IE8
+			// ^= $= *= and empty values
+			// Should not select anything
+			// Support: Windows 8 Native Apps
+			// The type attribute is restricted during .innerHTML assignment
+			var input = doc.createElement("input");
+			input.setAttribute( "type", "hidden" );
+			div.appendChild( input ).setAttribute( "t", "" );
+
+			if ( div.querySelectorAll("[t^='']").length ) {
+				rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
+			}
+
+			// FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
+			// IE8 throws error here and will not see later tests
+			if ( !div.querySelectorAll(":enabled").length ) {
+				rbuggyQSA.push( ":enabled", ":disabled" );
+			}
+
+			// Opera 10-11 does not throw on post-comma invalid pseudos
+			div.querySelectorAll("*,:x");
+			rbuggyQSA.push(",.*:");
+		});
+	}
+
+	if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector ||
+		docElem.mozMatchesSelector ||
+		docElem.oMatchesSelector ||
+		docElem.msMatchesSelector) )) ) {
+
+		assert(function( div ) {
+			// Check to see if it's possible to do matchesSelector
+			// on a disconnected node (IE 9)
+			support.disconnectedMatch = matches.call( div, "div" );
+
+			// This should fail with an exception
+			// Gecko does not error, returns false instead
+			matches.call( div, "[s!='']:x" );
+			rbuggyMatches.push( "!=", pseudos );
+		});
+	}
+
+	rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
+	rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
+
+	/* Contains
+	---------------------------------------------------------------------- */
+
+	// Element contains another
+	// Purposefully does not implement inclusive descendent
+	// As in, an element does not contain itself
+	contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ?
+		function( a, b ) {
+			var adown = a.nodeType === 9 ? a.documentElement : a,
+				bup = b && b.parentNode;
+			return a === bup || !!( bup && bup.nodeType === 1 && (
+				adown.contains ?
+					adown.contains( bup ) :
+					a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
+			));
+		} :
+		function( a, b ) {
+			if ( b ) {
+				while ( (b = b.parentNode) ) {
+					if ( b === a ) {
+						return true;
+					}
+				}
+			}
+			return false;
+		};
+
+	/* Sorting
+	---------------------------------------------------------------------- */
+
+	// Document order sorting
+	sortOrder = docElem.compareDocumentPosition ?
+	function( a, b ) {
+
+		// Flag for duplicate removal
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+		}
+
+		var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b );
+
+		if ( compare ) {
+			// Disconnected nodes
+			if ( compare & 1 ||
+				(!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
+
+				// Choose the first element that is related to our preferred document
+				if ( a === doc || contains(preferredDoc, a) ) {
+					return -1;
+				}
+				if ( b === doc || contains(preferredDoc, b) ) {
+					return 1;
+				}
+
+				// Maintain original order
+				return sortInput ?
+					( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+					0;
+			}
+
+			return compare & 4 ? -1 : 1;
+		}
+
+		// Not directly comparable, sort on existence of method
+		return a.compareDocumentPosition ? -1 : 1;
+	} :
+	function( a, b ) {
+		var cur,
+			i = 0,
+			aup = a.parentNode,
+			bup = b.parentNode,
+			ap = [ a ],
+			bp = [ b ];
+
+		// Exit early if the nodes are identical
+		if ( a === b ) {
+			hasDuplicate = true;
+			return 0;
+
+		// Parentless nodes are either documents or disconnected
+		} else if ( !aup || !bup ) {
+			return a === doc ? -1 :
+				b === doc ? 1 :
+				aup ? -1 :
+				bup ? 1 :
+				sortInput ?
+				( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) :
+				0;
+
+		// If the nodes are siblings, we can do a quick check
+		} else if ( aup === bup ) {
+			return siblingCheck( a, b );
+		}
+
+		// Otherwise we need full lists of their ancestors for comparison
+		cur = a;
+		while ( (cur = cur.parentNode) ) {
+			ap.unshift( cur );
+		}
+		cur = b;
+		while ( (cur = cur.parentNode) ) {
+			bp.unshift( cur );
+		}
+
+		// Walk down the tree looking for a discrepancy
+		while ( ap[i] === bp[i] ) {
+			i++;
+		}
+
+		return i ?
+			// Do a sibling check if the nodes have a common ancestor
+			siblingCheck( ap[i], bp[i] ) :
+
+			// Otherwise nodes in our document sort first
+			ap[i] === preferredDoc ? -1 :
+			bp[i] === preferredDoc ? 1 :
+			0;
+	};
+
+	return doc;
+};
+
+Sizzle.matches = function( expr, elements ) {
+	return Sizzle( expr, null, null, elements );
+};
+
+Sizzle.matchesSelector = function( elem, expr ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	// Make sure that attribute selectors are quoted
+	expr = expr.replace( rattributeQuotes, "='$1']" );
+
+	if ( support.matchesSelector && documentIsHTML &&
+		( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
+		( !rbuggyQSA     || !rbuggyQSA.test( expr ) ) ) {
+
+		try {
+			var ret = matches.call( elem, expr );
+
+			// IE 9's matchesSelector returns false on disconnected nodes
+			if ( ret || support.disconnectedMatch ||
+					// As well, disconnected nodes are said to be in a document
+					// fragment in IE 9
+					elem.document && elem.document.nodeType !== 11 ) {
+				return ret;
+			}
+		} catch(e) {}
+	}
+
+	return Sizzle( expr, document, null, [elem] ).length > 0;
+};
+
+Sizzle.contains = function( context, elem ) {
+	// Set document vars if needed
+	if ( ( context.ownerDocument || context ) !== document ) {
+		setDocument( context );
+	}
+	return contains( context, elem );
+};
+
+Sizzle.attr = function( elem, name ) {
+	// Set document vars if needed
+	if ( ( elem.ownerDocument || elem ) !== document ) {
+		setDocument( elem );
+	}
+
+	var fn = Expr.attrHandle[ name.toLowerCase() ],
+		// Don't get fooled by Object.prototype properties (jQuery #13807)
+		val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
+			fn( elem, name, !documentIsHTML ) :
+			undefined;
+
+	return val === undefined ?
+		support.attributes || !documentIsHTML ?
+			elem.getAttribute( name ) :
+			(val = elem.getAttributeNode(name)) && val.specified ?
+				val.value :
+				null :
+		val;
+};
+
+Sizzle.error = function( msg ) {
+	throw new Error( "Syntax error, unrecognized expression: " + msg );
+};
+
+/**
+ * Document sorting and removing duplicates
+ * @param {ArrayLike} results
+ */
+Sizzle.uniqueSort = function( results ) {
+	var elem,
+		duplicates = [],
+		j = 0,
+		i = 0;
+
+	// Unless we *know* we can detect duplicates, assume their presence
+	hasDuplicate = !support.detectDuplicates;
+	sortInput = !support.sortStable && results.slice( 0 );
+	results.sort( sortOrder );
+
+	if ( hasDuplicate ) {
+		while ( (elem = results[i++]) ) {
+			if ( elem === results[ i ] ) {
+				j = duplicates.push( i );
+			}
+		}
+		while ( j-- ) {
+			results.splice( duplicates[ j ], 1 );
+		}
+	}
+
+	return results;
+};
+
+/**
+ * Utility function for retrieving the text value of an array of DOM nodes
+ * @param {Array|Element} elem
+ */
+getText = Sizzle.getText = function( elem ) {
+	var node,
+		ret = "",
+		i = 0,
+		nodeType = elem.nodeType;
+
+	if ( !nodeType ) {
+		// If no nodeType, this is expected to be an array
+		for ( ; (node = elem[i]); i++ ) {
+			// Do not traverse comment nodes
+			ret += getText( node );
+		}
+	} else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
+		// Use textContent for elements
+		// innerText usage removed for consistency of new lines (see #11153)
+		if ( typeof elem.textContent === "string" ) {
+			return elem.textContent;
+		} else {
+			// Traverse its children
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				ret += getText( elem );
+			}
+		}
+	} else if ( nodeType === 3 || nodeType === 4 ) {
+		return elem.nodeValue;
+	}
+	// Do not include comment or processing instruction nodes
+
+	return ret;
+};
+
+Expr = Sizzle.selectors = {
+
+	// Can be adjusted by the user
+	cacheLength: 50,
+
+	createPseudo: markFunction,
+
+	match: matchExpr,
+
+	attrHandle: {},
+
+	find: {},
+
+	relative: {
+		">": { dir: "parentNode", first: true },
+		" ": { dir: "parentNode" },
+		"+": { dir: "previousSibling", first: true },
+		"~": { dir: "previousSibling" }
+	},
+
+	preFilter: {
+		"ATTR": function( match ) {
+			match[1] = match[1].replace( runescape, funescape );
+
+			// Move the given value to match[3] whether quoted or unquoted
+			match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape );
+
+			if ( match[2] === "~=" ) {
+				match[3] = " " + match[3] + " ";
+			}
+
+			return match.slice( 0, 4 );
+		},
+
+		"CHILD": function( match ) {
+			/* matches from matchExpr["CHILD"]
+				1 type (only|nth|...)
+				2 what (child|of-type)
+				3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
+				4 xn-component of xn+y argument ([+-]?\d*n|)
+				5 sign of xn-component
+				6 x of xn-component
+				7 sign of y-component
+				8 y of y-component
+			*/
+			match[1] = match[1].toLowerCase();
+
+			if ( match[1].slice( 0, 3 ) === "nth" ) {
+				// nth-* requires argument
+				if ( !match[3] ) {
+					Sizzle.error( match[0] );
+				}
+
+				// numeric x and y parameters for Expr.filter.CHILD
+				// remember that false/true cast respectively to 0/1
+				match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
+				match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
+
+			// other types prohibit arguments
+			} else if ( match[3] ) {
+				Sizzle.error( match[0] );
+			}
+
+			return match;
+		},
+
+		"PSEUDO": function( match ) {
+			var excess,
+				unquoted = !match[5] && match[2];
+
+			if ( matchExpr["CHILD"].test( match[0] ) ) {
+				return null;
+			}
+
+			// Accept quoted arguments as-is
+			if ( match[3] && match[4] !== undefined ) {
+				match[2] = match[4];
+
+			// Strip excess characters from unquoted arguments
+			} else if ( unquoted && rpseudo.test( unquoted ) &&
+				// Get excess from tokenize (recursively)
+				(excess = tokenize( unquoted, true )) &&
+				// advance to the next closing parenthesis
+				(excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
+
+				// excess is a negative index
+				match[0] = match[0].slice( 0, excess );
+				match[2] = unquoted.slice( 0, excess );
+			}
+
+			// Return only captures needed by the pseudo filter method (type and argument)
+			return match.slice( 0, 3 );
+		}
+	},
+
+	filter: {
+
+		"TAG": function( nodeNameSelector ) {
+			var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
+			return nodeNameSelector === "*" ?
+				function() { return true; } :
+				function( elem ) {
+					return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
+				};
+		},
+
+		"CLASS": function( className ) {
+			var pattern = classCache[ className + " " ];
+
+			return pattern ||
+				(pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
+				classCache( className, function( elem ) {
+					return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" );
+				});
+		},
+
+		"ATTR": function( name, operator, check ) {
+			return function( elem ) {
+				var result = Sizzle.attr( elem, name );
+
+				if ( result == null ) {
+					return operator === "!=";
+				}
+				if ( !operator ) {
+					return true;
+				}
+
+				result += "";
+
+				return operator === "=" ? result === check :
+					operator === "!=" ? result !== check :
+					operator === "^=" ? check && result.indexOf( check ) === 0 :
+					operator === "*=" ? check && result.indexOf( check ) > -1 :
+					operator === "$=" ? check && result.slice( -check.length ) === check :
+					operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 :
+					operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
+					false;
+			};
+		},
+
+		"CHILD": function( type, what, argument, first, last ) {
+			var simple = type.slice( 0, 3 ) !== "nth",
+				forward = type.slice( -4 ) !== "last",
+				ofType = what === "of-type";
+
+			return first === 1 && last === 0 ?
+
+				// Shortcut for :nth-*(n)
+				function( elem ) {
+					return !!elem.parentNode;
+				} :
+
+				function( elem, context, xml ) {
+					var cache, outerCache, node, diff, nodeIndex, start,
+						dir = simple !== forward ? "nextSibling" : "previousSibling",
+						parent = elem.parentNode,
+						name = ofType && elem.nodeName.toLowerCase(),
+						useCache = !xml && !ofType;
+
+					if ( parent ) {
+
+						// :(first|last|only)-(child|of-type)
+						if ( simple ) {
+							while ( dir ) {
+								node = elem;
+								while ( (node = node[ dir ]) ) {
+									if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) {
+										return false;
+									}
+								}
+								// Reverse direction for :only-* (if we haven't yet done so)
+								start = dir = type === "only" && !start && "nextSibling";
+							}
+							return true;
+						}
+
+						start = [ forward ? parent.firstChild : parent.lastChild ];
+
+						// non-xml :nth-child(...) stores cache data on `parent`
+						if ( forward && useCache ) {
+							// Seek `elem` from a previously-cached index
+							outerCache = parent[ expando ] || (parent[ expando ] = {});
+							cache = outerCache[ type ] || [];
+							nodeIndex = cache[0] === dirruns && cache[1];
+							diff = cache[0] === dirruns && cache[2];
+							node = nodeIndex && parent.childNodes[ nodeIndex ];
+
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+
+								// Fallback to seeking `elem` from the start
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								// When found, cache indexes on `parent` and break
+								if ( node.nodeType === 1 && ++diff && node === elem ) {
+									outerCache[ type ] = [ dirruns, nodeIndex, diff ];
+									break;
+								}
+							}
+
+						// Use previously-cached element index if available
+						} else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) {
+							diff = cache[1];
+
+						// xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...)
+						} else {
+							// Use the same loop as above to seek `elem` from the start
+							while ( (node = ++nodeIndex && node && node[ dir ] ||
+								(diff = nodeIndex = 0) || start.pop()) ) {
+
+								if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) {
+									// Cache the index of each encountered element
+									if ( useCache ) {
+										(node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ];
+									}
+
+									if ( node === elem ) {
+										break;
+									}
+								}
+							}
+						}
+
+						// Incorporate the offset, then check against cycle size
+						diff -= last;
+						return diff === first || ( diff % first === 0 && diff / first >= 0 );
+					}
+				};
+		},
+
+		"PSEUDO": function( pseudo, argument ) {
+			// pseudo-class names are case-insensitive
+			// http://www.w3.org/TR/selectors/#pseudo-classes
+			// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
+			// Remember that setFilters inherits from pseudos
+			var args,
+				fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
+					Sizzle.error( "unsupported pseudo: " + pseudo );
+
+			// The user may use createPseudo to indicate that
+			// arguments are needed to create the filter function
+			// just as Sizzle does
+			if ( fn[ expando ] ) {
+				return fn( argument );
+			}
+
+			// But maintain support for old signatures
+			if ( fn.length > 1 ) {
+				args = [ pseudo, pseudo, "", argument ];
+				return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
+					markFunction(function( seed, matches ) {
+						var idx,
+							matched = fn( seed, argument ),
+							i = matched.length;
+						while ( i-- ) {
+							idx = indexOf.call( seed, matched[i] );
+							seed[ idx ] = !( matches[ idx ] = matched[i] );
+						}
+					}) :
+					function( elem ) {
+						return fn( elem, 0, args );
+					};
+			}
+
+			return fn;
+		}
+	},
+
+	pseudos: {
+		// Potentially complex pseudos
+		"not": markFunction(function( selector ) {
+			// Trim the selector passed to compile
+			// to avoid treating leading and trailing
+			// spaces as combinators
+			var input = [],
+				results = [],
+				matcher = compile( selector.replace( rtrim, "$1" ) );
+
+			return matcher[ expando ] ?
+				markFunction(function( seed, matches, context, xml ) {
+					var elem,
+						unmatched = matcher( seed, null, xml, [] ),
+						i = seed.length;
+
+					// Match elements unmatched by `matcher`
+					while ( i-- ) {
+						if ( (elem = unmatched[i]) ) {
+							seed[i] = !(matches[i] = elem);
+						}
+					}
+				}) :
+				function( elem, context, xml ) {
+					input[0] = elem;
+					matcher( input, null, xml, results );
+					return !results.pop();
+				};
+		}),
+
+		"has": markFunction(function( selector ) {
+			return function( elem ) {
+				return Sizzle( selector, elem ).length > 0;
+			};
+		}),
+
+		"contains": markFunction(function( text ) {
+			return function( elem ) {
+				return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
+			};
+		}),
+
+		// "Whether an element is represented by a :lang() selector
+		// is based solely on the element's language value
+		// being equal to the identifier C,
+		// or beginning with the identifier C immediately followed by "-".
+		// The matching of C against the element's language value is performed case-insensitively.
+		// The identifier C does not have to be a valid language name."
+		// http://www.w3.org/TR/selectors/#lang-pseudo
+		"lang": markFunction( function( lang ) {
+			// lang value must be a valid identifier
+			if ( !ridentifier.test(lang || "") ) {
+				Sizzle.error( "unsupported lang: " + lang );
+			}
+			lang = lang.replace( runescape, funescape ).toLowerCase();
+			return function( elem ) {
+				var elemLang;
+				do {
+					if ( (elemLang = documentIsHTML ?
+						elem.lang :
+						elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
+
+						elemLang = elemLang.toLowerCase();
+						return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
+					}
+				} while ( (elem = elem.parentNode) && elem.nodeType === 1 );
+				return false;
+			};
+		}),
+
+		// Miscellaneous
+		"target": function( elem ) {
+			var hash = window.location && window.location.hash;
+			return hash && hash.slice( 1 ) === elem.id;
+		},
+
+		"root": function( elem ) {
+			return elem === docElem;
+		},
+
+		"focus": function( elem ) {
+			return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
+		},
+
+		// Boolean properties
+		"enabled": function( elem ) {
+			return elem.disabled === false;
+		},
+
+		"disabled": function( elem ) {
+			return elem.disabled === true;
+		},
+
+		"checked": function( elem ) {
+			// In CSS3, :checked should return both checked and selected elements
+			// http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
+			var nodeName = elem.nodeName.toLowerCase();
+			return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
+		},
+
+		"selected": function( elem ) {
+			// Accessing this property makes selected-by-default
+			// options in Safari work properly
+			if ( elem.parentNode ) {
+				elem.parentNode.selectedIndex;
+			}
+
+			return elem.selected === true;
+		},
+
+		// Contents
+		"empty": function( elem ) {
+			// http://www.w3.org/TR/selectors/#empty-pseudo
+			// :empty is only affected by element nodes and content nodes(including text(3), cdata(4)),
+			//   not comment, processing instructions, or others
+			// Thanks to Diego Perini for the nodeName shortcut
+			//   Greater than "@" means alpha characters (specifically not starting with "#" or "?")
+			for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
+				if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) {
+					return false;
+				}
+			}
+			return true;
+		},
+
+		"parent": function( elem ) {
+			return !Expr.pseudos["empty"]( elem );
+		},
+
+		// Element/input types
+		"header": function( elem ) {
+			return rheader.test( elem.nodeName );
+		},
+
+		"input": function( elem ) {
+			return rinputs.test( elem.nodeName );
+		},
+
+		"button": function( elem ) {
+			var name = elem.nodeName.toLowerCase();
+			return name === "input" && elem.type === "button" || name === "button";
+		},
+
+		"text": function( elem ) {
+			var attr;
+			// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
+			// use getAttribute instead to test this case
+			return elem.nodeName.toLowerCase() === "input" &&
+				elem.type === "text" &&
+				( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type );
+		},
+
+		// Position-in-collection
+		"first": createPositionalPseudo(function() {
+			return [ 0 ];
+		}),
+
+		"last": createPositionalPseudo(function( matchIndexes, length ) {
+			return [ length - 1 ];
+		}),
+
+		"eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			return [ argument < 0 ? argument + length : argument ];
+		}),
+
+		"even": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 0;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"odd": createPositionalPseudo(function( matchIndexes, length ) {
+			var i = 1;
+			for ( ; i < length; i += 2 ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; --i >= 0; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		}),
+
+		"gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
+			var i = argument < 0 ? argument + length : argument;
+			for ( ; ++i < length; ) {
+				matchIndexes.push( i );
+			}
+			return matchIndexes;
+		})
+	}
+};
+
+Expr.pseudos["nth"] = Expr.pseudos["eq"];
+
+// Add button/input type pseudos
+for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
+	Expr.pseudos[ i ] = createInputPseudo( i );
+}
+for ( i in { submit: true, reset: true } ) {
+	Expr.pseudos[ i ] = createButtonPseudo( i );
+}
+
+// Easy API for creating new setFilters
+function setFilters() {}
+setFilters.prototype = Expr.filters = Expr.pseudos;
+Expr.setFilters = new setFilters();
+
+function tokenize( selector, parseOnly ) {
+	var matched, match, tokens, type,
+		soFar, groups, preFilters,
+		cached = tokenCache[ selector + " " ];
+
+	if ( cached ) {
+		return parseOnly ? 0 : cached.slice( 0 );
+	}
+
+	soFar = selector;
+	groups = [];
+	preFilters = Expr.preFilter;
+
+	while ( soFar ) {
+
+		// Comma and first run
+		if ( !matched || (match = rcomma.exec( soFar )) ) {
+			if ( match ) {
+				// Don't consume trailing commas as valid
+				soFar = soFar.slice( match[0].length ) || soFar;
+			}
+			groups.push( tokens = [] );
+		}
+
+		matched = false;
+
+		// Combinators
+		if ( (match = rcombinators.exec( soFar )) ) {
+			matched = match.shift();
+			tokens.push({
+				value: matched,
+				// Cast descendant combinators to space
+				type: match[0].replace( rtrim, " " )
+			});
+			soFar = soFar.slice( matched.length );
+		}
+
+		// Filters
+		for ( type in Expr.filter ) {
+			if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
+				(match = preFilters[ type ]( match ))) ) {
+				matched = match.shift();
+				tokens.push({
+					value: matched,
+					type: type,
+					matches: match
+				});
+				soFar = soFar.slice( matched.length );
+			}
+		}
+
+		if ( !matched ) {
+			break;
+		}
+	}
+
+	// Return the length of the invalid excess
+	// if we're just parsing
+	// Otherwise, throw an error or return tokens
+	return parseOnly ?
+		soFar.length :
+		soFar ?
+			Sizzle.error( selector ) :
+			// Cache the tokens
+			tokenCache( selector, groups ).slice( 0 );
+}
+
+function toSelector( tokens ) {
+	var i = 0,
+		len = tokens.length,
+		selector = "";
+	for ( ; i < len; i++ ) {
+		selector += tokens[i].value;
+	}
+	return selector;
+}
+
+function addCombinator( matcher, combinator, base ) {
+	var dir = combinator.dir,
+		checkNonElements = base && dir === "parentNode",
+		doneName = done++;
+
+	return combinator.first ?
+		// Check against closest ancestor/preceding element
+		function( elem, context, xml ) {
+			while ( (elem = elem[ dir ]) ) {
+				if ( elem.nodeType === 1 || checkNonElements ) {
+					return matcher( elem, context, xml );
+				}
+			}
+		} :
+
+		// Check against all ancestor/preceding elements
+		function( elem, context, xml ) {
+			var data, cache, outerCache,
+				dirkey = dirruns + " " + doneName;
+
+			// We can't set arbitrary data on XML nodes, so they don't benefit from dir caching
+			if ( xml ) {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						if ( matcher( elem, context, xml ) ) {
+							return true;
+						}
+					}
+				}
+			} else {
+				while ( (elem = elem[ dir ]) ) {
+					if ( elem.nodeType === 1 || checkNonElements ) {
+						outerCache = elem[ expando ] || (elem[ expando ] = {});
+						if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) {
+							if ( (data = cache[1]) === true || data === cachedruns ) {
+								return data === true;
+							}
+						} else {
+							cache = outerCache[ dir ] = [ dirkey ];
+							cache[1] = matcher( elem, context, xml ) || cachedruns;
+							if ( cache[1] === true ) {
+								return true;
+							}
+						}
+					}
+				}
+			}
+		};
+}
+
+function elementMatcher( matchers ) {
+	return matchers.length > 1 ?
+		function( elem, context, xml ) {
+			var i = matchers.length;
+			while ( i-- ) {
+				if ( !matchers[i]( elem, context, xml ) ) {
+					return false;
+				}
+			}
+			return true;
+		} :
+		matchers[0];
+}
+
+function condense( unmatched, map, filter, context, xml ) {
+	var elem,
+		newUnmatched = [],
+		i = 0,
+		len = unmatched.length,
+		mapped = map != null;
+
+	for ( ; i < len; i++ ) {
+		if ( (elem = unmatched[i]) ) {
+			if ( !filter || filter( elem, context, xml ) ) {
+				newUnmatched.push( elem );
+				if ( mapped ) {
+					map.push( i );
+				}
+			}
+		}
+	}
+
+	return newUnmatched;
+}
+
+function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
+	if ( postFilter && !postFilter[ expando ] ) {
+		postFilter = setMatcher( postFilter );
+	}
+	if ( postFinder && !postFinder[ expando ] ) {
+		postFinder = setMatcher( postFinder, postSelector );
+	}
+	return markFunction(function( seed, results, context, xml ) {
+		var temp, i, elem,
+			preMap = [],
+			postMap = [],
+			preexisting = results.length,
+
+			// Get initial elements from seed or context
+			elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
+
+			// Prefilter to get matcher input, preserving a map for seed-results synchronization
+			matcherIn = preFilter && ( seed || !selector ) ?
+				condense( elems, preMap, preFilter, context, xml ) :
+				elems,
+
+			matcherOut = matcher ?
+				// If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
+				postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
+
+					// ...intermediate processing is necessary
+					[] :
+
+					// ...otherwise use results directly
+					results :
+				matcherIn;
+
+		// Find primary matches
+		if ( matcher ) {
+			matcher( matcherIn, matcherOut, context, xml );
+		}
+
+		// Apply postFilter
+		if ( postFilter ) {
+			temp = condense( matcherOut, postMap );
+			postFilter( temp, [], context, xml );
+
+			// Un-match failing elements by moving them back to matcherIn
+			i = temp.length;
+			while ( i-- ) {
+				if ( (elem = temp[i]) ) {
+					matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
+				}
+			}
+		}
+
+		if ( seed ) {
+			if ( postFinder || preFilter ) {
+				if ( postFinder ) {
+					// Get the final matcherOut by condensing this intermediate into postFinder contexts
+					temp = [];
+					i = matcherOut.length;
+					while ( i-- ) {
+						if ( (elem = matcherOut[i]) ) {
+							// Restore matcherIn since elem is not yet a final match
+							temp.push( (matcherIn[i] = elem) );
+						}
+					}
+					postFinder( null, (matcherOut = []), temp, xml );
+				}
+
+				// Move matched elements from seed to results to keep them synchronized
+				i = matcherOut.length;
+				while ( i-- ) {
+					if ( (elem = matcherOut[i]) &&
+						(temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) {
+
+						seed[temp] = !(results[temp] = elem);
+					}
+				}
+			}
+
+		// Add elements to results, through postFinder if defined
+		} else {
+			matcherOut = condense(
+				matcherOut === results ?
+					matcherOut.splice( preexisting, matcherOut.length ) :
+					matcherOut
+			);
+			if ( postFinder ) {
+				postFinder( null, results, matcherOut, xml );
+			} else {
+				push.apply( results, matcherOut );
+			}
+		}
+	});
+}
+
+function matcherFromTokens( tokens ) {
+	var checkContext, matcher, j,
+		len = tokens.length,
+		leadingRelative = Expr.relative[ tokens[0].type ],
+		implicitRelative = leadingRelative || Expr.relative[" "],
+		i = leadingRelative ? 1 : 0,
+
+		// The foundational matcher ensures that elements are reachable from top-level context(s)
+		matchContext = addCombinator( function( elem ) {
+			return elem === checkContext;
+		}, implicitRelative, true ),
+		matchAnyContext = addCombinator( function( elem ) {
+			return indexOf.call( checkContext, elem ) > -1;
+		}, implicitRelative, true ),
+		matchers = [ function( elem, context, xml ) {
+			return ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
+				(checkContext = context).nodeType ?
+					matchContext( elem, context, xml ) :
+					matchAnyContext( elem, context, xml ) );
+		} ];
+
+	for ( ; i < len; i++ ) {
+		if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
+			matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
+		} else {
+			matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
+
+			// Return special upon seeing a positional matcher
+			if ( matcher[ expando ] ) {
+				// Find the next relative operator (if any) for proper handling
+				j = ++i;
+				for ( ; j < len; j++ ) {
+					if ( Expr.relative[ tokens[j].type ] ) {
+						break;
+					}
+				}
+				return setMatcher(
+					i > 1 && elementMatcher( matchers ),
+					i > 1 && toSelector(
+						// If the preceding token was a descendant combinator, insert an implicit any-element `*`
+						tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
+					).replace( rtrim, "$1" ),
+					matcher,
+					i < j && matcherFromTokens( tokens.slice( i, j ) ),
+					j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
+					j < len && toSelector( tokens )
+				);
+			}
+			matchers.push( matcher );
+		}
+	}
+
+	return elementMatcher( matchers );
+}
+
+function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
+	// A counter to specify which element is currently being matched
+	var matcherCachedRuns = 0,
+		bySet = setMatchers.length > 0,
+		byElement = elementMatchers.length > 0,
+		superMatcher = function( seed, context, xml, results, expandContext ) {
+			var elem, j, matcher,
+				setMatched = [],
+				matchedCount = 0,
+				i = "0",
+				unmatched = seed && [],
+				outermost = expandContext != null,
+				contextBackup = outermostContext,
+				// We must always have either seed elements or context
+				elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ),
+				// Use integer dirruns iff this is the outermost matcher
+				dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1);
+
+			if ( outermost ) {
+				outermostContext = context !== document && context;
+				cachedruns = matcherCachedRuns;
+			}
+
+			// Add elements passing elementMatchers directly to results
+			// Keep `i` a string if there are no elements so `matchedCount` will be "00" below
+			for ( ; (elem = elems[i]) != null; i++ ) {
+				if ( byElement && elem ) {
+					j = 0;
+					while ( (matcher = elementMatchers[j++]) ) {
+						if ( matcher( elem, context, xml ) ) {
+							results.push( elem );
+							break;
+						}
+					}
+					if ( outermost ) {
+						dirruns = dirrunsUnique;
+						cachedruns = ++matcherCachedRuns;
+					}
+				}
+
+				// Track unmatched elements for set filters
+				if ( bySet ) {
+					// They will have gone through all possible matchers
+					if ( (elem = !matcher && elem) ) {
+						matchedCount--;
+					}
+
+					// Lengthen the array for every element, matched or not
+					if ( seed ) {
+						unmatched.push( elem );
+					}
+				}
+			}
+
+			// Apply set filters to unmatched elements
+			matchedCount += i;
+			if ( bySet && i !== matchedCount ) {
+				j = 0;
+				while ( (matcher = setMatchers[j++]) ) {
+					matcher( unmatched, setMatched, context, xml );
+				}
+
+				if ( seed ) {
+					// Reintegrate element matches to eliminate the need for sorting
+					if ( matchedCount > 0 ) {
+						while ( i-- ) {
+							if ( !(unmatched[i] || setMatched[i]) ) {
+								setMatched[i] = pop.call( results );
+							}
+						}
+					}
+
+					// Discard index placeholder values to get only actual matches
+					setMatched = condense( setMatched );
+				}
+
+				// Add matches to results
+				push.apply( results, setMatched );
+
+				// Seedless set matches succeeding multiple successful matchers stipulate sorting
+				if ( outermost && !seed && setMatched.length > 0 &&
+					( matchedCount + setMatchers.length ) > 1 ) {
+
+					Sizzle.uniqueSort( results );
+				}
+			}
+
+			// Override manipulation of globals by nested matchers
+			if ( outermost ) {
+				dirruns = dirrunsUnique;
+				outermostContext = contextBackup;
+			}
+
+			return unmatched;
+		};
+
+	return bySet ?
+		markFunction( superMatcher ) :
+		superMatcher;
+}
+
+compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) {
+	var i,
+		setMatchers = [],
+		elementMatchers = [],
+		cached = compilerCache[ selector + " " ];
+
+	if ( !cached ) {
+		// Generate a function of recursive functions that can be used to check each element
+		if ( !group ) {
+			group = tokenize( selector );
+		}
+		i = group.length;
+		while ( i-- ) {
+			cached = matcherFromTokens( group[i] );
+			if ( cached[ expando ] ) {
+				setMatchers.push( cached );
+			} else {
+				elementMatchers.push( cached );
+			}
+		}
+
+		// Cache the compiled function
+		cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
+	}
+	return cached;
+};
+
+function multipleContexts( selector, contexts, results ) {
+	var i = 0,
+		len = contexts.length;
+	for ( ; i < len; i++ ) {
+		Sizzle( selector, contexts[i], results );
+	}
+	return results;
+}
+
+function select( selector, context, results, seed ) {
+	var i, tokens, token, type, find,
+		match = tokenize( selector );
+
+	if ( !seed ) {
+		// Try to minimize operations if there is only one group
+		if ( match.length === 1 ) {
+
+			// Take a shortcut and set the context if the root selector is an ID
+			tokens = match[0] = match[0].slice( 0 );
+			if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
+					support.getById && context.nodeType === 9 && documentIsHTML &&
+					Expr.relative[ tokens[1].type ] ) {
+
+				context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
+				if ( !context ) {
+					return results;
+				}
+				selector = selector.slice( tokens.shift().value.length );
+			}
+
+			// Fetch a seed set for right-to-left matching
+			i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
+			while ( i-- ) {
+				token = tokens[i];
+
+				// Abort if we hit a combinator
+				if ( Expr.relative[ (type = token.type) ] ) {
+					break;
+				}
+				if ( (find = Expr.find[ type ]) ) {
+					// Search, expanding context for leading sibling combinators
+					if ( (seed = find(
+						token.matches[0].replace( runescape, funescape ),
+						rsibling.test( tokens[0].type ) && context.parentNode || context
+					)) ) {
+
+						// If seed is empty or no tokens remain, we can return early
+						tokens.splice( i, 1 );
+						selector = seed.length && toSelector( tokens );
+						if ( !selector ) {
+							push.apply( results, seed );
+							return results;
+						}
+
+						break;
+					}
+				}
+			}
+		}
+	}
+
+	// Compile and execute a filtering function
+	// Provide `match` to avoid retokenization if we modified the selector above
+	compile( selector, match )(
+		seed,
+		context,
+		!documentIsHTML,
+		results,
+		rsibling.test( selector )
+	);
+	return results;
+}
+
+// One-time assignments
+
+// Sort stability
+support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
+
+// Support: Chrome<14
+// Always assume duplicates if they aren't passed to the comparison function
+support.detectDuplicates = hasDuplicate;
+
+// Initialize against the default document
+setDocument();
+
+// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
+// Detached nodes confoundingly follow *each other*
+support.sortDetached = assert(function( div1 ) {
+	// Should return 1, but returns 4 (following)
+	return div1.compareDocumentPosition( document.createElement("div") ) & 1;
+});
+
+// Support: IE<8
+// Prevent attribute/property "interpolation"
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !assert(function( div ) {
+	div.innerHTML = "<a href='#'></a>";
+	return div.firstChild.getAttribute("href") === "#" ;
+}) ) {
+	addHandle( "type|href|height|width", function( elem, name, isXML ) {
+		if ( !isXML ) {
+			return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
+		}
+	});
+}
+
+// Support: IE<9
+// Use defaultValue in place of getAttribute("value")
+if ( !support.attributes || !assert(function( div ) {
+	div.innerHTML = "<input/>";
+	div.firstChild.setAttribute( "value", "" );
+	return div.firstChild.getAttribute( "value" ) === "";
+}) ) {
+	addHandle( "value", function( elem, name, isXML ) {
+		if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
+			return elem.defaultValue;
+		}
+	});
+}
+
+// Support: IE<9
+// Use getAttributeNode to fetch booleans when getAttribute lies
+if ( !assert(function( div ) {
+	return div.getAttribute("disabled") == null;
+}) ) {
+	addHandle( booleans, function( elem, name, isXML ) {
+		var val;
+		if ( !isXML ) {
+			return (val = elem.getAttributeNode( name )) && val.specified ?
+				val.value :
+				elem[ name ] === true ? name.toLowerCase() : null;
+		}
+	});
+}
+
+jQuery.find = Sizzle;
+jQuery.expr = Sizzle.selectors;
+jQuery.expr[":"] = jQuery.expr.pseudos;
+jQuery.unique = Sizzle.uniqueSort;
+jQuery.text = Sizzle.getText;
+jQuery.isXMLDoc = Sizzle.isXML;
+jQuery.contains = Sizzle.contains;
+
+
+})( window );
+// String to Object options format cache
+var optionsCache = {};
+
+// Convert String-formatted options into Object-formatted ones and store in cache
+function createOptions( options ) {
+	var object = optionsCache[ options ] = {};
+	jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
+		object[ flag ] = true;
+	});
+	return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ *	options: an optional list of space-separated options that will change how
+ *			the callback list behaves or a more traditional option object
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible options:
+ *
+ *	once:			will ensure the callback list can only be fired once (like a Deferred)
+ *
+ *	memory:			will keep track of previous values and will call any callback added
+ *					after the list has been fired right away with the latest "memorized"
+ *					values (like a Deferred)
+ *
+ *	unique:			will ensure a callback can only be added once (no duplicate in the list)
+ *
+ *	stopOnFalse:	interrupt callings when a callback returns false
+ *
+ */
+jQuery.Callbacks = function( options ) {
+
+	// Convert options from String-formatted to Object-formatted if needed
+	// (we check in cache first)
+	options = typeof options === "string" ?
+		( optionsCache[ options ] || createOptions( options ) ) :
+		jQuery.extend( {}, options );
+
+	var // Flag to know if list is currently firing
+		firing,
+		// Last fire value (for non-forgettable lists)
+		memory,
+		// Flag to know if list was already fired
+		fired,
+		// End of the loop when firing
+		firingLength,
+		// Index of currently firing callback (modified by remove if needed)
+		firingIndex,
+		// First callback to fire (used internally by add and fireWith)
+		firingStart,
+		// Actual callback list
+		list = [],
+		// Stack of fire calls for repeatable lists
+		stack = !options.once && [],
+		// Fire callbacks
+		fire = function( data ) {
+			memory = options.memory && data;
+			fired = true;
+			firingIndex = firingStart || 0;
+			firingStart = 0;
+			firingLength = list.length;
+			firing = true;
+			for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+				if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
+					memory = false; // To prevent further calls using add
+					break;
+				}
+			}
+			firing = false;
+			if ( list ) {
+				if ( stack ) {
+					if ( stack.length ) {
+						fire( stack.shift() );
+					}
+				} else if ( memory ) {
+					list = [];
+				} else {
+					self.disable();
+				}
+			}
+		},
+		// Actual Callbacks object
+		self = {
+			// Add a callback or a collection of callbacks to the list
+			add: function() {
+				if ( list ) {
+					// First, we save the current length
+					var start = list.length;
+					(function add( args ) {
+						jQuery.each( args, function( _, arg ) {
+							var type = jQuery.type( arg );
+							if ( type === "function" ) {
+								if ( !options.unique || !self.has( arg ) ) {
+									list.push( arg );
+								}
+							} else if ( arg && arg.length && type !== "string" ) {
+								// Inspect recursively
+								add( arg );
+							}
+						});
+					})( arguments );
+					// Do we need to add the callbacks to the
+					// current firing batch?
+					if ( firing ) {
+						firingLength = list.length;
+					// With memory, if we're not firing then
+					// we should call right away
+					} else if ( memory ) {
+						firingStart = start;
+						fire( memory );
+					}
+				}
+				return this;
+			},
+			// Remove a callback from the list
+			remove: function() {
+				if ( list ) {
+					jQuery.each( arguments, function( _, arg ) {
+						var index;
+						while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
+							list.splice( index, 1 );
+							// Handle firing indexes
+							if ( firing ) {
+								if ( index <= firingLength ) {
+									firingLength--;
+								}
+								if ( index <= firingIndex ) {
+									firingIndex--;
+								}
+							}
+						}
+					});
+				}
+				return this;
+			},
+			// Check if a given callback is in the list.
+			// If no argument is given, return whether or not list has callbacks attached.
+			has: function( fn ) {
+				return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
+			},
+			// Remove all callbacks from the list
+			empty: function() {
+				list = [];
+				firingLength = 0;
+				return this;
+			},
+			// Have the list do nothing anymore
+			disable: function() {
+				list = stack = memory = undefined;
+				return this;
+			},
+			// Is it disabled?
+			disabled: function() {
+				return !list;
+			},
+			// Lock the list in its current state
+			lock: function() {
+				stack = undefined;
+				if ( !memory ) {
+					self.disable();
+				}
+				return this;
+			},
+			// Is it locked?
+			locked: function() {
+				return !stack;
+			},
+			// Call all callbacks with the given context and arguments
+			fireWith: function( context, args ) {
+				if ( list && ( !fired || stack ) ) {
+					args = args || [];
+					args = [ context, args.slice ? args.slice() : args ];
+					if ( firing ) {
+						stack.push( args );
+					} else {
+						fire( args );
+					}
+				}
+				return this;
+			},
+			// Call all the callbacks with the given arguments
+			fire: function() {
+				self.fireWith( this, arguments );
+				return this;
+			},
+			// To know if the callbacks have already been called at least once
+			fired: function() {
+				return !!fired;
+			}
+		};
+
+	return self;
+};
+jQuery.extend({
+
+	Deferred: function( func ) {
+		var tuples = [
+				// action, add listener, listener list, final state
+				[ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
+				[ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
+				[ "notify", "progress", jQuery.Callbacks("memory") ]
+			],
+			state = "pending",
+			promise = {
+				state: function() {
+					return state;
+				},
+				always: function() {
+					deferred.done( arguments ).fail( arguments );
+					return this;
+				},
+				then: function( /* fnDone, fnFail, fnProgress */ ) {
+					var fns = arguments;
+					return jQuery.Deferred(function( newDefer ) {
+						jQuery.each( tuples, function( i, tuple ) {
+							var action = tuple[ 0 ],
+								fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
+							// deferred[ done | fail | progress ] for forwarding actions to newDefer
+							deferred[ tuple[1] ](function() {
+								var returned = fn && fn.apply( this, arguments );
+								if ( returned && jQuery.isFunction( returned.promise ) ) {
+									returned.promise()
+										.done( newDefer.resolve )
+										.fail( newDefer.reject )
+										.progress( newDefer.notify );
+								} else {
+									newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
+								}
+							});
+						});
+						fns = null;
+					}).promise();
+				},
+				// Get a promise for this deferred
+				// If obj is provided, the promise aspect is added to the object
+				promise: function( obj ) {
+					return obj != null ? jQuery.extend( obj, promise ) : promise;
+				}
+			},
+			deferred = {};
+
+		// Keep pipe for back-compat
+		promise.pipe = promise.then;
+
+		// Add list-specific methods
+		jQuery.each( tuples, function( i, tuple ) {
+			var list = tuple[ 2 ],
+				stateString = tuple[ 3 ];
+
+			// promise[ done | fail | progress ] = list.add
+			promise[ tuple[1] ] = list.add;
+
+			// Handle state
+			if ( stateString ) {
+				list.add(function() {
+					// state = [ resolved | rejected ]
+					state = stateString;
+
+				// [ reject_list | resolve_list ].disable; progress_list.lock
+				}, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
+			}
+
+			// deferred[ resolve | reject | notify ]
+			deferred[ tuple[0] ] = function() {
+				deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
+				return this;
+			};
+			deferred[ tuple[0] + "With" ] = list.fireWith;
+		});
+
+		// Make the deferred a promise
+		promise.promise( deferred );
+
+		// Call given func if any
+		if ( func ) {
+			func.call( deferred, deferred );
+		}
+
+		// All done!
+		return deferred;
+	},
+
+	// Deferred helper
+	when: function( subordinate /* , ..., subordinateN */ ) {
+		var i = 0,
+			resolveValues = core_slice.call( arguments ),
+			length = resolveValues.length,
+
+			// the count of uncompleted subordinates
+			remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
+
+			// the master Deferred. If resolveValues consist of only a single Deferred, just use that.
+			deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
+
+			// Update function for both resolve and progress values
+			updateFunc = function( i, contexts, values ) {
+				return function( value ) {
+					contexts[ i ] = this;
+					values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
+					if( values === progressValues ) {
+						deferred.notifyWith( contexts, values );
+					} else if ( !( --remaining ) ) {
+						deferred.resolveWith( contexts, values );
+					}
+				};
+			},
+
+			progressValues, progressContexts, resolveContexts;
+
+		// add listeners to Deferred subordinates; treat others as resolved
+		if ( length > 1 ) {
+			progressValues = new Array( length );
+			progressContexts = new Array( length );
+			resolveContexts = new Array( length );
+			for ( ; i < length; i++ ) {
+				if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
+					resolveValues[ i ].promise()
+						.done( updateFunc( i, resolveContexts, resolveValues ) )
+						.fail( deferred.reject )
+						.progress( updateFunc( i, progressContexts, progressValues ) );
+				} else {
+					--remaining;
+				}
+			}
+		}
+
+		// if we're not waiting on anything, resolve the master
+		if ( !remaining ) {
+			deferred.resolveWith( resolveContexts, resolveValues );
+		}
+
+		return deferred.promise();
+	}
+});
+jQuery.support = (function( support ) {
+
+	var all, a, input, select, fragment, opt, eventName, isSupported, i,
+		div = document.createElement("div");
+
+	// Setup
+	div.setAttribute( "className", "t" );
+	div.innerHTML = "  <link/><table></table><a href='/a'>a</a><input type='checkbox'/>";
+
+	// Finish early in limited (non-browser) environments
+	all = div.getElementsByTagName("*") || [];
+	a = div.getElementsByTagName("a")[ 0 ];
+	if ( !a || !a.style || !all.length ) {
+		return support;
+	}
+
+	// First batch of tests
+	select = document.createElement("select");
+	opt = select.appendChild( document.createElement("option") );
+	input = div.getElementsByTagName("input")[ 0 ];
+
+	a.style.cssText = "top:1px;float:left;opacity:.5";
+
+	// Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+	support.getSetAttribute = div.className !== "t";
+
+	// IE strips leading whitespace when .innerHTML is used
+	support.leadingWhitespace = div.firstChild.nodeType === 3;
+
+	// Make sure that tbody elements aren't automatically inserted
+	// IE will insert them into empty tables
+	support.tbody = !div.getElementsByTagName("tbody").length;
+
+	// Make sure that link elements get serialized correctly by innerHTML
+	// This requires a wrapper element in IE
+	support.htmlSerialize = !!div.getElementsByTagName("link").length;
+
+	// Get the style information from getAttribute
+	// (IE uses .cssText instead)
+	support.style = /top/.test( a.getAttribute("style") );
+
+	// Make sure that URLs aren't manipulated
+	// (IE normalizes it by default)
+	support.hrefNormalized = a.getAttribute("href") === "/a";
+
+	// Make sure that element opacity exists
+	// (IE uses filter instead)
+	// Use a regex to work around a WebKit issue. See #5145
+	support.opacity = /^0.5/.test( a.style.opacity );
+
+	// Verify style float existence
+	// (IE uses styleFloat instead of cssFloat)
+	support.cssFloat = !!a.style.cssFloat;
+
+	// Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
+	support.checkOn = !!input.value;
+
+	// Make sure that a selected-by-default option has a working selected property.
+	// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
+	support.optSelected = opt.selected;
+
+	// Tests for enctype support on a form (#6743)
+	support.enctype = !!document.createElement("form").enctype;
+
+	// Makes sure cloning an html5 element does not cause problems
+	// Where outerHTML is undefined, this still works
+	support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav></:nav>";
+
+	// Will be defined later
+	support.inlineBlockNeedsLayout = false;
+	support.shrinkWrapBlocks = false;
+	support.pixelPosition = false;
+	support.deleteExpando = true;
+	support.noCloneEvent = true;
+	support.reliableMarginRight = true;
+	support.boxSizingReliable = true;
+
+	// Make sure checked status is properly cloned
+	input.checked = true;
+	support.noCloneChecked = input.cloneNode( true ).checked;
+
+	// Make sure that the options inside disabled selects aren't marked as disabled
+	// (WebKit marks them as disabled)
+	select.disabled = true;
+	support.optDisabled = !opt.disabled;
+
+	// Support: IE<9
+	try {
+		delete div.test;
+	} catch( e ) {
+		support.deleteExpando = false;
+	}
+
+	// Check if we can trust getAttribute("value")
+	input = document.createElement("input");
+	input.setAttribute( "value", "" );
+	support.input = input.getAttribute( "value" ) === "";
+
+	// Check if an input maintains its value after becoming a radio
+	input.value = "t";
+	input.setAttribute( "type", "radio" );
+	support.radioValue = input.value === "t";
+
+	// #11217 - WebKit loses check when the name is after the checked attribute
+	input.setAttribute( "checked", "t" );
+	input.setAttribute( "name", "t" );
+
+	fragment = document.createDocumentFragment();
+	fragment.appendChild( input );
+
+	// Check if a disconnected checkbox will retain its checked
+	// value of true after appended to the DOM (IE6/7)
+	support.appendChecked = input.checked;
+
+	// WebKit doesn't clone checked state correctly in fragments
+	support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+	// Support: IE<9
+	// Opera does not clone events (and typeof div.attachEvent === undefined).
+	// IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
+	if ( div.attachEvent ) {
+		div.attachEvent( "onclick", function() {
+			support.noCloneEvent = false;
+		});
+
+		div.cloneNode( true ).click();
+	}
+
+	// Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
+	// Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP)
+	for ( i in { submit: true, change: true, focusin: true }) {
+		div.setAttribute( eventName = "on" + i, "t" );
+
+		support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
+	}
+
+	div.style.backgroundClip = "content-box";
+	div.cloneNode( true ).style.backgroundClip = "";
+	support.clearCloneStyle = div.style.backgroundClip === "content-box";
+
+	// Support: IE<9
+	// Iteration over object's inherited properties before its own.
+	for ( i in jQuery( support ) ) {
+		break;
+	}
+	support.ownLast = i !== "0";
+
+	// Run tests that need a body at doc ready
+	jQuery(function() {
+		var container, marginDiv, tds,
+			divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
+			body = document.getElementsByTagName("body")[0];
+
+		if ( !body ) {
+			// Return for frameset docs that don't have a body
+			return;
+		}
+
+		container = document.createElement("div");
+		container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
+
+		body.appendChild( container ).appendChild( div );
+
+		// Support: IE8
+		// Check if table cells still have offsetWidth/Height when they are set
+		// to display:none and there are still other visible table cells in a
+		// table row; if so, offsetWidth/Height are not reliable for use when
+		// determining if an element has been hidden directly using
+		// display:none (it is still safe to use offsets if a parent element is
+		// hidden; don safety goggles and see bug #4512 for more information).
+		div.innerHTML = "<table><tr><td></td><td>t</td></tr></table>";
+		tds = div.getElementsByTagName("td");
+		tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
+		isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+		tds[ 0 ].style.display = "";
+		tds[ 1 ].style.display = "none";
+
+		// Support: IE8
+		// Check if empty table cells still have offsetWidth/Height
+		support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+		// Check box-sizing and margin behavior.
+		div.innerHTML = "";
+		div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
+
+		// Workaround failing boxSizing test due to offsetWidth returning wrong value
+		// with some non-1 values of body zoom, ticket #13543
+		jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() {
+			support.boxSizing = div.offsetWidth === 4;
+		});
+
+		// Use window.getComputedStyle because jsdom on node.js will break without it.
+		if ( window.getComputedStyle ) {
+			support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
+			support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
+
+			// Check if div with explicit width and no margin-right incorrectly
+			// gets computed margin-right based on width of container. (#3333)
+			// Fails in WebKit before Feb 2011 nightlies
+			// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+			marginDiv = div.appendChild( document.createElement("div") );
+			marginDiv.style.cssText = div.style.cssText = divReset;
+			marginDiv.style.marginRight = marginDiv.style.width = "0";
+			div.style.width = "1px";
+
+			support.reliableMarginRight =
+				!parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
+		}
+
+		if ( typeof div.style.zoom !== core_strundefined ) {
+			// Support: IE<8
+			// Check if natively block-level elements act like inline-block
+			// elements when setting their display to 'inline' and giving
+			// them layout
+			div.innerHTML = "";
+			div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
+			support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+			// Support: IE6
+			// Check if elements with layout shrink-wrap their children
+			div.style.display = "block";
+			div.innerHTML = "<div></div>";
+			div.firstChild.style.width = "5px";
+			support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+
+			if ( support.inlineBlockNeedsLayout ) {
+				// Prevent IE 6 from affecting layout for positioned elements #11048
+				// Prevent IE from shrinking the body in IE 7 mode #12869
+				// Support: IE<8
+				body.style.zoom = 1;
+			}
+		}
+
+		body.removeChild( container );
+
+		// Null elements to avoid leaks in IE
+		container = div = tds = marginDiv = null;
+	});
+
+	// Null elements to avoid leaks in IE
+	all = select = fragment = opt = a = input = null;
+
+	return support;
+})({});
+
+var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
+	rmultiDash = /([A-Z])/g;
+
+function internalData( elem, name, data, pvt /* Internal Use Only */ ){
+	if ( !jQuery.acceptData( elem ) ) {
+		return;
+	}
+
+	var ret, thisCache,
+		internalKey = jQuery.expando,
+
+		// We have to handle DOM nodes and JS objects differently because IE6-7
+		// can't GC object references properly across the DOM-JS boundary
+		isNode = elem.nodeType,
+
+		// Only DOM nodes need the global jQuery cache; JS object data is
+		// attached directly to the object so GC can occur automatically
+		cache = isNode ? jQuery.cache : elem,
+
+		// Only defining an ID for JS objects if its cache already exists allows
+		// the code to shortcut on the same path as a DOM node with no cache
+		id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
+
+	// Avoid doing any more work than we need to when trying to get data on an
+	// object that has no data at all
+	if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) {
+		return;
+	}
+
+	if ( !id ) {
+		// Only DOM nodes need a new unique ID for each element since their data
+		// ends up in the global cache
+		if ( isNode ) {
+			id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++;
+		} else {
+			id = internalKey;
+		}
+	}
+
+	if ( !cache[ id ] ) {
+		// Avoid exposing jQuery metadata on plain JS objects when the object
+		// is serialized using JSON.stringify
+		cache[ id ] = isNode ? {} : { toJSON: jQuery.noop };
+	}
+
+	// An object can be passed to jQuery.data instead of a key/value pair; this gets
+	// shallow copied over onto the existing cache
+	if ( typeof name === "object" || typeof name === "function" ) {
+		if ( pvt ) {
+			cache[ id ] = jQuery.extend( cache[ id ], name );
+		} else {
+			cache[ id ].data = jQuery.extend( cache[ id ].data, name );
+		}
+	}
+
+	thisCache = cache[ id ];
+
+	// jQuery data() is stored in a separate object inside the object's internal data
+	// cache in order to avoid key collisions between internal data and user-defined
+	// data.
+	if ( !pvt ) {
+		if ( !thisCache.data ) {
+			thisCache.data = {};
+		}
+
+		thisCache = thisCache.data;
+	}
+
+	if ( data !== undefined ) {
+		thisCache[ jQuery.camelCase( name ) ] = data;
+	}
+
+	// Check for both converted-to-camel and non-converted data property names
+	// If a data property was specified
+	if ( typeof name === "string" ) {
+
+		// First Try to find as-is property data
+		ret = thisCache[ name ];
+
+		// Test for null|undefined property data
+		if ( ret == null ) {
+
+			// Try to find the camelCased property
+			ret = thisCache[ jQuery.camelCase( name ) ];
+		}
+	} else {
+		ret = thisCache;
+	}
+
+	return ret;
+}
+
+function internalRemoveData( elem, name, pvt ) {
+	if ( !jQuery.acceptData( elem ) ) {
+		return;
+	}
+
+	var thisCache, i,
+		isNode = elem.nodeType,
+
+		// See jQuery.data for more information
+		cache = isNode ? jQuery.cache : elem,
+		id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
+
+	// If there is already no cache entry for this object, there is no
+	// purpose in continuing
+	if ( !cache[ id ] ) {
+		return;
+	}
+
+	if ( name ) {
+
+		thisCache = pvt ? cache[ id ] : cache[ id ].data;
+
+		if ( thisCache ) {
+
+			// Support array or space separated string names for data keys
+			if ( !jQuery.isArray( name ) ) {
+
+				// try the string as a key before any manipulation
+				if ( name in thisCache ) {
+					name = [ name ];
+				} else {
+
+					// split the camel cased version by spaces unless a key with the spaces exists
+					name = jQuery.camelCase( name );
+					if ( name in thisCache ) {
+						name = [ name ];
+					} else {
+						name = name.split(" ");
+					}
+				}
+			} else {
+				// If "name" is an array of keys...
+				// When data is initially created, via ("key", "val") signature,
+				// keys will be converted to camelCase.
+				// Since there is no way to tell _how_ a key was added, remove
+				// both plain key and camelCase key. #12786
+				// This will only penalize the array argument path.
+				name = name.concat( jQuery.map( name, jQuery.camelCase ) );
+			}
+
+			i = name.length;
+			while ( i-- ) {
+				delete thisCache[ name[i] ];
+			}
+
+			// If there is no data left in the cache, we want to continue
+			// and let the cache object itself get destroyed
+			if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) {
+				return;
+			}
+		}
+	}
+
+	// See jQuery.data for more information
+	if ( !pvt ) {
+		delete cache[ id ].data;
+
+		// Don't destroy the parent cache unless the internal data object
+		// had been the only thing left in it
+		if ( !isEmptyDataObject( cache[ id ] ) ) {
+			return;
+		}
+	}
+
+	// Destroy the cache
+	if ( isNode ) {
+		jQuery.cleanData( [ elem ], true );
+
+	// Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
+	/* jshint eqeqeq: false */
+	} else if ( jQuery.support.deleteExpando || cache != cache.window ) {
+		/* jshint eqeqeq: true */
+		delete cache[ id ];
+
+	// When all else fails, null
+	} else {
+		cache[ id ] = null;
+	}
+}
+
+jQuery.extend({
+	cache: {},
+
+	// The following elements throw uncatchable exceptions if you
+	// attempt to add expando properties to them.
+	noData: {
+		"applet": true,
+		"embed": true,
+		// Ban all objects except for Flash (which handle expandos)
+		"object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
+	},
+
+	hasData: function( elem ) {
+		elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
+		return !!elem && !isEmptyDataObject( elem );
+	},
+
+	data: function( elem, name, data ) {
+		return internalData( elem, name, data );
+	},
+
+	removeData: function( elem, name ) {
+		return internalRemoveData( elem, name );
+	},
+
+	// For internal use only.
+	_data: function( elem, name, data ) {
+		return internalData( elem, name, data, true );
+	},
+
+	_removeData: function( elem, name ) {
+		return internalRemoveData( elem, name, true );
+	},
+
+	// A method for determining if a DOM node can handle the data expando
+	acceptData: function( elem ) {
+		// Do not set data on non-element because it will not be cleared (#8335).
+		if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
+			return false;
+		}
+
+		var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+		// nodes accept data unless otherwise specified; rejection can be conditional
+		return !noData || noData !== true && elem.getAttribute("classid") === noData;
+	}
+});
+
+jQuery.fn.extend({
+	data: function( key, value ) {
+		var attrs, name,
+			data = null,
+			i = 0,
+			elem = this[0];
+
+		// Special expections of .data basically thwart jQuery.access,
+		// so implement the relevant behavior ourselves
+
+		// Gets all values
+		if ( key === undefined ) {
+			if ( this.length ) {
+				data = jQuery.data( elem );
+
+				if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
+					attrs = elem.attributes;
+					for ( ; i < attrs.length; i++ ) {
+						name = attrs[i].name;
+
+						if ( name.indexOf("data-") === 0 ) {
+							name = jQuery.camelCase( name.slice(5) );
+
+							dataAttr( elem, name, data[ name ] );
+						}
+					}
+					jQuery._data( elem, "parsedAttrs", true );
+				}
+			}
+
+			return data;
+		}
+
+		// Sets multiple values
+		if ( typeof key === "object" ) {
+			return this.each(function() {
+				jQuery.data( this, key );
+			});
+		}
+
+		return arguments.length > 1 ?
+
+			// Sets one value
+			this.each(function() {
+				jQuery.data( this, key, value );
+			}) :
+
+			// Gets one value
+			// Try to fetch any internally stored data first
+			elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
+	},
+
+	removeData: function( key ) {
+		return this.each(function() {
+			jQuery.removeData( this, key );
+		});
+	}
+});
+
+function dataAttr( elem, key, data ) {
+	// If nothing was found internally, try to fetch any
+	// data from the HTML5 data-* attribute
+	if ( data === undefined && elem.nodeType === 1 ) {
+
+		var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
+
+		data = elem.getAttribute( name );
+
+		if ( typeof data === "string" ) {
+			try {
+				data = data === "true" ? true :
+					data === "false" ? false :
+					data === "null" ? null :
+					// Only convert to a number if it doesn't change the string
+					+data + "" === data ? +data :
+					rbrace.test( data ) ? jQuery.parseJSON( data ) :
+						data;
+			} catch( e ) {}
+
+			// Make sure we set the data so it isn't changed later
+			jQuery.data( elem, key, data );
+
+		} else {
+			data = undefined;
+		}
+	}
+
+	return data;
+}
+
+// checks a cache object for emptiness
+function isEmptyDataObject( obj ) {
+	var name;
+	for ( name in obj ) {
+
+		// if the public data object is empty, the private is still empty
+		if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
+			continue;
+		}
+		if ( name !== "toJSON" ) {
+			return false;
+		}
+	}
+
+	return true;
+}
+jQuery.extend({
+	queue: function( elem, type, data ) {
+		var queue;
+
+		if ( elem ) {
+			type = ( type || "fx" ) + "queue";
+			queue = jQuery._data( elem, type );
+
+			// Speed up dequeue by getting out quickly if this is just a lookup
+			if ( data ) {
+				if ( !queue || jQuery.isArray(data) ) {
+					queue = jQuery._data( elem, type, jQuery.makeArray(data) );
+				} else {
+					queue.push( data );
+				}
+			}
+			return queue || [];
+		}
+	},
+
+	dequeue: function( elem, type ) {
+		type = type || "fx";
+
+		var queue = jQuery.queue( elem, type ),
+			startLength = queue.length,
+			fn = queue.shift(),
+			hooks = jQuery._queueHooks( elem, type ),
+			next = function() {
+				jQuery.dequeue( elem, type );
+			};
+
+		// If the fx queue is dequeued, always remove the progress sentinel
+		if ( fn === "inprogress" ) {
+			fn = queue.shift();
+			startLength--;
+		}
+
+		if ( fn ) {
+
+			// Add a progress sentinel to prevent the fx queue from being
+			// automatically dequeued
+			if ( type === "fx" ) {
+				queue.unshift( "inprogress" );
+			}
+
+			// clear up the last queue stop function
+			delete hooks.stop;
+			fn.call( elem, next, hooks );
+		}
+
+		if ( !startLength && hooks ) {
+			hooks.empty.fire();
+		}
+	},
+
+	// not intended for public consumption - generates a queueHooks object, or returns the current one
+	_queueHooks: function( elem, type ) {
+		var key = type + "queueHooks";
+		return jQuery._data( elem, key ) || jQuery._data( elem, key, {
+			empty: jQuery.Callbacks("once memory").add(function() {
+				jQuery._removeData( elem, type + "queue" );
+				jQuery._removeData( elem, key );
+			})
+		});
+	}
+});
+
+jQuery.fn.extend({
+	queue: function( type, data ) {
+		var setter = 2;
+
+		if ( typeof type !== "string" ) {
+			data = type;
+			type = "fx";
+			setter--;
+		}
+
+		if ( arguments.length < setter ) {
+			return jQuery.queue( this[0], type );
+		}
+
+		return data === undefined ?
+			this :
+			this.each(function() {
+				var queue = jQuery.queue( this, type, data );
+
+				// ensure a hooks for this queue
+				jQuery._queueHooks( this, type );
+
+				if ( type === "fx" && queue[0] !== "inprogress" ) {
+					jQuery.dequeue( this, type );
+				}
+			});
+	},
+	dequeue: function( type ) {
+		return this.each(function() {
+			jQuery.dequeue( this, type );
+		});
+	},
+	// Based off of the plugin by Clint Helfers, with permission.
+	// http://blindsignals.com/index.php/2009/07/jquery-delay/
+	delay: function( time, type ) {
+		time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
+		type = type || "fx";
+
+		return this.queue( type, function( next, hooks ) {
+			var timeout = setTimeout( next, time );
+			hooks.stop = function() {
+				clearTimeout( timeout );
+			};
+		});
+	},
+	clearQueue: function( type ) {
+		return this.queue( type || "fx", [] );
+	},
+	// Get a promise resolved when queues of a certain type
+	// are emptied (fx is the type by default)
+	promise: function( type, obj ) {
+		var tmp,
+			count = 1,
+			defer = jQuery.Deferred(),
+			elements = this,
+			i = this.length,
+			resolve = function() {
+				if ( !( --count ) ) {
+					defer.resolveWith( elements, [ elements ] );
+				}
+			};
+
+		if ( typeof type !== "string" ) {
+			obj = type;
+			type = undefined;
+		}
+		type = type || "fx";
+
+		while( i-- ) {
+			tmp = jQuery._data( elements[ i ], type + "queueHooks" );
+			if ( tmp && tmp.empty ) {
+				count++;
+				tmp.empty.add( resolve );
+			}
+		}
+		resolve();
+		return defer.promise( obj );
+	}
+});
+var nodeHook, boolHook,
+	rclass = /[\t\r\n\f]/g,
+	rreturn = /\r/g,
+	rfocusable = /^(?:input|select|textarea|button|object)$/i,
+	rclickable = /^(?:a|area)$/i,
+	ruseDefault = /^(?:checked|selected)$/i,
+	getSetAttribute = jQuery.support.getSetAttribute,
+	getSetInput = jQuery.support.input;
+
+jQuery.fn.extend({
+	attr: function( name, value ) {
+		return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
+	},
+
+	removeAttr: function( name ) {
+		return this.each(function() {
+			jQuery.removeAttr( this, name );
+		});
+	},
+
+	prop: function( name, value ) {
+		return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
+	},
+
+	removeProp: function( name ) {
+		name = jQuery.propFix[ name ] || name;
+		return this.each(function() {
+			// try/catch handles cases where IE balks (such as removing a property on window)
+			try {
+				this[ name ] = undefined;
+				delete this[ name ];
+			} catch( e ) {}
+		});
+	},
+
+	addClass: function( value ) {
+		var classes, elem, cur, clazz, j,
+			i = 0,
+			len = this.length,
+			proceed = typeof value === "string" && value;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).addClass( value.call( this, j, this.className ) );
+			});
+		}
+
+		if ( proceed ) {
+			// The disjunction here is for better compressibility (see removeClass)
+			classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+			for ( ; i < len; i++ ) {
+				elem = this[ i ];
+				cur = elem.nodeType === 1 && ( elem.className ?
+					( " " + elem.className + " " ).replace( rclass, " " ) :
+					" "
+				);
+
+				if ( cur ) {
+					j = 0;
+					while ( (clazz = classes[j++]) ) {
+						if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
+							cur += clazz + " ";
+						}
+					}
+					elem.className = jQuery.trim( cur );
+
+				}
+			}
+		}
+
+		return this;
+	},
+
+	removeClass: function( value ) {
+		var classes, elem, cur, clazz, j,
+			i = 0,
+			len = this.length,
+			proceed = arguments.length === 0 || typeof value === "string" && value;
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( j ) {
+				jQuery( this ).removeClass( value.call( this, j, this.className ) );
+			});
+		}
+		if ( proceed ) {
+			classes = ( value || "" ).match( core_rnotwhite ) || [];
+
+			for ( ; i < len; i++ ) {
+				elem = this[ i ];
+				// This expression is here for better compressibility (see addClass)
+				cur = elem.nodeType === 1 && ( elem.className ?
+					( " " + elem.className + " " ).replace( rclass, " " ) :
+					""
+				);
+
+				if ( cur ) {
+					j = 0;
+					while ( (clazz = classes[j++]) ) {
+						// Remove *all* instances
+						while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
+							cur = cur.replace( " " + clazz + " ", " " );
+						}
+					}
+					elem.className = value ? jQuery.trim( cur ) : "";
+				}
+			}
+		}
+
+		return this;
+	},
+
+	toggleClass: function( value, stateVal ) {
+		var type = typeof value;
+
+		if ( typeof stateVal === "boolean" && type === "string" ) {
+			return stateVal ? this.addClass( value ) : this.removeClass( value );
+		}
+
+		if ( jQuery.isFunction( value ) ) {
+			return this.each(function( i ) {
+				jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
+			});
+		}
+
+		return this.each(function() {
+			if ( type === "string" ) {
+				// toggle individual class names
+				var className,
+					i = 0,
+					self = jQuery( this ),
+					classNames = value.match( core_rnotwhite ) || [];
+
+				while ( (className = classNames[ i++ ]) ) {
+					// check each className given, space separated list
+					if ( self.hasClass( className ) ) {
+						self.removeClass( className );
+					} else {
+						self.addClass( className );
+					}
+				}
+
+			// Toggle whole class name
+			} else if ( type === core_strundefined || type === "boolean" ) {
+				if ( this.className ) {
+					// store className if set
+					jQuery._data( this, "__className__", this.className );
+				}
+
+				// If the element has a class name or if we're passed "false",
+				// then remove the whole classname (if there was one, the above saved it).
+				// Otherwise bring back whatever was previously saved (if anything),
+				// falling back to the empty string if nothing was stored.
+				this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
+			}
+		});
+	},
+
+	hasClass: function( selector ) {
+		var className = " " + selector + " ",
+			i = 0,
+			l = this.length;
+		for ( ; i < l; i++ ) {
+			if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
+				return true;
+			}
+		}
+
+		return false;
+	},
+
+	val: function( value ) {
+		var ret, hooks, isFunction,
+			elem = this[0];
+
+		if ( !arguments.length ) {
+			if ( elem ) {
+				hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
+
+				if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
+					return ret;
+				}
+
+				ret = elem.value;
+
+				return typeof ret === "string" ?
+					// handle most common string cases
+					ret.replace(rreturn, "") :
+					// handle cases where value is null/undef or number
+					ret == null ? "" : ret;
+			}
+
+			return;
+		}
+
+		isFunction = jQuery.isFunction( value );
+
+		return this.each(function( i ) {
+			var val;
+
+			if ( this.nodeType !== 1 ) {
+				return;
+			}
+
+			if ( isFunction ) {
+				val = value.call( this, i, jQuery( this ).val() );
+			} else {
+				val = value;
+			}
+
+			// Treat null/undefined as ""; convert numbers to string
+			if ( val == null ) {
+				val = "";
+			} else if ( typeof val === "number" ) {
+				val += "";
+			} else if ( jQuery.isArray( val ) ) {
+				val = jQuery.map(val, function ( value ) {
+					return value == null ? "" : value + "";
+				});
+			}
+
+			hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
+
+			// If set returns undefined, fall back to normal setting
+			if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
+				this.value = val;
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	valHooks: {
+		option: {
+			get: function( elem ) {
+				// Use proper attribute retrieval(#6932, #12072)
+				var val = jQuery.find.attr( elem, "value" );
+				return val != null ?
+					val :
+					elem.text;
+			}
+		},
+		select: {
+			get: function( elem ) {
+				var value, option,
+					options = elem.options,
+					index = elem.selectedIndex,
+					one = elem.type === "select-one" || index < 0,
+					values = one ? null : [],
+					max = one ? index + 1 : options.length,
+					i = index < 0 ?
+						max :
+						one ? index : 0;
+
+				// Loop through all the selected options
+				for ( ; i < max; i++ ) {
+					option = options[ i ];
+
+					// oldIE doesn't update selected after form reset (#2551)
+					if ( ( option.selected || i === index ) &&
+							// Don't return options that are disabled or in a disabled optgroup
+							( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
+							( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
+
+						// Get the specific value for the option
+						value = jQuery( option ).val();
+
+						// We don't need an array for one selects
+						if ( one ) {
+							return value;
+						}
+
+						// Multi-Selects return an array
+						values.push( value );
+					}
+				}
+
+				return values;
+			},
+
+			set: function( elem, value ) {
+				var optionSet, option,
+					options = elem.options,
+					values = jQuery.makeArray( value ),
+					i = options.length;
+
+				while ( i-- ) {
+					option = options[ i ];
+					if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) {
+						optionSet = true;
+					}
+				}
+
+				// force browsers to behave consistently when non-matching value is set
+				if ( !optionSet ) {
+					elem.selectedIndex = -1;
+				}
+				return values;
+			}
+		}
+	},
+
+	attr: function( elem, name, value ) {
+		var hooks, ret,
+			nType = elem.nodeType;
+
+		// don't get/set attributes on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		// Fallback to prop when attributes are not supported
+		if ( typeof elem.getAttribute === core_strundefined ) {
+			return jQuery.prop( elem, name, value );
+		}
+
+		// All attributes are lowercase
+		// Grab necessary hook if one is defined
+		if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) {
+			name = name.toLowerCase();
+			hooks = jQuery.attrHooks[ name ] ||
+				( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook );
+		}
+
+		if ( value !== undefined ) {
+
+			if ( value === null ) {
+				jQuery.removeAttr( elem, name );
+
+			} else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
+				return ret;
+
+			} else {
+				elem.setAttribute( name, value + "" );
+				return value;
+			}
+
+		} else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
+			return ret;
+
+		} else {
+			ret = jQuery.find.attr( elem, name );
+
+			// Non-existent attributes return null, we normalize to undefined
+			return ret == null ?
+				undefined :
+				ret;
+		}
+	},
+
+	removeAttr: function( elem, value ) {
+		var name, propName,
+			i = 0,
+			attrNames = value && value.match( core_rnotwhite );
+
+		if ( attrNames && elem.nodeType === 1 ) {
+			while ( (name = attrNames[i++]) ) {
+				propName = jQuery.propFix[ name ] || name;
+
+				// Boolean attributes get special treatment (#10870)
+				if ( jQuery.expr.match.bool.test( name ) ) {
+					// Set corresponding property to false
+					if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+						elem[ propName ] = false;
+					// Support: IE<9
+					// Also clear defaultChecked/defaultSelected (if appropriate)
+					} else {
+						elem[ jQuery.camelCase( "default-" + name ) ] =
+							elem[ propName ] = false;
+					}
+
+				// See #9699 for explanation of this approach (setting first, then removal)
+				} else {
+					jQuery.attr( elem, name, "" );
+				}
+
+				elem.removeAttribute( getSetAttribute ? name : propName );
+			}
+		}
+	},
+
+	attrHooks: {
+		type: {
+			set: function( elem, value ) {
+				if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
+					// Setting the type on a radio button after the value resets the value in IE6-9
+					// Reset value to default in case type is set after value during creation
+					var val = elem.value;
+					elem.setAttribute( "type", value );
+					if ( val ) {
+						elem.value = val;
+					}
+					return value;
+				}
+			}
+		}
+	},
+
+	propFix: {
+		"for": "htmlFor",
+		"class": "className"
+	},
+
+	prop: function( elem, name, value ) {
+		var ret, hooks, notxml,
+			nType = elem.nodeType;
+
+		// don't get/set properties on text, comment and attribute nodes
+		if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+			return;
+		}
+
+		notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
+
+		if ( notxml ) {
+			// Fix name and attach hooks
+			name = jQuery.propFix[ name ] || name;
+			hooks = jQuery.propHooks[ name ];
+		}
+
+		if ( value !== undefined ) {
+			return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ?
+				ret :
+				( elem[ name ] = value );
+
+		} else {
+			return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ?
+				ret :
+				elem[ name ];
+		}
+	},
+
+	propHooks: {
+		tabIndex: {
+			get: function( elem ) {
+				// elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
+				// http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
+				// Use proper attribute retrieval(#12072)
+				var tabindex = jQuery.find.attr( elem, "tabindex" );
+
+				return tabindex ?
+					parseInt( tabindex, 10 ) :
+					rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
+						0 :
+						-1;
+			}
+		}
+	}
+});
+
+// Hooks for boolean attributes
+boolHook = {
+	set: function( elem, value, name ) {
+		if ( value === false ) {
+			// Remove boolean attributes when set to false
+			jQuery.removeAttr( elem, name );
+		} else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
+			// IE<8 needs the *property* name
+			elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
+
+		// Use defaultChecked and defaultSelected for oldIE
+		} else {
+			elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
+		}
+
+		return name;
+	}
+};
+jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
+	var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr;
+
+	jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ?
+		function( elem, name, isXML ) {
+			var fn = jQuery.expr.attrHandle[ name ],
+				ret = isXML ?
+					undefined :
+					/* jshint eqeqeq: false */
+					(jQuery.expr.attrHandle[ name ] = undefined) !=
+						getter( elem, name, isXML ) ?
+
+						name.toLowerCase() :
+						null;
+			jQuery.expr.attrHandle[ name ] = fn;
+			return ret;
+		} :
+		function( elem, name, isXML ) {
+			return isXML ?
+				undefined :
+				elem[ jQuery.camelCase( "default-" + name ) ] ?
+					name.toLowerCase() :
+					null;
+		};
+});
+
+// fix oldIE attroperties
+if ( !getSetInput || !getSetAttribute ) {
+	jQuery.attrHooks.value = {
+		set: function( elem, value, name ) {
+			if ( jQuery.nodeName( elem, "input" ) ) {
+				// Does not return so that setAttribute is also used
+				elem.defaultValue = value;
+			} else {
+				// Use nodeHook if defined (#1954); otherwise setAttribute is fine
+				return nodeHook && nodeHook.set( elem, value, name );
+			}
+		}
+	};
+}
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+	// Use this for any attribute in IE6/7
+	// This fixes almost every IE6/7 issue
+	nodeHook = {
+		set: function( elem, value, name ) {
+			// Set the existing or create a new attribute node
+			var ret = elem.getAttributeNode( name );
+			if ( !ret ) {
+				elem.setAttributeNode(
+					(ret = elem.ownerDocument.createAttribute( name ))
+				);
+			}
+
+			ret.value = value += "";
+
+			// Break association with cloned elements by also using setAttribute (#9646)
+			return name === "value" || value === elem.getAttribute( name ) ?
+				value :
+				undefined;
+		}
+	};
+	jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords =
+		// Some attributes are constructed with empty-string values when not defined
+		function( elem, name, isXML ) {
+			var ret;
+			return isXML ?
+				undefined :
+				(ret = elem.getAttributeNode( name )) && ret.value !== "" ?
+					ret.value :
+					null;
+		};
+	jQuery.valHooks.button = {
+		get: function( elem, name ) {
+			var ret = elem.getAttributeNode( name );
+			return ret && ret.specified ?
+				ret.value :
+				undefined;
+		},
+		set: nodeHook.set
+	};
+
+	// Set contenteditable to false on removals(#10429)
+	// Setting to empty string throws an error as an invalid value
+	jQuery.attrHooks.contenteditable = {
+		set: function( elem, value, name ) {
+			nodeHook.set( elem, value === "" ? false : value, name );
+		}
+	};
+
+	// Set width and height to auto instead of 0 on empty string( Bug #8150 )
+	// This is for removals
+	jQuery.each([ "width", "height" ], function( i, name ) {
+		jQuery.attrHooks[ name ] = {
+			set: function( elem, value ) {
+				if ( value === "" ) {
+					elem.setAttribute( name, "auto" );
+					return value;
+				}
+			}
+		};
+	});
+}
+
+
+// Some attributes require a special call on IE
+// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
+if ( !jQuery.support.hrefNormalized ) {
+	// href/src property should get the full normalized URL (#10299/#12915)
+	jQuery.each([ "href", "src" ], function( i, name ) {
+		jQuery.propHooks[ name ] = {
+			get: function( elem ) {
+				return elem.getAttribute( name, 4 );
+			}
+		};
+	});
+}
+
+if ( !jQuery.support.style ) {
+	jQuery.attrHooks.style = {
+		get: function( elem ) {
+			// Return undefined in the case of empty string
+			// Note: IE uppercases css property names, but if we were to .toLowerCase()
+			// .cssText, that would destroy case senstitivity in URL's, like in "background"
+			return elem.style.cssText || undefined;
+		},
+		set: function( elem, value ) {
+			return ( elem.style.cssText = value + "" );
+		}
+	};
+}
+
+// Safari mis-reports the default selected property of an option
+// Accessing the parent's selectedIndex property fixes it
+if ( !jQuery.support.optSelected ) {
+	jQuery.propHooks.selected = {
+		get: function( elem ) {
+			var parent = elem.parentNode;
+
+			if ( parent ) {
+				parent.selectedIndex;
+
+				// Make sure that it also works with optgroups, see #5701
+				if ( parent.parentNode ) {
+					parent.parentNode.selectedIndex;
+				}
+			}
+			return null;
+		}
+	};
+}
+
+jQuery.each([
+	"tabIndex",
+	"readOnly",
+	"maxLength",
+	"cellSpacing",
+	"cellPadding",
+	"rowSpan",
+	"colSpan",
+	"useMap",
+	"frameBorder",
+	"contentEditable"
+], function() {
+	jQuery.propFix[ this.toLowerCase() ] = this;
+});
+
+// IE6/7 call enctype encoding
+if ( !jQuery.support.enctype ) {
+	jQuery.propFix.enctype = "encoding";
+}
+
+// Radios and checkboxes getter/setter
+jQuery.each([ "radio", "checkbox" ], function() {
+	jQuery.valHooks[ this ] = {
+		set: function( elem, value ) {
+			if ( jQuery.isArray( value ) ) {
+				return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
+			}
+		}
+	};
+	if ( !jQuery.support.checkOn ) {
+		jQuery.valHooks[ this ].get = function( elem ) {
+			// Support: Webkit
+			// "" is returned instead of "on" if a value isn't specified
+			return elem.getAttribute("value") === null ? "on" : elem.value;
+		};
+	}
+});
+var rformElems = /^(?:input|select|textarea)$/i,
+	rkeyEvent = /^key/,
+	rmouseEvent = /^(?:mouse|contextmenu)|click/,
+	rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+	rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
+
+function returnTrue() {
+	return true;
+}
+
+function returnFalse() {
+	return false;
+}
+
+function safeActiveElement() {
+	try {
+		return document.activeElement;
+	} catch ( err ) { }
+}
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+	global: {},
+
+	add: function( elem, types, handler, data, selector ) {
+		var tmp, events, t, handleObjIn,
+			special, eventHandle, handleObj,
+			handlers, type, namespaces, origType,
+			elemData = jQuery._data( elem );
+
+		// Don't attach events to noData or text/comment nodes (but allow plain objects)
+		if ( !elemData ) {
+			return;
+		}
+
+		// Caller can pass in an object of custom data in lieu of the handler
+		if ( handler.handler ) {
+			handleObjIn = handler;
+			handler = handleObjIn.handler;
+			selector = handleObjIn.selector;
+		}
+
+		// Make sure that the handler has a unique ID, used to find/remove it later
+		if ( !handler.guid ) {
+			handler.guid = jQuery.guid++;
+		}
+
+		// Init the element's event structure and main handler, if this is the first
+		if ( !(events = elemData.events) ) {
+			events = elemData.events = {};
+		}
+		if ( !(eventHandle = elemData.handle) ) {
+			eventHandle = elemData.handle = function( e ) {
+				// Discard the second event of a jQuery.event.trigger() and
+				// when an event is called after a page has unloaded
+				return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
+					jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
+					undefined;
+			};
+			// Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
+			eventHandle.elem = elem;
+		}
+
+		// Handle multiple events separated by a space
+		types = ( types || "" ).match( core_rnotwhite ) || [""];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tmp[1];
+			namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+			// There *must* be a type, no attaching namespace-only handlers
+			if ( !type ) {
+				continue;
+			}
+
+			// If event changes its type, use the special event handlers for the changed type
+			special = jQuery.event.special[ type ] || {};
+
+			// If selector defined, determine special event api type, otherwise given type
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+
+			// Update special based on newly reset type
+			special = jQuery.event.special[ type ] || {};
+
+			// handleObj is passed to all event handlers
+			handleObj = jQuery.extend({
+				type: type,
+				origType: origType,
+				data: data,
+				handler: handler,
+				guid: handler.guid,
+				selector: selector,
+				needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
+				namespace: namespaces.join(".")
+			}, handleObjIn );
+
+			// Init the event handler queue if we're the first
+			if ( !(handlers = events[ type ]) ) {
+				handlers = events[ type ] = [];
+				handlers.delegateCount = 0;
+
+				// Only use addEventListener/attachEvent if the special events handler returns false
+				if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
+					// Bind the global event handler to the element
+					if ( elem.addEventListener ) {
+						elem.addEventListener( type, eventHandle, false );
+
+					} else if ( elem.attachEvent ) {
+						elem.attachEvent( "on" + type, eventHandle );
+					}
+				}
+			}
+
+			if ( special.add ) {
+				special.add.call( elem, handleObj );
+
+				if ( !handleObj.handler.guid ) {
+					handleObj.handler.guid = handler.guid;
+				}
+			}
+
+			// Add to the element's handler list, delegates in front
+			if ( selector ) {
+				handlers.splice( handlers.delegateCount++, 0, handleObj );
+			} else {
+				handlers.push( handleObj );
+			}
+
+			// Keep track of which events have ever been used, for event optimization
+			jQuery.event.global[ type ] = true;
+		}
+
+		// Nullify elem to prevent memory leaks in IE
+		elem = null;
+	},
+
+	// Detach an event or set of events from an element
+	remove: function( elem, types, handler, selector, mappedTypes ) {
+		var j, handleObj, tmp,
+			origCount, t, events,
+			special, handlers, type,
+			namespaces, origType,
+			elemData = jQuery.hasData( elem ) && jQuery._data( elem );
+
+		if ( !elemData || !(events = elemData.events) ) {
+			return;
+		}
+
+		// Once for each type.namespace in types; type may be omitted
+		types = ( types || "" ).match( core_rnotwhite ) || [""];
+		t = types.length;
+		while ( t-- ) {
+			tmp = rtypenamespace.exec( types[t] ) || [];
+			type = origType = tmp[1];
+			namespaces = ( tmp[2] || "" ).split( "." ).sort();
+
+			// Unbind all events (on this namespace, if provided) for the element
+			if ( !type ) {
+				for ( type in events ) {
+					jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
+				}
+				continue;
+			}
+
+			special = jQuery.event.special[ type ] || {};
+			type = ( selector ? special.delegateType : special.bindType ) || type;
+			handlers = events[ type ] || [];
+			tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
+
+			// Remove matching events
+			origCount = j = handlers.length;
+			while ( j-- ) {
+				handleObj = handlers[ j ];
+
+				if ( ( mappedTypes || origType === handleObj.origType ) &&
+					( !handler || handler.guid === handleObj.guid ) &&
+					( !tmp || tmp.test( handleObj.namespace ) ) &&
+					( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+					handlers.splice( j, 1 );
+
+					if ( handleObj.selector ) {
+						handlers.delegateCount--;
+					}
+					if ( special.remove ) {
+						special.remove.call( elem, handleObj );
+					}
+				}
+			}
+
+			// Remove generic event handler if we removed something and no more handlers exist
+			// (avoids potential for endless recursion during removal of special event handlers)
+			if ( origCount && !handlers.length ) {
+				if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
+					jQuery.removeEvent( elem, type, elemData.handle );
+				}
+
+				delete events[ type ];
+			}
+		}
+
+		// Remove the expando if it's no longer used
+		if ( jQuery.isEmptyObject( events ) ) {
+			delete elemData.handle;
+
+			// removeData also checks for emptiness and clears the expando if empty
+			// so use it instead of delete
+			jQuery._removeData( elem, "events" );
+		}
+	},
+
+	trigger: function( event, data, elem, onlyHandlers ) {
+		var handle, ontype, cur,
+			bubbleType, special, tmp, i,
+			eventPath = [ elem || document ],
+			type = core_hasOwn.call( event, "type" ) ? event.type : event,
+			namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
+
+		cur = tmp = elem = elem || document;
+
+		// Don't do events on text and comment nodes
+		if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
+			return;
+		}
+
+		// focus/blur morphs to focusin/out; ensure we're not firing them right now
+		if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
+			return;
+		}
+
+		if ( type.indexOf(".") >= 0 ) {
+			// Namespaced trigger; create a regexp to match event type in handle()
+			namespaces = type.split(".");
+			type = namespaces.shift();
+			namespaces.sort();
+		}
+		ontype = type.indexOf(":") < 0 && "on" + type;
+
+		// Caller can pass in a jQuery.Event object, Object, or just an event type string
+		event = event[ jQuery.expando ] ?
+			event :
+			new jQuery.Event( type, typeof event === "object" && event );
+
+		// Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true)
+		event.isTrigger = onlyHandlers ? 2 : 3;
+		event.namespace = namespaces.join(".");
+		event.namespace_re = event.namespace ?
+			new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
+			null;
+
+		// Clean up the event in case it is being reused
+		event.result = undefined;
+		if ( !event.target ) {
+			event.target = elem;
+		}
+
+		// Clone any incoming data and prepend the event, creating the handler arg list
+		data = data == null ?
+			[ event ] :
+			jQuery.makeArray( data, [ event ] );
+
+		// Allow special events to draw outside the lines
+		special = jQuery.event.special[ type ] || {};
+		if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
+			return;
+		}
+
+		// Determine event propagation path in advance, per W3C events spec (#9951)
+		// Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
+		if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
+
+			bubbleType = special.delegateType || type;
+			if ( !rfocusMorph.test( bubbleType + type ) ) {
+				cur = cur.parentNode;
+			}
+			for ( ; cur; cur = cur.parentNode ) {
+				eventPath.push( cur );
+				tmp = cur;
+			}
+
+			// Only add window if we got to document (e.g., not plain obj or detached DOM)
+			if ( tmp === (elem.ownerDocument || document) ) {
+				eventPath.push( tmp.defaultView || tmp.parentWindow || window );
+			}
+		}
+
+		// Fire handlers on the event path
+		i = 0;
+		while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
+
+			event.type = i > 1 ?
+				bubbleType :
+				special.bindType || type;
+
+			// jQuery handler
+			handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
+			if ( handle ) {
+				handle.apply( cur, data );
+			}
+
+			// Native handler
+			handle = ontype && cur[ ontype ];
+			if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
+				event.preventDefault();
+			}
+		}
+		event.type = type;
+
+		// If nobody prevented the default action, do it now
+		if ( !onlyHandlers && !event.isDefaultPrevented() ) {
+
+			if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) &&
+				jQuery.acceptData( elem ) ) {
+
+				// Call a native DOM method on the target with the same name name as the event.
+				// Can't use an .isFunction() check here because IE6/7 fails that test.
+				// Don't do default actions on window, that's where global variables be (#6170)
+				if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
+
+					// Don't re-trigger an onFOO event when we call its FOO() method
+					tmp = elem[ ontype ];
+
+					if ( tmp ) {
+						elem[ ontype ] = null;
+					}
+
+					// Prevent re-triggering of the same event, since we already bubbled it above
+					jQuery.event.triggered = type;
+					try {
+						elem[ type ]();
+					} catch ( e ) {
+						// IE<9 dies on focus/blur to hidden element (#1486,#12518)
+						// only reproducible on winXP IE8 native, not IE9 in IE8 mode
+					}
+					jQuery.event.triggered = undefined;
+
+					if ( tmp ) {
+						elem[ ontype ] = tmp;
+					}
+				}
+			}
+		}
+
+		return event.result;
+	},
+
+	dispatch: function( event ) {
+
+		// Make a writable jQuery.Event from the native event object
+		event = jQuery.event.fix( event );
+
+		var i, ret, handleObj, matched, j,
+			handlerQueue = [],
+			args = core_slice.call( arguments ),
+			handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
+			special = jQuery.event.special[ event.type ] || {};
+
+		// Use the fix-ed jQuery.Event rather than the (read-only) native event
+		args[0] = event;
+		event.delegateTarget = this;
+
+		// Call the preDispatch hook for the mapped type, and let it bail if desired
+		if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
+			return;
+		}
+
+		// Determine handlers
+		handlerQueue = jQuery.event.handlers.call( this, event, handlers );
+
+		// Run delegates first; they may want to stop propagation beneath us
+		i = 0;
+		while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
+			event.currentTarget = matched.elem;
+
+			j = 0;
+			while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
+
+				// Triggered event must either 1) have no namespace, or
+				// 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
+				if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
+
+					event.handleObj = handleObj;
+					event.data = handleObj.data;
+
+					ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
+							.apply( matched.elem, args );
+
+					if ( ret !== undefined ) {
+						if ( (event.result = ret) === false ) {
+							event.preventDefault();
+							event.stopPropagation();
+						}
+					}
+				}
+			}
+		}
+
+		// Call the postDispatch hook for the mapped type
+		if ( special.postDispatch ) {
+			special.postDispatch.call( this, event );
+		}
+
+		return event.result;
+	},
+
+	handlers: function( event, handlers ) {
+		var sel, handleObj, matches, i,
+			handlerQueue = [],
+			delegateCount = handlers.delegateCount,
+			cur = event.target;
+
+		// Find delegate handlers
+		// Black-hole SVG <use> instance trees (#13180)
+		// Avoid non-left-click bubbling in Firefox (#3861)
+		if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) {
+
+			/* jshint eqeqeq: false */
+			for ( ; cur != this; cur = cur.parentNode || this ) {
+				/* jshint eqeqeq: true */
+
+				// Don't check non-elements (#13208)
+				// Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
+				if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) {
+					matches = [];
+					for ( i = 0; i < delegateCount; i++ ) {
+						handleObj = handlers[ i ];
+
+						// Don't conflict with Object.prototype properties (#13203)
+						sel = handleObj.selector + " ";
+
+						if ( matches[ sel ] === undefined ) {
+							matches[ sel ] = handleObj.needsContext ?
+								jQuery( sel, this ).index( cur ) >= 0 :
+								jQuery.find( sel, this, null, [ cur ] ).length;
+						}
+						if ( matches[ sel ] ) {
+							matches.push( handleObj );
+						}
+					}
+					if ( matches.length ) {
+						handlerQueue.push({ elem: cur, handlers: matches });
+					}
+				}
+			}
+		}
+
+		// Add the remaining (directly-bound) handlers
+		if ( delegateCount < handlers.length ) {
+			handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) });
+		}
+
+		return handlerQueue;
+	},
+
+	fix: function( event ) {
+		if ( event[ jQuery.expando ] ) {
+			return event;
+		}
+
+		// Create a writable copy of the event object and normalize some properties
+		var i, prop, copy,
+			type = event.type,
+			originalEvent = event,
+			fixHook = this.fixHooks[ type ];
+
+		if ( !fixHook ) {
+			this.fixHooks[ type ] = fixHook =
+				rmouseEvent.test( type ) ? this.mouseHooks :
+				rkeyEvent.test( type ) ? this.keyHooks :
+				{};
+		}
+		copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
+
+		event = new jQuery.Event( originalEvent );
+
+		i = copy.length;
+		while ( i-- ) {
+			prop = copy[ i ];
+			event[ prop ] = originalEvent[ prop ];
+		}
+
+		// Support: IE<9
+		// Fix target property (#1925)
+		if ( !event.target ) {
+			event.target = originalEvent.srcElement || document;
+		}
+
+		// Support: Chrome 23+, Safari?
+		// Target should not be a text node (#504, #13143)
+		if ( event.target.nodeType === 3 ) {
+			event.target = event.target.parentNode;
+		}
+
+		// Support: IE<9
+		// For mouse/key events, metaKey==false if it's undefined (#3368, #11328)
+		event.metaKey = !!event.metaKey;
+
+		return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
+	},
+
+	// Includes some event props shared by KeyEvent and MouseEvent
+	props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
+
+	fixHooks: {},
+
+	keyHooks: {
+		props: "char charCode key keyCode".split(" "),
+		filter: function( event, original ) {
+
+			// Add which for key events
+			if ( event.which == null ) {
+				event.which = original.charCode != null ? original.charCode : original.keyCode;
+			}
+
+			return event;
+		}
+	},
+
+	mouseHooks: {
+		props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),
+		filter: function( event, original ) {
+			var body, eventDoc, doc,
+				button = original.button,
+				fromElement = original.fromElement;
+
+			// Calculate pageX/Y if missing and clientX/Y available
+			if ( event.pageX == null && original.clientX != null ) {
+				eventDoc = event.target.ownerDocument || document;
+				doc = eventDoc.documentElement;
+				body = eventDoc.body;
+
+				event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 );
+				event.pageY = original.clientY + ( doc && doc.scrollTop  || body && body.scrollTop  || 0 ) - ( doc && doc.clientTop  || body && body.clientTop  || 0 );
+			}
+
+			// Add relatedTarget, if necessary
+			if ( !event.relatedTarget && fromElement ) {
+				event.relatedTarget = fromElement === event.target ? original.toElement : fromElement;
+			}
+
+			// Add which for click: 1 === left; 2 === middle; 3 === right
+			// Note: button is not normalized, so don't use it
+			if ( !event.which && button !== undefined ) {
+				event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
+			}
+
+			return event;
+		}
+	},
+
+	special: {
+		load: {
+			// Prevent triggered image.load events from bubbling to window.load
+			noBubble: true
+		},
+		focus: {
+			// Fire native event if possible so blur/focus sequence is correct
+			trigger: function() {
+				if ( this !== safeActiveElement() && this.focus ) {
+					try {
+						this.focus();
+						return false;
+					} catch ( e ) {
+						// Support: IE<9
+						// If we error on focus to hidden element (#1486, #12518),
+						// let .trigger() run the handlers
+					}
+				}
+			},
+			delegateType: "focusin"
+		},
+		blur: {
+			trigger: function() {
+				if ( this === safeActiveElement() && this.blur ) {
+					this.blur();
+					return false;
+				}
+			},
+			delegateType: "focusout"
+		},
+		click: {
+			// For checkbox, fire native event so checked state will be right
+			trigger: function() {
+				if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) {
+					this.click();
+					return false;
+				}
+			},
+
+			// For cross-browser consistency, don't fire native .click() on links
+			_default: function( event ) {
+				return jQuery.nodeName( event.target, "a" );
+			}
+		},
+
+		beforeunload: {
+			postDispatch: function( event ) {
+
+				// Even when returnValue equals to undefined Firefox will still show alert
+				if ( event.result !== undefined ) {
+					event.originalEvent.returnValue = event.result;
+				}
+			}
+		}
+	},
+
+	simulate: function( type, elem, event, bubble ) {
+		// Piggyback on a donor event to simulate a different one.
+		// Fake originalEvent to avoid donor's stopPropagation, but if the
+		// simulated event prevents default then we do the same on the donor.
+		var e = jQuery.extend(
+			new jQuery.Event(),
+			event,
+			{
+				type: type,
+				isSimulated: true,
+				originalEvent: {}
+			}
+		);
+		if ( bubble ) {
+			jQuery.event.trigger( e, null, elem );
+		} else {
+			jQuery.event.dispatch.call( elem, e );
+		}
+		if ( e.isDefaultPrevented() ) {
+			event.preventDefault();
+		}
+	}
+};
+
+jQuery.removeEvent = document.removeEventListener ?
+	function( elem, type, handle ) {
+		if ( elem.removeEventListener ) {
+			elem.removeEventListener( type, handle, false );
+		}
+	} :
+	function( elem, type, handle ) {
+		var name = "on" + type;
+
+		if ( elem.detachEvent ) {
+
+			// #8545, #7054, preventing memory leaks for custom events in IE6-8
+			// detachEvent needed property on element, by name of that event, to properly expose it to GC
+			if ( typeof elem[ name ] === core_strundefined ) {
+				elem[ name ] = null;
+			}
+
+			elem.detachEvent( name, handle );
+		}
+	};
+
+jQuery.Event = function( src, props ) {
+	// Allow instantiation without the 'new' keyword
+	if ( !(this instanceof jQuery.Event) ) {
+		return new jQuery.Event( src, props );
+	}
+
+	// Event object
+	if ( src && src.type ) {
+		this.originalEvent = src;
+		this.type = src.type;
+
+		// Events bubbling up the document may have been marked as prevented
+		// by a handler lower down the tree; reflect the correct value.
+		this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false ||
+			src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse;
+
+	// Event type
+	} else {
+		this.type = src;
+	}
+
+	// Put explicitly provided properties onto the event object
+	if ( props ) {
+		jQuery.extend( this, props );
+	}
+
+	// Create a timestamp if incoming event doesn't have one
+	this.timeStamp = src && src.timeStamp || jQuery.now();
+
+	// Mark it as fixed
+	this[ jQuery.expando ] = true;
+};
+
+// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
+// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
+jQuery.Event.prototype = {
+	isDefaultPrevented: returnFalse,
+	isPropagationStopped: returnFalse,
+	isImmediatePropagationStopped: returnFalse,
+
+	preventDefault: function() {
+		var e = this.originalEvent;
+
+		this.isDefaultPrevented = returnTrue;
+		if ( !e ) {
+			return;
+		}
+
+		// If preventDefault exists, run it on the original event
+		if ( e.preventDefault ) {
+			e.preventDefault();
+
+		// Support: IE
+		// Otherwise set the returnValue property of the original event to false
+		} else {
+			e.returnValue = false;
+		}
+	},
+	stopPropagation: function() {
+		var e = this.originalEvent;
+
+		this.isPropagationStopped = returnTrue;
+		if ( !e ) {
+			return;
+		}
+		// If stopPropagation exists, run it on the original event
+		if ( e.stopPropagation ) {
+			e.stopPropagation();
+		}
+
+		// Support: IE
+		// Set the cancelBubble property of the original event to true
+		e.cancelBubble = true;
+	},
+	stopImmediatePropagation: function() {
+		this.isImmediatePropagationStopped = returnTrue;
+		this.stopPropagation();
+	}
+};
+
+// Create mouseenter/leave events using mouseover/out and event-time checks
+jQuery.each({
+	mouseenter: "mouseover",
+	mouseleave: "mouseout"
+}, function( orig, fix ) {
+	jQuery.event.special[ orig ] = {
+		delegateType: fix,
+		bindType: fix,
+
+		handle: function( event ) {
+			var ret,
+				target = this,
+				related = event.relatedTarget,
+				handleObj = event.handleObj;
+
+			// For mousenter/leave call the handler if related is outside the target.
+			// NB: No relatedTarget if the mouse left/entered the browser window
+			if ( !related || (related !== target && !jQuery.contains( target, related )) ) {
+				event.type = handleObj.origType;
+				ret = handleObj.handler.apply( this, arguments );
+				event.type = fix;
+			}
+			return ret;
+		}
+	};
+});
+
+// IE submit delegation
+if ( !jQuery.support.submitBubbles ) {
+
+	jQuery.event.special.submit = {
+		setup: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Lazy-add a submit handler when a descendant form may potentially be submitted
+			jQuery.event.add( this, "click._submit keypress._submit", function( e ) {
+				// Node name check avoids a VML-related crash in IE (#9807)
+				var elem = e.target,
+					form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined;
+				if ( form && !jQuery._data( form, "submitBubbles" ) ) {
+					jQuery.event.add( form, "submit._submit", function( event ) {
+						event._submit_bubble = true;
+					});
+					jQuery._data( form, "submitBubbles", true );
+				}
+			});
+			// return undefined since we don't need an event listener
+		},
+
+		postDispatch: function( event ) {
+			// If form was submitted by the user, bubble the event up the tree
+			if ( event._submit_bubble ) {
+				delete event._submit_bubble;
+				if ( this.parentNode && !event.isTrigger ) {
+					jQuery.event.simulate( "submit", this.parentNode, event, true );
+				}
+			}
+		},
+
+		teardown: function() {
+			// Only need this for delegated form submit events
+			if ( jQuery.nodeName( this, "form" ) ) {
+				return false;
+			}
+
+			// Remove delegated handlers; cleanData eventually reaps submit handlers attached above
+			jQuery.event.remove( this, "._submit" );
+		}
+	};
+}
+
+// IE change delegation and checkbox/radio fix
+if ( !jQuery.support.changeBubbles ) {
+
+	jQuery.event.special.change = {
+
+		setup: function() {
+
+			if ( rformElems.test( this.nodeName ) ) {
+				// IE doesn't fire change on a check/radio until blur; trigger it on click
+				// after a propertychange. Eat the blur-change in special.change.handle.
+				// This still fires onchange a second time for check/radio after blur.
+				if ( this.type === "checkbox" || this.type === "radio" ) {
+					jQuery.event.add( this, "propertychange._change", function( event ) {
+						if ( event.originalEvent.propertyName === "checked" ) {
+							this._just_changed = true;
+						}
+					});
+					jQuery.event.add( this, "click._change", function( event ) {
+						if ( this._just_changed && !event.isTrigger ) {
+							this._just_changed = false;
+						}
+						// Allow triggered, simulated change events (#11500)
+						jQuery.event.simulate( "change", this, event, true );
+					});
+				}
+				return false;
+			}
+			// Delegated event; lazy-add a change handler on descendant inputs
+			jQuery.event.add( this, "beforeactivate._change", function( e ) {
+				var elem = e.target;
+
+				if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) {
+					jQuery.event.add( elem, "change._change", function( event ) {
+						if ( this.parentNode && !event.isSimulated && !event.isTrigger ) {
+							jQuery.event.simulate( "change", this.parentNode, event, true );
+						}
+					});
+					jQuery._data( elem, "changeBubbles", true );
+				}
+			});
+		},
+
+		handle: function( event ) {
+			var elem = event.target;
+
+			// Swallow native change events from checkbox/radio, we already triggered them above
+			if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) {
+				return event.handleObj.handler.apply( this, arguments );
+			}
+		},
+
+		teardown: function() {
+			jQuery.event.remove( this, "._change" );
+
+			return !rformElems.test( this.nodeName );
+		}
+	};
+}
+
+// Create "bubbling" focus and blur events
+if ( !jQuery.support.focusinBubbles ) {
+	jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) {
+
+		// Attach a single capturing handler while someone wants focusin/focusout
+		var attaches = 0,
+			handler = function( event ) {
+				jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true );
+			};
+
+		jQuery.event.special[ fix ] = {
+			setup: function() {
+				if ( attaches++ === 0 ) {
+					document.addEventListener( orig, handler, true );
+				}
+			},
+			teardown: function() {
+				if ( --attaches === 0 ) {
+					document.removeEventListener( orig, handler, true );
+				}
+			}
+		};
+	});
+}
+
+jQuery.fn.extend({
+
+	on: function( types, selector, data, fn, /*INTERNAL*/ one ) {
+		var type, origFn;
+
+		// Types can be a map of types/handlers
+		if ( typeof types === "object" ) {
+			// ( types-Object, selector, data )
+			if ( typeof selector !== "string" ) {
+				// ( types-Object, data )
+				data = data || selector;
+				selector = undefined;
+			}
+			for ( type in types ) {
+				this.on( type, selector, data, types[ type ], one );
+			}
+			return this;
+		}
+
+		if ( data == null && fn == null ) {
+			// ( types, fn )
+			fn = selector;
+			data = selector = undefined;
+		} else if ( fn == null ) {
+			if ( typeof selector === "string" ) {
+				// ( types, selector, fn )
+				fn = data;
+				data = undefined;
+			} else {
+				// ( types, data, fn )
+				fn = data;
+				data = selector;
+				selector = undefined;
+			}
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		} else if ( !fn ) {
+			return this;
+		}
+
+		if ( one === 1 ) {
+			origFn = fn;
+			fn = function( event ) {
+				// Can use an empty set, since event contains the info
+				jQuery().off( event );
+				return origFn.apply( this, arguments );
+			};
+			// Use same guid so caller can remove using origFn
+			fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
+		}
+		return this.each( function() {
+			jQuery.event.add( this, types, fn, data, selector );
+		});
+	},
+	one: function( types, selector, data, fn ) {
+		return this.on( types, selector, data, fn, 1 );
+	},
+	off: function( types, selector, fn ) {
+		var handleObj, type;
+		if ( types && types.preventDefault && types.handleObj ) {
+			// ( event )  dispatched jQuery.Event
+			handleObj = types.handleObj;
+			jQuery( types.delegateTarget ).off(
+				handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
+				handleObj.selector,
+				handleObj.handler
+			);
+			return this;
+		}
+		if ( typeof types === "object" ) {
+			// ( types-object [, selector] )
+			for ( type in types ) {
+				this.off( type, selector, types[ type ] );
+			}
+			return this;
+		}
+		if ( selector === false || typeof selector === "function" ) {
+			// ( types [, fn] )
+			fn = selector;
+			selector = undefined;
+		}
+		if ( fn === false ) {
+			fn = returnFalse;
+		}
+		return this.each(function() {
+			jQuery.event.remove( this, types, fn, selector );
+		});
+	},
+
+	trigger: function( type, data ) {
+		return this.each(function() {
+			jQuery.event.trigger( type, data, this );
+		});
+	},
+	triggerHandler: function( type, data ) {
+		var elem = this[0];
+		if ( elem ) {
+			return jQuery.event.trigger( type, data, elem, true );
+		}
+	}
+});
+var isSimple = /^.[^:#\[\.,]*$/,
+	rparentsprev = /^(?:parents|prev(?:Until|All))/,
+	rneedsContext = jQuery.expr.match.needsContext,
+	// methods guaranteed to produce a unique set when starting from a unique set
+	guaranteedUnique = {
+		children: true,
+		contents: true,
+		next: true,
+		prev: true
+	};
+
+jQuery.fn.extend({
+	find: function( selector ) {
+		var i,
+			ret = [],
+			self = this,
+			len = self.length;
+
+		if ( typeof selector !== "string" ) {
+			return this.pushStack( jQuery( selector ).filter(function() {
+				for ( i = 0; i < len; i++ ) {
+					if ( jQuery.contains( self[ i ], this ) ) {
+						return true;
+					}
+				}
+			}) );
+		}
+
+		for ( i = 0; i < len; i++ ) {
+			jQuery.find( selector, self[ i ], ret );
+		}
+
+		// Needed because $( selector, context ) becomes $( context ).find( selector )
+		ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
+		ret.selector = this.selector ? this.selector + " " + selector : selector;
+		return ret;
+	},
+
+	has: function( target ) {
+		var i,
+			targets = jQuery( target, this ),
+			len = targets.length;
+
+		return this.filter(function() {
+			for ( i = 0; i < len; i++ ) {
+				if ( jQuery.contains( this, targets[i] ) ) {
+					return true;
+				}
+			}
+		});
+	},
+
+	not: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], true) );
+	},
+
+	filter: function( selector ) {
+		return this.pushStack( winnow(this, selector || [], false) );
+	},
+
+	is: function( selector ) {
+		return !!winnow(
+			this,
+
+			// If this is a positional/relative selector, check membership in the returned set
+			// so $("p:first").is("p:last") won't return true for a doc with two "p".
+			typeof selector === "string" && rneedsContext.test( selector ) ?
+				jQuery( selector ) :
+				selector || [],
+			false
+		).length;
+	},
+
+	closest: function( selectors, context ) {
+		var cur,
+			i = 0,
+			l = this.length,
+			ret = [],
+			pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
+				jQuery( selectors, context || this.context ) :
+				0;
+
+		for ( ; i < l; i++ ) {
+			for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) {
+				// Always skip document fragments
+				if ( cur.nodeType < 11 && (pos ?
+					pos.index(cur) > -1 :
+
+					// Don't pass non-elements to Sizzle
+					cur.nodeType === 1 &&
+						jQuery.find.matchesSelector(cur, selectors)) ) {
+
+					cur = ret.push( cur );
+					break;
+				}
+			}
+		}
+
+		return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret );
+	},
+
+	// Determine the position of an element within
+	// the matched set of elements
+	index: function( elem ) {
+
+		// No argument, return index in parent
+		if ( !elem ) {
+			return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
+		}
+
+		// index in selector
+		if ( typeof elem === "string" ) {
+			return jQuery.inArray( this[0], jQuery( elem ) );
+		}
+
+		// Locate the position of the desired element
+		return jQuery.inArray(
+			// If it receives a jQuery object, the first element is used
+			elem.jquery ? elem[0] : elem, this );
+	},
+
+	add: function( selector, context ) {
+		var set = typeof selector === "string" ?
+				jQuery( selector, context ) :
+				jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ),
+			all = jQuery.merge( this.get(), set );
+
+		return this.pushStack( jQuery.unique(all) );
+	},
+
+	addBack: function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter(selector)
+		);
+	}
+});
+
+function sibling( cur, dir ) {
+	do {
+		cur = cur[ dir ];
+	} while ( cur && cur.nodeType !== 1 );
+
+	return cur;
+}
+
+jQuery.each({
+	parent: function( elem ) {
+		var parent = elem.parentNode;
+		return parent && parent.nodeType !== 11 ? parent : null;
+	},
+	parents: function( elem ) {
+		return jQuery.dir( elem, "parentNode" );
+	},
+	parentsUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "parentNode", until );
+	},
+	next: function( elem ) {
+		return sibling( elem, "nextSibling" );
+	},
+	prev: function( elem ) {
+		return sibling( elem, "previousSibling" );
+	},
+	nextAll: function( elem ) {
+		return jQuery.dir( elem, "nextSibling" );
+	},
+	prevAll: function( elem ) {
+		return jQuery.dir( elem, "previousSibling" );
+	},
+	nextUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "nextSibling", until );
+	},
+	prevUntil: function( elem, i, until ) {
+		return jQuery.dir( elem, "previousSibling", until );
+	},
+	siblings: function( elem ) {
+		return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem );
+	},
+	children: function( elem ) {
+		return jQuery.sibling( elem.firstChild );
+	},
+	contents: function( elem ) {
+		return jQuery.nodeName( elem, "iframe" ) ?
+			elem.contentDocument || elem.contentWindow.document :
+			jQuery.merge( [], elem.childNodes );
+	}
+}, function( name, fn ) {
+	jQuery.fn[ name ] = function( until, selector ) {
+		var ret = jQuery.map( this, fn, until );
+
+		if ( name.slice( -5 ) !== "Until" ) {
+			selector = until;
+		}
+
+		if ( selector && typeof selector === "string" ) {
+			ret = jQuery.filter( selector, ret );
+		}
+
+		if ( this.length > 1 ) {
+			// Remove duplicates
+			if ( !guaranteedUnique[ name ] ) {
+				ret = jQuery.unique( ret );
+			}
+
+			// Reverse order for parents* and prev-derivatives
+			if ( rparentsprev.test( name ) ) {
+				ret = ret.reverse();
+			}
+		}
+
+		return this.pushStack( ret );
+	};
+});
+
+jQuery.extend({
+	filter: function( expr, elems, not ) {
+		var elem = elems[ 0 ];
+
+		if ( not ) {
+			expr = ":not(" + expr + ")";
+		}
+
+		return elems.length === 1 && elem.nodeType === 1 ?
+			jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
+			jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
+				return elem.nodeType === 1;
+			}));
+	},
+
+	dir: function( elem, dir, until ) {
+		var matched = [],
+			cur = elem[ dir ];
+
+		while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
+			if ( cur.nodeType === 1 ) {
+				matched.push( cur );
+			}
+			cur = cur[dir];
+		}
+		return matched;
+	},
+
+	sibling: function( n, elem ) {
+		var r = [];
+
+		for ( ; n; n = n.nextSibling ) {
+			if ( n.nodeType === 1 && n !== elem ) {
+				r.push( n );
+			}
+		}
+
+		return r;
+	}
+});
+
+// Implement the identical functionality for filter and not
+function winnow( elements, qualifier, not ) {
+	if ( jQuery.isFunction( qualifier ) ) {
+		return jQuery.grep( elements, function( elem, i ) {
+			/* jshint -W018 */
+			return !!qualifier.call( elem, i, elem ) !== not;
+		});
+
+	}
+
+	if ( qualifier.nodeType ) {
+		return jQuery.grep( elements, function( elem ) {
+			return ( elem === qualifier ) !== not;
+		});
+
+	}
+
+	if ( typeof qualifier === "string" ) {
+		if ( isSimple.test( qualifier ) ) {
+			return jQuery.filter( qualifier, elements, not );
+		}
+
+		qualifier = jQuery.filter( qualifier, elements );
+	}
+
+	return jQuery.grep( elements, function( elem ) {
+		return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not;
+	});
+}
+function createSafeFragment( document ) {
+	var list = nodeNames.split( "|" ),
+		safeFrag = document.createDocumentFragment();
+
+	if ( safeFrag.createElement ) {
+		while ( list.length ) {
+			safeFrag.createElement(
+				list.pop()
+			);
+		}
+	}
+	return safeFrag;
+}
+
+var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" +
+		"header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",
+	rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g,
+	rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"),
+	rleadingWhitespace = /^\s+/,
+	rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,
+	rtagName = /<([\w:]+)/,
+	rtbody = /<tbody/i,
+	rhtml = /<|&#?\w+;/,
+	rnoInnerhtml = /<(?:script|style|link)/i,
+	manipulation_rcheckableType = /^(?:checkbox|radio)$/i,
+	// checked="checked" or checked
+	rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
+	rscriptType = /^$|\/(?:java|ecma)script/i,
+	rscriptTypeMasked = /^true\/(.*)/,
+	rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,
+
+	// We have to close these tags to support XHTML (#13200)
+	wrapMap = {
+		option: [ 1, "<select multiple='multiple'>", "</select>" ],
+		legend: [ 1, "<fieldset>", "</fieldset>" ],
+		area: [ 1, "<map>", "</map>" ],
+		param: [ 1, "<object>", "</object>" ],
+		thead: [ 1, "<table>", "</table>" ],
+		tr: [ 2, "<table><tbody>", "</tbody></table>" ],
+		col: [ 2, "<table><tbody></tbody><colgroup>", "</colgroup></table>" ],
+		td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ],
+
+		// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,
+		// unless wrapped in a div with non-breaking characters in front of it.
+		_default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X<div>", "</div>"  ]
+	},
+	safeFragment = createSafeFragment( document ),
+	fragmentDiv = safeFragment.appendChild( document.createElement("div") );
+
+wrapMap.optgroup = wrapMap.option;
+wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
+wrapMap.th = wrapMap.td;
+
+jQuery.fn.extend({
+	text: function( value ) {
+		return jQuery.access( this, function( value ) {
+			return value === undefined ?
+				jQuery.text( this ) :
+				this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) );
+		}, null, value, arguments.length );
+	},
+
+	append: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.appendChild( elem );
+			}
+		});
+	},
+
+	prepend: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) {
+				var target = manipulationTarget( this, elem );
+				target.insertBefore( elem, target.firstChild );
+			}
+		});
+	},
+
+	before: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this );
+			}
+		});
+	},
+
+	after: function() {
+		return this.domManip( arguments, function( elem ) {
+			if ( this.parentNode ) {
+				this.parentNode.insertBefore( elem, this.nextSibling );
+			}
+		});
+	},
+
+	// keepData is for internal use only--do not document
+	remove: function( selector, keepData ) {
+		var elem,
+			elems = selector ? jQuery.filter( selector, this ) : this,
+			i = 0;
+
+		for ( ; (elem = elems[i]) != null; i++ ) {
+
+			if ( !keepData && elem.nodeType === 1 ) {
+				jQuery.cleanData( getAll( elem ) );
+			}
+
+			if ( elem.parentNode ) {
+				if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) {
+					setGlobalEval( getAll( elem, "script" ) );
+				}
+				elem.parentNode.removeChild( elem );
+			}
+		}
+
+		return this;
+	},
+
+	empty: function() {
+		var elem,
+			i = 0;
+
+		for ( ; (elem = this[i]) != null; i++ ) {
+			// Remove element nodes and prevent memory leaks
+			if ( elem.nodeType === 1 ) {
+				jQuery.cleanData( getAll( elem, false ) );
+			}
+
+			// Remove any remaining nodes
+			while ( elem.firstChild ) {
+				elem.removeChild( elem.firstChild );
+			}
+
+			// If this is a select, ensure that it displays empty (#12336)
+			// Support: IE<9
+			if ( elem.options && jQuery.nodeName( elem, "select" ) ) {
+				elem.options.length = 0;
+			}
+		}
+
+		return this;
+	},
+
+	clone: function( dataAndEvents, deepDataAndEvents ) {
+		dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
+		deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
+
+		return this.map( function () {
+			return jQuery.clone( this, dataAndEvents, deepDataAndEvents );
+		});
+	},
+
+	html: function( value ) {
+		return jQuery.access( this, function( value ) {
+			var elem = this[0] || {},
+				i = 0,
+				l = this.length;
+
+			if ( value === undefined ) {
+				return elem.nodeType === 1 ?
+					elem.innerHTML.replace( rinlinejQuery, "" ) :
+					undefined;
+			}
+
+			// See if we can take a shortcut and just use innerHTML
+			if ( typeof value === "string" && !rnoInnerhtml.test( value ) &&
+				( jQuery.support.htmlSerialize || !rnoshimcache.test( value )  ) &&
+				( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) &&
+				!wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) {
+
+				value = value.replace( rxhtmlTag, "<$1></$2>" );
+
+				try {
+					for (; i < l; i++ ) {
+						// Remove element nodes and prevent memory leaks
+						elem = this[i] || {};
+						if ( elem.nodeType === 1 ) {
+							jQuery.cleanData( getAll( elem, false ) );
+							elem.innerHTML = value;
+						}
+					}
+
+					elem = 0;
+
+				// If using innerHTML throws an exception, use the fallback method
+				} catch(e) {}
+			}
+
+			if ( elem ) {
+				this.empty().append( value );
+			}
+		}, null, value, arguments.length );
+	},
+
+	replaceWith: function() {
+		var
+			// Snapshot the DOM in case .domManip sweeps something relevant into its fragment
+			args = jQuery.map( this, function( elem ) {
+				return [ elem.nextSibling, elem.parentNode ];
+			}),
+			i = 0;
+
+		// Make the changes, replacing each context element with the new content
+		this.domManip( arguments, function( elem ) {
+			var next = args[ i++ ],
+				parent = args[ i++ ];
+
+			if ( parent ) {
+				// Don't use the snapshot next if it has moved (#13810)
+				if ( next && next.parentNode !== parent ) {
+					next = this.nextSibling;
+				}
+				jQuery( this ).remove();
+				parent.insertBefore( elem, next );
+			}
+		// Allow new content to include elements from the context set
+		}, true );
+
+		// Force removal if there was no new content (e.g., from empty arguments)
+		return i ? this : this.remove();
+	},
+
+	detach: function( selector ) {
+		return this.remove( selector, true );
+	},
+
+	domManip: function( args, callback, allowIntersection ) {
+
+		// Flatten any nested arrays
+		args = core_concat.apply( [], args );
+
+		var first, node, hasScripts,
+			scripts, doc, fragment,
+			i = 0,
+			l = this.length,
+			set = this,
+			iNoClone = l - 1,
+			value = args[0],
+			isFunction = jQuery.isFunction( value );
+
+		// We can't cloneNode fragments that contain checked, in WebKit
+		if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) {
+			return this.each(function( index ) {
+				var self = set.eq( index );
+				if ( isFunction ) {
+					args[0] = value.call( this, index, self.html() );
+				}
+				self.domManip( args, callback, allowIntersection );
+			});
+		}
+
+		if ( l ) {
+			fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this );
+			first = fragment.firstChild;
+
+			if ( fragment.childNodes.length === 1 ) {
+				fragment = first;
+			}
+
+			if ( first ) {
+				scripts = jQuery.map( getAll( fragment, "script" ), disableScript );
+				hasScripts = scripts.length;
+
+				// Use the original fragment for the last item instead of the first because it can end up
+				// being emptied incorrectly in certain situations (#8070).
+				for ( ; i < l; i++ ) {
+					node = fragment;
+
+					if ( i !== iNoClone ) {
+						node = jQuery.clone( node, true, true );
+
+						// Keep references to cloned scripts for later restoration
+						if ( hasScripts ) {
+							jQuery.merge( scripts, getAll( node, "script" ) );
+						}
+					}
+
+					callback.call( this[i], node, i );
+				}
+
+				if ( hasScripts ) {
+					doc = scripts[ scripts.length - 1 ].ownerDocument;
+
+					// Reenable scripts
+					jQuery.map( scripts, restoreScript );
+
+					// Evaluate executable scripts on first document insertion
+					for ( i = 0; i < hasScripts; i++ ) {
+						node = scripts[ i ];
+						if ( rscriptType.test( node.type || "" ) &&
+							!jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) {
+
+							if ( node.src ) {
+								// Hope ajax is available...
+								jQuery._evalUrl( node.src );
+							} else {
+								jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) );
+							}
+						}
+					}
+				}
+
+				// Fix #11809: Avoid leaking memory
+				fragment = first = null;
+			}
+		}
+
+		return this;
+	}
+});
+
+// Support: IE<8
+// Manipulating tables requires a tbody
+function manipulationTarget( elem, content ) {
+	return jQuery.nodeName( elem, "table" ) &&
+		jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ?
+
+		elem.getElementsByTagName("tbody")[0] ||
+			elem.appendChild( elem.ownerDocument.createElement("tbody") ) :
+		elem;
+}
+
+// Replace/restore the type attribute of script elements for safe DOM manipulation
+function disableScript( elem ) {
+	elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type;
+	return elem;
+}
+function restoreScript( elem ) {
+	var match = rscriptTypeMasked.exec( elem.type );
+	if ( match ) {
+		elem.type = match[1];
+	} else {
+		elem.removeAttribute("type");
+	}
+	return elem;
+}
+
+// Mark scripts as having already been evaluated
+function setGlobalEval( elems, refElements ) {
+	var elem,
+		i = 0;
+	for ( ; (elem = elems[i]) != null; i++ ) {
+		jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) );
+	}
+}
+
+function cloneCopyEvent( src, dest ) {
+
+	if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) {
+		return;
+	}
+
+	var type, i, l,
+		oldData = jQuery._data( src ),
+		curData = jQuery._data( dest, oldData ),
+		events = oldData.events;
+
+	if ( events ) {
+		delete curData.handle;
+		curData.events = {};
+
+		for ( type in events ) {
+			for ( i = 0, l = events[ type ].length; i < l; i++ ) {
+				jQuery.event.add( dest, type, events[ type ][ i ] );
+			}
+		}
+	}
+
+	// make the cloned public data object a copy from the original
+	if ( curData.data ) {
+		curData.data = jQuery.extend( {}, curData.data );
+	}
+}
+
+function fixCloneNodeIssues( src, dest ) {
+	var nodeName, e, data;
+
+	// We do not need to do anything for non-Elements
+	if ( dest.nodeType !== 1 ) {
+		return;
+	}
+
+	nodeName = dest.nodeName.toLowerCase();
+
+	// IE6-8 copies events bound via attachEvent when using cloneNode.
+	if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) {
+		data = jQuery._data( dest );
+
+		for ( e in data.events ) {
+			jQuery.removeEvent( dest, e, data.handle );
+		}
+
+		// Event data gets referenced instead of copied if the expando gets copied too
+		dest.removeAttribute( jQuery.expando );
+	}
+
+	// IE blanks contents when cloning scripts, and tries to evaluate newly-set text
+	if ( nodeName === "script" && dest.text !== src.text ) {
+		disableScript( dest ).text = src.text;
+		restoreScript( dest );
+
+	// IE6-10 improperly clones children of object elements using classid.
+	// IE10 throws NoModificationAllowedError if parent is null, #12132.
+	} else if ( nodeName === "object" ) {
+		if ( dest.parentNode ) {
+			dest.outerHTML = src.outerHTML;
+		}
+
+		// This path appears unavoidable for IE9. When cloning an object
+		// element in IE9, the outerHTML strategy above is not sufficient.
+		// If the src has innerHTML and the destination does not,
+		// copy the src.innerHTML into the dest.innerHTML. #10324
+		if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) {
+			dest.innerHTML = src.innerHTML;
+		}
+
+	} else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) {
+		// IE6-8 fails to persist the checked state of a cloned checkbox
+		// or radio button. Worse, IE6-7 fail to give the cloned element
+		// a checked appearance if the defaultChecked value isn't also set
+
+		dest.defaultChecked = dest.checked = src.checked;
+
+		// IE6-7 get confused and end up setting the value of a cloned
+		// checkbox/radio button to an empty string instead of "on"
+		if ( dest.value !== src.value ) {
+			dest.value = src.value;
+		}
+
+	// IE6-8 fails to return the selected option to the default selected
+	// state when cloning options
+	} else if ( nodeName === "option" ) {
+		dest.defaultSelected = dest.selected = src.defaultSelected;
+
+	// IE6-8 fails to set the defaultValue to the correct value when
+	// cloning other types of input fields
+	} else if ( nodeName === "input" || nodeName === "textarea" ) {
+		dest.defaultValue = src.defaultValue;
+	}
+}
+
+jQuery.each({
+	appendTo: "append",
+	prependTo: "prepend",
+	insertBefore: "before",
+	insertAfter: "after",
+	replaceAll: "replaceWith"
+}, function( name, original ) {
+	jQuery.fn[ name ] = function( selector ) {
+		var elems,
+			i = 0,
+			ret = [],
+			insert = jQuery( selector ),
+			last = insert.length - 1;
+
+		for ( ; i <= last; i++ ) {
+			elems = i === last ? this : this.clone(true);
+			jQuery( insert[i] )[ original ]( elems );
+
+			// Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get()
+			core_push.apply( ret, elems.get() );
+		}
+
+		return this.pushStack( ret );
+	};
+});
+
+function getAll( context, tag ) {
+	var elems, elem,
+		i = 0,
+		found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) :
+			typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) :
+			undefined;
+
+	if ( !found ) {
+		for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) {
+			if ( !tag || jQuery.nodeName( elem, tag ) ) {
+				found.push( elem );
+			} else {
+				jQuery.merge( found, getAll( elem, tag ) );
+			}
+		}
+	}
+
+	return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
+		jQuery.merge( [ context ], found ) :
+		found;
+}
+
+// Used in buildFragment, fixes the defaultChecked property
+function fixDefaultChecked( elem ) {
+	if ( manipulation_rcheckableType.test( elem.type ) ) {
+		elem.defaultChecked = elem.checked;
+	}
+}
+
+jQuery.extend({
+	clone: function( elem, dataAndEvents, deepDataAndEvents ) {
+		var destElements, node, clone, i, srcElements,
+			inPage = jQuery.contains( elem.ownerDocument, elem );
+
+		if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
+			clone = elem.cloneNode( true );
+
+		// IE<=8 does not properly clone detached, unknown element nodes
+		} else {
+			fragmentDiv.innerHTML = elem.outerHTML;
+			fragmentDiv.removeChild( clone = fragmentDiv.firstChild );
+		}
+
+		if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) &&
+				(elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) {
+
+			// We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2
+			destElements = getAll( clone );
+			srcElements = getAll( elem );
+
+			// Fix all IE cloning issues
+			for ( i = 0; (node = srcElements[i]) != null; ++i ) {
+				// Ensure that the destination node is not null; Fixes #9587
+				if ( destElements[i] ) {
+					fixCloneNodeIssues( node, destElements[i] );
+				}
+			}
+		}
+
+		// Copy the events from the original to the clone
+		if ( dataAndEvents ) {
+			if ( deepDataAndEvents ) {
+				srcElements = srcElements || getAll( elem );
+				destElements = destElements || getAll( clone );
+
+				for ( i = 0; (node = srcElements[i]) != null; i++ ) {
+					cloneCopyEvent( node, destElements[i] );
+				}
+			} else {
+				cloneCopyEvent( elem, clone );
+			}
+		}
+
+		// Preserve script evaluation history
+		destElements = getAll( clone, "script" );
+		if ( destElements.length > 0 ) {
+			setGlobalEval( destElements, !inPage && getAll( elem, "script" ) );
+		}
+
+		destElements = srcElements = node = null;
+
+		// Return the cloned set
+		return clone;
+	},
+
+	buildFragment: function( elems, context, scripts, selection ) {
+		var j, elem, contains,
+			tmp, tag, tbody, wrap,
+			l = elems.length,
+
+			// Ensure a safe fragment
+			safe = createSafeFragment( context ),
+
+			nodes = [],
+			i = 0;
+
+		for ( ; i < l; i++ ) {
+			elem = elems[ i ];
+
+			if ( elem || elem === 0 ) {
+
+				// Add nodes directly
+				if ( jQuery.type( elem ) === "object" ) {
+					jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
+
+				// Convert non-html into a text node
+				} else if ( !rhtml.test( elem ) ) {
+					nodes.push( context.createTextNode( elem ) );
+
+				// Convert html into DOM nodes
+				} else {
+					tmp = tmp || safe.appendChild( context.createElement("div") );
+
+					// Deserialize a standard representation
+					tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase();
+					wrap = wrapMap[ tag ] || wrapMap._default;
+
+					tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[2];
+
+					// Descend through wrappers to the right content
+					j = wrap[0];
+					while ( j-- ) {
+						tmp = tmp.lastChild;
+					}
+
+					// Manually add leading whitespace removed by IE
+					if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) {
+						nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) );
+					}
+
+					// Remove IE's autoinserted <tbody> from table fragments
+					if ( !jQuery.support.tbody ) {
+
+						// String was a <table>, *may* have spurious <tbody>
+						elem = tag === "table" && !rtbody.test( elem ) ?
+							tmp.firstChild :
+
+							// String was a bare <thead> or <tfoot>
+							wrap[1] === "<table>" && !rtbody.test( elem ) ?
+								tmp :
+								0;
+
+						j = elem && elem.childNodes.length;
+						while ( j-- ) {
+							if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) {
+								elem.removeChild( tbody );
+							}
+						}
+					}
+
+					jQuery.merge( nodes, tmp.childNodes );
+
+					// Fix #12392 for WebKit and IE > 9
+					tmp.textContent = "";
+
+					// Fix #12392 for oldIE
+					while ( tmp.firstChild ) {
+						tmp.removeChild( tmp.firstChild );
+					}
+
+					// Remember the top-level container for proper cleanup
+					tmp = safe.lastChild;
+				}
+			}
+		}
+
+		// Fix #11356: Clear elements from fragment
+		if ( tmp ) {
+			safe.removeChild( tmp );
+		}
+
+		// Reset defaultChecked for any radios and checkboxes
+		// about to be appended to the DOM in IE 6/7 (#8060)
+		if ( !jQuery.support.appendChecked ) {
+			jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked );
+		}
+
+		i = 0;
+		while ( (elem = nodes[ i++ ]) ) {
+
+			// #4087 - If origin and destination elements are the same, and this is
+			// that element, do not do anything
+			if ( selection && jQuery.inArray( elem, selection ) !== -1 ) {
+				continue;
+			}
+
+			contains = jQuery.contains( elem.ownerDocument, elem );
+
+			// Append to fragment
+			tmp = getAll( safe.appendChild( elem ), "script" );
+
+			// Preserve script evaluation history
+			if ( contains ) {
+				setGlobalEval( tmp );
+			}
+
+			// Capture executables
+			if ( scripts ) {
+				j = 0;
+				while ( (elem = tmp[ j++ ]) ) {
+					if ( rscriptType.test( elem.type || "" ) ) {
+						scripts.push( elem );
+					}
+				}
+			}
+		}
+
+		tmp = null;
+
+		return safe;
+	},
+
+	cleanData: function( elems, /* internal */ acceptData ) {
+		var elem, type, id, data,
+			i = 0,
+			internalKey = jQuery.expando,
+			cache = jQuery.cache,
+			deleteExpando = jQuery.support.deleteExpando,
+			special = jQuery.event.special;
+
+		for ( ; (elem = elems[i]) != null; i++ ) {
+
+			if ( acceptData || jQuery.acceptData( elem ) ) {
+
+				id = elem[ internalKey ];
+				data = id && cache[ id ];
+
+				if ( data ) {
+					if ( data.events ) {
+						for ( type in data.events ) {
+							if ( special[ type ] ) {
+								jQuery.event.remove( elem, type );
+
+							// This is a shortcut to avoid jQuery.event.remove's overhead
+							} else {
+								jQuery.removeEvent( elem, type, data.handle );
+							}
+						}
+					}
+
+					// Remove cache only if it was not already removed by jQuery.event.remove
+					if ( cache[ id ] ) {
+
+						delete cache[ id ];
+
+						// IE does not allow us to delete expando properties from nodes,
+						// nor does it have a removeAttribute function on Document nodes;
+						// we must handle all of these cases
+						if ( deleteExpando ) {
+							delete elem[ internalKey ];
+
+						} else if ( typeof elem.removeAttribute !== core_strundefined ) {
+							elem.removeAttribute( internalKey );
+
+						} else {
+							elem[ internalKey ] = null;
+						}
+
+						core_deletedIds.push( id );
+					}
+				}
+			}
+		}
+	},
+
+	_evalUrl: function( url ) {
+		return jQuery.ajax({
+			url: url,
+			type: "GET",
+			dataType: "script",
+			async: false,
+			global: false,
+			"throws": true
+		});
+	}
+});
+jQuery.fn.extend({
+	wrapAll: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapAll( html.call(this, i) );
+			});
+		}
+
+		if ( this[0] ) {
+			// The elements to wrap the target around
+			var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true);
+
+			if ( this[0].parentNode ) {
+				wrap.insertBefore( this[0] );
+			}
+
+			wrap.map(function() {
+				var elem = this;
+
+				while ( elem.firstChild && elem.firstChild.nodeType === 1 ) {
+					elem = elem.firstChild;
+				}
+
+				return elem;
+			}).append( this );
+		}
+
+		return this;
+	},
+
+	wrapInner: function( html ) {
+		if ( jQuery.isFunction( html ) ) {
+			return this.each(function(i) {
+				jQuery(this).wrapInner( html.call(this, i) );
+			});
+		}
+
+		return this.each(function() {
+			var self = jQuery( this ),
+				contents = self.contents();
+
+			if ( contents.length ) {
+				contents.wrapAll( html );
+
+			} else {
+				self.append( html );
+			}
+		});
+	},
+
+	wrap: function( html ) {
+		var isFunction = jQuery.isFunction( html );
+
+		return this.each(function(i) {
+			jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html );
+		});
+	},
+
+	unwrap: function() {
+		return this.parent().each(function() {
+			if ( !jQuery.nodeName( this, "body" ) ) {
+				jQuery( this ).replaceWith( this.childNodes );
+			}
+		}).end();
+	}
+});
+var iframe, getStyles, curCSS,
+	ralpha = /alpha\([^)]*\)/i,
+	ropacity = /opacity\s*=\s*([^)]*)/,
+	rposition = /^(top|right|bottom|left)$/,
+	// swappable if display is none or starts with table except "table", "table-cell", or "table-caption"
+	// see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display
+	rdisplayswap = /^(none|table(?!-c[ea]).+)/,
+	rmargin = /^margin/,
+	rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ),
+	rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ),
+	rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ),
+	elemdisplay = { BODY: "block" },
+
+	cssShow = { position: "absolute", visibility: "hidden", display: "block" },
+	cssNormalTransform = {
+		letterSpacing: 0,
+		fontWeight: 400
+	},
+
+	cssExpand = [ "Top", "Right", "Bottom", "Left" ],
+	cssPrefixes = [ "Webkit", "O", "Moz", "ms" ];
+
+// return a css property mapped to a potentially vendor prefixed property
+function vendorPropName( style, name ) {
+
+	// shortcut for names that are not vendor prefixed
+	if ( name in style ) {
+		return name;
+	}
+
+	// check for vendor prefixed names
+	var capName = name.charAt(0).toUpperCase() + name.slice(1),
+		origName = name,
+		i = cssPrefixes.length;
+
+	while ( i-- ) {
+		name = cssPrefixes[ i ] + capName;
+		if ( name in style ) {
+			return name;
+		}
+	}
+
+	return origName;
+}
+
+function isHidden( elem, el ) {
+	// isHidden might be called from jQuery#filter function;
+	// in that case, element will be second argument
+	elem = el || elem;
+	return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem );
+}
+
+function showHide( elements, show ) {
+	var display, elem, hidden,
+		values = [],
+		index = 0,
+		length = elements.length;
+
+	for ( ; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+
+		values[ index ] = jQuery._data( elem, "olddisplay" );
+		display = elem.style.display;
+		if ( show ) {
+			// Reset the inline display of this element to learn if it is
+			// being hidden by cascaded rules or not
+			if ( !values[ index ] && display === "none" ) {
+				elem.style.display = "";
+			}
+
+			// Set elements which have been overridden with display: none
+			// in a stylesheet to whatever the default browser style is
+			// for such an element
+			if ( elem.style.display === "" && isHidden( elem ) ) {
+				values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) );
+			}
+		} else {
+
+			if ( !values[ index ] ) {
+				hidden = isHidden( elem );
+
+				if ( display && display !== "none" || !hidden ) {
+					jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) );
+				}
+			}
+		}
+	}
+
+	// Set the display of most of the elements in a second loop
+	// to avoid the constant reflow
+	for ( index = 0; index < length; index++ ) {
+		elem = elements[ index ];
+		if ( !elem.style ) {
+			continue;
+		}
+		if ( !show || elem.style.display === "none" || elem.style.display === "" ) {
+			elem.style.display = show ? values[ index ] || "" : "none";
+		}
+	}
+
+	return elements;
+}
+
+jQuery.fn.extend({
+	css: function( name, value ) {
+		return jQuery.access( this, function( elem, name, value ) {
+			var len, styles,
+				map = {},
+				i = 0;
+
+			if ( jQuery.isArray( name ) ) {
+				styles = getStyles( elem );
+				len = name.length;
+
+				for ( ; i < len; i++ ) {
+					map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles );
+				}
+
+				return map;
+			}
+
+			return value !== undefined ?
+				jQuery.style( elem, name, value ) :
+				jQuery.css( elem, name );
+		}, name, value, arguments.length > 1 );
+	},
+	show: function() {
+		return showHide( this, true );
+	},
+	hide: function() {
+		return showHide( this );
+	},
+	toggle: function( state ) {
+		if ( typeof state === "boolean" ) {
+			return state ? this.show() : this.hide();
+		}
+
+		return this.each(function() {
+			if ( isHidden( this ) ) {
+				jQuery( this ).show();
+			} else {
+				jQuery( this ).hide();
+			}
+		});
+	}
+});
+
+jQuery.extend({
+	// Add in style property hooks for overriding the default
+	// behavior of getting and setting a style property
+	cssHooks: {
+		opacity: {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// We should always get a number back from opacity
+					var ret = curCSS( elem, "opacity" );
+					return ret === "" ? "1" : ret;
+				}
+			}
+		}
+	},
+
+	// Don't automatically add "px" to these possibly-unitless properties
+	cssNumber: {
+		"columnCount": true,
+		"fillOpacity": true,
+		"fontWeight": true,
+		"lineHeight": true,
+		"opacity": true,
+		"order": true,
+		"orphans": true,
+		"widows": true,
+		"zIndex": true,
+		"zoom": true
+	},
+
+	// Add in properties whose names you wish to fix before
+	// setting or getting the value
+	cssProps: {
+		// normalize float css property
+		"float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat"
+	},
+
+	// Get and set the style property on a DOM Node
+	style: function( elem, name, value, extra ) {
+		// Don't set styles on text and comment nodes
+		if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) {
+			return;
+		}
+
+		// Make sure that we're working with the right name
+		var ret, type, hooks,
+			origName = jQuery.camelCase( name ),
+			style = elem.style;
+
+		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) );
+
+		// gets hook for the prefixed version
+		// followed by the unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// Check if we're setting a value
+		if ( value !== undefined ) {
+			type = typeof value;
+
+			// convert relative number strings (+= or -=) to relative numbers. #7345
+			if ( type === "string" && (ret = rrelNum.exec( value )) ) {
+				value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) );
+				// Fixes bug #9237
+				type = "number";
+			}
+
+			// Make sure that NaN and null values aren't set. See: #7116
+			if ( value == null || type === "number" && isNaN( value ) ) {
+				return;
+			}
+
+			// If a number was passed in, add 'px' to the (except for certain CSS properties)
+			if ( type === "number" && !jQuery.cssNumber[ origName ] ) {
+				value += "px";
+			}
+
+			// Fixes #8908, it can be done more correctly by specifing setters in cssHooks,
+			// but it would mean to define eight (for every problematic property) identical functions
+			if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) {
+				style[ name ] = "inherit";
+			}
+
+			// If a hook was provided, use that value, otherwise just set the specified value
+			if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
+
+				// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
+				// Fixes bug #5509
+				try {
+					style[ name ] = value;
+				} catch(e) {}
+			}
+
+		} else {
+			// If a hook was provided get the non-computed value from there
+			if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) {
+				return ret;
+			}
+
+			// Otherwise just get the value from the style object
+			return style[ name ];
+		}
+	},
+
+	css: function( elem, name, extra, styles ) {
+		var num, val, hooks,
+			origName = jQuery.camelCase( name );
+
+		// Make sure that we're working with the right name
+		name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) );
+
+		// gets hook for the prefixed version
+		// followed by the unprefixed version
+		hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ];
+
+		// If a hook was provided get the computed value from there
+		if ( hooks && "get" in hooks ) {
+			val = hooks.get( elem, true, extra );
+		}
+
+		// Otherwise, if a way to get the computed value exists, use that
+		if ( val === undefined ) {
+			val = curCSS( elem, name, styles );
+		}
+
+		//convert "normal" to computed value
+		if ( val === "normal" && name in cssNormalTransform ) {
+			val = cssNormalTransform[ name ];
+		}
+
+		// Return, converting to number if forced or a qualifier was provided and val looks numeric
+		if ( extra === "" || extra ) {
+			num = parseFloat( val );
+			return extra === true || jQuery.isNumeric( num ) ? num || 0 : val;
+		}
+		return val;
+	}
+});
+
+// NOTE: we've included the "window" in window.getComputedStyle
+// because jsdom on node.js will break without it.
+if ( window.getComputedStyle ) {
+	getStyles = function( elem ) {
+		return window.getComputedStyle( elem, null );
+	};
+
+	curCSS = function( elem, name, _computed ) {
+		var width, minWidth, maxWidth,
+			computed = _computed || getStyles( elem ),
+
+			// getPropertyValue is only needed for .css('filter') in IE9, see #12537
+			ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined,
+			style = elem.style;
+
+		if ( computed ) {
+
+			if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
+				ret = jQuery.style( elem, name );
+			}
+
+			// A tribute to the "awesome hack by Dean Edwards"
+			// Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right
+			// Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels
+			// this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values
+			if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) {
+
+				// Remember the original values
+				width = style.width;
+				minWidth = style.minWidth;
+				maxWidth = style.maxWidth;
+
+				// Put in the new values to get a computed value out
+				style.minWidth = style.maxWidth = style.width = ret;
+				ret = computed.width;
+
+				// Revert the changed values
+				style.width = width;
+				style.minWidth = minWidth;
+				style.maxWidth = maxWidth;
+			}
+		}
+
+		return ret;
+	};
+} else if ( document.documentElement.currentStyle ) {
+	getStyles = function( elem ) {
+		return elem.currentStyle;
+	};
+
+	curCSS = function( elem, name, _computed ) {
+		var left, rs, rsLeft,
+			computed = _computed || getStyles( elem ),
+			ret = computed ? computed[ name ] : undefined,
+			style = elem.style;
+
+		// Avoid setting ret to empty string here
+		// so we don't default to auto
+		if ( ret == null && style && style[ name ] ) {
+			ret = style[ name ];
+		}
+
+		// From the awesome hack by Dean Edwards
+		// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
+
+		// If we're not dealing with a regular pixel number
+		// but a number that has a weird ending, we need to convert it to pixels
+		// but not position css attributes, as those are proportional to the parent element instead
+		// and we can't measure the parent instead because it might trigger a "stacking dolls" problem
+		if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) {
+
+			// Remember the original values
+			left = style.left;
+			rs = elem.runtimeStyle;
+			rsLeft = rs && rs.left;
+
+			// Put in the new values to get a computed value out
+			if ( rsLeft ) {
+				rs.left = elem.currentStyle.left;
+			}
+			style.left = name === "fontSize" ? "1em" : ret;
+			ret = style.pixelLeft + "px";
+
+			// Revert the changed values
+			style.left = left;
+			if ( rsLeft ) {
+				rs.left = rsLeft;
+			}
+		}
+
+		return ret === "" ? "auto" : ret;
+	};
+}
+
+function setPositiveNumber( elem, value, subtract ) {
+	var matches = rnumsplit.exec( value );
+	return matches ?
+		// Guard against undefined "subtract", e.g., when used as in cssHooks
+		Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) :
+		value;
+}
+
+function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) {
+	var i = extra === ( isBorderBox ? "border" : "content" ) ?
+		// If we already have the right measurement, avoid augmentation
+		4 :
+		// Otherwise initialize for horizontal or vertical properties
+		name === "width" ? 1 : 0,
+
+		val = 0;
+
+	for ( ; i < 4; i += 2 ) {
+		// both box models exclude margin, so add it if we want it
+		if ( extra === "margin" ) {
+			val += jQuery.css( elem, extra + cssExpand[ i ], true, styles );
+		}
+
+		if ( isBorderBox ) {
+			// border-box includes padding, so remove it if we want content
+			if ( extra === "content" ) {
+				val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+			}
+
+			// at this point, extra isn't border nor margin, so remove border
+			if ( extra !== "margin" ) {
+				val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		} else {
+			// at this point, extra isn't content, so add padding
+			val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles );
+
+			// at this point, extra isn't content nor padding, so add border
+			if ( extra !== "padding" ) {
+				val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles );
+			}
+		}
+	}
+
+	return val;
+}
+
+function getWidthOrHeight( elem, name, extra ) {
+
+	// Start with offset property, which is equivalent to the border-box value
+	var valueIsBorderBox = true,
+		val = name === "width" ? elem.offsetWidth : elem.offsetHeight,
+		styles = getStyles( elem ),
+		isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box";
+
+	// some non-html elements return undefined for offsetWidth, so check for null/undefined
+	// svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285
+	// MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668
+	if ( val <= 0 || val == null ) {
+		// Fall back to computed then uncomputed css if necessary
+		val = curCSS( elem, name, styles );
+		if ( val < 0 || val == null ) {
+			val = elem.style[ name ];
+		}
+
+		// Computed unit is not pixels. Stop here and return.
+		if ( rnumnonpx.test(val) ) {
+			return val;
+		}
+
+		// we need the check for style in case a browser which returns unreliable values
+		// for getComputedStyle silently falls back to the reliable elem.style
+		valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] );
+
+		// Normalize "", auto, and prepare for extra
+		val = parseFloat( val ) || 0;
+	}
+
+	// use the active box-sizing model to add/subtract irrelevant styles
+	return ( val +
+		augmentWidthOrHeight(
+			elem,
+			name,
+			extra || ( isBorderBox ? "border" : "content" ),
+			valueIsBorderBox,
+			styles
+		)
+	) + "px";
+}
+
+// Try to determine the default display value of an element
+function css_defaultDisplay( nodeName ) {
+	var doc = document,
+		display = elemdisplay[ nodeName ];
+
+	if ( !display ) {
+		display = actualDisplay( nodeName, doc );
+
+		// If the simple way fails, read from inside an iframe
+		if ( display === "none" || !display ) {
+			// Use the already-created iframe if possible
+			iframe = ( iframe ||
+				jQuery("<iframe frameborder='0' width='0' height='0'/>")
+				.css( "cssText", "display:block !important" )
+			).appendTo( doc.documentElement );
+
+			// Always write a new HTML skeleton so Webkit and Firefox don't choke on reuse
+			doc = ( iframe[0].contentWindow || iframe[0].contentDocument ).document;
+			doc.write("<!doctype html><html><body>");
+			doc.close();
+
+			display = actualDisplay( nodeName, doc );
+			iframe.detach();
+		}
+
+		// Store the correct default display
+		elemdisplay[ nodeName ] = display;
+	}
+
+	return display;
+}
+
+// Called ONLY from within css_defaultDisplay
+function actualDisplay( name, doc ) {
+	var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ),
+		display = jQuery.css( elem[0], "display" );
+	elem.remove();
+	return display;
+}
+
+jQuery.each([ "height", "width" ], function( i, name ) {
+	jQuery.cssHooks[ name ] = {
+		get: function( elem, computed, extra ) {
+			if ( computed ) {
+				// certain elements can have dimension info if we invisibly show them
+				// however, it must have a current display style that would benefit from this
+				return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ?
+					jQuery.swap( elem, cssShow, function() {
+						return getWidthOrHeight( elem, name, extra );
+					}) :
+					getWidthOrHeight( elem, name, extra );
+			}
+		},
+
+		set: function( elem, value, extra ) {
+			var styles = extra && getStyles( elem );
+			return setPositiveNumber( elem, value, extra ?
+				augmentWidthOrHeight(
+					elem,
+					name,
+					extra,
+					jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box",
+					styles
+				) : 0
+			);
+		}
+	};
+});
+
+if ( !jQuery.support.opacity ) {
+	jQuery.cssHooks.opacity = {
+		get: function( elem, computed ) {
+			// IE uses filters for opacity
+			return ropacity.test( (computed && elem.currentStyle ? elem.currentStyle.filter : elem.style.filter) || "" ) ?
+				( 0.01 * parseFloat( RegExp.$1 ) ) + "" :
+				computed ? "1" : "";
+		},
+
+		set: function( elem, value ) {
+			var style = elem.style,
+				currentStyle = elem.currentStyle,
+				opacity = jQuery.isNumeric( value ) ? "alpha(opacity=" + value * 100 + ")" : "",
+				filter = currentStyle && currentStyle.filter || style.filter || "";
+
+			// IE has trouble with opacity if it does not have layout
+			// Force it by setting the zoom level
+			style.zoom = 1;
+
+			// if setting opacity to 1, and no other filters exist - attempt to remove filter attribute #6652
+			// if value === "", then remove inline opacity #12685
+			if ( ( value >= 1 || value === "" ) &&
+					jQuery.trim( filter.replace( ralpha, "" ) ) === "" &&
+					style.removeAttribute ) {
+
+				// Setting style.filter to null, "" & " " still leave "filter:" in the cssText
+				// if "filter:" is present at all, clearType is disabled, we want to avoid this
+				// style.removeAttribute is IE Only, but so apparently is this code path...
+				style.removeAttribute( "filter" );
+
+				// if there is no filter style applied in a css rule or unset inline opacity, we are done
+				if ( value === "" || currentStyle && !currentStyle.filter ) {
+					return;
+				}
+			}
+
+			// otherwise, set new filter values
+			style.filter = ralpha.test( filter ) ?
+				filter.replace( ralpha, opacity ) :
+				filter + " " + opacity;
+		}
+	};
+}
+
+// These hooks cannot be added until DOM ready because the support test
+// for it is not run until after DOM ready
+jQuery(function() {
+	if ( !jQuery.support.reliableMarginRight ) {
+		jQuery.cssHooks.marginRight = {
+			get: function( elem, computed ) {
+				if ( computed ) {
+					// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+					// Work around by temporarily setting element display to inline-block
+					return jQuery.swap( elem, { "display": "inline-block" },
+						curCSS, [ elem, "marginRight" ] );
+				}
+			}
+		};
+	}
+
+	// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084
+	// getComputedStyle returns percent when specified for top/left/bottom/right
+	// rather than make the css module depend on the offset module, we just check for it here
+	if ( !jQuery.support.pixelPosition && jQuery.fn.position ) {
+		jQuery.each( [ "top", "left" ], function( i, prop ) {
+			jQuery.cssHooks[ prop ] = {
+				get: function( elem, computed ) {
+					if ( computed ) {
+						computed = curCSS( elem, prop );
+						// if curCSS returns percentage, fallback to offset
+						return rnumnonpx.test( computed ) ?
+							jQuery( elem ).position()[ prop ] + "px" :
+							computed;
+					}
+				}
+			};
+		});
+	}
+
+});
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.hidden = function( elem ) {
+		// Support: Opera <= 12.12
+		// Opera reports offsetWidths and offsetHeights less than zero on some elements
+		return elem.offsetWidth <= 0 && elem.offsetHeight <= 0 ||
+			(!jQuery.support.reliableHiddenOffsets && ((elem.style && elem.style.display) || jQuery.css( elem, "display" )) === "none");
+	};
+
+	jQuery.expr.filters.visible = function( elem ) {
+		return !jQuery.expr.filters.hidden( elem );
+	};
+}
+
+// These hooks are used by animate to expand properties
+jQuery.each({
+	margin: "",
+	padding: "",
+	border: "Width"
+}, function( prefix, suffix ) {
+	jQuery.cssHooks[ prefix + suffix ] = {
+		expand: function( value ) {
+			var i = 0,
+				expanded = {},
+
+				// assumes a single number if not a string
+				parts = typeof value === "string" ? value.split(" ") : [ value ];
+
+			for ( ; i < 4; i++ ) {
+				expanded[ prefix + cssExpand[ i ] + suffix ] =
+					parts[ i ] || parts[ i - 2 ] || parts[ 0 ];
+			}
+
+			return expanded;
+		}
+	};
+
+	if ( !rmargin.test( prefix ) ) {
+		jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber;
+	}
+});
+var r20 = /%20/g,
+	rbracket = /\[\]$/,
+	rCRLF = /\r?\n/g,
+	rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i,
+	rsubmittable = /^(?:input|select|textarea|keygen)/i;
+
+jQuery.fn.extend({
+	serialize: function() {
+		return jQuery.param( this.serializeArray() );
+	},
+	serializeArray: function() {
+		return this.map(function(){
+			// Can add propHook for "elements" to filter or add form elements
+			var elements = jQuery.prop( this, "elements" );
+			return elements ? jQuery.makeArray( elements ) : this;
+		})
+		.filter(function(){
+			var type = this.type;
+			// Use .is(":disabled") so that fieldset[disabled] works
+			return this.name && !jQuery( this ).is( ":disabled" ) &&
+				rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
+				( this.checked || !manipulation_rcheckableType.test( type ) );
+		})
+		.map(function( i, elem ){
+			var val = jQuery( this ).val();
+
+			return val == null ?
+				null :
+				jQuery.isArray( val ) ?
+					jQuery.map( val, function( val ){
+						return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+					}) :
+					{ name: elem.name, value: val.replace( rCRLF, "\r\n" ) };
+		}).get();
+	}
+});
+
+//Serialize an array of form elements or a set of
+//key/values into a query string
+jQuery.param = function( a, traditional ) {
+	var prefix,
+		s = [],
+		add = function( key, value ) {
+			// If value is a function, invoke it and return its value
+			value = jQuery.isFunction( value ) ? value() : ( value == null ? "" : value );
+			s[ s.length ] = encodeURIComponent( key ) + "=" + encodeURIComponent( value );
+		};
+
+	// Set traditional to true for jQuery <= 1.3.2 behavior.
+	if ( traditional === undefined ) {
+		traditional = jQuery.ajaxSettings && jQuery.ajaxSettings.traditional;
+	}
+
+	// If an array was passed in, assume that it is an array of form elements.
+	if ( jQuery.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) {
+		// Serialize the form elements
+		jQuery.each( a, function() {
+			add( this.name, this.value );
+		});
+
+	} else {
+		// If traditional, encode the "old" way (the way 1.3.2 or older
+		// did it), otherwise encode params recursively.
+		for ( prefix in a ) {
+			buildParams( prefix, a[ prefix ], traditional, add );
+		}
+	}
+
+	// Return the resulting serialization
+	return s.join( "&" ).replace( r20, "+" );
+};
+
+function buildParams( prefix, obj, traditional, add ) {
+	var name;
+
+	if ( jQuery.isArray( obj ) ) {
+		// Serialize array item.
+		jQuery.each( obj, function( i, v ) {
+			if ( traditional || rbracket.test( prefix ) ) {
+				// Treat each array item as a scalar.
+				add( prefix, v );
+
+			} else {
+				// Item is non-scalar (array or object), encode its numeric index.
+				buildParams( prefix + "[" + ( typeof v === "object" ? i : "" ) + "]", v, traditional, add );
+			}
+		});
+
+	} else if ( !traditional && jQuery.type( obj ) === "object" ) {
+		// Serialize object item.
+		for ( name in obj ) {
+			buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add );
+		}
+
+	} else {
+		// Serialize scalar item.
+		add( prefix, obj );
+	}
+}
+jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " +
+	"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
+	"change select submit keydown keypress keyup error contextmenu").split(" "), function( i, name ) {
+
+	// Handle event binding
+	jQuery.fn[ name ] = function( data, fn ) {
+		return arguments.length > 0 ?
+			this.on( name, null, data, fn ) :
+			this.trigger( name );
+	};
+});
+
+jQuery.fn.extend({
+	hover: function( fnOver, fnOut ) {
+		return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver );
+	},
+
+	bind: function( types, data, fn ) {
+		return this.on( types, null, data, fn );
+	},
+	unbind: function( types, fn ) {
+		return this.off( types, null, fn );
+	},
+
+	delegate: function( selector, types, data, fn ) {
+		return this.on( types, selector, data, fn );
+	},
+	undelegate: function( selector, types, fn ) {
+		// ( namespace ) or ( selector, types [, fn] )
+		return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn );
+	}
+});
+var
+	// Document location
+	ajaxLocParts,
+	ajaxLocation,
+	ajax_nonce = jQuery.now(),
+
+	ajax_rquery = /\?/,
+	rhash = /#.*$/,
+	rts = /([?&])_=[^&]*/,
+	rheaders = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg, // IE leaves an \r character at EOL
+	// #7653, #8125, #8152: local protocol detection
+	rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/,
+	rnoContent = /^(?:GET|HEAD)$/,
+	rprotocol = /^\/\//,
+	rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
+
+	// Keep a copy of the old load method
+	_load = jQuery.fn.load,
+
+	/* Prefilters
+	 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example)
+	 * 2) These are called:
+	 *    - BEFORE asking for a transport
+	 *    - AFTER param serialization (s.data is a string if s.processData is true)
+	 * 3) key is the dataType
+	 * 4) the catchall symbol "*" can be used
+	 * 5) execution will start with transport dataType and THEN continue down to "*" if needed
+	 */
+	prefilters = {},
+
+	/* Transports bindings
+	 * 1) key is the dataType
+	 * 2) the catchall symbol "*" can be used
+	 * 3) selection will start with transport dataType and THEN go to "*" if needed
+	 */
+	transports = {},
+
+	// Avoid comment-prolog char sequence (#10098); must appease lint and evade compression
+	allTypes = "*/".concat("*");
+
+// #8138, IE may throw an exception when accessing
+// a field from window.location if document.domain has been set
+try {
+	ajaxLocation = location.href;
+} catch( e ) {
+	// Use the href attribute of an A element
+	// since IE will modify it given document.location
+	ajaxLocation = document.createElement( "a" );
+	ajaxLocation.href = "";
+	ajaxLocation = ajaxLocation.href;
+}
+
+// Segment location into parts
+ajaxLocParts = rurl.exec( ajaxLocation.toLowerCase() ) || [];
+
+// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
+function addToPrefiltersOrTransports( structure ) {
+
+	// dataTypeExpression is optional and defaults to "*"
+	return function( dataTypeExpression, func ) {
+
+		if ( typeof dataTypeExpression !== "string" ) {
+			func = dataTypeExpression;
+			dataTypeExpression = "*";
+		}
+
+		var dataType,
+			i = 0,
+			dataTypes = dataTypeExpression.toLowerCase().match( core_rnotwhite ) || [];
+
+		if ( jQuery.isFunction( func ) ) {
+			// For each dataType in the dataTypeExpression
+			while ( (dataType = dataTypes[i++]) ) {
+				// Prepend if requested
+				if ( dataType[0] === "+" ) {
+					dataType = dataType.slice( 1 ) || "*";
+					(structure[ dataType ] = structure[ dataType ] || []).unshift( func );
+
+				// Otherwise append
+				} else {
+					(structure[ dataType ] = structure[ dataType ] || []).push( func );
+				}
+			}
+		}
+	};
+}
+
+// Base inspection function for prefilters and transports
+function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) {
+
+	var inspected = {},
+		seekingTransport = ( structure === transports );
+
+	function inspect( dataType ) {
+		var selected;
+		inspected[ dataType ] = true;
+		jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) {
+			var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR );
+			if( typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[ dataTypeOrTransport ] ) {
+				options.dataTypes.unshift( dataTypeOrTransport );
+				inspect( dataTypeOrTransport );
+				return false;
+			} else if ( seekingTransport ) {
+				return !( selected = dataTypeOrTransport );
+			}
+		});
+		return selected;
+	}
+
+	return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" );
+}
+
+// A special extend for ajax options
+// that takes "flat" options (not to be deep extended)
+// Fixes #9887
+function ajaxExtend( target, src ) {
+	var deep, key,
+		flatOptions = jQuery.ajaxSettings.flatOptions || {};
+
+	for ( key in src ) {
+		if ( src[ key ] !== undefined ) {
+			( flatOptions[ key ] ? target : ( deep || (deep = {}) ) )[ key ] = src[ key ];
+		}
+	}
+	if ( deep ) {
+		jQuery.extend( true, target, deep );
+	}
+
+	return target;
+}
+
+jQuery.fn.load = function( url, params, callback ) {
+	if ( typeof url !== "string" && _load ) {
+		return _load.apply( this, arguments );
+	}
+
+	var selector, response, type,
+		self = this,
+		off = url.indexOf(" ");
+
+	if ( off >= 0 ) {
+		selector = url.slice( off, url.length );
+		url = url.slice( 0, off );
+	}
+
+	// If it's a function
+	if ( jQuery.isFunction( params ) ) {
+
+		// We assume that it's the callback
+		callback = params;
+		params = undefined;
+
+	// Otherwise, build a param string
+	} else if ( params && typeof params === "object" ) {
+		type = "POST";
+	}
+
+	// If we have elements to modify, make the request
+	if ( self.length > 0 ) {
+		jQuery.ajax({
+			url: url,
+
+			// if "type" variable is undefined, then "GET" method will be used
+			type: type,
+			dataType: "html",
+			data: params
+		}).done(function( responseText ) {
+
+			// Save response for use in complete callback
+			response = arguments;
+
+			self.html( selector ?
+
+				// If a selector was specified, locate the right elements in a dummy div
+				// Exclude scripts to avoid IE 'Permission Denied' errors
+				jQuery("<div>").append( jQuery.parseHTML( responseText ) ).find( selector ) :
+
+				// Otherwise use the full result
+				responseText );
+
+		}).complete( callback && function( jqXHR, status ) {
+			self.each( callback, response || [ jqXHR.responseText, status, jqXHR ] );
+		});
+	}
+
+	return this;
+};
+
+// Attach a bunch of functions for handling common AJAX events
+jQuery.each( [ "ajaxStart", "ajaxStop", "ajaxComplete", "ajaxError", "ajaxSuccess", "ajaxSend" ], function( i, type ){
+	jQuery.fn[ type ] = function( fn ){
+		return this.on( type, fn );
+	};
+});
+
+jQuery.extend({
+
+	// Counter for holding the number of active queries
+	active: 0,
+
+	// Last-Modified header cache for next request
+	lastModified: {},
+	etag: {},
+
+	ajaxSettings: {
+		url: ajaxLocation,
+		type: "GET",
+		isLocal: rlocalProtocol.test( ajaxLocParts[ 1 ] ),
+		global: true,
+		processData: true,
+		async: true,
+		contentType: "application/x-www-form-urlencoded; charset=UTF-8",
+		/*
+		timeout: 0,
+		data: null,
+		dataType: null,
+		username: null,
+		password: null,
+		cache: null,
+		throws: false,
+		traditional: false,
+		headers: {},
+		*/
+
+		accepts: {
+			"*": allTypes,
+			text: "text/plain",
+			html: "text/html",
+			xml: "application/xml, text/xml",
+			json: "application/json, text/javascript"
+		},
+
+		contents: {
+			xml: /xml/,
+			html: /html/,
+			json: /json/
+		},
+
+		responseFields: {
+			xml: "responseXML",
+			text: "responseText",
+			json: "responseJSON"
+		},
+
+		// Data converters
+		// Keys separate source (or catchall "*") and destination types with a single space
+		converters: {
+
+			// Convert anything to text
+			"* text": String,
+
+			// Text to html (true = no transformation)
+			"text html": true,
+
+			// Evaluate text as a json expression
+			"text json": jQuery.parseJSON,
+
+			// Parse text as xml
+			"text xml": jQuery.parseXML
+		},
+
+		// For options that shouldn't be deep extended:
+		// you can add your own custom options here if
+		// and when you create one that shouldn't be
+		// deep extended (see ajaxExtend)
+		flatOptions: {
+			url: true,
+			context: true
+		}
+	},
+
+	// Creates a full fledged settings object into target
+	// with both ajaxSettings and settings fields.
+	// If target is omitted, writes into ajaxSettings.
+	ajaxSetup: function( target, settings ) {
+		return settings ?
+
+			// Building a settings object
+			ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) :
+
+			// Extending ajaxSettings
+			ajaxExtend( jQuery.ajaxSettings, target );
+	},
+
+	ajaxPrefilter: addToPrefiltersOrTransports( prefilters ),
+	ajaxTransport: addToPrefiltersOrTransports( transports ),
+
+	// Main method
+	ajax: function( url, options ) {
+
+		// If url is an object, simulate pre-1.5 signature
+		if ( typeof url === "object" ) {
+			options = url;
+			url = undefined;
+		}
+
+		// Force options to be an object
+		options = options || {};
+
+		var // Cross-domain detection vars
+			parts,
+			// Loop variable
+			i,
+			// URL without anti-cache param
+			cacheURL,
+			// Response headers as string
+			responseHeadersString,
+			// timeout handle
+			timeoutTimer,
+
+			// To know if global events are to be dispatched
+			fireGlobals,
+
+			transport,
+			// Response headers
+			responseHeaders,
+			// Create the final options object
+			s = jQuery.ajaxSetup( {}, options ),
+			// Callbacks context
+			callbackContext = s.context || s,
+			// Context for global events is callbackContext if it is a DOM node or jQuery collection
+			globalEventContext = s.context && ( callbackContext.nodeType || callbackContext.jquery ) ?
+				jQuery( callbackContext ) :
+				jQuery.event,
+			// Deferreds
+			deferred = jQuery.Deferred(),
+			completeDeferred = jQuery.Callbacks("once memory"),
+			// Status-dependent callbacks
+			statusCode = s.statusCode || {},
+			// Headers (they are sent all at once)
+			requestHeaders = {},
+			requestHeadersNames = {},
+			// The jqXHR state
+			state = 0,
+			// Default abort message
+			strAbort = "canceled",
+			// Fake xhr
+			jqXHR = {
+				readyState: 0,
+
+				// Builds headers hashtable if needed
+				getResponseHeader: function( key ) {
+					var match;
+					if ( state === 2 ) {
+						if ( !responseHeaders ) {
+							responseHeaders = {};
+							while ( (match = rheaders.exec( responseHeadersString )) ) {
+								responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
+							}
+						}
+						match = responseHeaders[ key.toLowerCase() ];
+					}
+					return match == null ? null : match;
+				},
+
+				// Raw string
+				getAllResponseHeaders: function() {
+					return state === 2 ? responseHeadersString : null;
+				},
+
+				// Caches the header
+				setRequestHeader: function( name, value ) {
+					var lname = name.toLowerCase();
+					if ( !state ) {
+						name = requestHeadersNames[ lname ] = requestHeadersNames[ lname ] || name;
+						requestHeaders[ name ] = value;
+					}
+					return this;
+				},
+
+				// Overrides response content-type header
+				overrideMimeType: function( type ) {
+					if ( !state ) {
+						s.mimeType = type;
+					}
+					return this;
+				},
+
+				// Status-dependent callbacks
+				statusCode: function( map ) {
+					var code;
+					if ( map ) {
+						if ( state < 2 ) {
+							for ( code in map ) {
+								// Lazy-add the new callback in a way that preserves old ones
+								statusCode[ code ] = [ statusCode[ code ], map[ code ] ];
+							}
+						} else {
+							// Execute the appropriate callbacks
+							jqXHR.always( map[ jqXHR.status ] );
+						}
+					}
+					return this;
+				},
+
+				// Cancel the request
+				abort: function( statusText ) {
+					var finalText = statusText || strAbort;
+					if ( transport ) {
+						transport.abort( finalText );
+					}
+					done( 0, finalText );
+					return this;
+				}
+			};
+
+		// Attach deferreds
+		deferred.promise( jqXHR ).complete = completeDeferred.add;
+		jqXHR.success = jqXHR.done;
+		jqXHR.error = jqXHR.fail;
+
+		// Remove hash character (#7531: and string promotion)
+		// Add protocol if not provided (#5866: IE7 issue with protocol-less urls)
+		// Handle falsy url in the settings object (#10093: consistency with old signature)
+		// We also use the url parameter if available
+		s.url = ( ( url || s.url || ajaxLocation ) + "" ).replace( rhash, "" ).replace( rprotocol, ajaxLocParts[ 1 ] + "//" );
+
+		// Alias method option to type as per ticket #12004
+		s.type = options.method || options.type || s.method || s.type;
+
+		// Extract dataTypes list
+		s.dataTypes = jQuery.trim( s.dataType || "*" ).toLowerCase().match( core_rnotwhite ) || [""];
+
+		// A cross-domain request is in order when we have a protocol:host:port mismatch
+		if ( s.crossDomain == null ) {
+			parts = rurl.exec( s.url.toLowerCase() );
+			s.crossDomain = !!( parts &&
+				( parts[ 1 ] !== ajaxLocParts[ 1 ] || parts[ 2 ] !== ajaxLocParts[ 2 ] ||
+					( parts[ 3 ] || ( parts[ 1 ] === "http:" ? "80" : "443" ) ) !==
+						( ajaxLocParts[ 3 ] || ( ajaxLocParts[ 1 ] === "http:" ? "80" : "443" ) ) )
+			);
+		}
+
+		// Convert data if not already a string
+		if ( s.data && s.processData && typeof s.data !== "string" ) {
+			s.data = jQuery.param( s.data, s.traditional );
+		}
+
+		// Apply prefilters
+		inspectPrefiltersOrTransports( prefilters, s, options, jqXHR );
+
+		// If request was aborted inside a prefilter, stop there
+		if ( state === 2 ) {
+			return jqXHR;
+		}
+
+		// We can fire global events as of now if asked to
+		fireGlobals = s.global;
+
+		// Watch for a new set of requests
+		if ( fireGlobals && jQuery.active++ === 0 ) {
+			jQuery.event.trigger("ajaxStart");
+		}
+
+		// Uppercase the type
+		s.type = s.type.toUpperCase();
+
+		// Determine if request has content
+		s.hasContent = !rnoContent.test( s.type );
+
+		// Save the URL in case we're toying with the If-Modified-Since
+		// and/or If-None-Match header later on
+		cacheURL = s.url;
+
+		// More options handling for requests with no content
+		if ( !s.hasContent ) {
+
+			// If data is available, append data to url
+			if ( s.data ) {
+				cacheURL = ( s.url += ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + s.data );
+				// #9682: remove data so that it's not used in an eventual retry
+				delete s.data;
+			}
+
+			// Add anti-cache in url if needed
+			if ( s.cache === false ) {
+				s.url = rts.test( cacheURL ) ?
+
+					// If there is already a '_' parameter, set its value
+					cacheURL.replace( rts, "$1_=" + ajax_nonce++ ) :
+
+					// Otherwise add one to the end
+					cacheURL + ( ajax_rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ajax_nonce++;
+			}
+		}
+
+		// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+		if ( s.ifModified ) {
+			if ( jQuery.lastModified[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] );
+			}
+			if ( jQuery.etag[ cacheURL ] ) {
+				jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] );
+			}
+		}
+
+		// Set the correct header, if data is being sent
+		if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) {
+			jqXHR.setRequestHeader( "Content-Type", s.contentType );
+		}
+
+		// Set the Accepts header for the server, depending on the dataType
+		jqXHR.setRequestHeader(
+			"Accept",
+			s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[0] ] ?
+				s.accepts[ s.dataTypes[0] ] + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) :
+				s.accepts[ "*" ]
+		);
+
+		// Check for headers option
+		for ( i in s.headers ) {
+			jqXHR.setRequestHeader( i, s.headers[ i ] );
+		}
+
+		// Allow custom headers/mimetypes and early abort
+		if ( s.beforeSend && ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || state === 2 ) ) {
+			// Abort if not done already and return
+			return jqXHR.abort();
+		}
+
+		// aborting is no longer a cancellation
+		strAbort = "abort";
+
+		// Install callbacks on deferreds
+		for ( i in { success: 1, error: 1, complete: 1 } ) {
+			jqXHR[ i ]( s[ i ] );
+		}
+
+		// Get transport
+		transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR );
+
+		// If no transport, we auto-abort
+		if ( !transport ) {
+			done( -1, "No Transport" );
+		} else {
+			jqXHR.readyState = 1;
+
+			// Send global event
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] );
+			}
+			// Timeout
+			if ( s.async && s.timeout > 0 ) {
+				timeoutTimer = setTimeout(function() {
+					jqXHR.abort("timeout");
+				}, s.timeout );
+			}
+
+			try {
+				state = 1;
+				transport.send( requestHeaders, done );
+			} catch ( e ) {
+				// Propagate exception as error if not done
+				if ( state < 2 ) {
+					done( -1, e );
+				// Simply rethrow otherwise
+				} else {
+					throw e;
+				}
+			}
+		}
+
+		// Callback for when everything is done
+		function done( status, nativeStatusText, responses, headers ) {
+			var isSuccess, success, error, response, modified,
+				statusText = nativeStatusText;
+
+			// Called once
+			if ( state === 2 ) {
+				return;
+			}
+
+			// State is "done" now
+			state = 2;
+
+			// Clear timeout if it exists
+			if ( timeoutTimer ) {
+				clearTimeout( timeoutTimer );
+			}
+
+			// Dereference transport for early garbage collection
+			// (no matter how long the jqXHR object will be used)
+			transport = undefined;
+
+			// Cache response headers
+			responseHeadersString = headers || "";
+
+			// Set readyState
+			jqXHR.readyState = status > 0 ? 4 : 0;
+
+			// Determine if successful
+			isSuccess = status >= 200 && status < 300 || status === 304;
+
+			// Get response data
+			if ( responses ) {
+				response = ajaxHandleResponses( s, jqXHR, responses );
+			}
+
+			// Convert no matter what (that way responseXXX fields are always set)
+			response = ajaxConvert( s, response, jqXHR, isSuccess );
+
+			// If successful, handle type chaining
+			if ( isSuccess ) {
+
+				// Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode.
+				if ( s.ifModified ) {
+					modified = jqXHR.getResponseHeader("Last-Modified");
+					if ( modified ) {
+						jQuery.lastModified[ cacheURL ] = modified;
+					}
+					modified = jqXHR.getResponseHeader("etag");
+					if ( modified ) {
+						jQuery.etag[ cacheURL ] = modified;
+					}
+				}
+
+				// if no content
+				if ( status === 204 || s.type === "HEAD" ) {
+					statusText = "nocontent";
+
+				// if not modified
+				} else if ( status === 304 ) {
+					statusText = "notmodified";
+
+				// If we have data, let's convert it
+				} else {
+					statusText = response.state;
+					success = response.data;
+					error = response.error;
+					isSuccess = !error;
+				}
+			} else {
+				// We extract error from statusText
+				// then normalize statusText and status for non-aborts
+				error = statusText;
+				if ( status || !statusText ) {
+					statusText = "error";
+					if ( status < 0 ) {
+						status = 0;
+					}
+				}
+			}
+
+			// Set data for the fake xhr object
+			jqXHR.status = status;
+			jqXHR.statusText = ( nativeStatusText || statusText ) + "";
+
+			// Success/Error
+			if ( isSuccess ) {
+				deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] );
+			} else {
+				deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] );
+			}
+
+			// Status-dependent callbacks
+			jqXHR.statusCode( statusCode );
+			statusCode = undefined;
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError",
+					[ jqXHR, s, isSuccess ? success : error ] );
+			}
+
+			// Complete
+			completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] );
+
+			if ( fireGlobals ) {
+				globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] );
+				// Handle the global AJAX counter
+				if ( !( --jQuery.active ) ) {
+					jQuery.event.trigger("ajaxStop");
+				}
+			}
+		}
+
+		return jqXHR;
+	},
+
+	getJSON: function( url, data, callback ) {
+		return jQuery.get( url, data, callback, "json" );
+	},
+
+	getScript: function( url, callback ) {
+		return jQuery.get( url, undefined, callback, "script" );
+	}
+});
+
+jQuery.each( [ "get", "post" ], function( i, method ) {
+	jQuery[ method ] = function( url, data, callback, type ) {
+		// shift arguments if data argument was omitted
+		if ( jQuery.isFunction( data ) ) {
+			type = type || callback;
+			callback = data;
+			data = undefined;
+		}
+
+		return jQuery.ajax({
+			url: url,
+			type: method,
+			dataType: type,
+			data: data,
+			success: callback
+		});
+	};
+});
+
+/* Handles responses to an ajax request:
+ * - finds the right dataType (mediates between content-type and expected dataType)
+ * - returns the corresponding response
+ */
+function ajaxHandleResponses( s, jqXHR, responses ) {
+	var firstDataType, ct, finalDataType, type,
+		contents = s.contents,
+		dataTypes = s.dataTypes;
+
+	// Remove auto dataType and get content-type in the process
+	while( dataTypes[ 0 ] === "*" ) {
+		dataTypes.shift();
+		if ( ct === undefined ) {
+			ct = s.mimeType || jqXHR.getResponseHeader("Content-Type");
+		}
+	}
+
+	// Check if we're dealing with a known content-type
+	if ( ct ) {
+		for ( type in contents ) {
+			if ( contents[ type ] && contents[ type ].test( ct ) ) {
+				dataTypes.unshift( type );
+				break;
+			}
+		}
+	}
+
+	// Check to see if we have a response for the expected dataType
+	if ( dataTypes[ 0 ] in responses ) {
+		finalDataType = dataTypes[ 0 ];
+	} else {
+		// Try convertible dataTypes
+		for ( type in responses ) {
+			if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[0] ] ) {
+				finalDataType = type;
+				break;
+			}
+			if ( !firstDataType ) {
+				firstDataType = type;
+			}
+		}
+		// Or just use first one
+		finalDataType = finalDataType || firstDataType;
+	}
+
+	// If we found a dataType
+	// We add the dataType to the list if needed
+	// and return the corresponding response
+	if ( finalDataType ) {
+		if ( finalDataType !== dataTypes[ 0 ] ) {
+			dataTypes.unshift( finalDataType );
+		}
+		return responses[ finalDataType ];
+	}
+}
+
+/* Chain conversions given the request and the original response
+ * Also sets the responseXXX fields on the jqXHR instance
+ */
+function ajaxConvert( s, response, jqXHR, isSuccess ) {
+	var conv2, current, conv, tmp, prev,
+		converters = {},
+		// Work with a copy of dataTypes in case we need to modify it for conversion
+		dataTypes = s.dataTypes.slice();
+
+	// Create converters map with lowercased keys
+	if ( dataTypes[ 1 ] ) {
+		for ( conv in s.converters ) {
+			converters[ conv.toLowerCase() ] = s.converters[ conv ];
+		}
+	}
+
+	current = dataTypes.shift();
+
+	// Convert to each sequential dataType
+	while ( current ) {
+
+		if ( s.responseFields[ current ] ) {
+			jqXHR[ s.responseFields[ current ] ] = response;
+		}
+
+		// Apply the dataFilter if provided
+		if ( !prev && isSuccess && s.dataFilter ) {
+			response = s.dataFilter( response, s.dataType );
+		}
+
+		prev = current;
+		current = dataTypes.shift();
+
+		if ( current ) {
+
+			// There's only work to do if current dataType is non-auto
+			if ( current === "*" ) {
+
+				current = prev;
+
+			// Convert response if prev dataType is non-auto and differs from current
+			} else if ( prev !== "*" && prev !== current ) {
+
+				// Seek a direct converter
+				conv = converters[ prev + " " + current ] || converters[ "* " + current ];
+
+				// If none found, seek a pair
+				if ( !conv ) {
+					for ( conv2 in converters ) {
+
+						// If conv2 outputs current
+						tmp = conv2.split( " " );
+						if ( tmp[ 1 ] === current ) {
+
+							// If prev can be converted to accepted input
+							conv = converters[ prev + " " + tmp[ 0 ] ] ||
+								converters[ "* " + tmp[ 0 ] ];
+							if ( conv ) {
+								// Condense equivalence converters
+								if ( conv === true ) {
+									conv = converters[ conv2 ];
+
+								// Otherwise, insert the intermediate dataType
+								} else if ( converters[ conv2 ] !== true ) {
+									current = tmp[ 0 ];
+									dataTypes.unshift( tmp[ 1 ] );
+								}
+								break;
+							}
+						}
+					}
+				}
+
+				// Apply converter (if not an equivalence)
+				if ( conv !== true ) {
+
+					// Unless errors are allowed to bubble, catch and return them
+					if ( conv && s[ "throws" ] ) {
+						response = conv( response );
+					} else {
+						try {
+							response = conv( response );
+						} catch ( e ) {
+							return { state: "parsererror", error: conv ? e : "No conversion from " + prev + " to " + current };
+						}
+					}
+				}
+			}
+		}
+	}
+
+	return { state: "success", data: response };
+}
+// Install script dataType
+jQuery.ajaxSetup({
+	accepts: {
+		script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
+	},
+	contents: {
+		script: /(?:java|ecma)script/
+	},
+	converters: {
+		"text script": function( text ) {
+			jQuery.globalEval( text );
+			return text;
+		}
+	}
+});
+
+// Handle cache's special case and global
+jQuery.ajaxPrefilter( "script", function( s ) {
+	if ( s.cache === undefined ) {
+		s.cache = false;
+	}
+	if ( s.crossDomain ) {
+		s.type = "GET";
+		s.global = false;
+	}
+});
+
+// Bind script tag hack transport
+jQuery.ajaxTransport( "script", function(s) {
+
+	// This transport only deals with cross domain requests
+	if ( s.crossDomain ) {
+
+		var script,
+			head = document.head || jQuery("head")[0] || document.documentElement;
+
+		return {
+
+			send: function( _, callback ) {
+
+				script = document.createElement("script");
+
+				script.async = true;
+
+				if ( s.scriptCharset ) {
+					script.charset = s.scriptCharset;
+				}
+
+				script.src = s.url;
+
+				// Attach handlers for all browsers
+				script.onload = script.onreadystatechange = function( _, isAbort ) {
+
+					if ( isAbort || !script.readyState || /loaded|complete/.test( script.readyState ) ) {
+
+						// Handle memory leak in IE
+						script.onload = script.onreadystatechange = null;
+
+						// Remove the script
+						if ( script.parentNode ) {
+							script.parentNode.removeChild( script );
+						}
+
+						// Dereference the script
+						script = null;
+
+						// Callback if not abort
+						if ( !isAbort ) {
+							callback( 200, "success" );
+						}
+					}
+				};
+
+				// Circumvent IE6 bugs with base elements (#2709 and #4378) by prepending
+				// Use native DOM manipulation to avoid our domManip AJAX trickery
+				head.insertBefore( script, head.firstChild );
+			},
+
+			abort: function() {
+				if ( script ) {
+					script.onload( undefined, true );
+				}
+			}
+		};
+	}
+});
+var oldCallbacks = [],
+	rjsonp = /(=)\?(?=&|$)|\?\?/;
+
+// Default jsonp settings
+jQuery.ajaxSetup({
+	jsonp: "callback",
+	jsonpCallback: function() {
+		var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( ajax_nonce++ ) );
+		this[ callback ] = true;
+		return callback;
+	}
+});
+
+// Detect, normalize options and install callbacks for jsonp requests
+jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
+
+	var callbackName, overwritten, responseContainer,
+		jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ?
+			"url" :
+			typeof s.data === "string" && !( s.contentType || "" ).indexOf("application/x-www-form-urlencoded") && rjsonp.test( s.data ) && "data"
+		);
+
+	// Handle iff the expected data type is "jsonp" or we have a parameter to set
+	if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
+
+		// Get callback name, remembering preexisting value associated with it
+		callbackName = s.jsonpCallback = jQuery.isFunction( s.jsonpCallback ) ?
+			s.jsonpCallback() :
+			s.jsonpCallback;
+
+		// Insert callback into url or form data
+		if ( jsonProp ) {
+			s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName );
+		} else if ( s.jsonp !== false ) {
+			s.url += ( ajax_rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName;
+		}
+
+		// Use data converter to retrieve json after script execution
+		s.converters["script json"] = function() {
+			if ( !responseContainer ) {
+				jQuery.error( callbackName + " was not called" );
+			}
+			return responseContainer[ 0 ];
+		};
+
+		// force json dataType
+		s.dataTypes[ 0 ] = "json";
+
+		// Install callback
+		overwritten = window[ callbackName ];
+		window[ callbackName ] = function() {
+			responseContainer = arguments;
+		};
+
+		// Clean-up function (fires after converters)
+		jqXHR.always(function() {
+			// Restore preexisting value
+			window[ callbackName ] = overwritten;
+
+			// Save back as free
+			if ( s[ callbackName ] ) {
+				// make sure that re-using the options doesn't screw things around
+				s.jsonpCallback = originalSettings.jsonpCallback;
+
+				// save the callback name for future use
+				oldCallbacks.push( callbackName );
+			}
+
+			// Call if it was a function and we have a response
+			if ( responseContainer && jQuery.isFunction( overwritten ) ) {
+				overwritten( responseContainer[ 0 ] );
+			}
+
+			responseContainer = overwritten = undefined;
+		});
+
+		// Delegate to script
+		return "script";
+	}
+});
+var xhrCallbacks, xhrSupported,
+	xhrId = 0,
+	// #5280: Internet Explorer will keep connections alive if we don't abort on unload
+	xhrOnUnloadAbort = window.ActiveXObject && function() {
+		// Abort all pending requests
+		var key;
+		for ( key in xhrCallbacks ) {
+			xhrCallbacks[ key ]( undefined, true );
+		}
+	};
+
+// Functions to create xhrs
+function createStandardXHR() {
+	try {
+		return new window.XMLHttpRequest();
+	} catch( e ) {}
+}
+
+function createActiveXHR() {
+	try {
+		return new window.ActiveXObject("Microsoft.XMLHTTP");
+	} catch( e ) {}
+}
+
+// Create the request object
+// (This is still attached to ajaxSettings for backward compatibility)
+jQuery.ajaxSettings.xhr = window.ActiveXObject ?
+	/* Microsoft failed to properly
+	 * implement the XMLHttpRequest in IE7 (can't request local files),
+	 * so we use the ActiveXObject when it is available
+	 * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+	 * we need a fallback.
+	 */
+	function() {
+		return !this.isLocal && createStandardXHR() || createActiveXHR();
+	} :
+	// For all other browsers, use the standard XMLHttpRequest object
+	createStandardXHR;
+
+// Determine support properties
+xhrSupported = jQuery.ajaxSettings.xhr();
+jQuery.support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported );
+xhrSupported = jQuery.support.ajax = !!xhrSupported;
+
+// Create transport if the browser can provide an xhr
+if ( xhrSupported ) {
+
+	jQuery.ajaxTransport(function( s ) {
+		// Cross domain only allowed if supported through XMLHttpRequest
+		if ( !s.crossDomain || jQuery.support.cors ) {
+
+			var callback;
+
+			return {
+				send: function( headers, complete ) {
+
+					// Get a new xhr
+					var handle, i,
+						xhr = s.xhr();
+
+					// Open the socket
+					// Passing null username, generates a login popup on Opera (#2865)
+					if ( s.username ) {
+						xhr.open( s.type, s.url, s.async, s.username, s.password );
+					} else {
+						xhr.open( s.type, s.url, s.async );
+					}
+
+					// Apply custom fields if provided
+					if ( s.xhrFields ) {
+						for ( i in s.xhrFields ) {
+							xhr[ i ] = s.xhrFields[ i ];
+						}
+					}
+
+					// Override mime type if needed
+					if ( s.mimeType && xhr.overrideMimeType ) {
+						xhr.overrideMimeType( s.mimeType );
+					}
+
+					// X-Requested-With header
+					// For cross-domain requests, seeing as conditions for a preflight are
+					// akin to a jigsaw puzzle, we simply never set it to be sure.
+					// (it can always be set on a per-request basis or even using ajaxSetup)
+					// For same-domain requests, won't change header if already provided.
+					if ( !s.crossDomain && !headers["X-Requested-With"] ) {
+						headers["X-Requested-With"] = "XMLHttpRequest";
+					}
+
+					// Need an extra try/catch for cross domain requests in Firefox 3
+					try {
+						for ( i in headers ) {
+							xhr.setRequestHeader( i, headers[ i ] );
+						}
+					} catch( err ) {}
+
+					// Do send the request
+					// This may raise an exception which is actually
+					// handled in jQuery.ajax (so no try/catch here)
+					xhr.send( ( s.hasContent && s.data ) || null );
+
+					// Listener
+					callback = function( _, isAbort ) {
+						var status, responseHeaders, statusText, responses;
+
+						// Firefox throws exceptions when accessing properties
+						// of an xhr when a network error occurred
+						// http://helpful.knobs-dials.com/index.php/Component_returned_failure_code:_0x80040111_(NS_ERROR_NOT_AVAILABLE)
+						try {
+
+							// Was never called and is aborted or complete
+							if ( callback && ( isAbort || xhr.readyState === 4 ) ) {
+
+								// Only called once
+								callback = undefined;
+
+								// Do not keep as active anymore
+								if ( handle ) {
+									xhr.onreadystatechange = jQuery.noop;
+									if ( xhrOnUnloadAbort ) {
+										delete xhrCallbacks[ handle ];
+									}
+								}
+
+								// If it's an abort
+								if ( isAbort ) {
+									// Abort it manually if needed
+									if ( xhr.readyState !== 4 ) {
+										xhr.abort();
+									}
+								} else {
+									responses = {};
+									status = xhr.status;
+									responseHeaders = xhr.getAllResponseHeaders();
+
+									// When requesting binary data, IE6-9 will throw an exception
+									// on any attempt to access responseText (#11426)
+									if ( typeof xhr.responseText === "string" ) {
+										responses.text = xhr.responseText;
+									}
+
+									// Firefox throws an exception when accessing
+									// statusText for faulty cross-domain requests
+									try {
+										statusText = xhr.statusText;
+									} catch( e ) {
+										// We normalize with Webkit giving an empty statusText
+										statusText = "";
+									}
+
+									// Filter status for non standard behaviors
+
+									// If the request is local and we have data: assume a success
+									// (success with no data won't get notified, that's the best we
+									// can do given current implementations)
+									if ( !status && s.isLocal && !s.crossDomain ) {
+										status = responses.text ? 200 : 404;
+									// IE - #1450: sometimes returns 1223 when it should be 204
+									} else if ( status === 1223 ) {
+										status = 204;
+									}
+								}
+							}
+						} catch( firefoxAccessException ) {
+							if ( !isAbort ) {
+								complete( -1, firefoxAccessException );
+							}
+						}
+
+						// Call complete if needed
+						if ( responses ) {
+							complete( status, statusText, responses, responseHeaders );
+						}
+					};
+
+					if ( !s.async ) {
+						// if we're in sync mode we fire the callback
+						callback();
+					} else if ( xhr.readyState === 4 ) {
+						// (IE6 & IE7) if it's in cache and has been
+						// retrieved directly we need to fire the callback
+						setTimeout( callback );
+					} else {
+						handle = ++xhrId;
+						if ( xhrOnUnloadAbort ) {
+							// Create the active xhrs callbacks list if needed
+							// and attach the unload handler
+							if ( !xhrCallbacks ) {
+								xhrCallbacks = {};
+								jQuery( window ).unload( xhrOnUnloadAbort );
+							}
+							// Add to list of active xhrs callbacks
+							xhrCallbacks[ handle ] = callback;
+						}
+						xhr.onreadystatechange = callback;
+					}
+				},
+
+				abort: function() {
+					if ( callback ) {
+						callback( undefined, true );
+					}
+				}
+			};
+		}
+	});
+}
+var fxNow, timerId,
+	rfxtypes = /^(?:toggle|show|hide)$/,
+	rfxnum = new RegExp( "^(?:([+-])=|)(" + core_pnum + ")([a-z%]*)$", "i" ),
+	rrun = /queueHooks$/,
+	animationPrefilters = [ defaultPrefilter ],
+	tweeners = {
+		"*": [function( prop, value ) {
+			var tween = this.createTween( prop, value ),
+				target = tween.cur(),
+				parts = rfxnum.exec( value ),
+				unit = parts && parts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
+
+				// Starting value computation is required for potential unit mismatches
+				start = ( jQuery.cssNumber[ prop ] || unit !== "px" && +target ) &&
+					rfxnum.exec( jQuery.css( tween.elem, prop ) ),
+				scale = 1,
+				maxIterations = 20;
+
+			if ( start && start[ 3 ] !== unit ) {
+				// Trust units reported by jQuery.css
+				unit = unit || start[ 3 ];
+
+				// Make sure we update the tween properties later on
+				parts = parts || [];
+
+				// Iteratively approximate from a nonzero starting point
+				start = +target || 1;
+
+				do {
+					// If previous iteration zeroed out, double until we get *something*
+					// Use a string for doubling factor so we don't accidentally see scale as unchanged below
+					scale = scale || ".5";
+
+					// Adjust and apply
+					start = start / scale;
+					jQuery.style( tween.elem, prop, start + unit );
+
+				// Update scale, tolerating zero or NaN from tween.cur()
+				// And breaking the loop if scale is unchanged or perfect, or if we've just had enough
+				} while ( scale !== (scale = tween.cur() / target) && scale !== 1 && --maxIterations );
+			}
+
+			// Update tween properties
+			if ( parts ) {
+				start = tween.start = +start || +target || 0;
+				tween.unit = unit;
+				// If a +=/-= token was provided, we're doing a relative animation
+				tween.end = parts[ 1 ] ?
+					start + ( parts[ 1 ] + 1 ) * parts[ 2 ] :
+					+parts[ 2 ];
+			}
+
+			return tween;
+		}]
+	};
+
+// Animations created synchronously will run synchronously
+function createFxNow() {
+	setTimeout(function() {
+		fxNow = undefined;
+	});
+	return ( fxNow = jQuery.now() );
+}
+
+function createTween( value, prop, animation ) {
+	var tween,
+		collection = ( tweeners[ prop ] || [] ).concat( tweeners[ "*" ] ),
+		index = 0,
+		length = collection.length;
+	for ( ; index < length; index++ ) {
+		if ( (tween = collection[ index ].call( animation, prop, value )) ) {
+
+			// we're done with this property
+			return tween;
+		}
+	}
+}
+
+function Animation( elem, properties, options ) {
+	var result,
+		stopped,
+		index = 0,
+		length = animationPrefilters.length,
+		deferred = jQuery.Deferred().always( function() {
+			// don't match elem in the :animated selector
+			delete tick.elem;
+		}),
+		tick = function() {
+			if ( stopped ) {
+				return false;
+			}
+			var currentTime = fxNow || createFxNow(),
+				remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ),
+				// archaic crash bug won't allow us to use 1 - ( 0.5 || 0 ) (#12497)
+				temp = remaining / animation.duration || 0,
+				percent = 1 - temp,
+				index = 0,
+				length = animation.tweens.length;
+
+			for ( ; index < length ; index++ ) {
+				animation.tweens[ index ].run( percent );
+			}
+
+			deferred.notifyWith( elem, [ animation, percent, remaining ]);
+
+			if ( percent < 1 && length ) {
+				return remaining;
+			} else {
+				deferred.resolveWith( elem, [ animation ] );
+				return false;
+			}
+		},
+		animation = deferred.promise({
+			elem: elem,
+			props: jQuery.extend( {}, properties ),
+			opts: jQuery.extend( true, { specialEasing: {} }, options ),
+			originalProperties: properties,
+			originalOptions: options,
+			startTime: fxNow || createFxNow(),
+			duration: options.duration,
+			tweens: [],
+			createTween: function( prop, end ) {
+				var tween = jQuery.Tween( elem, animation.opts, prop, end,
+						animation.opts.specialEasing[ prop ] || animation.opts.easing );
+				animation.tweens.push( tween );
+				return tween;
+			},
+			stop: function( gotoEnd ) {
+				var index = 0,
+					// if we are going to the end, we want to run all the tweens
+					// otherwise we skip this part
+					length = gotoEnd ? animation.tweens.length : 0;
+				if ( stopped ) {
+					return this;
+				}
+				stopped = true;
+				for ( ; index < length ; index++ ) {
+					animation.tweens[ index ].run( 1 );
+				}
+
+				// resolve when we played the last frame
+				// otherwise, reject
+				if ( gotoEnd ) {
+					deferred.resolveWith( elem, [ animation, gotoEnd ] );
+				} else {
+					deferred.rejectWith( elem, [ animation, gotoEnd ] );
+				}
+				return this;
+			}
+		}),
+		props = animation.props;
+
+	propFilter( props, animation.opts.specialEasing );
+
+	for ( ; index < length ; index++ ) {
+		result = animationPrefilters[ index ].call( animation, elem, props, animation.opts );
+		if ( result ) {
+			return result;
+		}
+	}
+
+	jQuery.map( props, createTween, animation );
+
+	if ( jQuery.isFunction( animation.opts.start ) ) {
+		animation.opts.start.call( elem, animation );
+	}
+
+	jQuery.fx.timer(
+		jQuery.extend( tick, {
+			elem: elem,
+			anim: animation,
+			queue: animation.opts.queue
+		})
+	);
+
+	// attach callbacks from options
+	return animation.progress( animation.opts.progress )
+		.done( animation.opts.done, animation.opts.complete )
+		.fail( animation.opts.fail )
+		.always( animation.opts.always );
+}
+
+function propFilter( props, specialEasing ) {
+	var index, name, easing, value, hooks;
+
+	// camelCase, specialEasing and expand cssHook pass
+	for ( index in props ) {
+		name = jQuery.camelCase( index );
+		easing = specialEasing[ name ];
+		value = props[ index ];
+		if ( jQuery.isArray( value ) ) {
+			easing = value[ 1 ];
+			value = props[ index ] = value[ 0 ];
+		}
+
+		if ( index !== name ) {
+			props[ name ] = value;
+			delete props[ index ];
+		}
+
+		hooks = jQuery.cssHooks[ name ];
+		if ( hooks && "expand" in hooks ) {
+			value = hooks.expand( value );
+			delete props[ name ];
+
+			// not quite $.extend, this wont overwrite keys already present.
+			// also - reusing 'index' from above because we have the correct "name"
+			for ( index in value ) {
+				if ( !( index in props ) ) {
+					props[ index ] = value[ index ];
+					specialEasing[ index ] = easing;
+				}
+			}
+		} else {
+			specialEasing[ name ] = easing;
+		}
+	}
+}
+
+jQuery.Animation = jQuery.extend( Animation, {
+
+	tweener: function( props, callback ) {
+		if ( jQuery.isFunction( props ) ) {
+			callback = props;
+			props = [ "*" ];
+		} else {
+			props = props.split(" ");
+		}
+
+		var prop,
+			index = 0,
+			length = props.length;
+
+		for ( ; index < length ; index++ ) {
+			prop = props[ index ];
+			tweeners[ prop ] = tweeners[ prop ] || [];
+			tweeners[ prop ].unshift( callback );
+		}
+	},
+
+	prefilter: function( callback, prepend ) {
+		if ( prepend ) {
+			animationPrefilters.unshift( callback );
+		} else {
+			animationPrefilters.push( callback );
+		}
+	}
+});
+
+function defaultPrefilter( elem, props, opts ) {
+	/* jshint validthis: true */
+	var prop, value, toggle, tween, hooks, oldfire,
+		anim = this,
+		orig = {},
+		style = elem.style,
+		hidden = elem.nodeType && isHidden( elem ),
+		dataShow = jQuery._data( elem, "fxshow" );
+
+	// handle queue: false promises
+	if ( !opts.queue ) {
+		hooks = jQuery._queueHooks( elem, "fx" );
+		if ( hooks.unqueued == null ) {
+			hooks.unqueued = 0;
+			oldfire = hooks.empty.fire;
+			hooks.empty.fire = function() {
+				if ( !hooks.unqueued ) {
+					oldfire();
+				}
+			};
+		}
+		hooks.unqueued++;
+
+		anim.always(function() {
+			// doing this makes sure that the complete handler will be called
+			// before this completes
+			anim.always(function() {
+				hooks.unqueued--;
+				if ( !jQuery.queue( elem, "fx" ).length ) {
+					hooks.empty.fire();
+				}
+			});
+		});
+	}
+
+	// height/width overflow pass
+	if ( elem.nodeType === 1 && ( "height" in props || "width" in props ) ) {
+		// Make sure that nothing sneaks out
+		// Record all 3 overflow attributes because IE does not
+		// change the overflow attribute when overflowX and
+		// overflowY are set to the same value
+		opts.overflow = [ style.overflow, style.overflowX, style.overflowY ];
+
+		// Set display property to inline-block for height/width
+		// animations on inline elements that are having width/height animated
+		if ( jQuery.css( elem, "display" ) === "inline" &&
+				jQuery.css( elem, "float" ) === "none" ) {
+
+			// inline-level elements accept inline-block;
+			// block-level elements need to be inline with layout
+			if ( !jQuery.support.inlineBlockNeedsLayout || css_defaultDisplay( elem.nodeName ) === "inline" ) {
+				style.display = "inline-block";
+
+			} else {
+				style.zoom = 1;
+			}
+		}
+	}
+
+	if ( opts.overflow ) {
+		style.overflow = "hidden";
+		if ( !jQuery.support.shrinkWrapBlocks ) {
+			anim.always(function() {
+				style.overflow = opts.overflow[ 0 ];
+				style.overflowX = opts.overflow[ 1 ];
+				style.overflowY = opts.overflow[ 2 ];
+			});
+		}
+	}
+
+
+	// show/hide pass
+	for ( prop in props ) {
+		value = props[ prop ];
+		if ( rfxtypes.exec( value ) ) {
+			delete props[ prop ];
+			toggle = toggle || value === "toggle";
+			if ( value === ( hidden ? "hide" : "show" ) ) {
+				continue;
+			}
+			orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop );
+		}
+	}
+
+	if ( !jQuery.isEmptyObject( orig ) ) {
+		if ( dataShow ) {
+			if ( "hidden" in dataShow ) {
+				hidden = dataShow.hidden;
+			}
+		} else {
+			dataShow = jQuery._data( elem, "fxshow", {} );
+		}
+
+		// store state if its toggle - enables .stop().toggle() to "reverse"
+		if ( toggle ) {
+			dataShow.hidden = !hidden;
+		}
+		if ( hidden ) {
+			jQuery( elem ).show();
+		} else {
+			anim.done(function() {
+				jQuery( elem ).hide();
+			});
+		}
+		anim.done(function() {
+			var prop;
+			jQuery._removeData( elem, "fxshow" );
+			for ( prop in orig ) {
+				jQuery.style( elem, prop, orig[ prop ] );
+			}
+		});
+		for ( prop in orig ) {
+			tween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim );
+
+			if ( !( prop in dataShow ) ) {
+				dataShow[ prop ] = tween.start;
+				if ( hidden ) {
+					tween.end = tween.start;
+					tween.start = prop === "width" || prop === "height" ? 1 : 0;
+				}
+			}
+		}
+	}
+}
+
+function Tween( elem, options, prop, end, easing ) {
+	return new Tween.prototype.init( elem, options, prop, end, easing );
+}
+jQuery.Tween = Tween;
+
+Tween.prototype = {
+	constructor: Tween,
+	init: function( elem, options, prop, end, easing, unit ) {
+		this.elem = elem;
+		this.prop = prop;
+		this.easing = easing || "swing";
+		this.options = options;
+		this.start = this.now = this.cur();
+		this.end = end;
+		this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" );
+	},
+	cur: function() {
+		var hooks = Tween.propHooks[ this.prop ];
+
+		return hooks && hooks.get ?
+			hooks.get( this ) :
+			Tween.propHooks._default.get( this );
+	},
+	run: function( percent ) {
+		var eased,
+			hooks = Tween.propHooks[ this.prop ];
+
+		if ( this.options.duration ) {
+			this.pos = eased = jQuery.easing[ this.easing ](
+				percent, this.options.duration * percent, 0, 1, this.options.duration
+			);
+		} else {
+			this.pos = eased = percent;
+		}
+		this.now = ( this.end - this.start ) * eased + this.start;
+
+		if ( this.options.step ) {
+			this.options.step.call( this.elem, this.now, this );
+		}
+
+		if ( hooks && hooks.set ) {
+			hooks.set( this );
+		} else {
+			Tween.propHooks._default.set( this );
+		}
+		return this;
+	}
+};
+
+Tween.prototype.init.prototype = Tween.prototype;
+
+Tween.propHooks = {
+	_default: {
+		get: function( tween ) {
+			var result;
+
+			if ( tween.elem[ tween.prop ] != null &&
+				(!tween.elem.style || tween.elem.style[ tween.prop ] == null) ) {
+				return tween.elem[ tween.prop ];
+			}
+
+			// passing an empty string as a 3rd parameter to .css will automatically
+			// attempt a parseFloat and fallback to a string if the parse fails
+			// so, simple values such as "10px" are parsed to Float.
+			// complex values such as "rotate(1rad)" are returned as is.
+			result = jQuery.css( tween.elem, tween.prop, "" );
+			// Empty strings, null, undefined and "auto" are converted to 0.
+			return !result || result === "auto" ? 0 : result;
+		},
+		set: function( tween ) {
+			// use step hook for back compat - use cssHook if its there - use .style if its
+			// available and use plain properties where available
+			if ( jQuery.fx.step[ tween.prop ] ) {
+				jQuery.fx.step[ tween.prop ]( tween );
+			} else if ( tween.elem.style && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) {
+				jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
+			} else {
+				tween.elem[ tween.prop ] = tween.now;
+			}
+		}
+	}
+};
+
+// Support: IE <=9
+// Panic based approach to setting things on disconnected nodes
+
+Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
+	set: function( tween ) {
+		if ( tween.elem.nodeType && tween.elem.parentNode ) {
+			tween.elem[ tween.prop ] = tween.now;
+		}
+	}
+};
+
+jQuery.each([ "toggle", "show", "hide" ], function( i, name ) {
+	var cssFn = jQuery.fn[ name ];
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return speed == null || typeof speed === "boolean" ?
+			cssFn.apply( this, arguments ) :
+			this.animate( genFx( name, true ), speed, easing, callback );
+	};
+});
+
+jQuery.fn.extend({
+	fadeTo: function( speed, to, easing, callback ) {
+
+		// show any hidden elements after setting opacity to 0
+		return this.filter( isHidden ).css( "opacity", 0 ).show()
+
+			// animate to the value specified
+			.end().animate({ opacity: to }, speed, easing, callback );
+	},
+	animate: function( prop, speed, easing, callback ) {
+		var empty = jQuery.isEmptyObject( prop ),
+			optall = jQuery.speed( speed, easing, callback ),
+			doAnimation = function() {
+				// Operate on a copy of prop so per-property easing won't be lost
+				var anim = Animation( this, jQuery.extend( {}, prop ), optall );
+
+				// Empty animations, or finishing resolves immediately
+				if ( empty || jQuery._data( this, "finish" ) ) {
+					anim.stop( true );
+				}
+			};
+			doAnimation.finish = doAnimation;
+
+		return empty || optall.queue === false ?
+			this.each( doAnimation ) :
+			this.queue( optall.queue, doAnimation );
+	},
+	stop: function( type, clearQueue, gotoEnd ) {
+		var stopQueue = function( hooks ) {
+			var stop = hooks.stop;
+			delete hooks.stop;
+			stop( gotoEnd );
+		};
+
+		if ( typeof type !== "string" ) {
+			gotoEnd = clearQueue;
+			clearQueue = type;
+			type = undefined;
+		}
+		if ( clearQueue && type !== false ) {
+			this.queue( type || "fx", [] );
+		}
+
+		return this.each(function() {
+			var dequeue = true,
+				index = type != null && type + "queueHooks",
+				timers = jQuery.timers,
+				data = jQuery._data( this );
+
+			if ( index ) {
+				if ( data[ index ] && data[ index ].stop ) {
+					stopQueue( data[ index ] );
+				}
+			} else {
+				for ( index in data ) {
+					if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) {
+						stopQueue( data[ index ] );
+					}
+				}
+			}
+
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && (type == null || timers[ index ].queue === type) ) {
+					timers[ index ].anim.stop( gotoEnd );
+					dequeue = false;
+					timers.splice( index, 1 );
+				}
+			}
+
+			// start the next in the queue if the last step wasn't forced
+			// timers currently will call their complete callbacks, which will dequeue
+			// but only if they were gotoEnd
+			if ( dequeue || !gotoEnd ) {
+				jQuery.dequeue( this, type );
+			}
+		});
+	},
+	finish: function( type ) {
+		if ( type !== false ) {
+			type = type || "fx";
+		}
+		return this.each(function() {
+			var index,
+				data = jQuery._data( this ),
+				queue = data[ type + "queue" ],
+				hooks = data[ type + "queueHooks" ],
+				timers = jQuery.timers,
+				length = queue ? queue.length : 0;
+
+			// enable finishing flag on private data
+			data.finish = true;
+
+			// empty the queue first
+			jQuery.queue( this, type, [] );
+
+			if ( hooks && hooks.stop ) {
+				hooks.stop.call( this, true );
+			}
+
+			// look for any active animations, and finish them
+			for ( index = timers.length; index--; ) {
+				if ( timers[ index ].elem === this && timers[ index ].queue === type ) {
+					timers[ index ].anim.stop( true );
+					timers.splice( index, 1 );
+				}
+			}
+
+			// look for any animations in the old queue and finish them
+			for ( index = 0; index < length; index++ ) {
+				if ( queue[ index ] && queue[ index ].finish ) {
+					queue[ index ].finish.call( this );
+				}
+			}
+
+			// turn off finishing flag
+			delete data.finish;
+		});
+	}
+});
+
+// Generate parameters to create a standard animation
+function genFx( type, includeWidth ) {
+	var which,
+		attrs = { height: type },
+		i = 0;
+
+	// if we include width, step value is 1 to do all cssExpand values,
+	// if we don't include width, step value is 2 to skip over Left and Right
+	includeWidth = includeWidth? 1 : 0;
+	for( ; i < 4 ; i += 2 - includeWidth ) {
+		which = cssExpand[ i ];
+		attrs[ "margin" + which ] = attrs[ "padding" + which ] = type;
+	}
+
+	if ( includeWidth ) {
+		attrs.opacity = attrs.width = type;
+	}
+
+	return attrs;
+}
+
+// Generate shortcuts for custom animations
+jQuery.each({
+	slideDown: genFx("show"),
+	slideUp: genFx("hide"),
+	slideToggle: genFx("toggle"),
+	fadeIn: { opacity: "show" },
+	fadeOut: { opacity: "hide" },
+	fadeToggle: { opacity: "toggle" }
+}, function( name, props ) {
+	jQuery.fn[ name ] = function( speed, easing, callback ) {
+		return this.animate( props, speed, easing, callback );
+	};
+});
+
+jQuery.speed = function( speed, easing, fn ) {
+	var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : {
+		complete: fn || !fn && easing ||
+			jQuery.isFunction( speed ) && speed,
+		duration: speed,
+		easing: fn && easing || easing && !jQuery.isFunction( easing ) && easing
+	};
+
+	opt.duration = jQuery.fx.off ? 0 : typeof opt.duration === "number" ? opt.duration :
+		opt.duration in jQuery.fx.speeds ? jQuery.fx.speeds[ opt.duration ] : jQuery.fx.speeds._default;
+
+	// normalize opt.queue - true/undefined/null -> "fx"
+	if ( opt.queue == null || opt.queue === true ) {
+		opt.queue = "fx";
+	}
+
+	// Queueing
+	opt.old = opt.complete;
+
+	opt.complete = function() {
+		if ( jQuery.isFunction( opt.old ) ) {
+			opt.old.call( this );
+		}
+
+		if ( opt.queue ) {
+			jQuery.dequeue( this, opt.queue );
+		}
+	};
+
+	return opt;
+};
+
+jQuery.easing = {
+	linear: function( p ) {
+		return p;
+	},
+	swing: function( p ) {
+		return 0.5 - Math.cos( p*Math.PI ) / 2;
+	}
+};
+
+jQuery.timers = [];
+jQuery.fx = Tween.prototype.init;
+jQuery.fx.tick = function() {
+	var timer,
+		timers = jQuery.timers,
+		i = 0;
+
+	fxNow = jQuery.now();
+
+	for ( ; i < timers.length; i++ ) {
+		timer = timers[ i ];
+		// Checks the timer has not already been removed
+		if ( !timer() && timers[ i ] === timer ) {
+			timers.splice( i--, 1 );
+		}
+	}
+
+	if ( !timers.length ) {
+		jQuery.fx.stop();
+	}
+	fxNow = undefined;
+};
+
+jQuery.fx.timer = function( timer ) {
+	if ( timer() && jQuery.timers.push( timer ) ) {
+		jQuery.fx.start();
+	}
+};
+
+jQuery.fx.interval = 13;
+
+jQuery.fx.start = function() {
+	if ( !timerId ) {
+		timerId = setInterval( jQuery.fx.tick, jQuery.fx.interval );
+	}
+};
+
+jQuery.fx.stop = function() {
+	clearInterval( timerId );
+	timerId = null;
+};
+
+jQuery.fx.speeds = {
+	slow: 600,
+	fast: 200,
+	// Default speed
+	_default: 400
+};
+
+// Back Compat <1.8 extension point
+jQuery.fx.step = {};
+
+if ( jQuery.expr && jQuery.expr.filters ) {
+	jQuery.expr.filters.animated = function( elem ) {
+		return jQuery.grep(jQuery.timers, function( fn ) {
+			return elem === fn.elem;
+		}).length;
+	};
+}
+jQuery.fn.offset = function( options ) {
+	if ( arguments.length ) {
+		return options === undefined ?
+			this :
+			this.each(function( i ) {
+				jQuery.offset.setOffset( this, options, i );
+			});
+	}
+
+	var docElem, win,
+		box = { top: 0, left: 0 },
+		elem = this[ 0 ],
+		doc = elem && elem.ownerDocument;
+
+	if ( !doc ) {
+		return;
+	}
+
+	docElem = doc.documentElement;
+
+	// Make sure it's not a disconnected DOM node
+	if ( !jQuery.contains( docElem, elem ) ) {
+		return box;
+	}
+
+	// If we don't have gBCR, just use 0,0 rather than error
+	// BlackBerry 5, iOS 3 (original iPhone)
+	if ( typeof elem.getBoundingClientRect !== core_strundefined ) {
+		box = elem.getBoundingClientRect();
+	}
+	win = getWindow( doc );
+	return {
+		top: box.top  + ( win.pageYOffset || docElem.scrollTop )  - ( docElem.clientTop  || 0 ),
+		left: box.left + ( win.pageXOffset || docElem.scrollLeft ) - ( docElem.clientLeft || 0 )
+	};
+};
+
+jQuery.offset = {
+
+	setOffset: function( elem, options, i ) {
+		var position = jQuery.css( elem, "position" );
+
+		// set position first, in-case top/left are set even on static elem
+		if ( position === "static" ) {
+			elem.style.position = "relative";
+		}
+
+		var curElem = jQuery( elem ),
+			curOffset = curElem.offset(),
+			curCSSTop = jQuery.css( elem, "top" ),
+			curCSSLeft = jQuery.css( elem, "left" ),
+			calculatePosition = ( position === "absolute" || position === "fixed" ) && jQuery.inArray("auto", [curCSSTop, curCSSLeft]) > -1,
+			props = {}, curPosition = {}, curTop, curLeft;
+
+		// need to be able to calculate position if either top or left is auto and position is either absolute or fixed
+		if ( calculatePosition ) {
+			curPosition = curElem.position();
+			curTop = curPosition.top;
+			curLeft = curPosition.left;
+		} else {
+			curTop = parseFloat( curCSSTop ) || 0;
+			curLeft = parseFloat( curCSSLeft ) || 0;
+		}
+
+		if ( jQuery.isFunction( options ) ) {
+			options = options.call( elem, i, curOffset );
+		}
+
+		if ( options.top != null ) {
+			props.top = ( options.top - curOffset.top ) + curTop;
+		}
+		if ( options.left != null ) {
+			props.left = ( options.left - curOffset.left ) + curLeft;
+		}
+
+		if ( "using" in options ) {
+			options.using.call( elem, props );
+		} else {
+			curElem.css( props );
+		}
+	}
+};
+
+
+jQuery.fn.extend({
+
+	position: function() {
+		if ( !this[ 0 ] ) {
+			return;
+		}
+
+		var offsetParent, offset,
+			parentOffset = { top: 0, left: 0 },
+			elem = this[ 0 ];
+
+		// fixed elements are offset from window (parentOffset = {top:0, left: 0}, because it is it's only offset parent
+		if ( jQuery.css( elem, "position" ) === "fixed" ) {
+			// we assume that getBoundingClientRect is available when computed position is fixed
+			offset = elem.getBoundingClientRect();
+		} else {
+			// Get *real* offsetParent
+			offsetParent = this.offsetParent();
+
+			// Get correct offsets
+			offset = this.offset();
+			if ( !jQuery.nodeName( offsetParent[ 0 ], "html" ) ) {
+				parentOffset = offsetParent.offset();
+			}
+
+			// Add offsetParent borders
+			parentOffset.top  += jQuery.css( offsetParent[ 0 ], "borderTopWidth", true );
+			parentOffset.left += jQuery.css( offsetParent[ 0 ], "borderLeftWidth", true );
+		}
+
+		// Subtract parent offsets and element margins
+		// note: when an element has margin: auto the offsetLeft and marginLeft
+		// are the same in Safari causing offset.left to incorrectly be 0
+		return {
+			top:  offset.top  - parentOffset.top - jQuery.css( elem, "marginTop", true ),
+			left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true)
+		};
+	},
+
+	offsetParent: function() {
+		return this.map(function() {
+			var offsetParent = this.offsetParent || docElem;
+			while ( offsetParent && ( !jQuery.nodeName( offsetParent, "html" ) && jQuery.css( offsetParent, "position") === "static" ) ) {
+				offsetParent = offsetParent.offsetParent;
+			}
+			return offsetParent || docElem;
+		});
+	}
+});
+
+
+// Create scrollLeft and scrollTop methods
+jQuery.each( {scrollLeft: "pageXOffset", scrollTop: "pageYOffset"}, function( method, prop ) {
+	var top = /Y/.test( prop );
+
+	jQuery.fn[ method ] = function( val ) {
+		return jQuery.access( this, function( elem, method, val ) {
+			var win = getWindow( elem );
+
+			if ( val === undefined ) {
+				return win ? (prop in win) ? win[ prop ] :
+					win.document.documentElement[ method ] :
+					elem[ method ];
+			}
+
+			if ( win ) {
+				win.scrollTo(
+					!top ? val : jQuery( win ).scrollLeft(),
+					top ? val : jQuery( win ).scrollTop()
+				);
+
+			} else {
+				elem[ method ] = val;
+			}
+		}, method, val, arguments.length, null );
+	};
+});
+
+function getWindow( elem ) {
+	return jQuery.isWindow( elem ) ?
+		elem :
+		elem.nodeType === 9 ?
+			elem.defaultView || elem.parentWindow :
+			false;
+}
+// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
+jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
+	jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name }, function( defaultExtra, funcName ) {
+		// margin is only for outerHeight, outerWidth
+		jQuery.fn[ funcName ] = function( margin, value ) {
+			var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ),
+				extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" );
+
+			return jQuery.access( this, function( elem, type, value ) {
+				var doc;
+
+				if ( jQuery.isWindow( elem ) ) {
+					// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
+					// isn't a whole lot we can do. See pull request at this URL for discussion:
+					// https://github.com/jquery/jquery/pull/764
+					return elem.document.documentElement[ "client" + name ];
+				}
+
+				// Get document width or height
+				if ( elem.nodeType === 9 ) {
+					doc = elem.documentElement;
+
+					// Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest
+					// unfortunately, this causes bug #3838 in IE6/8 only, but there is currently no good, small way to fix it.
+					return Math.max(
+						elem.body[ "scroll" + name ], doc[ "scroll" + name ],
+						elem.body[ "offset" + name ], doc[ "offset" + name ],
+						doc[ "client" + name ]
+					);
+				}
+
+				return value === undefined ?
+					// Get width or height on the element, requesting but not forcing parseFloat
+					jQuery.css( elem, type, extra ) :
+
+					// Set width or height on the element
+					jQuery.style( elem, type, value, extra );
+			}, type, chainable ? margin : undefined, chainable, null );
+		};
+	});
+});
+// Limit scope pollution from any deprecated API
+// (function() {
+
+// The number of elements contained in the matched element set
+jQuery.fn.size = function() {
+	return this.length;
+};
+
+jQuery.fn.andSelf = jQuery.fn.addBack;
+
+// })();
+if ( typeof module === "object" && module && typeof module.exports === "object" ) {
+	// Expose jQuery as module.exports in loaders that implement the Node
+	// module pattern (including browserify). Do not create the global, since
+	// the user will be storing it themselves locally, and globals are frowned
+	// upon in the Node module world.
+	module.exports = jQuery;
+} else {
+	// Otherwise expose jQuery to the global object as usual
+	window.jQuery = window.$ = jQuery;
+
+	// Register as a named AMD module, since jQuery can be concatenated with other
+	// files that may use define, but not via a proper concatenation script that
+	// understands anonymous AMD modules. A named AMD is safest and most robust
+	// way to register. Lowercase jquery is used because AMD module names are
+	// derived from file names, and jQuery is normally delivered in a lowercase
+	// file name. Do this after creating the global so that if an AMD module wants
+	// to call noConflict to hide this version of jQuery, it will work.
+	if ( typeof define === "function" && define.amd ) {
+		define( "jquery", [], function () { return jQuery; } );
+	}
+}
+
+})( window );
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-ui.css	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,544 @@
+/*! jQuery UI - v1.11.4 - 2015-05-20
+* http://jqueryui.com
+* Includes: core.css, autocomplete.css, menu.css, theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden {
+	display: none;
+}
+.ui-helper-hidden-accessible {
+	border: 0;
+	clip: rect(0 0 0 0);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute;
+	width: 1px;
+}
+.ui-helper-reset {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	line-height: 1.3;
+	text-decoration: none;
+	font-size: 100%;
+	list-style: none;
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+	content: "";
+	display: table;
+	border-collapse: collapse;
+}
+.ui-helper-clearfix:after {
+	clear: both;
+}
+.ui-helper-clearfix {
+	min-height: 0; /* support: IE7 */
+}
+.ui-helper-zfix {
+	width: 100%;
+	height: 100%;
+	top: 0;
+	left: 0;
+	position: absolute;
+	opacity: 0;
+	filter:Alpha(Opacity=0); /* support: IE8 */
+}
+
+.ui-front {
+	z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled {
+	cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	display: block;
+	text-indent: -99999px;
+	overflow: hidden;
+	background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+}
+.ui-autocomplete {
+	position: absolute;
+	top: 0;
+	left: 0;
+	cursor: default;
+}
+.ui-menu {
+	list-style: none;
+	padding: 0;
+	margin: 0;
+	display: block;
+	outline: none;
+}
+.ui-menu .ui-menu {
+	position: absolute;
+}
+.ui-menu .ui-menu-item {
+	position: relative;
+	margin: 0;
+	padding: 3px 1em 3px .4em;
+	cursor: pointer;
+	min-height: 0; /* support: IE7 */
+	/* support: IE10, see #8844 */
+	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
+}
+.ui-menu .ui-menu-divider {
+	margin: 5px 0;
+	height: 0;
+	font-size: 0;
+	line-height: 0;
+	border-width: 1px 0 0 0;
+}
+.ui-menu .ui-state-focus,
+.ui-menu .ui-state-active {
+	margin: -1px;
+}
+
+/* icon support */
+.ui-menu-icons {
+	position: relative;
+}
+.ui-menu-icons .ui-menu-item {
+	padding-left: 2em;
+}
+
+/* left-aligned */
+.ui-menu .ui-icon {
+	position: absolute;
+	top: 0;
+	bottom: 0;
+	left: .2em;
+	margin: auto 0;
+}
+
+/* right-aligned */
+.ui-menu .ui-menu-icon {
+	left: auto;
+	right: 0;
+}
+
+/* Component containers
+----------------------------------*/
+.ui-widget {
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1.1em;
+}
+.ui-widget .ui-widget {
+	font-size: 1em;
+}
+.ui-widget input,
+.ui-widget select,
+.ui-widget textarea,
+.ui-widget button {
+	font-family: Verdana,Arial,sans-serif;
+	font-size: 1em;
+}
+.ui-widget-content {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;
+	color: #222222;
+}
+.ui-widget-content a {
+	color: #222222;
+}
+.ui-widget-header {
+	border: 1px solid #aaaaaa;
+	background: #cccccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;
+	color: #222222;
+	font-weight: bold;
+}
+.ui-widget-header a {
+	color: #222222;
+}
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default,
+.ui-widget-content .ui-state-default,
+.ui-widget-header .ui-state-default {
+	border: 1px solid #d3d3d3;
+	background: #e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #555555;
+}
+.ui-state-default a,
+.ui-state-default a:link,
+.ui-state-default a:visited {
+	color: #555555;
+	text-decoration: none;
+}
+.ui-state-hover,
+.ui-widget-content .ui-state-hover,
+.ui-widget-header .ui-state-hover,
+.ui-state-focus,
+.ui-widget-content .ui-state-focus,
+.ui-widget-header .ui-state-focus {
+	border: 1px solid #999999;
+	background: #dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #212121;
+}
+.ui-state-hover a,
+.ui-state-hover a:hover,
+.ui-state-hover a:link,
+.ui-state-hover a:visited,
+.ui-state-focus a,
+.ui-state-focus a:hover,
+.ui-state-focus a:link,
+.ui-state-focus a:visited {
+	color: #212121;
+	text-decoration: none;
+}
+.ui-state-active,
+.ui-widget-content .ui-state-active,
+.ui-widget-header .ui-state-active {
+	border: 1px solid #aaaaaa;
+	background: #ffffff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;
+	font-weight: normal;
+	color: #212121;
+}
+.ui-state-active a,
+.ui-state-active a:link,
+.ui-state-active a:visited {
+	color: #212121;
+	text-decoration: none;
+}
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight,
+.ui-widget-content .ui-state-highlight,
+.ui-widget-header .ui-state-highlight {
+	border: 1px solid #fcefa1;
+	background: #fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;
+	color: #363636;
+}
+.ui-state-highlight a,
+.ui-widget-content .ui-state-highlight a,
+.ui-widget-header .ui-state-highlight a {
+	color: #363636;
+}
+.ui-state-error,
+.ui-widget-content .ui-state-error,
+.ui-widget-header .ui-state-error {
+	border: 1px solid #cd0a0a;
+	background: #fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;
+	color: #cd0a0a;
+}
+.ui-state-error a,
+.ui-widget-content .ui-state-error a,
+.ui-widget-header .ui-state-error a {
+	color: #cd0a0a;
+}
+.ui-state-error-text,
+.ui-widget-content .ui-state-error-text,
+.ui-widget-header .ui-state-error-text {
+	color: #cd0a0a;
+}
+.ui-priority-primary,
+.ui-widget-content .ui-priority-primary,
+.ui-widget-header .ui-priority-primary {
+	font-weight: bold;
+}
+.ui-priority-secondary,
+.ui-widget-content .ui-priority-secondary,
+.ui-widget-header .ui-priority-secondary {
+	opacity: .7;
+	filter:Alpha(Opacity=70); /* support: IE8 */
+	font-weight: normal;
+}
+.ui-state-disabled,
+.ui-widget-content .ui-state-disabled,
+.ui-widget-header .ui-state-disabled {
+	opacity: .35;
+	filter:Alpha(Opacity=35); /* support: IE8 */
+	background-image: none;
+}
+.ui-state-disabled .ui-icon {
+	filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
+}
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	width: 16px;
+	height: 16px;
+}
+.ui-icon,
+.ui-widget-content .ui-icon {
+	background-image: url("images/ui-icons_222222_256x240.png");
+}
+.ui-widget-header .ui-icon {
+	background-image: url("images/ui-icons_222222_256x240.png");
+}
+.ui-state-default .ui-icon {
+	background-image: url("images/ui-icons_888888_256x240.png");
+}
+.ui-state-hover .ui-icon,
+.ui-state-focus .ui-icon {
+	background-image: url("images/ui-icons_454545_256x240.png");
+}
+.ui-state-active .ui-icon {
+	background-image: url("images/ui-icons_454545_256x240.png");
+}
+.ui-state-highlight .ui-icon {
+	background-image: url("images/ui-icons_2e83ff_256x240.png");
+}
+.ui-state-error .ui-icon,
+.ui-state-error-text .ui-icon {
+	background-image: url("images/ui-icons_cd0a0a_256x240.png");
+}
+
+/* positioning */
+.ui-icon-blank { background-position: 16px 16px; }
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-on { background-position: -96px -144px; }
+.ui-icon-radio-off { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-left,
+.ui-corner-tl {
+	border-top-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-top,
+.ui-corner-right,
+.ui-corner-tr {
+	border-top-right-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-left,
+.ui-corner-bl {
+	border-bottom-left-radius: 4px;
+}
+.ui-corner-all,
+.ui-corner-bottom,
+.ui-corner-right,
+.ui-corner-br {
+	border-bottom-right-radius: 4px;
+}
+
+/* Overlays */
+.ui-widget-overlay {
+	background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+	opacity: .3;
+	filter: Alpha(Opacity=30); /* support: IE8 */
+}
+.ui-widget-shadow {
+	margin: -8px 0 0 -8px;
+	padding: 8px;
+	background: #aaaaaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;
+	opacity: .3;
+	filter: Alpha(Opacity=30); /* support: IE8 */
+	border-radius: 8px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-ui.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2610 @@
+/*! jQuery UI - v1.11.4 - 2015-05-20
+* http://jqueryui.com
+* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+(function( factory ) {
+	if ( typeof define === "function" && define.amd ) {
+
+		// AMD. Register as an anonymous module.
+		define([ "jquery" ], factory );
+	} else {
+
+		// Browser globals
+		factory( jQuery );
+	}
+}(function( $ ) {
+/*!
+ * jQuery UI Core 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/category/ui-core/
+ */
+
+
+// $.ui might exist from components with no dependencies, e.g., $.ui.position
+$.ui = $.ui || {};
+
+$.extend( $.ui, {
+	version: "1.11.4",
+
+	keyCode: {
+		BACKSPACE: 8,
+		COMMA: 188,
+		DELETE: 46,
+		DOWN: 40,
+		END: 35,
+		ENTER: 13,
+		ESCAPE: 27,
+		HOME: 36,
+		LEFT: 37,
+		PAGE_DOWN: 34,
+		PAGE_UP: 33,
+		PERIOD: 190,
+		RIGHT: 39,
+		SPACE: 32,
+		TAB: 9,
+		UP: 38
+	}
+});
+
+// plugins
+$.fn.extend({
+	scrollParent: function( includeHidden ) {
+		var position = this.css( "position" ),
+			excludeStaticParent = position === "absolute",
+			overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
+			scrollParent = this.parents().filter( function() {
+				var parent = $( this );
+				if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
+					return false;
+				}
+				return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
+			}).eq( 0 );
+
+		return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
+	},
+
+	uniqueId: (function() {
+		var uuid = 0;
+
+		return function() {
+			return this.each(function() {
+				if ( !this.id ) {
+					this.id = "ui-id-" + ( ++uuid );
+				}
+			});
+		};
+	})(),
+
+	removeUniqueId: function() {
+		return this.each(function() {
+			if ( /^ui-id-\d+$/.test( this.id ) ) {
+				$( this ).removeAttr( "id" );
+			}
+		});
+	}
+});
+
+// selectors
+function focusable( element, isTabIndexNotNaN ) {
+	var map, mapName, img,
+		nodeName = element.nodeName.toLowerCase();
+	if ( "area" === nodeName ) {
+		map = element.parentNode;
+		mapName = map.name;
+		if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
+			return false;
+		}
+		img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
+		return !!img && visible( img );
+	}
+	return ( /^(input|select|textarea|button|object)$/.test( nodeName ) ?
+		!element.disabled :
+		"a" === nodeName ?
+			element.href || isTabIndexNotNaN :
+			isTabIndexNotNaN) &&
+		// the element and all of its ancestors must be visible
+		visible( element );
+}
+
+function visible( element ) {
+	return $.expr.filters.visible( element ) &&
+		!$( element ).parents().addBack().filter(function() {
+			return $.css( this, "visibility" ) === "hidden";
+		}).length;
+}
+
+$.extend( $.expr[ ":" ], {
+	data: $.expr.createPseudo ?
+		$.expr.createPseudo(function( dataName ) {
+			return function( elem ) {
+				return !!$.data( elem, dataName );
+			};
+		}) :
+		// support: jQuery <1.8
+		function( elem, i, match ) {
+			return !!$.data( elem, match[ 3 ] );
+		},
+
+	focusable: function( element ) {
+		return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
+	},
+
+	tabbable: function( element ) {
+		var tabIndex = $.attr( element, "tabindex" ),
+			isTabIndexNaN = isNaN( tabIndex );
+		return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
+	}
+});
+
+// support: jQuery <1.8
+if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
+	$.each( [ "Width", "Height" ], function( i, name ) {
+		var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
+			type = name.toLowerCase(),
+			orig = {
+				innerWidth: $.fn.innerWidth,
+				innerHeight: $.fn.innerHeight,
+				outerWidth: $.fn.outerWidth,
+				outerHeight: $.fn.outerHeight
+			};
+
+		function reduce( elem, size, border, margin ) {
+			$.each( side, function() {
+				size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
+				if ( border ) {
+					size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
+				}
+				if ( margin ) {
+					size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
+				}
+			});
+			return size;
+		}
+
+		$.fn[ "inner" + name ] = function( size ) {
+			if ( size === undefined ) {
+				return orig[ "inner" + name ].call( this );
+			}
+
+			return this.each(function() {
+				$( this ).css( type, reduce( this, size ) + "px" );
+			});
+		};
+
+		$.fn[ "outer" + name] = function( size, margin ) {
+			if ( typeof size !== "number" ) {
+				return orig[ "outer" + name ].call( this, size );
+			}
+
+			return this.each(function() {
+				$( this).css( type, reduce( this, size, true, margin ) + "px" );
+			});
+		};
+	});
+}
+
+// support: jQuery <1.8
+if ( !$.fn.addBack ) {
+	$.fn.addBack = function( selector ) {
+		return this.add( selector == null ?
+			this.prevObject : this.prevObject.filter( selector )
+		);
+	};
+}
+
+// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
+if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
+	$.fn.removeData = (function( removeData ) {
+		return function( key ) {
+			if ( arguments.length ) {
+				return removeData.call( this, $.camelCase( key ) );
+			} else {
+				return removeData.call( this );
+			}
+		};
+	})( $.fn.removeData );
+}
+
+// deprecated
+$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
+
+$.fn.extend({
+	focus: (function( orig ) {
+		return function( delay, fn ) {
+			return typeof delay === "number" ?
+				this.each(function() {
+					var elem = this;
+					setTimeout(function() {
+						$( elem ).focus();
+						if ( fn ) {
+							fn.call( elem );
+						}
+					}, delay );
+				}) :
+				orig.apply( this, arguments );
+		};
+	})( $.fn.focus ),
+
+	disableSelection: (function() {
+		var eventType = "onselectstart" in document.createElement( "div" ) ?
+			"selectstart" :
+			"mousedown";
+
+		return function() {
+			return this.bind( eventType + ".ui-disableSelection", function( event ) {
+				event.preventDefault();
+			});
+		};
+	})(),
+
+	enableSelection: function() {
+		return this.unbind( ".ui-disableSelection" );
+	},
+
+	zIndex: function( zIndex ) {
+		if ( zIndex !== undefined ) {
+			return this.css( "zIndex", zIndex );
+		}
+
+		if ( this.length ) {
+			var elem = $( this[ 0 ] ), position, value;
+			while ( elem.length && elem[ 0 ] !== document ) {
+				// Ignore z-index if position is set to a value where z-index is ignored by the browser
+				// This makes behavior of this function consistent across browsers
+				// WebKit always returns auto if the element is positioned
+				position = elem.css( "position" );
+				if ( position === "absolute" || position === "relative" || position === "fixed" ) {
+					// IE returns 0 when zIndex is not specified
+					// other browsers return a string
+					// we ignore the case of nested elements with an explicit value of 0
+					// <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
+					value = parseInt( elem.css( "zIndex" ), 10 );
+					if ( !isNaN( value ) && value !== 0 ) {
+						return value;
+					}
+				}
+				elem = elem.parent();
+			}
+		}
+
+		return 0;
+	}
+});
+
+// $.ui.plugin is deprecated. Use $.widget() extensions instead.
+$.ui.plugin = {
+	add: function( module, option, set ) {
+		var i,
+			proto = $.ui[ module ].prototype;
+		for ( i in set ) {
+			proto.plugins[ i ] = proto.plugins[ i ] || [];
+			proto.plugins[ i ].push( [ option, set[ i ] ] );
+		}
+	},
+	call: function( instance, name, args, allowDisconnected ) {
+		var i,
+			set = instance.plugins[ name ];
+
+		if ( !set ) {
+			return;
+		}
+
+		if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
+			return;
+		}
+
+		for ( i = 0; i < set.length; i++ ) {
+			if ( instance.options[ set[ i ][ 0 ] ] ) {
+				set[ i ][ 1 ].apply( instance.element, args );
+			}
+		}
+	}
+};
+
+
+/*!
+ * jQuery UI Widget 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/jQuery.widget/
+ */
+
+
+var widget_uuid = 0,
+	widget_slice = Array.prototype.slice;
+
+$.cleanData = (function( orig ) {
+	return function( elems ) {
+		var events, elem, i;
+		for ( i = 0; (elem = elems[i]) != null; i++ ) {
+			try {
+
+				// Only trigger remove when necessary to save time
+				events = $._data( elem, "events" );
+				if ( events && events.remove ) {
+					$( elem ).triggerHandler( "remove" );
+				}
+
+			// http://bugs.jquery.com/ticket/8235
+			} catch ( e ) {}
+		}
+		orig( elems );
+	};
+})( $.cleanData );
+
+$.widget = function( name, base, prototype ) {
+	var fullName, existingConstructor, constructor, basePrototype,
+		// proxiedPrototype allows the provided prototype to remain unmodified
+		// so that it can be used as a mixin for multiple widgets (#8876)
+		proxiedPrototype = {},
+		namespace = name.split( "." )[ 0 ];
+
+	name = name.split( "." )[ 1 ];
+	fullName = namespace + "-" + name;
+
+	if ( !prototype ) {
+		prototype = base;
+		base = $.Widget;
+	}
+
+	// create selector for plugin
+	$.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
+		return !!$.data( elem, fullName );
+	};
+
+	$[ namespace ] = $[ namespace ] || {};
+	existingConstructor = $[ namespace ][ name ];
+	constructor = $[ namespace ][ name ] = function( options, element ) {
+		// allow instantiation without "new" keyword
+		if ( !this._createWidget ) {
+			return new constructor( options, element );
+		}
+
+		// allow instantiation without initializing for simple inheritance
+		// must use "new" keyword (the code above always passes args)
+		if ( arguments.length ) {
+			this._createWidget( options, element );
+		}
+	};
+	// extend with the existing constructor to carry over any static properties
+	$.extend( constructor, existingConstructor, {
+		version: prototype.version,
+		// copy the object used to create the prototype in case we need to
+		// redefine the widget later
+		_proto: $.extend( {}, prototype ),
+		// track widgets that inherit from this widget in case this widget is
+		// redefined after a widget inherits from it
+		_childConstructors: []
+	});
+
+	basePrototype = new base();
+	// we need to make the options hash a property directly on the new instance
+	// otherwise we'll modify the options hash on the prototype that we're
+	// inheriting from
+	basePrototype.options = $.widget.extend( {}, basePrototype.options );
+	$.each( prototype, function( prop, value ) {
+		if ( !$.isFunction( value ) ) {
+			proxiedPrototype[ prop ] = value;
+			return;
+		}
+		proxiedPrototype[ prop ] = (function() {
+			var _super = function() {
+					return base.prototype[ prop ].apply( this, arguments );
+				},
+				_superApply = function( args ) {
+					return base.prototype[ prop ].apply( this, args );
+				};
+			return function() {
+				var __super = this._super,
+					__superApply = this._superApply,
+					returnValue;
+
+				this._super = _super;
+				this._superApply = _superApply;
+
+				returnValue = value.apply( this, arguments );
+
+				this._super = __super;
+				this._superApply = __superApply;
+
+				return returnValue;
+			};
+		})();
+	});
+	constructor.prototype = $.widget.extend( basePrototype, {
+		// TODO: remove support for widgetEventPrefix
+		// always use the name + a colon as the prefix, e.g., draggable:start
+		// don't prefix for widgets that aren't DOM-based
+		widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
+	}, proxiedPrototype, {
+		constructor: constructor,
+		namespace: namespace,
+		widgetName: name,
+		widgetFullName: fullName
+	});
+
+	// If this widget is being redefined then we need to find all widgets that
+	// are inheriting from it and redefine all of them so that they inherit from
+	// the new version of this widget. We're essentially trying to replace one
+	// level in the prototype chain.
+	if ( existingConstructor ) {
+		$.each( existingConstructor._childConstructors, function( i, child ) {
+			var childPrototype = child.prototype;
+
+			// redefine the child widget using the same prototype that was
+			// originally used, but inherit from the new version of the base
+			$.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
+		});
+		// remove the list of existing child constructors from the old constructor
+		// so the old child constructors can be garbage collected
+		delete existingConstructor._childConstructors;
+	} else {
+		base._childConstructors.push( constructor );
+	}
+
+	$.widget.bridge( name, constructor );
+
+	return constructor;
+};
+
+$.widget.extend = function( target ) {
+	var input = widget_slice.call( arguments, 1 ),
+		inputIndex = 0,
+		inputLength = input.length,
+		key,
+		value;
+	for ( ; inputIndex < inputLength; inputIndex++ ) {
+		for ( key in input[ inputIndex ] ) {
+			value = input[ inputIndex ][ key ];
+			if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
+				// Clone objects
+				if ( $.isPlainObject( value ) ) {
+					target[ key ] = $.isPlainObject( target[ key ] ) ?
+						$.widget.extend( {}, target[ key ], value ) :
+						// Don't extend strings, arrays, etc. with objects
+						$.widget.extend( {}, value );
+				// Copy everything else by reference
+				} else {
+					target[ key ] = value;
+				}
+			}
+		}
+	}
+	return target;
+};
+
+$.widget.bridge = function( name, object ) {
+	var fullName = object.prototype.widgetFullName || name;
+	$.fn[ name ] = function( options ) {
+		var isMethodCall = typeof options === "string",
+			args = widget_slice.call( arguments, 1 ),
+			returnValue = this;
+
+		if ( isMethodCall ) {
+			this.each(function() {
+				var methodValue,
+					instance = $.data( this, fullName );
+				if ( options === "instance" ) {
+					returnValue = instance;
+					return false;
+				}
+				if ( !instance ) {
+					return $.error( "cannot call methods on " + name + " prior to initialization; " +
+						"attempted to call method '" + options + "'" );
+				}
+				if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
+					return $.error( "no such method '" + options + "' for " + name + " widget instance" );
+				}
+				methodValue = instance[ options ].apply( instance, args );
+				if ( methodValue !== instance && methodValue !== undefined ) {
+					returnValue = methodValue && methodValue.jquery ?
+						returnValue.pushStack( methodValue.get() ) :
+						methodValue;
+					return false;
+				}
+			});
+		} else {
+
+			// Allow multiple hashes to be passed on init
+			if ( args.length ) {
+				options = $.widget.extend.apply( null, [ options ].concat(args) );
+			}
+
+			this.each(function() {
+				var instance = $.data( this, fullName );
+				if ( instance ) {
+					instance.option( options || {} );
+					if ( instance._init ) {
+						instance._init();
+					}
+				} else {
+					$.data( this, fullName, new object( options, this ) );
+				}
+			});
+		}
+
+		return returnValue;
+	};
+};
+
+$.Widget = function( /* options, element */ ) {};
+$.Widget._childConstructors = [];
+
+$.Widget.prototype = {
+	widgetName: "widget",
+	widgetEventPrefix: "",
+	defaultElement: "<div>",
+	options: {
+		disabled: false,
+
+		// callbacks
+		create: null
+	},
+	_createWidget: function( options, element ) {
+		element = $( element || this.defaultElement || this )[ 0 ];
+		this.element = $( element );
+		this.uuid = widget_uuid++;
+		this.eventNamespace = "." + this.widgetName + this.uuid;
+
+		this.bindings = $();
+		this.hoverable = $();
+		this.focusable = $();
+
+		if ( element !== this ) {
+			$.data( element, this.widgetFullName, this );
+			this._on( true, this.element, {
+				remove: function( event ) {
+					if ( event.target === element ) {
+						this.destroy();
+					}
+				}
+			});
+			this.document = $( element.style ?
+				// element within the document
+				element.ownerDocument :
+				// element is window or document
+				element.document || element );
+			this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
+		}
+
+		this.options = $.widget.extend( {},
+			this.options,
+			this._getCreateOptions(),
+			options );
+
+		this._create();
+		this._trigger( "create", null, this._getCreateEventData() );
+		this._init();
+	},
+	_getCreateOptions: $.noop,
+	_getCreateEventData: $.noop,
+	_create: $.noop,
+	_init: $.noop,
+
+	destroy: function() {
+		this._destroy();
+		// we can probably remove the unbind calls in 2.0
+		// all event bindings should go through this._on()
+		this.element
+			.unbind( this.eventNamespace )
+			.removeData( this.widgetFullName )
+			// support: jquery <1.6.3
+			// http://bugs.jquery.com/ticket/9413
+			.removeData( $.camelCase( this.widgetFullName ) );
+		this.widget()
+			.unbind( this.eventNamespace )
+			.removeAttr( "aria-disabled" )
+			.removeClass(
+				this.widgetFullName + "-disabled " +
+				"ui-state-disabled" );
+
+		// clean up events and states
+		this.bindings.unbind( this.eventNamespace );
+		this.hoverable.removeClass( "ui-state-hover" );
+		this.focusable.removeClass( "ui-state-focus" );
+	},
+	_destroy: $.noop,
+
+	widget: function() {
+		return this.element;
+	},
+
+	option: function( key, value ) {
+		var options = key,
+			parts,
+			curOption,
+			i;
+
+		if ( arguments.length === 0 ) {
+			// don't return a reference to the internal hash
+			return $.widget.extend( {}, this.options );
+		}
+
+		if ( typeof key === "string" ) {
+			// handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
+			options = {};
+			parts = key.split( "." );
+			key = parts.shift();
+			if ( parts.length ) {
+				curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
+				for ( i = 0; i < parts.length - 1; i++ ) {
+					curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
+					curOption = curOption[ parts[ i ] ];
+				}
+				key = parts.pop();
+				if ( arguments.length === 1 ) {
+					return curOption[ key ] === undefined ? null : curOption[ key ];
+				}
+				curOption[ key ] = value;
+			} else {
+				if ( arguments.length === 1 ) {
+					return this.options[ key ] === undefined ? null : this.options[ key ];
+				}
+				options[ key ] = value;
+			}
+		}
+
+		this._setOptions( options );
+
+		return this;
+	},
+	_setOptions: function( options ) {
+		var key;
+
+		for ( key in options ) {
+			this._setOption( key, options[ key ] );
+		}
+
+		return this;
+	},
+	_setOption: function( key, value ) {
+		this.options[ key ] = value;
+
+		if ( key === "disabled" ) {
+			this.widget()
+				.toggleClass( this.widgetFullName + "-disabled", !!value );
+
+			// If the widget is becoming disabled, then nothing is interactive
+			if ( value ) {
+				this.hoverable.removeClass( "ui-state-hover" );
+				this.focusable.removeClass( "ui-state-focus" );
+			}
+		}
+
+		return this;
+	},
+
+	enable: function() {
+		return this._setOptions({ disabled: false });
+	},
+	disable: function() {
+		return this._setOptions({ disabled: true });
+	},
+
+	_on: function( suppressDisabledCheck, element, handlers ) {
+		var delegateElement,
+			instance = this;
+
+		// no suppressDisabledCheck flag, shuffle arguments
+		if ( typeof suppressDisabledCheck !== "boolean" ) {
+			handlers = element;
+			element = suppressDisabledCheck;
+			suppressDisabledCheck = false;
+		}
+
+		// no element argument, shuffle and use this.element
+		if ( !handlers ) {
+			handlers = element;
+			element = this.element;
+			delegateElement = this.widget();
+		} else {
+			element = delegateElement = $( element );
+			this.bindings = this.bindings.add( element );
+		}
+
+		$.each( handlers, function( event, handler ) {
+			function handlerProxy() {
+				// allow widgets to customize the disabled handling
+				// - disabled as an array instead of boolean
+				// - disabled class as method for disabling individual parts
+				if ( !suppressDisabledCheck &&
+						( instance.options.disabled === true ||
+							$( this ).hasClass( "ui-state-disabled" ) ) ) {
+					return;
+				}
+				return ( typeof handler === "string" ? instance[ handler ] : handler )
+					.apply( instance, arguments );
+			}
+
+			// copy the guid so direct unbinding works
+			if ( typeof handler !== "string" ) {
+				handlerProxy.guid = handler.guid =
+					handler.guid || handlerProxy.guid || $.guid++;
+			}
+
+			var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
+				eventName = match[1] + instance.eventNamespace,
+				selector = match[2];
+			if ( selector ) {
+				delegateElement.delegate( selector, eventName, handlerProxy );
+			} else {
+				element.bind( eventName, handlerProxy );
+			}
+		});
+	},
+
+	_off: function( element, eventName ) {
+		eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) +
+			this.eventNamespace;
+		element.unbind( eventName ).undelegate( eventName );
+
+		// Clear the stack to avoid memory leaks (#10056)
+		this.bindings = $( this.bindings.not( element ).get() );
+		this.focusable = $( this.focusable.not( element ).get() );
+		this.hoverable = $( this.hoverable.not( element ).get() );
+	},
+
+	_delay: function( handler, delay ) {
+		function handlerProxy() {
+			return ( typeof handler === "string" ? instance[ handler ] : handler )
+				.apply( instance, arguments );
+		}
+		var instance = this;
+		return setTimeout( handlerProxy, delay || 0 );
+	},
+
+	_hoverable: function( element ) {
+		this.hoverable = this.hoverable.add( element );
+		this._on( element, {
+			mouseenter: function( event ) {
+				$( event.currentTarget ).addClass( "ui-state-hover" );
+			},
+			mouseleave: function( event ) {
+				$( event.currentTarget ).removeClass( "ui-state-hover" );
+			}
+		});
+	},
+
+	_focusable: function( element ) {
+		this.focusable = this.focusable.add( element );
+		this._on( element, {
+			focusin: function( event ) {
+				$( event.currentTarget ).addClass( "ui-state-focus" );
+			},
+			focusout: function( event ) {
+				$( event.currentTarget ).removeClass( "ui-state-focus" );
+			}
+		});
+	},
+
+	_trigger: function( type, event, data ) {
+		var prop, orig,
+			callback = this.options[ type ];
+
+		data = data || {};
+		event = $.Event( event );
+		event.type = ( type === this.widgetEventPrefix ?
+			type :
+			this.widgetEventPrefix + type ).toLowerCase();
+		// the original event may come from any element
+		// so we need to reset the target on the new event
+		event.target = this.element[ 0 ];
+
+		// copy original event properties over to the new event
+		orig = event.originalEvent;
+		if ( orig ) {
+			for ( prop in orig ) {
+				if ( !( prop in event ) ) {
+					event[ prop ] = orig[ prop ];
+				}
+			}
+		}
+
+		this.element.trigger( event, data );
+		return !( $.isFunction( callback ) &&
+			callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
+			event.isDefaultPrevented() );
+	}
+};
+
+$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
+	$.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
+		if ( typeof options === "string" ) {
+			options = { effect: options };
+		}
+		var hasOptions,
+			effectName = !options ?
+				method :
+				options === true || typeof options === "number" ?
+					defaultEffect :
+					options.effect || defaultEffect;
+		options = options || {};
+		if ( typeof options === "number" ) {
+			options = { duration: options };
+		}
+		hasOptions = !$.isEmptyObject( options );
+		options.complete = callback;
+		if ( options.delay ) {
+			element.delay( options.delay );
+		}
+		if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
+			element[ method ]( options );
+		} else if ( effectName !== method && element[ effectName ] ) {
+			element[ effectName ]( options.duration, options.easing, callback );
+		} else {
+			element.queue(function( next ) {
+				$( this )[ method ]();
+				if ( callback ) {
+					callback.call( element[ 0 ] );
+				}
+				next();
+			});
+		}
+	};
+});
+
+var widget = $.widget;
+
+
+/*!
+ * jQuery UI Position 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/position/
+ */
+
+(function() {
+
+$.ui = $.ui || {};
+
+var cachedScrollbarWidth, supportsOffsetFractions,
+	max = Math.max,
+	abs = Math.abs,
+	round = Math.round,
+	rhorizontal = /left|center|right/,
+	rvertical = /top|center|bottom/,
+	roffset = /[\+\-]\d+(\.[\d]+)?%?/,
+	rposition = /^\w+/,
+	rpercent = /%$/,
+	_position = $.fn.position;
+
+function getOffsets( offsets, width, height ) {
+	return [
+		parseFloat( offsets[ 0 ] ) * ( rpercent.test( offsets[ 0 ] ) ? width / 100 : 1 ),
+		parseFloat( offsets[ 1 ] ) * ( rpercent.test( offsets[ 1 ] ) ? height / 100 : 1 )
+	];
+}
+
+function parseCss( element, property ) {
+	return parseInt( $.css( element, property ), 10 ) || 0;
+}
+
+function getDimensions( elem ) {
+	var raw = elem[0];
+	if ( raw.nodeType === 9 ) {
+		return {
+			width: elem.width(),
+			height: elem.height(),
+			offset: { top: 0, left: 0 }
+		};
+	}
+	if ( $.isWindow( raw ) ) {
+		return {
+			width: elem.width(),
+			height: elem.height(),
+			offset: { top: elem.scrollTop(), left: elem.scrollLeft() }
+		};
+	}
+	if ( raw.preventDefault ) {
+		return {
+			width: 0,
+			height: 0,
+			offset: { top: raw.pageY, left: raw.pageX }
+		};
+	}
+	return {
+		width: elem.outerWidth(),
+		height: elem.outerHeight(),
+		offset: elem.offset()
+	};
+}
+
+$.position = {
+	scrollbarWidth: function() {
+		if ( cachedScrollbarWidth !== undefined ) {
+			return cachedScrollbarWidth;
+		}
+		var w1, w2,
+			div = $( "<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>" ),
+			innerDiv = div.children()[0];
+
+		$( "body" ).append( div );
+		w1 = innerDiv.offsetWidth;
+		div.css( "overflow", "scroll" );
+
+		w2 = innerDiv.offsetWidth;
+
+		if ( w1 === w2 ) {
+			w2 = div[0].clientWidth;
+		}
+
+		div.remove();
+
+		return (cachedScrollbarWidth = w1 - w2);
+	},
+	getScrollInfo: function( within ) {
+		var overflowX = within.isWindow || within.isDocument ? "" :
+				within.element.css( "overflow-x" ),
+			overflowY = within.isWindow || within.isDocument ? "" :
+				within.element.css( "overflow-y" ),
+			hasOverflowX = overflowX === "scroll" ||
+				( overflowX === "auto" && within.width < within.element[0].scrollWidth ),
+			hasOverflowY = overflowY === "scroll" ||
+				( overflowY === "auto" && within.height < within.element[0].scrollHeight );
+		return {
+			width: hasOverflowY ? $.position.scrollbarWidth() : 0,
+			height: hasOverflowX ? $.position.scrollbarWidth() : 0
+		};
+	},
+	getWithinInfo: function( element ) {
+		var withinElement = $( element || window ),
+			isWindow = $.isWindow( withinElement[0] ),
+			isDocument = !!withinElement[ 0 ] && withinElement[ 0 ].nodeType === 9;
+		return {
+			element: withinElement,
+			isWindow: isWindow,
+			isDocument: isDocument,
+			offset: withinElement.offset() || { left: 0, top: 0 },
+			scrollLeft: withinElement.scrollLeft(),
+			scrollTop: withinElement.scrollTop(),
+
+			// support: jQuery 1.6.x
+			// jQuery 1.6 doesn't support .outerWidth/Height() on documents or windows
+			width: isWindow || isDocument ? withinElement.width() : withinElement.outerWidth(),
+			height: isWindow || isDocument ? withinElement.height() : withinElement.outerHeight()
+		};
+	}
+};
+
+$.fn.position = function( options ) {
+	if ( !options || !options.of ) {
+		return _position.apply( this, arguments );
+	}
+
+	// make a copy, we don't want to modify arguments
+	options = $.extend( {}, options );
+
+	var atOffset, targetWidth, targetHeight, targetOffset, basePosition, dimensions,
+		target = $( options.of ),
+		within = $.position.getWithinInfo( options.within ),
+		scrollInfo = $.position.getScrollInfo( within ),
+		collision = ( options.collision || "flip" ).split( " " ),
+		offsets = {};
+
+	dimensions = getDimensions( target );
+	if ( target[0].preventDefault ) {
+		// force left top to allow flipping
+		options.at = "left top";
+	}
+	targetWidth = dimensions.width;
+	targetHeight = dimensions.height;
+	targetOffset = dimensions.offset;
+	// clone to reuse original targetOffset later
+	basePosition = $.extend( {}, targetOffset );
+
+	// force my and at to have valid horizontal and vertical positions
+	// if a value is missing or invalid, it will be converted to center
+	$.each( [ "my", "at" ], function() {
+		var pos = ( options[ this ] || "" ).split( " " ),
+			horizontalOffset,
+			verticalOffset;
+
+		if ( pos.length === 1) {
+			pos = rhorizontal.test( pos[ 0 ] ) ?
+				pos.concat( [ "center" ] ) :
+				rvertical.test( pos[ 0 ] ) ?
+					[ "center" ].concat( pos ) :
+					[ "center", "center" ];
+		}
+		pos[ 0 ] = rhorizontal.test( pos[ 0 ] ) ? pos[ 0 ] : "center";
+		pos[ 1 ] = rvertical.test( pos[ 1 ] ) ? pos[ 1 ] : "center";
+
+		// calculate offsets
+		horizontalOffset = roffset.exec( pos[ 0 ] );
+		verticalOffset = roffset.exec( pos[ 1 ] );
+		offsets[ this ] = [
+			horizontalOffset ? horizontalOffset[ 0 ] : 0,
+			verticalOffset ? verticalOffset[ 0 ] : 0
+		];
+
+		// reduce to just the positions without the offsets
+		options[ this ] = [
+			rposition.exec( pos[ 0 ] )[ 0 ],
+			rposition.exec( pos[ 1 ] )[ 0 ]
+		];
+	});
+
+	// normalize collision option
+	if ( collision.length === 1 ) {
+		collision[ 1 ] = collision[ 0 ];
+	}
+
+	if ( options.at[ 0 ] === "right" ) {
+		basePosition.left += targetWidth;
+	} else if ( options.at[ 0 ] === "center" ) {
+		basePosition.left += targetWidth / 2;
+	}
+
+	if ( options.at[ 1 ] === "bottom" ) {
+		basePosition.top += targetHeight;
+	} else if ( options.at[ 1 ] === "center" ) {
+		basePosition.top += targetHeight / 2;
+	}
+
+	atOffset = getOffsets( offsets.at, targetWidth, targetHeight );
+	basePosition.left += atOffset[ 0 ];
+	basePosition.top += atOffset[ 1 ];
+
+	return this.each(function() {
+		var collisionPosition, using,
+			elem = $( this ),
+			elemWidth = elem.outerWidth(),
+			elemHeight = elem.outerHeight(),
+			marginLeft = parseCss( this, "marginLeft" ),
+			marginTop = parseCss( this, "marginTop" ),
+			collisionWidth = elemWidth + marginLeft + parseCss( this, "marginRight" ) + scrollInfo.width,
+			collisionHeight = elemHeight + marginTop + parseCss( this, "marginBottom" ) + scrollInfo.height,
+			position = $.extend( {}, basePosition ),
+			myOffset = getOffsets( offsets.my, elem.outerWidth(), elem.outerHeight() );
+
+		if ( options.my[ 0 ] === "right" ) {
+			position.left -= elemWidth;
+		} else if ( options.my[ 0 ] === "center" ) {
+			position.left -= elemWidth / 2;
+		}
+
+		if ( options.my[ 1 ] === "bottom" ) {
+			position.top -= elemHeight;
+		} else if ( options.my[ 1 ] === "center" ) {
+			position.top -= elemHeight / 2;
+		}
+
+		position.left += myOffset[ 0 ];
+		position.top += myOffset[ 1 ];
+
+		// if the browser doesn't support fractions, then round for consistent results
+		if ( !supportsOffsetFractions ) {
+			position.left = round( position.left );
+			position.top = round( position.top );
+		}
+
+		collisionPosition = {
+			marginLeft: marginLeft,
+			marginTop: marginTop
+		};
+
+		$.each( [ "left", "top" ], function( i, dir ) {
+			if ( $.ui.position[ collision[ i ] ] ) {
+				$.ui.position[ collision[ i ] ][ dir ]( position, {
+					targetWidth: targetWidth,
+					targetHeight: targetHeight,
+					elemWidth: elemWidth,
+					elemHeight: elemHeight,
+					collisionPosition: collisionPosition,
+					collisionWidth: collisionWidth,
+					collisionHeight: collisionHeight,
+					offset: [ atOffset[ 0 ] + myOffset[ 0 ], atOffset [ 1 ] + myOffset[ 1 ] ],
+					my: options.my,
+					at: options.at,
+					within: within,
+					elem: elem
+				});
+			}
+		});
+
+		if ( options.using ) {
+			// adds feedback as second argument to using callback, if present
+			using = function( props ) {
+				var left = targetOffset.left - position.left,
+					right = left + targetWidth - elemWidth,
+					top = targetOffset.top - position.top,
+					bottom = top + targetHeight - elemHeight,
+					feedback = {
+						target: {
+							element: target,
+							left: targetOffset.left,
+							top: targetOffset.top,
+							width: targetWidth,
+							height: targetHeight
+						},
+						element: {
+							element: elem,
+							left: position.left,
+							top: position.top,
+							width: elemWidth,
+							height: elemHeight
+						},
+						horizontal: right < 0 ? "left" : left > 0 ? "right" : "center",
+						vertical: bottom < 0 ? "top" : top > 0 ? "bottom" : "middle"
+					};
+				if ( targetWidth < elemWidth && abs( left + right ) < targetWidth ) {
+					feedback.horizontal = "center";
+				}
+				if ( targetHeight < elemHeight && abs( top + bottom ) < targetHeight ) {
+					feedback.vertical = "middle";
+				}
+				if ( max( abs( left ), abs( right ) ) > max( abs( top ), abs( bottom ) ) ) {
+					feedback.important = "horizontal";
+				} else {
+					feedback.important = "vertical";
+				}
+				options.using.call( this, props, feedback );
+			};
+		}
+
+		elem.offset( $.extend( position, { using: using } ) );
+	});
+};
+
+$.ui.position = {
+	fit: {
+		left: function( position, data ) {
+			var within = data.within,
+				withinOffset = within.isWindow ? within.scrollLeft : within.offset.left,
+				outerWidth = within.width,
+				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+				overLeft = withinOffset - collisionPosLeft,
+				overRight = collisionPosLeft + data.collisionWidth - outerWidth - withinOffset,
+				newOverRight;
+
+			// element is wider than within
+			if ( data.collisionWidth > outerWidth ) {
+				// element is initially over the left side of within
+				if ( overLeft > 0 && overRight <= 0 ) {
+					newOverRight = position.left + overLeft + data.collisionWidth - outerWidth - withinOffset;
+					position.left += overLeft - newOverRight;
+				// element is initially over right side of within
+				} else if ( overRight > 0 && overLeft <= 0 ) {
+					position.left = withinOffset;
+				// element is initially over both left and right sides of within
+				} else {
+					if ( overLeft > overRight ) {
+						position.left = withinOffset + outerWidth - data.collisionWidth;
+					} else {
+						position.left = withinOffset;
+					}
+				}
+			// too far left -> align with left edge
+			} else if ( overLeft > 0 ) {
+				position.left += overLeft;
+			// too far right -> align with right edge
+			} else if ( overRight > 0 ) {
+				position.left -= overRight;
+			// adjust based on position and margin
+			} else {
+				position.left = max( position.left - collisionPosLeft, position.left );
+			}
+		},
+		top: function( position, data ) {
+			var within = data.within,
+				withinOffset = within.isWindow ? within.scrollTop : within.offset.top,
+				outerHeight = data.within.height,
+				collisionPosTop = position.top - data.collisionPosition.marginTop,
+				overTop = withinOffset - collisionPosTop,
+				overBottom = collisionPosTop + data.collisionHeight - outerHeight - withinOffset,
+				newOverBottom;
+
+			// element is taller than within
+			if ( data.collisionHeight > outerHeight ) {
+				// element is initially over the top of within
+				if ( overTop > 0 && overBottom <= 0 ) {
+					newOverBottom = position.top + overTop + data.collisionHeight - outerHeight - withinOffset;
+					position.top += overTop - newOverBottom;
+				// element is initially over bottom of within
+				} else if ( overBottom > 0 && overTop <= 0 ) {
+					position.top = withinOffset;
+				// element is initially over both top and bottom of within
+				} else {
+					if ( overTop > overBottom ) {
+						position.top = withinOffset + outerHeight - data.collisionHeight;
+					} else {
+						position.top = withinOffset;
+					}
+				}
+			// too far up -> align with top
+			} else if ( overTop > 0 ) {
+				position.top += overTop;
+			// too far down -> align with bottom edge
+			} else if ( overBottom > 0 ) {
+				position.top -= overBottom;
+			// adjust based on position and margin
+			} else {
+				position.top = max( position.top - collisionPosTop, position.top );
+			}
+		}
+	},
+	flip: {
+		left: function( position, data ) {
+			var within = data.within,
+				withinOffset = within.offset.left + within.scrollLeft,
+				outerWidth = within.width,
+				offsetLeft = within.isWindow ? within.scrollLeft : within.offset.left,
+				collisionPosLeft = position.left - data.collisionPosition.marginLeft,
+				overLeft = collisionPosLeft - offsetLeft,
+				overRight = collisionPosLeft + data.collisionWidth - outerWidth - offsetLeft,
+				myOffset = data.my[ 0 ] === "left" ?
+					-data.elemWidth :
+					data.my[ 0 ] === "right" ?
+						data.elemWidth :
+						0,
+				atOffset = data.at[ 0 ] === "left" ?
+					data.targetWidth :
+					data.at[ 0 ] === "right" ?
+						-data.targetWidth :
+						0,
+				offset = -2 * data.offset[ 0 ],
+				newOverRight,
+				newOverLeft;
+
+			if ( overLeft < 0 ) {
+				newOverRight = position.left + myOffset + atOffset + offset + data.collisionWidth - outerWidth - withinOffset;
+				if ( newOverRight < 0 || newOverRight < abs( overLeft ) ) {
+					position.left += myOffset + atOffset + offset;
+				}
+			} else if ( overRight > 0 ) {
+				newOverLeft = position.left - data.collisionPosition.marginLeft + myOffset + atOffset + offset - offsetLeft;
+				if ( newOverLeft > 0 || abs( newOverLeft ) < overRight ) {
+					position.left += myOffset + atOffset + offset;
+				}
+			}
+		},
+		top: function( position, data ) {
+			var within = data.within,
+				withinOffset = within.offset.top + within.scrollTop,
+				outerHeight = within.height,
+				offsetTop = within.isWindow ? within.scrollTop : within.offset.top,
+				collisionPosTop = position.top - data.collisionPosition.marginTop,
+				overTop = collisionPosTop - offsetTop,
+				overBottom = collisionPosTop + data.collisionHeight - outerHeight - offsetTop,
+				top = data.my[ 1 ] === "top",
+				myOffset = top ?
+					-data.elemHeight :
+					data.my[ 1 ] === "bottom" ?
+						data.elemHeight :
+						0,
+				atOffset = data.at[ 1 ] === "top" ?
+					data.targetHeight :
+					data.at[ 1 ] === "bottom" ?
+						-data.targetHeight :
+						0,
+				offset = -2 * data.offset[ 1 ],
+				newOverTop,
+				newOverBottom;
+			if ( overTop < 0 ) {
+				newOverBottom = position.top + myOffset + atOffset + offset + data.collisionHeight - outerHeight - withinOffset;
+				if ( newOverBottom < 0 || newOverBottom < abs( overTop ) ) {
+					position.top += myOffset + atOffset + offset;
+				}
+			} else if ( overBottom > 0 ) {
+				newOverTop = position.top - data.collisionPosition.marginTop + myOffset + atOffset + offset - offsetTop;
+				if ( newOverTop > 0 || abs( newOverTop ) < overBottom ) {
+					position.top += myOffset + atOffset + offset;
+				}
+			}
+		}
+	},
+	flipfit: {
+		left: function() {
+			$.ui.position.flip.left.apply( this, arguments );
+			$.ui.position.fit.left.apply( this, arguments );
+		},
+		top: function() {
+			$.ui.position.flip.top.apply( this, arguments );
+			$.ui.position.fit.top.apply( this, arguments );
+		}
+	}
+};
+
+// fraction support test
+(function() {
+	var testElement, testElementParent, testElementStyle, offsetLeft, i,
+		body = document.getElementsByTagName( "body" )[ 0 ],
+		div = document.createElement( "div" );
+
+	//Create a "fake body" for testing based on method used in jQuery.support
+	testElement = document.createElement( body ? "div" : "body" );
+	testElementStyle = {
+		visibility: "hidden",
+		width: 0,
+		height: 0,
+		border: 0,
+		margin: 0,
+		background: "none"
+	};
+	if ( body ) {
+		$.extend( testElementStyle, {
+			position: "absolute",
+			left: "-1000px",
+			top: "-1000px"
+		});
+	}
+	for ( i in testElementStyle ) {
+		testElement.style[ i ] = testElementStyle[ i ];
+	}
+	testElement.appendChild( div );
+	testElementParent = body || document.documentElement;
+	testElementParent.insertBefore( testElement, testElementParent.firstChild );
+
+	div.style.cssText = "position: absolute; left: 10.7432222px;";
+
+	offsetLeft = $( div ).offset().left;
+	supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
+
+	testElement.innerHTML = "";
+	testElementParent.removeChild( testElement );
+})();
+
+})();
+
+var position = $.ui.position;
+
+
+/*!
+ * jQuery UI Menu 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/menu/
+ */
+
+
+var menu = $.widget( "ui.menu", {
+	version: "1.11.4",
+	defaultElement: "<ul>",
+	delay: 300,
+	options: {
+		icons: {
+			submenu: "ui-icon-carat-1-e"
+		},
+		items: "> *",
+		menus: "ul",
+		position: {
+			my: "left-1 top",
+			at: "right top"
+		},
+		role: "menu",
+
+		// callbacks
+		blur: null,
+		focus: null,
+		select: null
+	},
+
+	_create: function() {
+		this.activeMenu = this.element;
+
+		// Flag used to prevent firing of the click handler
+		// as the event bubbles up through nested menus
+		this.mouseHandled = false;
+		this.element
+			.uniqueId()
+			.addClass( "ui-menu ui-widget ui-widget-content" )
+			.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length )
+			.attr({
+				role: this.options.role,
+				tabIndex: 0
+			});
+
+		if ( this.options.disabled ) {
+			this.element
+				.addClass( "ui-state-disabled" )
+				.attr( "aria-disabled", "true" );
+		}
+
+		this._on({
+			// Prevent focus from sticking to links inside menu after clicking
+			// them (focus should always stay on UL during navigation).
+			"mousedown .ui-menu-item": function( event ) {
+				event.preventDefault();
+			},
+			"click .ui-menu-item": function( event ) {
+				var target = $( event.target );
+				if ( !this.mouseHandled && target.not( ".ui-state-disabled" ).length ) {
+					this.select( event );
+
+					// Only set the mouseHandled flag if the event will bubble, see #9469.
+					if ( !event.isPropagationStopped() ) {
+						this.mouseHandled = true;
+					}
+
+					// Open submenu on click
+					if ( target.has( ".ui-menu" ).length ) {
+						this.expand( event );
+					} else if ( !this.element.is( ":focus" ) && $( this.document[ 0 ].activeElement ).closest( ".ui-menu" ).length ) {
+
+						// Redirect focus to the menu
+						this.element.trigger( "focus", [ true ] );
+
+						// If the active item is on the top level, let it stay active.
+						// Otherwise, blur the active item since it is no longer visible.
+						if ( this.active && this.active.parents( ".ui-menu" ).length === 1 ) {
+							clearTimeout( this.timer );
+						}
+					}
+				}
+			},
+			"mouseenter .ui-menu-item": function( event ) {
+				// Ignore mouse events while typeahead is active, see #10458.
+				// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
+				// is over an item in the menu
+				if ( this.previousFilter ) {
+					return;
+				}
+				var target = $( event.currentTarget );
+				// Remove ui-state-active class from siblings of the newly focused menu item
+				// to avoid a jump caused by adjacent elements both having a class with a border
+				target.siblings( ".ui-state-active" ).removeClass( "ui-state-active" );
+				this.focus( event, target );
+			},
+			mouseleave: "collapseAll",
+			"mouseleave .ui-menu": "collapseAll",
+			focus: function( event, keepActiveItem ) {
+				// If there's already an active item, keep it active
+				// If not, activate the first item
+				var item = this.active || this.element.find( this.options.items ).eq( 0 );
+
+				if ( !keepActiveItem ) {
+					this.focus( event, item );
+				}
+			},
+			blur: function( event ) {
+				this._delay(function() {
+					if ( !$.contains( this.element[0], this.document[0].activeElement ) ) {
+						this.collapseAll( event );
+					}
+				});
+			},
+			keydown: "_keydown"
+		});
+
+		this.refresh();
+
+		// Clicks outside of a menu collapse any open menus
+		this._on( this.document, {
+			click: function( event ) {
+				if ( this._closeOnDocumentClick( event ) ) {
+					this.collapseAll( event );
+				}
+
+				// Reset the mouseHandled flag
+				this.mouseHandled = false;
+			}
+		});
+	},
+
+	_destroy: function() {
+		// Destroy (sub)menus
+		this.element
+			.removeAttr( "aria-activedescendant" )
+			.find( ".ui-menu" ).addBack()
+				.removeClass( "ui-menu ui-widget ui-widget-content ui-menu-icons ui-front" )
+				.removeAttr( "role" )
+				.removeAttr( "tabIndex" )
+				.removeAttr( "aria-labelledby" )
+				.removeAttr( "aria-expanded" )
+				.removeAttr( "aria-hidden" )
+				.removeAttr( "aria-disabled" )
+				.removeUniqueId()
+				.show();
+
+		// Destroy menu items
+		this.element.find( ".ui-menu-item" )
+			.removeClass( "ui-menu-item" )
+			.removeAttr( "role" )
+			.removeAttr( "aria-disabled" )
+			.removeUniqueId()
+			.removeClass( "ui-state-hover" )
+			.removeAttr( "tabIndex" )
+			.removeAttr( "role" )
+			.removeAttr( "aria-haspopup" )
+			.children().each( function() {
+				var elem = $( this );
+				if ( elem.data( "ui-menu-submenu-carat" ) ) {
+					elem.remove();
+				}
+			});
+
+		// Destroy menu dividers
+		this.element.find( ".ui-menu-divider" ).removeClass( "ui-menu-divider ui-widget-content" );
+	},
+
+	_keydown: function( event ) {
+		var match, prev, character, skip,
+			preventDefault = true;
+
+		switch ( event.keyCode ) {
+		case $.ui.keyCode.PAGE_UP:
+			this.previousPage( event );
+			break;
+		case $.ui.keyCode.PAGE_DOWN:
+			this.nextPage( event );
+			break;
+		case $.ui.keyCode.HOME:
+			this._move( "first", "first", event );
+			break;
+		case $.ui.keyCode.END:
+			this._move( "last", "last", event );
+			break;
+		case $.ui.keyCode.UP:
+			this.previous( event );
+			break;
+		case $.ui.keyCode.DOWN:
+			this.next( event );
+			break;
+		case $.ui.keyCode.LEFT:
+			this.collapse( event );
+			break;
+		case $.ui.keyCode.RIGHT:
+			if ( this.active && !this.active.is( ".ui-state-disabled" ) ) {
+				this.expand( event );
+			}
+			break;
+		case $.ui.keyCode.ENTER:
+		case $.ui.keyCode.SPACE:
+			this._activate( event );
+			break;
+		case $.ui.keyCode.ESCAPE:
+			this.collapse( event );
+			break;
+		default:
+			preventDefault = false;
+			prev = this.previousFilter || "";
+			character = String.fromCharCode( event.keyCode );
+			skip = false;
+
+			clearTimeout( this.filterTimer );
+
+			if ( character === prev ) {
+				skip = true;
+			} else {
+				character = prev + character;
+			}
+
+			match = this._filterMenuItems( character );
+			match = skip && match.index( this.active.next() ) !== -1 ?
+				this.active.nextAll( ".ui-menu-item" ) :
+				match;
+
+			// If no matches on the current filter, reset to the last character pressed
+			// to move down the menu to the first item that starts with that character
+			if ( !match.length ) {
+				character = String.fromCharCode( event.keyCode );
+				match = this._filterMenuItems( character );
+			}
+
+			if ( match.length ) {
+				this.focus( event, match );
+				this.previousFilter = character;
+				this.filterTimer = this._delay(function() {
+					delete this.previousFilter;
+				}, 1000 );
+			} else {
+				delete this.previousFilter;
+			}
+		}
+
+		if ( preventDefault ) {
+			event.preventDefault();
+		}
+	},
+
+	_activate: function( event ) {
+		if ( !this.active.is( ".ui-state-disabled" ) ) {
+			if ( this.active.is( "[aria-haspopup='true']" ) ) {
+				this.expand( event );
+			} else {
+				this.select( event );
+			}
+		}
+	},
+
+	refresh: function() {
+		var menus, items,
+			that = this,
+			icon = this.options.icons.submenu,
+			submenus = this.element.find( this.options.menus );
+
+		this.element.toggleClass( "ui-menu-icons", !!this.element.find( ".ui-icon" ).length );
+
+		// Initialize nested menus
+		submenus.filter( ":not(.ui-menu)" )
+			.addClass( "ui-menu ui-widget ui-widget-content ui-front" )
+			.hide()
+			.attr({
+				role: this.options.role,
+				"aria-hidden": "true",
+				"aria-expanded": "false"
+			})
+			.each(function() {
+				var menu = $( this ),
+					item = menu.parent(),
+					submenuCarat = $( "<span>" )
+						.addClass( "ui-menu-icon ui-icon " + icon )
+						.data( "ui-menu-submenu-carat", true );
+
+				item
+					.attr( "aria-haspopup", "true" )
+					.prepend( submenuCarat );
+				menu.attr( "aria-labelledby", item.attr( "id" ) );
+			});
+
+		menus = submenus.add( this.element );
+		items = menus.find( this.options.items );
+
+		// Initialize menu-items containing spaces and/or dashes only as dividers
+		items.not( ".ui-menu-item" ).each(function() {
+			var item = $( this );
+			if ( that._isDivider( item ) ) {
+				item.addClass( "ui-widget-content ui-menu-divider" );
+			}
+		});
+
+		// Don't refresh list items that are already adapted
+		items.not( ".ui-menu-item, .ui-menu-divider" )
+			.addClass( "ui-menu-item" )
+			.uniqueId()
+			.attr({
+				tabIndex: -1,
+				role: this._itemRole()
+			});
+
+		// Add aria-disabled attribute to any disabled menu item
+		items.filter( ".ui-state-disabled" ).attr( "aria-disabled", "true" );
+
+		// If the active item has been removed, blur the menu
+		if ( this.active && !$.contains( this.element[ 0 ], this.active[ 0 ] ) ) {
+			this.blur();
+		}
+	},
+
+	_itemRole: function() {
+		return {
+			menu: "menuitem",
+			listbox: "option"
+		}[ this.options.role ];
+	},
+
+	_setOption: function( key, value ) {
+		if ( key === "icons" ) {
+			this.element.find( ".ui-menu-icon" )
+				.removeClass( this.options.icons.submenu )
+				.addClass( value.submenu );
+		}
+		if ( key === "disabled" ) {
+			this.element
+				.toggleClass( "ui-state-disabled", !!value )
+				.attr( "aria-disabled", value );
+		}
+		this._super( key, value );
+	},
+
+	focus: function( event, item ) {
+		var nested, focused;
+		this.blur( event, event && event.type === "focus" );
+
+		this._scrollIntoView( item );
+
+		this.active = item.first();
+		focused = this.active.addClass( "ui-state-focus" ).removeClass( "ui-state-active" );
+		// Only update aria-activedescendant if there's a role
+		// otherwise we assume focus is managed elsewhere
+		if ( this.options.role ) {
+			this.element.attr( "aria-activedescendant", focused.attr( "id" ) );
+		}
+
+		// Highlight active parent menu item, if any
+		this.active
+			.parent()
+			.closest( ".ui-menu-item" )
+			.addClass( "ui-state-active" );
+
+		if ( event && event.type === "keydown" ) {
+			this._close();
+		} else {
+			this.timer = this._delay(function() {
+				this._close();
+			}, this.delay );
+		}
+
+		nested = item.children( ".ui-menu" );
+		if ( nested.length && event && ( /^mouse/.test( event.type ) ) ) {
+			this._startOpening(nested);
+		}
+		this.activeMenu = item.parent();
+
+		this._trigger( "focus", event, { item: item } );
+	},
+
+	_scrollIntoView: function( item ) {
+		var borderTop, paddingTop, offset, scroll, elementHeight, itemHeight;
+		if ( this._hasScroll() ) {
+			borderTop = parseFloat( $.css( this.activeMenu[0], "borderTopWidth" ) ) || 0;
+			paddingTop = parseFloat( $.css( this.activeMenu[0], "paddingTop" ) ) || 0;
+			offset = item.offset().top - this.activeMenu.offset().top - borderTop - paddingTop;
+			scroll = this.activeMenu.scrollTop();
+			elementHeight = this.activeMenu.height();
+			itemHeight = item.outerHeight();
+
+			if ( offset < 0 ) {
+				this.activeMenu.scrollTop( scroll + offset );
+			} else if ( offset + itemHeight > elementHeight ) {
+				this.activeMenu.scrollTop( scroll + offset - elementHeight + itemHeight );
+			}
+		}
+	},
+
+	blur: function( event, fromFocus ) {
+		if ( !fromFocus ) {
+			clearTimeout( this.timer );
+		}
+
+		if ( !this.active ) {
+			return;
+		}
+
+		this.active.removeClass( "ui-state-focus" );
+		this.active = null;
+
+		this._trigger( "blur", event, { item: this.active } );
+	},
+
+	_startOpening: function( submenu ) {
+		clearTimeout( this.timer );
+
+		// Don't open if already open fixes a Firefox bug that caused a .5 pixel
+		// shift in the submenu position when mousing over the carat icon
+		if ( submenu.attr( "aria-hidden" ) !== "true" ) {
+			return;
+		}
+
+		this.timer = this._delay(function() {
+			this._close();
+			this._open( submenu );
+		}, this.delay );
+	},
+
+	_open: function( submenu ) {
+		var position = $.extend({
+			of: this.active
+		}, this.options.position );
+
+		clearTimeout( this.timer );
+		this.element.find( ".ui-menu" ).not( submenu.parents( ".ui-menu" ) )
+			.hide()
+			.attr( "aria-hidden", "true" );
+
+		submenu
+			.show()
+			.removeAttr( "aria-hidden" )
+			.attr( "aria-expanded", "true" )
+			.position( position );
+	},
+
+	collapseAll: function( event, all ) {
+		clearTimeout( this.timer );
+		this.timer = this._delay(function() {
+			// If we were passed an event, look for the submenu that contains the event
+			var currentMenu = all ? this.element :
+				$( event && event.target ).closest( this.element.find( ".ui-menu" ) );
+
+			// If we found no valid submenu ancestor, use the main menu to close all sub menus anyway
+			if ( !currentMenu.length ) {
+				currentMenu = this.element;
+			}
+
+			this._close( currentMenu );
+
+			this.blur( event );
+			this.activeMenu = currentMenu;
+		}, this.delay );
+	},
+
+	// With no arguments, closes the currently active menu - if nothing is active
+	// it closes all menus.  If passed an argument, it will search for menus BELOW
+	_close: function( startMenu ) {
+		if ( !startMenu ) {
+			startMenu = this.active ? this.active.parent() : this.element;
+		}
+
+		startMenu
+			.find( ".ui-menu" )
+				.hide()
+				.attr( "aria-hidden", "true" )
+				.attr( "aria-expanded", "false" )
+			.end()
+			.find( ".ui-state-active" ).not( ".ui-state-focus" )
+				.removeClass( "ui-state-active" );
+	},
+
+	_closeOnDocumentClick: function( event ) {
+		return !$( event.target ).closest( ".ui-menu" ).length;
+	},
+
+	_isDivider: function( item ) {
+
+		// Match hyphen, em dash, en dash
+		return !/[^\-\u2014\u2013\s]/.test( item.text() );
+	},
+
+	collapse: function( event ) {
+		var newItem = this.active &&
+			this.active.parent().closest( ".ui-menu-item", this.element );
+		if ( newItem && newItem.length ) {
+			this._close();
+			this.focus( event, newItem );
+		}
+	},
+
+	expand: function( event ) {
+		var newItem = this.active &&
+			this.active
+				.children( ".ui-menu " )
+				.find( this.options.items )
+				.first();
+
+		if ( newItem && newItem.length ) {
+			this._open( newItem.parent() );
+
+			// Delay so Firefox will not hide activedescendant change in expanding submenu from AT
+			this._delay(function() {
+				this.focus( event, newItem );
+			});
+		}
+	},
+
+	next: function( event ) {
+		this._move( "next", "first", event );
+	},
+
+	previous: function( event ) {
+		this._move( "prev", "last", event );
+	},
+
+	isFirstItem: function() {
+		return this.active && !this.active.prevAll( ".ui-menu-item" ).length;
+	},
+
+	isLastItem: function() {
+		return this.active && !this.active.nextAll( ".ui-menu-item" ).length;
+	},
+
+	_move: function( direction, filter, event ) {
+		var next;
+		if ( this.active ) {
+			if ( direction === "first" || direction === "last" ) {
+				next = this.active
+					[ direction === "first" ? "prevAll" : "nextAll" ]( ".ui-menu-item" )
+					.eq( -1 );
+			} else {
+				next = this.active
+					[ direction + "All" ]( ".ui-menu-item" )
+					.eq( 0 );
+			}
+		}
+		if ( !next || !next.length || !this.active ) {
+			next = this.activeMenu.find( this.options.items )[ filter ]();
+		}
+
+		this.focus( event, next );
+	},
+
+	nextPage: function( event ) {
+		var item, base, height;
+
+		if ( !this.active ) {
+			this.next( event );
+			return;
+		}
+		if ( this.isLastItem() ) {
+			return;
+		}
+		if ( this._hasScroll() ) {
+			base = this.active.offset().top;
+			height = this.element.height();
+			this.active.nextAll( ".ui-menu-item" ).each(function() {
+				item = $( this );
+				return item.offset().top - base - height < 0;
+			});
+
+			this.focus( event, item );
+		} else {
+			this.focus( event, this.activeMenu.find( this.options.items )
+				[ !this.active ? "first" : "last" ]() );
+		}
+	},
+
+	previousPage: function( event ) {
+		var item, base, height;
+		if ( !this.active ) {
+			this.next( event );
+			return;
+		}
+		if ( this.isFirstItem() ) {
+			return;
+		}
+		if ( this._hasScroll() ) {
+			base = this.active.offset().top;
+			height = this.element.height();
+			this.active.prevAll( ".ui-menu-item" ).each(function() {
+				item = $( this );
+				return item.offset().top - base + height > 0;
+			});
+
+			this.focus( event, item );
+		} else {
+			this.focus( event, this.activeMenu.find( this.options.items ).first() );
+		}
+	},
+
+	_hasScroll: function() {
+		return this.element.outerHeight() < this.element.prop( "scrollHeight" );
+	},
+
+	select: function( event ) {
+		// TODO: It should never be possible to not have an active item at this
+		// point, but the tests don't trigger mouseenter before click.
+		this.active = this.active || $( event.target ).closest( ".ui-menu-item" );
+		var ui = { item: this.active };
+		if ( !this.active.has( ".ui-menu" ).length ) {
+			this.collapseAll( event, true );
+		}
+		this._trigger( "select", event, ui );
+	},
+
+	_filterMenuItems: function(character) {
+		var escapedCharacter = character.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ),
+			regex = new RegExp( "^" + escapedCharacter, "i" );
+
+		return this.activeMenu
+			.find( this.options.items )
+
+			// Only match on items, not dividers or other content (#10571)
+			.filter( ".ui-menu-item" )
+			.filter(function() {
+				return regex.test( $.trim( $( this ).text() ) );
+			});
+	}
+});
+
+
+/*!
+ * jQuery UI Autocomplete 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/autocomplete/
+ */
+
+
+$.widget( "ui.autocomplete", {
+	version: "1.11.4",
+	defaultElement: "<input>",
+	options: {
+		appendTo: null,
+		autoFocus: false,
+		delay: 300,
+		minLength: 1,
+		position: {
+			my: "left top",
+			at: "left bottom",
+			collision: "none"
+		},
+		source: null,
+
+		// callbacks
+		change: null,
+		close: null,
+		focus: null,
+		open: null,
+		response: null,
+		search: null,
+		select: null
+	},
+
+	requestIndex: 0,
+	pending: 0,
+
+	_create: function() {
+		// Some browsers only repeat keydown events, not keypress events,
+		// so we use the suppressKeyPress flag to determine if we've already
+		// handled the keydown event. #7269
+		// Unfortunately the code for & in keypress is the same as the up arrow,
+		// so we use the suppressKeyPressRepeat flag to avoid handling keypress
+		// events when we know the keydown event was used to modify the
+		// search term. #7799
+		var suppressKeyPress, suppressKeyPressRepeat, suppressInput,
+			nodeName = this.element[ 0 ].nodeName.toLowerCase(),
+			isTextarea = nodeName === "textarea",
+			isInput = nodeName === "input";
+
+		this.isMultiLine =
+			// Textareas are always multi-line
+			isTextarea ? true :
+			// Inputs are always single-line, even if inside a contentEditable element
+			// IE also treats inputs as contentEditable
+			isInput ? false :
+			// All other element types are determined by whether or not they're contentEditable
+			this.element.prop( "isContentEditable" );
+
+		this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
+		this.isNewMenu = true;
+
+		this.element
+			.addClass( "ui-autocomplete-input" )
+			.attr( "autocomplete", "off" );
+
+		this._on( this.element, {
+			keydown: function( event ) {
+				if ( this.element.prop( "readOnly" ) ) {
+					suppressKeyPress = true;
+					suppressInput = true;
+					suppressKeyPressRepeat = true;
+					return;
+				}
+
+				suppressKeyPress = false;
+				suppressInput = false;
+				suppressKeyPressRepeat = false;
+				var keyCode = $.ui.keyCode;
+				switch ( event.keyCode ) {
+				case keyCode.PAGE_UP:
+					suppressKeyPress = true;
+					this._move( "previousPage", event );
+					break;
+				case keyCode.PAGE_DOWN:
+					suppressKeyPress = true;
+					this._move( "nextPage", event );
+					break;
+				case keyCode.UP:
+					suppressKeyPress = true;
+					this._keyEvent( "previous", event );
+					break;
+				case keyCode.DOWN:
+					suppressKeyPress = true;
+					this._keyEvent( "next", event );
+					break;
+				case keyCode.ENTER:
+					// when menu is open and has focus
+					if ( this.menu.active ) {
+						// #6055 - Opera still allows the keypress to occur
+						// which causes forms to submit
+						suppressKeyPress = true;
+						event.preventDefault();
+						this.menu.select( event );
+					}
+					break;
+				case keyCode.TAB:
+					if ( this.menu.active ) {
+						this.menu.select( event );
+					}
+					break;
+				case keyCode.ESCAPE:
+					if ( this.menu.element.is( ":visible" ) ) {
+						if ( !this.isMultiLine ) {
+							this._value( this.term );
+						}
+						this.close( event );
+						// Different browsers have different default behavior for escape
+						// Single press can mean undo or clear
+						// Double press in IE means clear the whole form
+						event.preventDefault();
+					}
+					break;
+				default:
+					suppressKeyPressRepeat = true;
+					// search timeout should be triggered before the input value is changed
+					this._searchTimeout( event );
+					break;
+				}
+			},
+			keypress: function( event ) {
+				if ( suppressKeyPress ) {
+					suppressKeyPress = false;
+					if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+						event.preventDefault();
+					}
+					return;
+				}
+				if ( suppressKeyPressRepeat ) {
+					return;
+				}
+
+				// replicate some key handlers to allow them to repeat in Firefox and Opera
+				var keyCode = $.ui.keyCode;
+				switch ( event.keyCode ) {
+				case keyCode.PAGE_UP:
+					this._move( "previousPage", event );
+					break;
+				case keyCode.PAGE_DOWN:
+					this._move( "nextPage", event );
+					break;
+				case keyCode.UP:
+					this._keyEvent( "previous", event );
+					break;
+				case keyCode.DOWN:
+					this._keyEvent( "next", event );
+					break;
+				}
+			},
+			input: function( event ) {
+				if ( suppressInput ) {
+					suppressInput = false;
+					event.preventDefault();
+					return;
+				}
+				this._searchTimeout( event );
+			},
+			focus: function() {
+				this.selectedItem = null;
+				this.previous = this._value();
+			},
+			blur: function( event ) {
+				if ( this.cancelBlur ) {
+					delete this.cancelBlur;
+					return;
+				}
+
+				clearTimeout( this.searching );
+				this.close( event );
+				this._change( event );
+			}
+		});
+
+		this._initSource();
+		this.menu = $( "<ul>" )
+			.addClass( "ui-autocomplete ui-front" )
+			.appendTo( this._appendTo() )
+			.menu({
+				// disable ARIA support, the live region takes care of that
+				role: null
+			})
+			.hide()
+			.menu( "instance" );
+
+		this._on( this.menu.element, {
+			mousedown: function( event ) {
+				// prevent moving focus out of the text field
+				event.preventDefault();
+
+				// IE doesn't prevent moving focus even with event.preventDefault()
+				// so we set a flag to know when we should ignore the blur event
+				this.cancelBlur = true;
+				this._delay(function() {
+					delete this.cancelBlur;
+				});
+
+				// clicking on the scrollbar causes focus to shift to the body
+				// but we can't detect a mouseup or a click immediately afterward
+				// so we have to track the next mousedown and close the menu if
+				// the user clicks somewhere outside of the autocomplete
+				var menuElement = this.menu.element[ 0 ];
+				if ( !$( event.target ).closest( ".ui-menu-item" ).length ) {
+					this._delay(function() {
+						var that = this;
+						this.document.one( "mousedown", function( event ) {
+							if ( event.target !== that.element[ 0 ] &&
+									event.target !== menuElement &&
+									!$.contains( menuElement, event.target ) ) {
+								that.close();
+							}
+						});
+					});
+				}
+			},
+			menufocus: function( event, ui ) {
+				var label, item;
+				// support: Firefox
+				// Prevent accidental activation of menu items in Firefox (#7024 #9118)
+				if ( this.isNewMenu ) {
+					this.isNewMenu = false;
+					if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
+						this.menu.blur();
+
+						this.document.one( "mousemove", function() {
+							$( event.target ).trigger( event.originalEvent );
+						});
+
+						return;
+					}
+				}
+
+				item = ui.item.data( "ui-autocomplete-item" );
+				if ( false !== this._trigger( "focus", event, { item: item } ) ) {
+					// use value to match what will end up in the input, if it was a key event
+					if ( event.originalEvent && /^key/.test( event.originalEvent.type ) ) {
+						this._value( item.value );
+					}
+				}
+
+				// Announce the value in the liveRegion
+				label = ui.item.attr( "aria-label" ) || item.value;
+				if ( label && $.trim( label ).length ) {
+					this.liveRegion.children().hide();
+					$( "<div>" ).text( label ).appendTo( this.liveRegion );
+				}
+			},
+			menuselect: function( event, ui ) {
+				var item = ui.item.data( "ui-autocomplete-item" ),
+					previous = this.previous;
+
+				// only trigger when focus was lost (click on menu)
+				if ( this.element[ 0 ] !== this.document[ 0 ].activeElement ) {
+					this.element.focus();
+					this.previous = previous;
+					// #6109 - IE triggers two focus events and the second
+					// is asynchronous, so we need to reset the previous
+					// term synchronously and asynchronously :-(
+					this._delay(function() {
+						this.previous = previous;
+						this.selectedItem = item;
+					});
+				}
+
+				if ( false !== this._trigger( "select", event, { item: item } ) ) {
+					this._value( item.value );
+				}
+				// reset the term after the select event
+				// this allows custom select handling to work properly
+				this.term = this._value();
+
+				this.close( event );
+				this.selectedItem = item;
+			}
+		});
+
+		this.liveRegion = $( "<span>", {
+				role: "status",
+				"aria-live": "assertive",
+				"aria-relevant": "additions"
+			})
+			.addClass( "ui-helper-hidden-accessible" )
+			.appendTo( this.document[ 0 ].body );
+
+		// turning off autocomplete prevents the browser from remembering the
+		// value when navigating through history, so we re-enable autocomplete
+		// if the page is unloaded before the widget is destroyed. #7790
+		this._on( this.window, {
+			beforeunload: function() {
+				this.element.removeAttr( "autocomplete" );
+			}
+		});
+	},
+
+	_destroy: function() {
+		clearTimeout( this.searching );
+		this.element
+			.removeClass( "ui-autocomplete-input" )
+			.removeAttr( "autocomplete" );
+		this.menu.element.remove();
+		this.liveRegion.remove();
+	},
+
+	_setOption: function( key, value ) {
+		this._super( key, value );
+		if ( key === "source" ) {
+			this._initSource();
+		}
+		if ( key === "appendTo" ) {
+			this.menu.element.appendTo( this._appendTo() );
+		}
+		if ( key === "disabled" && value && this.xhr ) {
+			this.xhr.abort();
+		}
+	},
+
+	_appendTo: function() {
+		var element = this.options.appendTo;
+
+		if ( element ) {
+			element = element.jquery || element.nodeType ?
+				$( element ) :
+				this.document.find( element ).eq( 0 );
+		}
+
+		if ( !element || !element[ 0 ] ) {
+			element = this.element.closest( ".ui-front" );
+		}
+
+		if ( !element.length ) {
+			element = this.document[ 0 ].body;
+		}
+
+		return element;
+	},
+
+	_initSource: function() {
+		var array, url,
+			that = this;
+		if ( $.isArray( this.options.source ) ) {
+			array = this.options.source;
+			this.source = function( request, response ) {
+				response( $.ui.autocomplete.filter( array, request.term ) );
+			};
+		} else if ( typeof this.options.source === "string" ) {
+			url = this.options.source;
+			this.source = function( request, response ) {
+				if ( that.xhr ) {
+					that.xhr.abort();
+				}
+				that.xhr = $.ajax({
+					url: url,
+					data: request,
+					dataType: "json",
+					success: function( data ) {
+						response( data );
+					},
+					error: function() {
+						response([]);
+					}
+				});
+			};
+		} else {
+			this.source = this.options.source;
+		}
+	},
+
+	_searchTimeout: function( event ) {
+		clearTimeout( this.searching );
+		this.searching = this._delay(function() {
+
+			// Search if the value has changed, or if the user retypes the same value (see #7434)
+			var equalValues = this.term === this._value(),
+				menuVisible = this.menu.element.is( ":visible" ),
+				modifierKey = event.altKey || event.ctrlKey || event.metaKey || event.shiftKey;
+
+			if ( !equalValues || ( equalValues && !menuVisible && !modifierKey ) ) {
+				this.selectedItem = null;
+				this.search( null, event );
+			}
+		}, this.options.delay );
+	},
+
+	search: function( value, event ) {
+		value = value != null ? value : this._value();
+
+		// always save the actual value, not the one passed as an argument
+		this.term = this._value();
+
+		if ( value.length < this.options.minLength ) {
+			return this.close( event );
+		}
+
+		if ( this._trigger( "search", event ) === false ) {
+			return;
+		}
+
+		return this._search( value );
+	},
+
+	_search: function( value ) {
+		this.pending++;
+		this.element.addClass( "ui-autocomplete-loading" );
+		this.cancelSearch = false;
+
+		this.source( { term: value }, this._response() );
+	},
+
+	_response: function() {
+		var index = ++this.requestIndex;
+
+		return $.proxy(function( content ) {
+			if ( index === this.requestIndex ) {
+				this.__response( content );
+			}
+
+			this.pending--;
+			if ( !this.pending ) {
+				this.element.removeClass( "ui-autocomplete-loading" );
+			}
+		}, this );
+	},
+
+	__response: function( content ) {
+		if ( content ) {
+			content = this._normalize( content );
+		}
+		this._trigger( "response", null, { content: content } );
+		if ( !this.options.disabled && content && content.length && !this.cancelSearch ) {
+			this._suggest( content );
+			this._trigger( "open" );
+		} else {
+			// use ._close() instead of .close() so we don't cancel future searches
+			this._close();
+		}
+	},
+
+	close: function( event ) {
+		this.cancelSearch = true;
+		this._close( event );
+	},
+
+	_close: function( event ) {
+		if ( this.menu.element.is( ":visible" ) ) {
+			this.menu.element.hide();
+			this.menu.blur();
+			this.isNewMenu = true;
+			this._trigger( "close", event );
+		}
+	},
+
+	_change: function( event ) {
+		if ( this.previous !== this._value() ) {
+			this._trigger( "change", event, { item: this.selectedItem } );
+		}
+	},
+
+	_normalize: function( items ) {
+		// assume all items have the right format when the first item is complete
+		if ( items.length && items[ 0 ].label && items[ 0 ].value ) {
+			return items;
+		}
+		return $.map( items, function( item ) {
+			if ( typeof item === "string" ) {
+				return {
+					label: item,
+					value: item
+				};
+			}
+			return $.extend( {}, item, {
+				label: item.label || item.value,
+				value: item.value || item.label
+			});
+		});
+	},
+
+	_suggest: function( items ) {
+		var ul = this.menu.element.empty();
+		this._renderMenu( ul, items );
+		this.isNewMenu = true;
+		this.menu.refresh();
+
+		// size and position menu
+		ul.show();
+		this._resizeMenu();
+		ul.position( $.extend({
+			of: this.element
+		}, this.options.position ) );
+
+		if ( this.options.autoFocus ) {
+			this.menu.next();
+		}
+	},
+
+	_resizeMenu: function() {
+		var ul = this.menu.element;
+		ul.outerWidth( Math.max(
+			// Firefox wraps long text (possibly a rounding bug)
+			// so we add 1px to avoid the wrapping (#7513)
+			ul.width( "" ).outerWidth() + 1,
+			this.element.outerWidth()
+		) );
+	},
+
+	_renderMenu: function( ul, items ) {
+		var that = this;
+		$.each( items, function( index, item ) {
+			that._renderItemData( ul, item );
+		});
+	},
+
+	_renderItemData: function( ul, item ) {
+		return this._renderItem( ul, item ).data( "ui-autocomplete-item", item );
+	},
+
+	_renderItem: function( ul, item ) {
+		return $( "<li>" ).text( item.label ).appendTo( ul );
+	},
+
+	_move: function( direction, event ) {
+		if ( !this.menu.element.is( ":visible" ) ) {
+			this.search( null, event );
+			return;
+		}
+		if ( this.menu.isFirstItem() && /^previous/.test( direction ) ||
+				this.menu.isLastItem() && /^next/.test( direction ) ) {
+
+			if ( !this.isMultiLine ) {
+				this._value( this.term );
+			}
+
+			this.menu.blur();
+			return;
+		}
+		this.menu[ direction ]( event );
+	},
+
+	widget: function() {
+		return this.menu.element;
+	},
+
+	_value: function() {
+		return this.valueMethod.apply( this.element, arguments );
+	},
+
+	_keyEvent: function( keyEvent, event ) {
+		if ( !this.isMultiLine || this.menu.element.is( ":visible" ) ) {
+			this._move( keyEvent, event );
+
+			// prevents moving cursor to beginning/end of the text field in some browsers
+			event.preventDefault();
+		}
+	}
+});
+
+$.extend( $.ui.autocomplete, {
+	escapeRegex: function( value ) {
+		return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
+	},
+	filter: function( array, term ) {
+		var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" );
+		return $.grep( array, function( value ) {
+			return matcher.test( value.label || value.value || value );
+		});
+	}
+});
+
+// live region extension, adding a `messages` option
+// NOTE: This is an experimental API. We are still investigating
+// a full solution for string manipulation and internationalization.
+$.widget( "ui.autocomplete", $.ui.autocomplete, {
+	options: {
+		messages: {
+			noResults: "No search results.",
+			results: function( amount ) {
+				return amount + ( amount > 1 ? " results are" : " result is" ) +
+					" available, use up and down arrow keys to navigate.";
+			}
+		}
+	},
+
+	__response: function( content ) {
+		var message;
+		this._superApply( arguments );
+		if ( this.options.disabled || this.cancelSearch ) {
+			return;
+		}
+		if ( content && content.length ) {
+			message = this.options.messages.results( content.length );
+		} else {
+			message = this.options.messages.noResults;
+		}
+		this.liveRegion.children().hide();
+		$( "<div>" ).text( message ).appendTo( this.liveRegion );
+	}
+});
+
+var autocomplete = $.ui.autocomplete;
+
+
+
+}));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-ui.min.css	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,7 @@
+/*! jQuery UI - v1.11.4 - 2015-05-20
+* http://jqueryui.com
+* Includes: core.css, autocomplete.css, menu.css, theme.css
+* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url("images/ui-bg_flat_75_ffffff_40x100.png") 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url("images/ui-bg_highlight-soft_75_cccccc_1x100.png") 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url("images/ui-bg_glass_75_e6e6e6_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url("images/ui-bg_glass_75_dadada_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url("images/ui-bg_glass_65_ffffff_1x400.png") 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url("images/ui-bg_glass_55_fbf9ee_1x400.png") 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url("images/ui-bg_glass_95_fef1ec_1x400.png") 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-widget-header .ui-icon{background-image:url("images/ui-icons_222222_256x240.png")}.ui-state-default .ui-icon{background-image:url("images/ui-icons_888888_256x240.png")}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-active .ui-icon{background-image:url("images/ui-icons_454545_256x240.png")}.ui-state-highlight .ui-icon{background-image:url("images/ui-icons_2e83ff_256x240.png")}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url("images/ui-icons_cd0a0a_256x240.png")}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url("images/ui-bg_flat_0_aaaaaa_40x100.png") 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-ui.min.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,7 @@
+/*! jQuery UI - v1.11.4 - 2015-05-20
+* http://jqueryui.com
+* Includes: core.js, widget.js, position.js, autocomplete.js, menu.js
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+(function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)})(function(e){function t(t,s){var n,a,o,r=t.nodeName.toLowerCase();return"area"===r?(n=t.parentNode,a=n.name,t.href&&a&&"map"===n.nodeName.toLowerCase()?(o=e("img[usemap='#"+a+"']")[0],!!o&&i(o)):!1):(/^(input|select|textarea|button|object)$/.test(r)?!t.disabled:"a"===r?t.href||s:s)&&i(t)}function i(t){return e.expr.filters.visible(t)&&!e(t).parents().addBack().filter(function(){return"hidden"===e.css(this,"visibility")}).length}e.ui=e.ui||{},e.extend(e.ui,{version:"1.11.4",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),e.fn.extend({scrollParent:function(t){var i=this.css("position"),s="absolute"===i,n=t?/(auto|scroll|hidden)/:/(auto|scroll)/,a=this.parents().filter(function(){var t=e(this);return s&&"static"===t.css("position")?!1:n.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==i&&a.length?a:e(this[0].ownerDocument||document)},uniqueId:function(){var e=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&e(this).removeAttr("id")})}}),e.extend(e.expr[":"],{data:e.expr.createPseudo?e.expr.createPseudo(function(t){return function(i){return!!e.data(i,t)}}):function(t,i,s){return!!e.data(t,s[3])},focusable:function(i){return t(i,!isNaN(e.attr(i,"tabindex")))},tabbable:function(i){var s=e.attr(i,"tabindex"),n=isNaN(s);return(n||s>=0)&&t(i,!n)}}),e("<a>").outerWidth(1).jquery||e.each(["Width","Height"],function(t,i){function s(t,i,s,a){return e.each(n,function(){i-=parseFloat(e.css(t,"padding"+this))||0,s&&(i-=parseFloat(e.css(t,"border"+this+"Width"))||0),a&&(i-=parseFloat(e.css(t,"margin"+this))||0)}),i}var n="Width"===i?["Left","Right"]:["Top","Bottom"],a=i.toLowerCase(),o={innerWidth:e.fn.innerWidth,innerHeight:e.fn.innerHeight,outerWidth:e.fn.outerWidth,outerHeight:e.fn.outerHeight};e.fn["inner"+i]=function(t){return void 0===t?o["inner"+i].call(this):this.each(function(){e(this).css(a,s(this,t)+"px")})},e.fn["outer"+i]=function(t,n){return"number"!=typeof t?o["outer"+i].call(this,t):this.each(function(){e(this).css(a,s(this,t,!0,n)+"px")})}}),e.fn.addBack||(e.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),e("<a>").data("a-b","a").removeData("a-b").data("a-b")&&(e.fn.removeData=function(t){return function(i){return arguments.length?t.call(this,e.camelCase(i)):t.call(this)}}(e.fn.removeData)),e.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase()),e.fn.extend({focus:function(t){return function(i,s){return"number"==typeof i?this.each(function(){var t=this;setTimeout(function(){e(t).focus(),s&&s.call(t)},i)}):t.apply(this,arguments)}}(e.fn.focus),disableSelection:function(){var e="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(e+".ui-disableSelection",function(e){e.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(t){if(void 0!==t)return this.css("zIndex",t);if(this.length)for(var i,s,n=e(this[0]);n.length&&n[0]!==document;){if(i=n.css("position"),("absolute"===i||"relative"===i||"fixed"===i)&&(s=parseInt(n.css("zIndex"),10),!isNaN(s)&&0!==s))return s;n=n.parent()}return 0}}),e.ui.plugin={add:function(t,i,s){var n,a=e.ui[t].prototype;for(n in s)a.plugins[n]=a.plugins[n]||[],a.plugins[n].push([i,s[n]])},call:function(e,t,i,s){var n,a=e.plugins[t];if(a&&(s||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(n=0;a.length>n;n++)e.options[a[n][0]]&&a[n][1].apply(e.element,i)}};var s=0,n=Array.prototype.slice;e.cleanData=function(t){return function(i){var s,n,a;for(a=0;null!=(n=i[a]);a++)try{s=e._data(n,"events"),s&&s.remove&&e(n).triggerHandler("remove")}catch(o){}t(i)}}(e.cleanData),e.widget=function(t,i,s){var n,a,o,r,h={},l=t.split(".")[0];return t=t.split(".")[1],n=l+"-"+t,s||(s=i,i=e.Widget),e.expr[":"][n.toLowerCase()]=function(t){return!!e.data(t,n)},e[l]=e[l]||{},a=e[l][t],o=e[l][t]=function(e,t){return this._createWidget?(arguments.length&&this._createWidget(e,t),void 0):new o(e,t)},e.extend(o,a,{version:s.version,_proto:e.extend({},s),_childConstructors:[]}),r=new i,r.options=e.widget.extend({},r.options),e.each(s,function(t,s){return e.isFunction(s)?(h[t]=function(){var e=function(){return i.prototype[t].apply(this,arguments)},n=function(e){return i.prototype[t].apply(this,e)};return function(){var t,i=this._super,a=this._superApply;return this._super=e,this._superApply=n,t=s.apply(this,arguments),this._super=i,this._superApply=a,t}}(),void 0):(h[t]=s,void 0)}),o.prototype=e.widget.extend(r,{widgetEventPrefix:a?r.widgetEventPrefix||t:t},h,{constructor:o,namespace:l,widgetName:t,widgetFullName:n}),a?(e.each(a._childConstructors,function(t,i){var s=i.prototype;e.widget(s.namespace+"."+s.widgetName,o,i._proto)}),delete a._childConstructors):i._childConstructors.push(o),e.widget.bridge(t,o),o},e.widget.extend=function(t){for(var i,s,a=n.call(arguments,1),o=0,r=a.length;r>o;o++)for(i in a[o])s=a[o][i],a[o].hasOwnProperty(i)&&void 0!==s&&(t[i]=e.isPlainObject(s)?e.isPlainObject(t[i])?e.widget.extend({},t[i],s):e.widget.extend({},s):s);return t},e.widget.bridge=function(t,i){var s=i.prototype.widgetFullName||t;e.fn[t]=function(a){var o="string"==typeof a,r=n.call(arguments,1),h=this;return o?this.each(function(){var i,n=e.data(this,s);return"instance"===a?(h=n,!1):n?e.isFunction(n[a])&&"_"!==a.charAt(0)?(i=n[a].apply(n,r),i!==n&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):e.error("no such method '"+a+"' for "+t+" widget instance"):e.error("cannot call methods on "+t+" prior to initialization; "+"attempted to call method '"+a+"'")}):(r.length&&(a=e.widget.extend.apply(null,[a].concat(r))),this.each(function(){var t=e.data(this,s);t?(t.option(a||{}),t._init&&t._init()):e.data(this,s,new i(a,this))})),h}},e.Widget=function(){},e.Widget._childConstructors=[],e.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(t,i){i=e(i||this.defaultElement||this)[0],this.element=e(i),this.uuid=s++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=e(),this.hoverable=e(),this.focusable=e(),i!==this&&(e.data(i,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===i&&this.destroy()}}),this.document=e(i.style?i.ownerDocument:i.document||i),this.window=e(this.document[0].defaultView||this.document[0].parentWindow)),this.options=e.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:e.noop,_getCreateEventData:e.noop,_create:e.noop,_init:e.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(e.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:e.noop,widget:function(){return this.element},option:function(t,i){var s,n,a,o=t;if(0===arguments.length)return e.widget.extend({},this.options);if("string"==typeof t)if(o={},s=t.split("."),t=s.shift(),s.length){for(n=o[t]=e.widget.extend({},this.options[t]),a=0;s.length-1>a;a++)n[s[a]]=n[s[a]]||{},n=n[s[a]];if(t=s.pop(),1===arguments.length)return void 0===n[t]?null:n[t];n[t]=i}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=i}return this._setOptions(o),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return this.options[e]=t,"disabled"===e&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!t),t&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(t,i,s){var n,a=this;"boolean"!=typeof t&&(s=i,i=t,t=!1),s?(i=n=e(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),e.each(s,function(s,o){function r(){return t||a.options.disabled!==!0&&!e(this).hasClass("ui-state-disabled")?("string"==typeof o?a[o]:o).apply(a,arguments):void 0}"string"!=typeof o&&(r.guid=o.guid=o.guid||r.guid||e.guid++);var h=s.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+a.eventNamespace,u=h[2];u?n.delegate(u,l,r):i.bind(l,r)})},_off:function(t,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.unbind(i).undelegate(i),this.bindings=e(this.bindings.not(t).get()),this.focusable=e(this.focusable.not(t).get()),this.hoverable=e(this.hoverable.not(t).get())},_delay:function(e,t){function i(){return("string"==typeof e?s[e]:e).apply(s,arguments)}var s=this;return setTimeout(i,t||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){e(t.currentTarget).addClass("ui-state-hover")},mouseleave:function(t){e(t.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){e(t.currentTarget).addClass("ui-state-focus")},focusout:function(t){e(t.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(t,i,s){var n,a,o=this.options[t];if(s=s||{},i=e.Event(i),i.type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),i.target=this.element[0],a=i.originalEvent)for(n in a)n in i||(i[n]=a[n]);return this.element.trigger(i,s),!(e.isFunction(o)&&o.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},e.each({show:"fadeIn",hide:"fadeOut"},function(t,i){e.Widget.prototype["_"+t]=function(s,n,a){"string"==typeof n&&(n={effect:n});var o,r=n?n===!0||"number"==typeof n?i:n.effect||i:t;n=n||{},"number"==typeof n&&(n={duration:n}),o=!e.isEmptyObject(n),n.complete=a,n.delay&&s.delay(n.delay),o&&e.effects&&e.effects.effect[r]?s[t](n):r!==t&&s[r]?s[r](n.duration,n.easing,a):s.queue(function(i){e(this)[t](),a&&a.call(s[0]),i()})}}),e.widget,function(){function t(e,t,i){return[parseFloat(e[0])*(p.test(e[0])?t/100:1),parseFloat(e[1])*(p.test(e[1])?i/100:1)]}function i(t,i){return parseInt(e.css(t,i),10)||0}function s(t){var i=t[0];return 9===i.nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:e.isWindow(i)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()}}e.ui=e.ui||{};var n,a,o=Math.max,r=Math.abs,h=Math.round,l=/left|center|right/,u=/top|center|bottom/,d=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,p=/%$/,f=e.fn.position;e.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,i,s=e("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),a=s.children()[0];return e("body").append(s),t=a.offsetWidth,s.css("overflow","scroll"),i=a.offsetWidth,t===i&&(i=s[0].clientWidth),s.remove(),n=t-i},getScrollInfo:function(t){var i=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),s=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),n="scroll"===i||"auto"===i&&t.width<t.element[0].scrollWidth,a="scroll"===s||"auto"===s&&t.height<t.element[0].scrollHeight;return{width:a?e.position.scrollbarWidth():0,height:n?e.position.scrollbarWidth():0}},getWithinInfo:function(t){var i=e(t||window),s=e.isWindow(i[0]),n=!!i[0]&&9===i[0].nodeType;return{element:i,isWindow:s,isDocument:n,offset:i.offset()||{left:0,top:0},scrollLeft:i.scrollLeft(),scrollTop:i.scrollTop(),width:s||n?i.width():i.outerWidth(),height:s||n?i.height():i.outerHeight()}}},e.fn.position=function(n){if(!n||!n.of)return f.apply(this,arguments);n=e.extend({},n);var p,m,g,v,y,b,_=e(n.of),x=e.position.getWithinInfo(n.within),w=e.position.getScrollInfo(x),k=(n.collision||"flip").split(" "),T={};return b=s(_),_[0].preventDefault&&(n.at="left top"),m=b.width,g=b.height,v=b.offset,y=e.extend({},v),e.each(["my","at"],function(){var e,t,i=(n[this]||"").split(" ");1===i.length&&(i=l.test(i[0])?i.concat(["center"]):u.test(i[0])?["center"].concat(i):["center","center"]),i[0]=l.test(i[0])?i[0]:"center",i[1]=u.test(i[1])?i[1]:"center",e=d.exec(i[0]),t=d.exec(i[1]),T[this]=[e?e[0]:0,t?t[0]:0],n[this]=[c.exec(i[0])[0],c.exec(i[1])[0]]}),1===k.length&&(k[1]=k[0]),"right"===n.at[0]?y.left+=m:"center"===n.at[0]&&(y.left+=m/2),"bottom"===n.at[1]?y.top+=g:"center"===n.at[1]&&(y.top+=g/2),p=t(T.at,m,g),y.left+=p[0],y.top+=p[1],this.each(function(){var s,l,u=e(this),d=u.outerWidth(),c=u.outerHeight(),f=i(this,"marginLeft"),b=i(this,"marginTop"),D=d+f+i(this,"marginRight")+w.width,S=c+b+i(this,"marginBottom")+w.height,N=e.extend({},y),M=t(T.my,u.outerWidth(),u.outerHeight());"right"===n.my[0]?N.left-=d:"center"===n.my[0]&&(N.left-=d/2),"bottom"===n.my[1]?N.top-=c:"center"===n.my[1]&&(N.top-=c/2),N.left+=M[0],N.top+=M[1],a||(N.left=h(N.left),N.top=h(N.top)),s={marginLeft:f,marginTop:b},e.each(["left","top"],function(t,i){e.ui.position[k[t]]&&e.ui.position[k[t]][i](N,{targetWidth:m,targetHeight:g,elemWidth:d,elemHeight:c,collisionPosition:s,collisionWidth:D,collisionHeight:S,offset:[p[0]+M[0],p[1]+M[1]],my:n.my,at:n.at,within:x,elem:u})}),n.using&&(l=function(e){var t=v.left-N.left,i=t+m-d,s=v.top-N.top,a=s+g-c,h={target:{element:_,left:v.left,top:v.top,width:m,height:g},element:{element:u,left:N.left,top:N.top,width:d,height:c},horizontal:0>i?"left":t>0?"right":"center",vertical:0>a?"top":s>0?"bottom":"middle"};d>m&&m>r(t+i)&&(h.horizontal="center"),c>g&&g>r(s+a)&&(h.vertical="middle"),h.important=o(r(t),r(i))>o(r(s),r(a))?"horizontal":"vertical",n.using.call(this,e,h)}),u.offset(e.extend(N,{using:l}))})},e.ui.position={fit:{left:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=e.left-t.collisionPosition.marginLeft,h=n-r,l=r+t.collisionWidth-a-n;t.collisionWidth>a?h>0&&0>=l?(i=e.left+h+t.collisionWidth-a-n,e.left+=h-i):e.left=l>0&&0>=h?n:h>l?n+a-t.collisionWidth:n:h>0?e.left+=h:l>0?e.left-=l:e.left=o(e.left-r,e.left)},top:function(e,t){var i,s=t.within,n=s.isWindow?s.scrollTop:s.offset.top,a=t.within.height,r=e.top-t.collisionPosition.marginTop,h=n-r,l=r+t.collisionHeight-a-n;t.collisionHeight>a?h>0&&0>=l?(i=e.top+h+t.collisionHeight-a-n,e.top+=h-i):e.top=l>0&&0>=h?n:h>l?n+a-t.collisionHeight:n:h>0?e.top+=h:l>0?e.top-=l:e.top=o(e.top-r,e.top)}},flip:{left:function(e,t){var i,s,n=t.within,a=n.offset.left+n.scrollLeft,o=n.width,h=n.isWindow?n.scrollLeft:n.offset.left,l=e.left-t.collisionPosition.marginLeft,u=l-h,d=l+t.collisionWidth-o-h,c="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,p="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,f=-2*t.offset[0];0>u?(i=e.left+c+p+f+t.collisionWidth-o-a,(0>i||r(u)>i)&&(e.left+=c+p+f)):d>0&&(s=e.left-t.collisionPosition.marginLeft+c+p+f-h,(s>0||d>r(s))&&(e.left+=c+p+f))},top:function(e,t){var i,s,n=t.within,a=n.offset.top+n.scrollTop,o=n.height,h=n.isWindow?n.scrollTop:n.offset.top,l=e.top-t.collisionPosition.marginTop,u=l-h,d=l+t.collisionHeight-o-h,c="top"===t.my[1],p=c?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,f="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,m=-2*t.offset[1];0>u?(s=e.top+p+f+m+t.collisionHeight-o-a,(0>s||r(u)>s)&&(e.top+=p+f+m)):d>0&&(i=e.top-t.collisionPosition.marginTop+p+f+m-h,(i>0||d>r(i))&&(e.top+=p+f+m))}},flipfit:{left:function(){e.ui.position.flip.left.apply(this,arguments),e.ui.position.fit.left.apply(this,arguments)},top:function(){e.ui.position.flip.top.apply(this,arguments),e.ui.position.fit.top.apply(this,arguments)}}},function(){var t,i,s,n,o,r=document.getElementsByTagName("body")[0],h=document.createElement("div");t=document.createElement(r?"div":"body"),s={visibility:"hidden",width:0,height:0,border:0,margin:0,background:"none"},r&&e.extend(s,{position:"absolute",left:"-1000px",top:"-1000px"});for(o in s)t.style[o]=s[o];t.appendChild(h),i=r||document.documentElement,i.insertBefore(t,i.firstChild),h.style.cssText="position: absolute; left: 10.7432222px;",n=e(h).offset().left,a=n>10&&11>n,t.innerHTML="",i.removeChild(t)}()}(),e.ui.position,e.widget("ui.menu",{version:"1.11.4",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-carat-1-e"},items:"> *",menus:"ul",position:{my:"left-1 top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().addClass("ui-menu ui-widget ui-widget-content").toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length).attr({role:this.options.role,tabIndex:0}),this.options.disabled&&this.element.addClass("ui-state-disabled").attr("aria-disabled","true"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(t){var i=e(t.target);!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&e(this.document[0].activeElement).closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(t){if(!this.previousFilter){var i=e(t.currentTarget);i.siblings(".ui-state-active").removeClass("ui-state-active"),this.focus(t,i)}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var i=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,i)},blur:function(t){this._delay(function(){e.contains(this.element[0],this.document[0].activeElement)||this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeClass("ui-menu ui-widget ui-widget-content ui-menu-icons ui-front").removeAttr("role").removeAttr("tabIndex").removeAttr("aria-labelledby").removeAttr("aria-expanded").removeAttr("aria-hidden").removeAttr("aria-disabled").removeUniqueId().show(),this.element.find(".ui-menu-item").removeClass("ui-menu-item").removeAttr("role").removeAttr("aria-disabled").removeUniqueId().removeClass("ui-state-hover").removeAttr("tabIndex").removeAttr("role").removeAttr("aria-haspopup").children().each(function(){var t=e(this);t.data("ui-menu-submenu-carat")&&t.remove()}),this.element.find(".ui-menu-divider").removeClass("ui-menu-divider ui-widget-content")},_keydown:function(t){var i,s,n,a,o=!0;switch(t.keyCode){case e.ui.keyCode.PAGE_UP:this.previousPage(t);break;case e.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case e.ui.keyCode.HOME:this._move("first","first",t);break;case e.ui.keyCode.END:this._move("last","last",t);break;case e.ui.keyCode.UP:this.previous(t);break;case e.ui.keyCode.DOWN:this.next(t);break;case e.ui.keyCode.LEFT:this.collapse(t);break;case e.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case e.ui.keyCode.ENTER:case e.ui.keyCode.SPACE:this._activate(t);break;case e.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,s=this.previousFilter||"",n=String.fromCharCode(t.keyCode),a=!1,clearTimeout(this.filterTimer),n===s?a=!0:n=s+n,i=this._filterMenuItems(n),i=a&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(t.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(t,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(e){this.active.is(".ui-state-disabled")||(this.active.is("[aria-haspopup='true']")?this.expand(e):this.select(e))},refresh:function(){var t,i,s=this,n=this.options.icons.submenu,a=this.element.find(this.options.menus);this.element.toggleClass("ui-menu-icons",!!this.element.find(".ui-icon").length),a.filter(":not(.ui-menu)").addClass("ui-menu ui-widget ui-widget-content ui-front").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=e(this),i=t.parent(),s=e("<span>").addClass("ui-menu-icon ui-icon "+n).data("ui-menu-submenu-carat",!0);i.attr("aria-haspopup","true").prepend(s),t.attr("aria-labelledby",i.attr("id"))}),t=a.add(this.element),i=t.find(this.options.items),i.not(".ui-menu-item").each(function(){var t=e(this);s._isDivider(t)&&t.addClass("ui-widget-content ui-menu-divider")}),i.not(".ui-menu-item, .ui-menu-divider").addClass("ui-menu-item").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!e.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){"icons"===e&&this.element.find(".ui-menu-icon").removeClass(this.options.icons.submenu).addClass(t.submenu),"disabled"===e&&this.element.toggleClass("ui-state-disabled",!!t).attr("aria-disabled",t),this._super(e,t)},focus:function(e,t){var i,s;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),s=this.active.addClass("ui-state-focus").removeClass("ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),this.active.parent().closest(".ui-menu-item").addClass("ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=t.children(".ui-menu"),i.length&&e&&/^mouse/.test(e.type)&&this._startOpening(i),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(t){var i,s,n,a,o,r;this._hasScroll()&&(i=parseFloat(e.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(e.css(this.activeMenu[0],"paddingTop"))||0,n=t.offset().top-this.activeMenu.offset().top-i-s,a=this.activeMenu.scrollTop(),o=this.activeMenu.height(),r=t.outerHeight(),0>n?this.activeMenu.scrollTop(a+n):n+r>o&&this.activeMenu.scrollTop(a+n-o+r))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this.active.removeClass("ui-state-focus"),this.active=null,this._trigger("blur",e,{item:this.active}))},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(t){var i=e.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(t,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:e(t&&t.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(t),this.activeMenu=s},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false").end().find(".ui-state-active").not(".ui-state-focus").removeClass("ui-state-active")},_closeOnDocumentClick:function(t){return!e(t.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,i){var s;this.active&&(s="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[t]()),this.focus(i,s)},nextPage:function(t){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=e(this),0>i.offset().top-s-n}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(t),void 0)},previousPage:function(t){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=e(this),i.offset().top-s+n>0}),this.focus(t,i)):this.focus(t,this.activeMenu.find(this.options.items).first())),void 0):(this.next(t),void 0)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||e(t.target).closest(".ui-menu-item");var i={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,i)},_filterMenuItems:function(t){var i=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),s=RegExp("^"+i,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return s.test(e.trim(e(this).text()))})}}),e.widget("ui.autocomplete",{version:"1.11.4",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var t,i,s,n=this.element[0].nodeName.toLowerCase(),a="textarea"===n,o="input"===n;this.isMultiLine=a?!0:o?!1:this.element.prop("isContentEditable"),this.valueMethod=this.element[a||o?"val":"text"],this.isNewMenu=!0,this.element.addClass("ui-autocomplete-input").attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return t=!0,s=!0,i=!0,void 0;t=!1,s=!1,i=!1;var a=e.ui.keyCode;switch(n.keyCode){case a.PAGE_UP:t=!0,this._move("previousPage",n);break;case a.PAGE_DOWN:t=!0,this._move("nextPage",n);break;case a.UP:t=!0,this._keyEvent("previous",n);break;case a.DOWN:t=!0,this._keyEvent("next",n);break;case a.ENTER:this.menu.active&&(t=!0,n.preventDefault(),this.menu.select(n));break;case a.TAB:this.menu.active&&this.menu.select(n);break;case a.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(t)return t=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=e.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(e){return s?(s=!1,e.preventDefault(),void 0):(this._searchTimeout(e),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(e),this._change(e),void 0)}}),this._initSource(),this.menu=e("<ul>").addClass("ui-autocomplete ui-front").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur});var i=this.menu.element[0];e(t.target).closest(".ui-menu-item").length||this._delay(function(){var t=this;this.document.one("mousedown",function(s){s.target===t.element[0]||s.target===i||e.contains(i,s.target)||t.close()})})},menufocus:function(t,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){e(t.target).trigger(t.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:n})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&e.trim(s).length&&(this.liveRegion.children().hide(),e("<div>").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,t){var i=t.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.focus(),this.previous=s,this._delay(function(){this.previous=s,this.selectedItem=i})),!1!==this._trigger("select",e,{item:i})&&this._value(i.value),this.term=this._value(),this.close(e),this.selectedItem=i}}),this.liveRegion=e("<span>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).addClass("ui-helper-hidden-accessible").appendTo(this.document[0].body),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?e(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front")),t.length||(t=this.document[0].body),t},_initSource:function(){var t,i,s=this;e.isArray(this.options.source)?(t=this.options.source,this.source=function(i,s){s(e.ui.autocomplete.filter(t,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(t,n){s.xhr&&s.xhr.abort(),s.xhr=e.ajax({url:i,data:t,dataType:"json",success:function(e){n(e)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(e){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),i=this.menu.element.is(":visible"),s=e.altKey||e.ctrlKey||e.metaKey||e.shiftKey;(!t||t&&!i&&!s)&&(this.selectedItem=null,this.search(null,e))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):this._trigger("search",t)!==!1?this._search(e):void 0},_search:function(e){this.pending++,this.element.addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return e.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this.element.removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:e.map(t,function(t){return"string"==typeof t?{label:t,value:t}:e.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var i=this.menu.element.empty();this._renderMenu(i,t),this.isNewMenu=!0,this.menu.refresh(),i.show(),this._resizeMenu(),i.position(e.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next()
+},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(t,i){var s=this;e.each(i,function(e,i){s._renderItemData(t,i)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(t,i){return e("<li>").text(i.label).appendTo(t)},_move:function(e,t){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[e](t),void 0):(this.search(null,t),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(e,t),t.preventDefault())}}),e.extend(e.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,i){var s=RegExp(e.ui.autocomplete.escapeRegex(i),"i");return e.grep(t,function(e){return s.test(e.label||e.value||e)})}}),e.widget("ui.autocomplete",e.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(e>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,this.liveRegion.children().hide(),e("<div>").text(i).appendTo(this.liveRegion))}}),e.ui.autocomplete});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-ui.structure.css	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,152 @@
+/*!
+ * jQuery UI CSS Framework 1.11.4
+ * http://jqueryui.com
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license.
+ * http://jquery.org/license
+ *
+ * http://api.jqueryui.com/category/theming/
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden {
+	display: none;
+}
+.ui-helper-hidden-accessible {
+	border: 0;
+	clip: rect(0 0 0 0);
+	height: 1px;
+	margin: -1px;
+	overflow: hidden;
+	padding: 0;
+	position: absolute;
+	width: 1px;
+}
+.ui-helper-reset {
+	margin: 0;
+	padding: 0;
+	border: 0;
+	outline: 0;
+	line-height: 1.3;
+	text-decoration: none;
+	font-size: 100%;
+	list-style: none;
+}
+.ui-helper-clearfix:before,
+.ui-helper-clearfix:after {
+	content: "";
+	display: table;
+	border-collapse: collapse;
+}
+.ui-helper-clearfix:after {
+	clear: both;
+}
+.ui-helper-clearfix {
+	min-height: 0; /* support: IE7 */
+}
+.ui-helper-zfix {
+	width: 100%;
+	height: 100%;
+	top: 0;
+	left: 0;
+	position: absolute;
+	opacity: 0;
+	filter:Alpha(Opacity=0); /* support: IE8 */
+}
+
+.ui-front {
+	z-index: 100;
+}
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled {
+	cursor: default !important;
+}
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon {
+	display: block;
+	text-indent: -99999px;
+	overflow: hidden;
+	background-repeat: no-repeat;
+}
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay {
+	position: fixed;
+	top: 0;
+	left: 0;
+	width: 100%;
+	height: 100%;
+}
+.ui-autocomplete {
+	position: absolute;
+	top: 0;
+	left: 0;
+	cursor: default;
+}
+.ui-menu {
+	list-style: none;
+	padding: 0;
+	margin: 0;
+	display: block;
+	outline: none;
+}
+.ui-menu .ui-menu {
+	position: absolute;
+}
+.ui-menu .ui-menu-item {
+	position: relative;
+	margin: 0;
+	padding: 3px 1em 3px .4em;
+	cursor: pointer;
+	min-height: 0; /* support: IE7 */
+	/* support: IE10, see #8844 */
+	list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
+}
+.ui-menu .ui-menu-divider {
+	margin: 5px 0;
+	height: 0;
+	font-size: 0;
+	line-height: 0;
+	border-width: 1px 0 0 0;
+}
+.ui-menu .ui-state-focus,
+.ui-menu .ui-state-active {
+	margin: -1px;
+}
+
+/* icon support */
+.ui-menu-icons {
+	position: relative;
+}
+.ui-menu-icons .ui-menu-item {
+	padding-left: 2em;
+}
+
+/* left-aligned */
+.ui-menu .ui-icon {
+	position: absolute;
+	top: 0;
+	bottom: 0;
+	left: .2em;
+	margin: auto 0;
+}
+
+/* right-aligned */
+.ui-menu .ui-menu-icon {
+	left: auto;
+	right: 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jquery-ui.structure.min.css	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+/*! jQuery UI - v1.11.4 - 2015-05-20
+* http://jqueryui.com
+* Copyright 2015 jQuery Foundation and other contributors; Licensed MIT */
+
+.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:none}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{position:relative;margin:0;padding:3px 1em 3px .4em;cursor:pointer;min-height:0;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jszip-utils/dist/jszip-utils-ie.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,56 @@
+/*!
+
+JSZipUtils - A collection of cross-browser utilities to go along with JSZip.
+<http://stuk.github.io/jszip-utils>
+
+(c) 2014 Stuart Knightley, David Duponchel
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown.
+
+*/
+;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+var global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};/* jshint evil: true, newcap: false */
+/* global IEBinaryToArray_ByteStr, IEBinaryToArray_ByteStr_Last */
+"use strict";
+
+// Adapted from http://stackoverflow.com/questions/1095102/how-do-i-load-binary-image-data-using-javascript-and-xmlhttprequest
+var IEBinaryToArray_ByteStr_Script =
+    "<!-- IEBinaryToArray_ByteStr -->\r\n"+
+    "<script type='text/vbscript'>\r\n"+
+    "Function IEBinaryToArray_ByteStr(Binary)\r\n"+
+    "   IEBinaryToArray_ByteStr = CStr(Binary)\r\n"+
+    "End Function\r\n"+
+    "Function IEBinaryToArray_ByteStr_Last(Binary)\r\n"+
+    "   Dim lastIndex\r\n"+
+    "   lastIndex = LenB(Binary)\r\n"+
+    "   if lastIndex mod 2 Then\r\n"+
+    "       IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n"+
+    "   Else\r\n"+
+    "       IEBinaryToArray_ByteStr_Last = "+'""'+"\r\n"+
+    "   End If\r\n"+
+    "End Function\r\n"+
+    "</script>\r\n";
+
+// inject VBScript
+document.write(IEBinaryToArray_ByteStr_Script);
+
+global.JSZipUtils._getBinaryFromXHR = function (xhr) {
+    var binary = xhr.responseBody;
+    var byteMapping = {};
+    for ( var i = 0; i < 256; i++ ) {
+        for ( var j = 0; j < 256; j++ ) {
+            byteMapping[ String.fromCharCode( i + (j << 8) ) ] =
+                String.fromCharCode(i) + String.fromCharCode(j);
+        }
+    }
+    var rawBytes = IEBinaryToArray_ByteStr(binary);
+    var lastChr = IEBinaryToArray_ByteStr_Last(binary);
+    return rawBytes.replace(/[\s\S]/g, function( match ) {
+        return byteMapping[match];
+    }) + lastChr;
+};
+
+// enforcing Stuk's coding style
+// vim: set shiftwidth=4 softtabstop=4:
+
+},{}]},{},[1])
+;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jszip-utils/dist/jszip-utils-ie.min.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,10 @@
+/*!
+
+JSZipUtils - A collection of cross-browser utilities to go along with JSZip.
+<http://stuk.github.io/jszip-utils>
+
+(c) 2014 Stuart Knightley, David Duponchel
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown.
+
+*/
+!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(){var a="undefined"!=typeof self?self:"undefined"!=typeof window?window:{},b="<!-- IEBinaryToArray_ByteStr -->\r\n<script type='text/vbscript'>\r\nFunction IEBinaryToArray_ByteStr(Binary)\r\n   IEBinaryToArray_ByteStr = CStr(Binary)\r\nEnd Function\r\nFunction IEBinaryToArray_ByteStr_Last(Binary)\r\n   Dim lastIndex\r\n   lastIndex = LenB(Binary)\r\n   if lastIndex mod 2 Then\r\n       IEBinaryToArray_ByteStr_Last = Chr( AscB( MidB( Binary, lastIndex, 1 ) ) )\r\n   Else\r\n       IEBinaryToArray_ByteStr_Last = \"\"\r\n   End If\r\nEnd Function\r\n</script>\r\n";document.write(b),a.JSZipUtils._getBinaryFromXHR=function(a){for(var b=a.responseBody,c={},d=0;256>d;d++)for(var e=0;256>e;e++)c[String.fromCharCode(d+(e<<8))]=String.fromCharCode(d)+String.fromCharCode(e);var f=IEBinaryToArray_ByteStr(b),g=IEBinaryToArray_ByteStr_Last(b);return f.replace(/[\s\S]/g,function(a){return c[a]})+g}},{}]},{},[1]);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jszip-utils/dist/jszip-utils.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,118 @@
+/*!
+
+JSZipUtils - A collection of cross-browser utilities to go along with JSZip.
+<http://stuk.github.io/jszip-utils>
+
+(c) 2014 Stuart Knightley, David Duponchel
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown.
+
+*/
+!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.JSZipUtils=e():"undefined"!=typeof global?global.JSZipUtils=e():"undefined"!=typeof self&&(self.JSZipUtils=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
+'use strict';
+
+var JSZipUtils = {};
+// just use the responseText with xhr1, response with xhr2.
+// The transformation doesn't throw away high-order byte (with responseText)
+// because JSZip handles that case. If not used with JSZip, you may need to
+// do it, see https://developer.mozilla.org/En/Using_XMLHttpRequest#Handling_binary_data
+JSZipUtils._getBinaryFromXHR = function (xhr) {
+    // for xhr.responseText, the 0xFF mask is applied by JSZip
+    return xhr.response || xhr.responseText;
+};
+
+// taken from jQuery
+function createStandardXHR() {
+    try {
+        return new window.XMLHttpRequest();
+    } catch( e ) {}
+}
+
+function createActiveXHR() {
+    try {
+        return new window.ActiveXObject("Microsoft.XMLHTTP");
+    } catch( e ) {}
+}
+
+// Create the request object
+var createXHR = window.ActiveXObject ?
+    /* Microsoft failed to properly
+     * implement the XMLHttpRequest in IE7 (can't request local files),
+     * so we use the ActiveXObject when it is available
+     * Additionally XMLHttpRequest can be disabled in IE7/IE8 so
+     * we need a fallback.
+     */
+    function() {
+    return createStandardXHR() || createActiveXHR();
+} :
+    // For all other browsers, use the standard XMLHttpRequest object
+    createStandardXHR;
+
+
+
+JSZipUtils.getBinaryContent = function(path, callback) {
+    /*
+     * Here is the tricky part : getting the data.
+     * In firefox/chrome/opera/... setting the mimeType to 'text/plain; charset=x-user-defined'
+     * is enough, the result is in the standard xhr.responseText.
+     * cf https://developer.mozilla.org/En/XMLHttpRequest/Using_XMLHttpRequest#Receiving_binary_data_in_older_browsers
+     * In IE <= 9, we must use (the IE only) attribute responseBody
+     * (for binary data, its content is different from responseText).
+     * In IE 10, the 'charset=x-user-defined' trick doesn't work, only the
+     * responseType will work :
+     * http://msdn.microsoft.com/en-us/library/ie/hh673569%28v=vs.85%29.aspx#Binary_Object_upload_and_download
+     *
+     * I'd like to use jQuery to avoid this XHR madness, but it doesn't support
+     * the responseType attribute : http://bugs.jquery.com/ticket/11461
+     */
+    try {
+
+        var xhr = createXHR();
+
+        xhr.open('GET', path, true);
+
+        // recent browsers
+        if ("responseType" in xhr) {
+            xhr.responseType = "arraybuffer";
+        }
+
+        // older browser
+        if(xhr.overrideMimeType) {
+            xhr.overrideMimeType("text/plain; charset=x-user-defined");
+        }
+
+        xhr.onreadystatechange = function(evt) {
+            var file, err;
+            // use `xhr` and not `this`... thanks IE
+            if (xhr.readyState === 4) {
+                if (xhr.status === 200 || xhr.status === 0) {
+                    file = null;
+                    err = null;
+                    try {
+                        file = JSZipUtils._getBinaryFromXHR(xhr);
+                    } catch(e) {
+                        err = new Error(e);
+                    }
+                    callback(err, file);
+                } else {
+                    callback(new Error("Ajax error for " + path + " : " + this.status + " " + this.statusText), null);
+                }
+            }
+        };
+
+        xhr.send();
+
+    } catch (e) {
+        callback(new Error(e), null);
+    }
+};
+
+// export
+module.exports = JSZipUtils;
+
+// enforcing Stuk's coding style
+// vim: set shiftwidth=4 softtabstop=4:
+
+},{}]},{},[1])
+(1)
+});
+;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jszip-utils/dist/jszip-utils.min.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,10 @@
+/*!
+
+JSZipUtils - A collection of cross-browser utilities to go along with JSZip.
+<http://stuk.github.io/jszip-utils>
+
+(c) 2014 Stuart Knightley, David Duponchel
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip-utils/master/LICENSE.markdown.
+
+*/
+!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.JSZipUtils=a():"undefined"!=typeof global?global.JSZipUtils=a():"undefined"!=typeof self&&(self.JSZipUtils=a())}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){"use strict";function c(){try{return new window.XMLHttpRequest}catch(a){}}function d(){try{return new window.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}}var e={};e._getBinaryFromXHR=function(a){return a.response||a.responseText};var f=window.ActiveXObject?function(){return c()||d()}:c;e.getBinaryContent=function(a,b){try{var c=f();c.open("GET",a,!0),"responseType"in c&&(c.responseType="arraybuffer"),c.overrideMimeType&&c.overrideMimeType("text/plain; charset=x-user-defined"),c.onreadystatechange=function(){var d,f;if(4===c.readyState)if(200===c.status||0===c.status){d=null,f=null;try{d=e._getBinaryFromXHR(c)}catch(g){f=new Error(g)}b(f,d)}else b(new Error("Ajax error for "+a+" : "+this.status+" "+this.statusText),null)},c.send()}catch(d){b(new Error(d),null)}},b.exports=e},{}]},{},[1])(1)});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jszip/dist/jszip.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,9155 @@
+/*!
+
+JSZip - A Javascript class for generating and reading zip files
+<http://stuartk.com/jszip>
+
+(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
+
+JSZip uses the library pako released under the MIT license :
+https://github.com/nodeca/pako/blob/master/LICENSE
+*/
+!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.JSZip=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
+'use strict';
+// private property
+var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
+
+
+// public method for encoding
+exports.encode = function(input, utf8) {
+    var output = "";
+    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
+    var i = 0;
+
+    while (i < input.length) {
+
+        chr1 = input.charCodeAt(i++);
+        chr2 = input.charCodeAt(i++);
+        chr3 = input.charCodeAt(i++);
+
+        enc1 = chr1 >> 2;
+        enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
+        enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
+        enc4 = chr3 & 63;
+
+        if (isNaN(chr2)) {
+            enc3 = enc4 = 64;
+        }
+        else if (isNaN(chr3)) {
+            enc4 = 64;
+        }
+
+        output = output + _keyStr.charAt(enc1) + _keyStr.charAt(enc2) + _keyStr.charAt(enc3) + _keyStr.charAt(enc4);
+
+    }
+
+    return output;
+};
+
+// public method for decoding
+exports.decode = function(input, utf8) {
+    var output = "";
+    var chr1, chr2, chr3;
+    var enc1, enc2, enc3, enc4;
+    var i = 0;
+
+    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");
+
+    while (i < input.length) {
+
+        enc1 = _keyStr.indexOf(input.charAt(i++));
+        enc2 = _keyStr.indexOf(input.charAt(i++));
+        enc3 = _keyStr.indexOf(input.charAt(i++));
+        enc4 = _keyStr.indexOf(input.charAt(i++));
+
+        chr1 = (enc1 << 2) | (enc2 >> 4);
+        chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
+        chr3 = ((enc3 & 3) << 6) | enc4;
+
+        output = output + String.fromCharCode(chr1);
+
+        if (enc3 != 64) {
+            output = output + String.fromCharCode(chr2);
+        }
+        if (enc4 != 64) {
+            output = output + String.fromCharCode(chr3);
+        }
+
+    }
+
+    return output;
+
+};
+
+},{}],2:[function(_dereq_,module,exports){
+'use strict';
+function CompressedObject() {
+    this.compressedSize = 0;
+    this.uncompressedSize = 0;
+    this.crc32 = 0;
+    this.compressionMethod = null;
+    this.compressedContent = null;
+}
+
+CompressedObject.prototype = {
+    /**
+     * Return the decompressed content in an unspecified format.
+     * The format will depend on the decompressor.
+     * @return {Object} the decompressed content.
+     */
+    getContent: function() {
+        return null; // see implementation
+    },
+    /**
+     * Return the compressed content in an unspecified format.
+     * The format will depend on the compressed conten source.
+     * @return {Object} the compressed content.
+     */
+    getCompressedContent: function() {
+        return null; // see implementation
+    }
+};
+module.exports = CompressedObject;
+
+},{}],3:[function(_dereq_,module,exports){
+'use strict';
+exports.STORE = {
+    magic: "\x00\x00",
+    compress: function(content, compressionOptions) {
+        return content; // no compression
+    },
+    uncompress: function(content) {
+        return content; // no compression
+    },
+    compressInputType: null,
+    uncompressInputType: null
+};
+exports.DEFLATE = _dereq_('./flate');
+
+},{"./flate":8}],4:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+
+var table = [
+    0x00000000, 0x77073096, 0xEE0E612C, 0x990951BA,
+    0x076DC419, 0x706AF48F, 0xE963A535, 0x9E6495A3,
+    0x0EDB8832, 0x79DCB8A4, 0xE0D5E91E, 0x97D2D988,
+    0x09B64C2B, 0x7EB17CBD, 0xE7B82D07, 0x90BF1D91,
+    0x1DB71064, 0x6AB020F2, 0xF3B97148, 0x84BE41DE,
+    0x1ADAD47D, 0x6DDDE4EB, 0xF4D4B551, 0x83D385C7,
+    0x136C9856, 0x646BA8C0, 0xFD62F97A, 0x8A65C9EC,
+    0x14015C4F, 0x63066CD9, 0xFA0F3D63, 0x8D080DF5,
+    0x3B6E20C8, 0x4C69105E, 0xD56041E4, 0xA2677172,
+    0x3C03E4D1, 0x4B04D447, 0xD20D85FD, 0xA50AB56B,
+    0x35B5A8FA, 0x42B2986C, 0xDBBBC9D6, 0xACBCF940,
+    0x32D86CE3, 0x45DF5C75, 0xDCD60DCF, 0xABD13D59,
+    0x26D930AC, 0x51DE003A, 0xC8D75180, 0xBFD06116,
+    0x21B4F4B5, 0x56B3C423, 0xCFBA9599, 0xB8BDA50F,
+    0x2802B89E, 0x5F058808, 0xC60CD9B2, 0xB10BE924,
+    0x2F6F7C87, 0x58684C11, 0xC1611DAB, 0xB6662D3D,
+    0x76DC4190, 0x01DB7106, 0x98D220BC, 0xEFD5102A,
+    0x71B18589, 0x06B6B51F, 0x9FBFE4A5, 0xE8B8D433,
+    0x7807C9A2, 0x0F00F934, 0x9609A88E, 0xE10E9818,
+    0x7F6A0DBB, 0x086D3D2D, 0x91646C97, 0xE6635C01,
+    0x6B6B51F4, 0x1C6C6162, 0x856530D8, 0xF262004E,
+    0x6C0695ED, 0x1B01A57B, 0x8208F4C1, 0xF50FC457,
+    0x65B0D9C6, 0x12B7E950, 0x8BBEB8EA, 0xFCB9887C,
+    0x62DD1DDF, 0x15DA2D49, 0x8CD37CF3, 0xFBD44C65,
+    0x4DB26158, 0x3AB551CE, 0xA3BC0074, 0xD4BB30E2,
+    0x4ADFA541, 0x3DD895D7, 0xA4D1C46D, 0xD3D6F4FB,
+    0x4369E96A, 0x346ED9FC, 0xAD678846, 0xDA60B8D0,
+    0x44042D73, 0x33031DE5, 0xAA0A4C5F, 0xDD0D7CC9,
+    0x5005713C, 0x270241AA, 0xBE0B1010, 0xC90C2086,
+    0x5768B525, 0x206F85B3, 0xB966D409, 0xCE61E49F,
+    0x5EDEF90E, 0x29D9C998, 0xB0D09822, 0xC7D7A8B4,
+    0x59B33D17, 0x2EB40D81, 0xB7BD5C3B, 0xC0BA6CAD,
+    0xEDB88320, 0x9ABFB3B6, 0x03B6E20C, 0x74B1D29A,
+    0xEAD54739, 0x9DD277AF, 0x04DB2615, 0x73DC1683,
+    0xE3630B12, 0x94643B84, 0x0D6D6A3E, 0x7A6A5AA8,
+    0xE40ECF0B, 0x9309FF9D, 0x0A00AE27, 0x7D079EB1,
+    0xF00F9344, 0x8708A3D2, 0x1E01F268, 0x6906C2FE,
+    0xF762575D, 0x806567CB, 0x196C3671, 0x6E6B06E7,
+    0xFED41B76, 0x89D32BE0, 0x10DA7A5A, 0x67DD4ACC,
+    0xF9B9DF6F, 0x8EBEEFF9, 0x17B7BE43, 0x60B08ED5,
+    0xD6D6A3E8, 0xA1D1937E, 0x38D8C2C4, 0x4FDFF252,
+    0xD1BB67F1, 0xA6BC5767, 0x3FB506DD, 0x48B2364B,
+    0xD80D2BDA, 0xAF0A1B4C, 0x36034AF6, 0x41047A60,
+    0xDF60EFC3, 0xA867DF55, 0x316E8EEF, 0x4669BE79,
+    0xCB61B38C, 0xBC66831A, 0x256FD2A0, 0x5268E236,
+    0xCC0C7795, 0xBB0B4703, 0x220216B9, 0x5505262F,
+    0xC5BA3BBE, 0xB2BD0B28, 0x2BB45A92, 0x5CB36A04,
+    0xC2D7FFA7, 0xB5D0CF31, 0x2CD99E8B, 0x5BDEAE1D,
+    0x9B64C2B0, 0xEC63F226, 0x756AA39C, 0x026D930A,
+    0x9C0906A9, 0xEB0E363F, 0x72076785, 0x05005713,
+    0x95BF4A82, 0xE2B87A14, 0x7BB12BAE, 0x0CB61B38,
+    0x92D28E9B, 0xE5D5BE0D, 0x7CDCEFB7, 0x0BDBDF21,
+    0x86D3D2D4, 0xF1D4E242, 0x68DDB3F8, 0x1FDA836E,
+    0x81BE16CD, 0xF6B9265B, 0x6FB077E1, 0x18B74777,
+    0x88085AE6, 0xFF0F6A70, 0x66063BCA, 0x11010B5C,
+    0x8F659EFF, 0xF862AE69, 0x616BFFD3, 0x166CCF45,
+    0xA00AE278, 0xD70DD2EE, 0x4E048354, 0x3903B3C2,
+    0xA7672661, 0xD06016F7, 0x4969474D, 0x3E6E77DB,
+    0xAED16A4A, 0xD9D65ADC, 0x40DF0B66, 0x37D83BF0,
+    0xA9BCAE53, 0xDEBB9EC5, 0x47B2CF7F, 0x30B5FFE9,
+    0xBDBDF21C, 0xCABAC28A, 0x53B39330, 0x24B4A3A6,
+    0xBAD03605, 0xCDD70693, 0x54DE5729, 0x23D967BF,
+    0xB3667A2E, 0xC4614AB8, 0x5D681B02, 0x2A6F2B94,
+    0xB40BBE37, 0xC30C8EA1, 0x5A05DF1B, 0x2D02EF8D
+];
+
+/**
+ *
+ *  Javascript crc32
+ *  http://www.webtoolkit.info/
+ *
+ */
+module.exports = function crc32(input, crc) {
+    if (typeof input === "undefined" || !input.length) {
+        return 0;
+    }
+
+    var isArray = utils.getTypeOf(input) !== "string";
+
+    if (typeof(crc) == "undefined") {
+        crc = 0;
+    }
+    var x = 0;
+    var y = 0;
+    var b = 0;
+
+    crc = crc ^ (-1);
+    for (var i = 0, iTop = input.length; i < iTop; i++) {
+        b = isArray ? input[i] : input.charCodeAt(i);
+        y = (crc ^ b) & 0xFF;
+        x = table[y];
+        crc = (crc >>> 8) ^ x;
+    }
+
+    return crc ^ (-1);
+};
+// vim: set shiftwidth=4 softtabstop=4:
+
+},{"./utils":21}],5:[function(_dereq_,module,exports){
+'use strict';
+var utils = _dereq_('./utils');
+
+function DataReader(data) {
+    this.data = null; // type : see implementation
+    this.length = 0;
+    this.index = 0;
+}
+DataReader.prototype = {
+    /**
+     * Check that the offset will not go too far.
+     * @param {string} offset the additional offset to check.
+     * @throws {Error} an Error if the offset is out of bounds.
+     */
+    checkOffset: function(offset) {
+        this.checkIndex(this.index + offset);
+    },
+    /**
+     * Check that the specifed index will not be too far.
+     * @param {string} newIndex the index to check.
+     * @throws {Error} an Error if the index is out of bounds.
+     */
+    checkIndex: function(newIndex) {
+        if (this.length < newIndex || newIndex < 0) {
+            throw new Error("End of data reached (data length = " + this.length + ", asked index = " + (newIndex) + "). Corrupted zip ?");
+        }
+    },
+    /**
+     * Change the index.
+     * @param {number} newIndex The new index.
+     * @throws {Error} if the new index is out of the data.
+     */
+    setIndex: function(newIndex) {
+        this.checkIndex(newIndex);
+        this.index = newIndex;
+    },
+    /**
+     * Skip the next n bytes.
+     * @param {number} n the number of bytes to skip.
+     * @throws {Error} if the new index is out of the data.
+     */
+    skip: function(n) {
+        this.setIndex(this.index + n);
+    },
+    /**
+     * Get the byte at the specified index.
+     * @param {number} i the index to use.
+     * @return {number} a byte.
+     */
+    byteAt: function(i) {
+        // see implementations
+    },
+    /**
+     * Get the next number with a given byte size.
+     * @param {number} size the number of bytes to read.
+     * @return {number} the corresponding number.
+     */
+    readInt: function(size) {
+        var result = 0,
+            i;
+        this.checkOffset(size);
+        for (i = this.index + size - 1; i >= this.index; i--) {
+            result = (result << 8) + this.byteAt(i);
+        }
+        this.index += size;
+        return result;
+    },
+    /**
+     * Get the next string with a given byte size.
+     * @param {number} size the number of bytes to read.
+     * @return {string} the corresponding string.
+     */
+    readString: function(size) {
+        return utils.transformTo("string", this.readData(size));
+    },
+    /**
+     * Get raw data without conversion, <size> bytes.
+     * @param {number} size the number of bytes to read.
+     * @return {Object} the raw data, implementation specific.
+     */
+    readData: function(size) {
+        // see implementations
+    },
+    /**
+     * Find the last occurence of a zip signature (4 bytes).
+     * @param {string} sig the signature to find.
+     * @return {number} the index of the last occurence, -1 if not found.
+     */
+    lastIndexOfSignature: function(sig) {
+        // see implementations
+    },
+    /**
+     * Get the next date.
+     * @return {Date} the date.
+     */
+    readDate: function() {
+        var dostime = this.readInt(4);
+        return new Date(
+        ((dostime >> 25) & 0x7f) + 1980, // year
+        ((dostime >> 21) & 0x0f) - 1, // month
+        (dostime >> 16) & 0x1f, // day
+        (dostime >> 11) & 0x1f, // hour
+        (dostime >> 5) & 0x3f, // minute
+        (dostime & 0x1f) << 1); // second
+    }
+};
+module.exports = DataReader;
+
+},{"./utils":21}],6:[function(_dereq_,module,exports){
+'use strict';
+exports.base64 = false;
+exports.binary = false;
+exports.dir = false;
+exports.createFolders = false;
+exports.date = null;
+exports.compression = null;
+exports.compressionOptions = null;
+exports.comment = null;
+exports.unixPermissions = null;
+exports.dosPermissions = null;
+
+},{}],7:[function(_dereq_,module,exports){
+'use strict';
+var utils = _dereq_('./utils');
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.string2binary = function(str) {
+    return utils.string2binary(str);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.string2Uint8Array = function(str) {
+    return utils.transformTo("uint8array", str);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.uint8Array2String = function(array) {
+    return utils.transformTo("string", array);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.string2Blob = function(str) {
+    var buffer = utils.transformTo("arraybuffer", str);
+    return utils.arrayBuffer2Blob(buffer);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.arrayBuffer2Blob = function(buffer) {
+    return utils.arrayBuffer2Blob(buffer);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.transformTo = function(outputType, input) {
+    return utils.transformTo(outputType, input);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.getTypeOf = function(input) {
+    return utils.getTypeOf(input);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.checkSupport = function(type) {
+    return utils.checkSupport(type);
+};
+
+/**
+ * @deprecated
+ * This value will be removed in a future version without replacement.
+ */
+exports.MAX_VALUE_16BITS = utils.MAX_VALUE_16BITS;
+
+/**
+ * @deprecated
+ * This value will be removed in a future version without replacement.
+ */
+exports.MAX_VALUE_32BITS = utils.MAX_VALUE_32BITS;
+
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.pretty = function(str) {
+    return utils.pretty(str);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.findCompression = function(compressionMethod) {
+    return utils.findCompression(compressionMethod);
+};
+
+/**
+ * @deprecated
+ * This function will be removed in a future version without replacement.
+ */
+exports.isRegExp = function (object) {
+    return utils.isRegExp(object);
+};
+
+
+},{"./utils":21}],8:[function(_dereq_,module,exports){
+'use strict';
+var USE_TYPEDARRAY = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Uint32Array !== 'undefined');
+
+var pako = _dereq_("pako");
+exports.uncompressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
+exports.compressInputType = USE_TYPEDARRAY ? "uint8array" : "array";
+
+exports.magic = "\x08\x00";
+exports.compress = function(input, compressionOptions) {
+    return pako.deflateRaw(input, {
+        level : compressionOptions.level || -1 // default compression
+    });
+};
+exports.uncompress =  function(input) {
+    return pako.inflateRaw(input);
+};
+
+},{"pako":24}],9:[function(_dereq_,module,exports){
+'use strict';
+
+var base64 = _dereq_('./base64');
+
+/**
+Usage:
+   zip = new JSZip();
+   zip.file("hello.txt", "Hello, World!").file("tempfile", "nothing");
+   zip.folder("images").file("smile.gif", base64Data, {base64: true});
+   zip.file("Xmas.txt", "Ho ho ho !", {date : new Date("December 25, 2007 00:00:01")});
+   zip.remove("tempfile");
+
+   base64zip = zip.generate();
+
+**/
+
+/**
+ * Representation a of zip file in js
+ * @constructor
+ * @param {String=|ArrayBuffer=|Uint8Array=} data the data to load, if any (optional).
+ * @param {Object=} options the options for creating this objects (optional).
+ */
+function JSZip(data, options) {
+    // if this constructor is used without `new`, it adds `new` before itself:
+    if(!(this instanceof JSZip)) return new JSZip(data, options);
+
+    // object containing the files :
+    // {
+    //   "folder/" : {...},
+    //   "folder/data.txt" : {...}
+    // }
+    this.files = {};
+
+    this.comment = null;
+
+    // Where we are in the hierarchy
+    this.root = "";
+    if (data) {
+        this.load(data, options);
+    }
+    this.clone = function() {
+        var newObj = new JSZip();
+        for (var i in this) {
+            if (typeof this[i] !== "function") {
+                newObj[i] = this[i];
+            }
+        }
+        return newObj;
+    };
+}
+JSZip.prototype = _dereq_('./object');
+JSZip.prototype.load = _dereq_('./load');
+JSZip.support = _dereq_('./support');
+JSZip.defaults = _dereq_('./defaults');
+
+/**
+ * @deprecated
+ * This namespace will be removed in a future version without replacement.
+ */
+JSZip.utils = _dereq_('./deprecatedPublicUtils');
+
+JSZip.base64 = {
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    encode : function(input) {
+        return base64.encode(input);
+    },
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    decode : function(input) {
+        return base64.decode(input);
+    }
+};
+JSZip.compressions = _dereq_('./compressions');
+module.exports = JSZip;
+
+},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(_dereq_,module,exports){
+'use strict';
+var base64 = _dereq_('./base64');
+var ZipEntries = _dereq_('./zipEntries');
+module.exports = function(data, options) {
+    var files, zipEntries, i, input;
+    options = options || {};
+    if (options.base64) {
+        data = base64.decode(data);
+    }
+
+    zipEntries = new ZipEntries(data, options);
+    files = zipEntries.files;
+    for (i = 0; i < files.length; i++) {
+        input = files[i];
+        this.file(input.fileName, input.decompressed, {
+            binary: true,
+            optimizedBinaryString: true,
+            date: input.date,
+            dir: input.dir,
+            comment : input.fileComment.length ? input.fileComment : null,
+            unixPermissions : input.unixPermissions,
+            dosPermissions : input.dosPermissions,
+            createFolders: options.createFolders
+        });
+    }
+    if (zipEntries.zipComment.length) {
+        this.comment = zipEntries.zipComment;
+    }
+
+    return this;
+};
+
+},{"./base64":1,"./zipEntries":22}],11:[function(_dereq_,module,exports){
+(function (Buffer){
+'use strict';
+module.exports = function(data, encoding){
+    return new Buffer(data, encoding);
+};
+module.exports.test = function(b){
+    return Buffer.isBuffer(b);
+};
+
+}).call(this,(typeof Buffer !== "undefined" ? Buffer : undefined))
+},{}],12:[function(_dereq_,module,exports){
+'use strict';
+var Uint8ArrayReader = _dereq_('./uint8ArrayReader');
+
+function NodeBufferReader(data) {
+    this.data = data;
+    this.length = this.data.length;
+    this.index = 0;
+}
+NodeBufferReader.prototype = new Uint8ArrayReader();
+
+/**
+ * @see DataReader.readData
+ */
+NodeBufferReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    var result = this.data.slice(this.index, this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = NodeBufferReader;
+
+},{"./uint8ArrayReader":18}],13:[function(_dereq_,module,exports){
+'use strict';
+var support = _dereq_('./support');
+var utils = _dereq_('./utils');
+var crc32 = _dereq_('./crc32');
+var signature = _dereq_('./signature');
+var defaults = _dereq_('./defaults');
+var base64 = _dereq_('./base64');
+var compressions = _dereq_('./compressions');
+var CompressedObject = _dereq_('./compressedObject');
+var nodeBuffer = _dereq_('./nodeBuffer');
+var utf8 = _dereq_('./utf8');
+var StringWriter = _dereq_('./stringWriter');
+var Uint8ArrayWriter = _dereq_('./uint8ArrayWriter');
+
+/**
+ * Returns the raw data of a ZipObject, decompress the content if necessary.
+ * @param {ZipObject} file the file to use.
+ * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.
+ */
+var getRawData = function(file) {
+    if (file._data instanceof CompressedObject) {
+        file._data = file._data.getContent();
+        file.options.binary = true;
+        file.options.base64 = false;
+
+        if (utils.getTypeOf(file._data) === "uint8array") {
+            var copy = file._data;
+            // when reading an arraybuffer, the CompressedObject mechanism will keep it and subarray() a Uint8Array.
+            // if we request a file in the same format, we might get the same Uint8Array or its ArrayBuffer (the original zip file).
+            file._data = new Uint8Array(copy.length);
+            // with an empty Uint8Array, Opera fails with a "Offset larger than array size"
+            if (copy.length !== 0) {
+                file._data.set(copy, 0);
+            }
+        }
+    }
+    return file._data;
+};
+
+/**
+ * Returns the data of a ZipObject in a binary form. If the content is an unicode string, encode it.
+ * @param {ZipObject} file the file to use.
+ * @return {String|ArrayBuffer|Uint8Array|Buffer} the data.
+ */
+var getBinaryData = function(file) {
+    var result = getRawData(file),
+        type = utils.getTypeOf(result);
+    if (type === "string") {
+        if (!file.options.binary) {
+            // unicode text !
+            // unicode string => binary string is a painful process, check if we can avoid it.
+            if (support.nodebuffer) {
+                return nodeBuffer(result, "utf-8");
+            }
+        }
+        return file.asBinary();
+    }
+    return result;
+};
+
+/**
+ * Transform this._data into a string.
+ * @param {function} filter a function String -> String, applied if not null on the result.
+ * @return {String} the string representing this._data.
+ */
+var dataToString = function(asUTF8) {
+    var result = getRawData(this);
+    if (result === null || typeof result === "undefined") {
+        return "";
+    }
+    // if the data is a base64 string, we decode it before checking the encoding !
+    if (this.options.base64) {
+        result = base64.decode(result);
+    }
+    if (asUTF8 && this.options.binary) {
+        // JSZip.prototype.utf8decode supports arrays as input
+        // skip to array => string step, utf8decode will do it.
+        result = out.utf8decode(result);
+    }
+    else {
+        // no utf8 transformation, do the array => string step.
+        result = utils.transformTo("string", result);
+    }
+
+    if (!asUTF8 && !this.options.binary) {
+        result = utils.transformTo("string", out.utf8encode(result));
+    }
+    return result;
+};
+/**
+ * A simple object representing a file in the zip file.
+ * @constructor
+ * @param {string} name the name of the file
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data
+ * @param {Object} options the options of the file
+ */
+var ZipObject = function(name, data, options) {
+    this.name = name;
+    this.dir = options.dir;
+    this.date = options.date;
+    this.comment = options.comment;
+    this.unixPermissions = options.unixPermissions;
+    this.dosPermissions = options.dosPermissions;
+
+    this._data = data;
+    this.options = options;
+
+    /*
+     * This object contains initial values for dir and date.
+     * With them, we can check if the user changed the deprecated metadata in
+     * `ZipObject#options` or not.
+     */
+    this._initialMetadata = {
+      dir : options.dir,
+      date : options.date
+    };
+};
+
+ZipObject.prototype = {
+    /**
+     * Return the content as UTF8 string.
+     * @return {string} the UTF8 string.
+     */
+    asText: function() {
+        return dataToString.call(this, true);
+    },
+    /**
+     * Returns the binary content.
+     * @return {string} the content as binary.
+     */
+    asBinary: function() {
+        return dataToString.call(this, false);
+    },
+    /**
+     * Returns the content as a nodejs Buffer.
+     * @return {Buffer} the content as a Buffer.
+     */
+    asNodeBuffer: function() {
+        var result = getBinaryData(this);
+        return utils.transformTo("nodebuffer", result);
+    },
+    /**
+     * Returns the content as an Uint8Array.
+     * @return {Uint8Array} the content as an Uint8Array.
+     */
+    asUint8Array: function() {
+        var result = getBinaryData(this);
+        return utils.transformTo("uint8array", result);
+    },
+    /**
+     * Returns the content as an ArrayBuffer.
+     * @return {ArrayBuffer} the content as an ArrayBufer.
+     */
+    asArrayBuffer: function() {
+        return this.asUint8Array().buffer;
+    }
+};
+
+/**
+ * Transform an integer into a string in hexadecimal.
+ * @private
+ * @param {number} dec the number to convert.
+ * @param {number} bytes the number of bytes to generate.
+ * @returns {string} the result.
+ */
+var decToHex = function(dec, bytes) {
+    var hex = "",
+        i;
+    for (i = 0; i < bytes; i++) {
+        hex += String.fromCharCode(dec & 0xff);
+        dec = dec >>> 8;
+    }
+    return hex;
+};
+
+/**
+ * Merge the objects passed as parameters into a new one.
+ * @private
+ * @param {...Object} var_args All objects to merge.
+ * @return {Object} a new object with the data of the others.
+ */
+var extend = function() {
+    var result = {}, i, attr;
+    for (i = 0; i < arguments.length; i++) { // arguments is not enumerable in some browsers
+        for (attr in arguments[i]) {
+            if (arguments[i].hasOwnProperty(attr) && typeof result[attr] === "undefined") {
+                result[attr] = arguments[i][attr];
+            }
+        }
+    }
+    return result;
+};
+
+/**
+ * Transforms the (incomplete) options from the user into the complete
+ * set of options to create a file.
+ * @private
+ * @param {Object} o the options from the user.
+ * @return {Object} the complete set of options.
+ */
+var prepareFileAttrs = function(o) {
+    o = o || {};
+    if (o.base64 === true && (o.binary === null || o.binary === undefined)) {
+        o.binary = true;
+    }
+    o = extend(o, defaults);
+    o.date = o.date || new Date();
+    if (o.compression !== null) o.compression = o.compression.toUpperCase();
+
+    return o;
+};
+
+/**
+ * Add a file in the current folder.
+ * @private
+ * @param {string} name the name of the file
+ * @param {String|ArrayBuffer|Uint8Array|Buffer} data the data of the file
+ * @param {Object} o the options of the file
+ * @return {Object} the new file.
+ */
+var fileAdd = function(name, data, o) {
+    // be sure sub folders exist
+    var dataType = utils.getTypeOf(data),
+        parent;
+
+    o = prepareFileAttrs(o);
+
+    if (typeof o.unixPermissions === "string") {
+        o.unixPermissions = parseInt(o.unixPermissions, 8);
+    }
+
+    // UNX_IFDIR  0040000 see zipinfo.c
+    if (o.unixPermissions && (o.unixPermissions & 0x4000)) {
+        o.dir = true;
+    }
+    // Bit 4    Directory
+    if (o.dosPermissions && (o.dosPermissions & 0x0010)) {
+        o.dir = true;
+    }
+
+    if (o.dir) {
+        name = forceTrailingSlash(name);
+    }
+
+    if (o.createFolders && (parent = parentFolder(name))) {
+        folderAdd.call(this, parent, true);
+    }
+
+    if (o.dir || data === null || typeof data === "undefined") {
+        o.base64 = false;
+        o.binary = false;
+        data = null;
+        dataType = null;
+    }
+    else if (dataType === "string") {
+        if (o.binary && !o.base64) {
+            // optimizedBinaryString == true means that the file has already been filtered with a 0xFF mask
+            if (o.optimizedBinaryString !== true) {
+                // this is a string, not in a base64 format.
+                // Be sure that this is a correct "binary string"
+                data = utils.string2binary(data);
+            }
+        }
+    }
+    else { // arraybuffer, uint8array, ...
+        o.base64 = false;
+        o.binary = true;
+
+        if (!dataType && !(data instanceof CompressedObject)) {
+            throw new Error("The data of '" + name + "' is in an unsupported format !");
+        }
+
+        // special case : it's way easier to work with Uint8Array than with ArrayBuffer
+        if (dataType === "arraybuffer") {
+            data = utils.transformTo("uint8array", data);
+        }
+    }
+
+    var object = new ZipObject(name, data, o);
+    this.files[name] = object;
+    return object;
+};
+
+/**
+ * Find the parent folder of the path.
+ * @private
+ * @param {string} path the path to use
+ * @return {string} the parent folder, or ""
+ */
+var parentFolder = function (path) {
+    if (path.slice(-1) == '/') {
+        path = path.substring(0, path.length - 1);
+    }
+    var lastSlash = path.lastIndexOf('/');
+    return (lastSlash > 0) ? path.substring(0, lastSlash) : "";
+};
+
+
+/**
+ * Returns the path with a slash at the end.
+ * @private
+ * @param {String} path the path to check.
+ * @return {String} the path with a trailing slash.
+ */
+var forceTrailingSlash = function(path) {
+    // Check the name ends with a /
+    if (path.slice(-1) != "/") {
+        path += "/"; // IE doesn't like substr(-1)
+    }
+    return path;
+};
+/**
+ * Add a (sub) folder in the current folder.
+ * @private
+ * @param {string} name the folder's name
+ * @param {boolean=} [createFolders] If true, automatically create sub
+ *  folders. Defaults to false.
+ * @return {Object} the new folder.
+ */
+var folderAdd = function(name, createFolders) {
+    createFolders = (typeof createFolders !== 'undefined') ? createFolders : false;
+
+    name = forceTrailingSlash(name);
+
+    // Does this folder already exist?
+    if (!this.files[name]) {
+        fileAdd.call(this, name, null, {
+            dir: true,
+            createFolders: createFolders
+        });
+    }
+    return this.files[name];
+};
+
+/**
+ * Generate a JSZip.CompressedObject for a given zipOject.
+ * @param {ZipObject} file the object to read.
+ * @param {JSZip.compression} compression the compression to use.
+ * @param {Object} compressionOptions the options to use when compressing.
+ * @return {JSZip.CompressedObject} the compressed result.
+ */
+var generateCompressedObjectFrom = function(file, compression, compressionOptions) {
+    var result = new CompressedObject(),
+        content;
+
+    // the data has not been decompressed, we might reuse things !
+    if (file._data instanceof CompressedObject) {
+        result.uncompressedSize = file._data.uncompressedSize;
+        result.crc32 = file._data.crc32;
+
+        if (result.uncompressedSize === 0 || file.dir) {
+            compression = compressions['STORE'];
+            result.compressedContent = "";
+            result.crc32 = 0;
+        }
+        else if (file._data.compressionMethod === compression.magic) {
+            result.compressedContent = file._data.getCompressedContent();
+        }
+        else {
+            content = file._data.getContent();
+            // need to decompress / recompress
+            result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions);
+        }
+    }
+    else {
+        // have uncompressed data
+        content = getBinaryData(file);
+        if (!content || content.length === 0 || file.dir) {
+            compression = compressions['STORE'];
+            content = "";
+        }
+        result.uncompressedSize = content.length;
+        result.crc32 = crc32(content);
+        result.compressedContent = compression.compress(utils.transformTo(compression.compressInputType, content), compressionOptions);
+    }
+
+    result.compressedSize = result.compressedContent.length;
+    result.compressionMethod = compression.magic;
+
+    return result;
+};
+
+
+
+
+/**
+ * Generate the UNIX part of the external file attributes.
+ * @param {Object} unixPermissions the unix permissions or null.
+ * @param {Boolean} isDir true if the entry is a directory, false otherwise.
+ * @return {Number} a 32 bit integer.
+ *
+ * adapted from http://unix.stackexchange.com/questions/14705/the-zip-formats-external-file-attribute :
+ *
+ * TTTTsstrwxrwxrwx0000000000ADVSHR
+ * ^^^^____________________________ file type, see zipinfo.c (UNX_*)
+ *     ^^^_________________________ setuid, setgid, sticky
+ *        ^^^^^^^^^________________ permissions
+ *                 ^^^^^^^^^^______ not used ?
+ *                           ^^^^^^ DOS attribute bits : Archive, Directory, Volume label, System file, Hidden, Read only
+ */
+var generateUnixExternalFileAttr = function (unixPermissions, isDir) {
+
+    var result = unixPermissions;
+    if (!unixPermissions) {
+        // I can't use octal values in strict mode, hence the hexa.
+        //  040775 => 0x41fd
+        // 0100664 => 0x81b4
+        result = isDir ? 0x41fd : 0x81b4;
+    }
+
+    return (result & 0xFFFF) << 16;
+};
+
+/**
+ * Generate the DOS part of the external file attributes.
+ * @param {Object} dosPermissions the dos permissions or null.
+ * @param {Boolean} isDir true if the entry is a directory, false otherwise.
+ * @return {Number} a 32 bit integer.
+ *
+ * Bit 0     Read-Only
+ * Bit 1     Hidden
+ * Bit 2     System
+ * Bit 3     Volume Label
+ * Bit 4     Directory
+ * Bit 5     Archive
+ */
+var generateDosExternalFileAttr = function (dosPermissions, isDir) {
+
+    // the dir flag is already set for compatibility
+
+    return (dosPermissions || 0)  & 0x3F;
+};
+
+/**
+ * Generate the various parts used in the construction of the final zip file.
+ * @param {string} name the file name.
+ * @param {ZipObject} file the file content.
+ * @param {JSZip.CompressedObject} compressedObject the compressed object.
+ * @param {number} offset the current offset from the start of the zip file.
+ * @param {String} platform let's pretend we are this platform (change platform dependents fields)
+ * @return {object} the zip parts.
+ */
+var generateZipParts = function(name, file, compressedObject, offset, platform) {
+    var data = compressedObject.compressedContent,
+        utfEncodedFileName = utils.transformTo("string", utf8.utf8encode(file.name)),
+        comment = file.comment || "",
+        utfEncodedComment = utils.transformTo("string", utf8.utf8encode(comment)),
+        useUTF8ForFileName = utfEncodedFileName.length !== file.name.length,
+        useUTF8ForComment = utfEncodedComment.length !== comment.length,
+        o = file.options,
+        dosTime,
+        dosDate,
+        extraFields = "",
+        unicodePathExtraField = "",
+        unicodeCommentExtraField = "",
+        dir, date;
+
+
+    // handle the deprecated options.dir
+    if (file._initialMetadata.dir !== file.dir) {
+        dir = file.dir;
+    } else {
+        dir = o.dir;
+    }
+
+    // handle the deprecated options.date
+    if(file._initialMetadata.date !== file.date) {
+        date = file.date;
+    } else {
+        date = o.date;
+    }
+
+    var extFileAttr = 0;
+    var versionMadeBy = 0;
+    if (dir) {
+        // dos or unix, we set the dos dir flag
+        extFileAttr |= 0x00010;
+    }
+    if(platform === "UNIX") {
+        versionMadeBy = 0x031E; // UNIX, version 3.0
+        extFileAttr |= generateUnixExternalFileAttr(file.unixPermissions, dir);
+    } else { // DOS or other, fallback to DOS
+        versionMadeBy = 0x0014; // DOS, version 2.0
+        extFileAttr |= generateDosExternalFileAttr(file.dosPermissions, dir);
+    }
+
+    // date
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/52/13.html
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/65/16.html
+    // @see http://www.delorie.com/djgpp/doc/rbinter/it/66/16.html
+
+    dosTime = date.getHours();
+    dosTime = dosTime << 6;
+    dosTime = dosTime | date.getMinutes();
+    dosTime = dosTime << 5;
+    dosTime = dosTime | date.getSeconds() / 2;
+
+    dosDate = date.getFullYear() - 1980;
+    dosDate = dosDate << 4;
+    dosDate = dosDate | (date.getMonth() + 1);
+    dosDate = dosDate << 5;
+    dosDate = dosDate | date.getDate();
+
+    if (useUTF8ForFileName) {
+        // set the unicode path extra field. unzip needs at least one extra
+        // field to correctly handle unicode path, so using the path is as good
+        // as any other information. This could improve the situation with
+        // other archive managers too.
+        // This field is usually used without the utf8 flag, with a non
+        // unicode path in the header (winrar, winzip). This helps (a bit)
+        // with the messy Windows' default compressed folders feature but
+        // breaks on p7zip which doesn't seek the unicode path extra field.
+        // So for now, UTF-8 everywhere !
+        unicodePathExtraField =
+            // Version
+            decToHex(1, 1) +
+            // NameCRC32
+            decToHex(crc32(utfEncodedFileName), 4) +
+            // UnicodeName
+            utfEncodedFileName;
+
+        extraFields +=
+            // Info-ZIP Unicode Path Extra Field
+            "\x75\x70" +
+            // size
+            decToHex(unicodePathExtraField.length, 2) +
+            // content
+            unicodePathExtraField;
+    }
+
+    if(useUTF8ForComment) {
+
+        unicodeCommentExtraField =
+            // Version
+            decToHex(1, 1) +
+            // CommentCRC32
+            decToHex(this.crc32(utfEncodedComment), 4) +
+            // UnicodeName
+            utfEncodedComment;
+
+        extraFields +=
+            // Info-ZIP Unicode Path Extra Field
+            "\x75\x63" +
+            // size
+            decToHex(unicodeCommentExtraField.length, 2) +
+            // content
+            unicodeCommentExtraField;
+    }
+
+    var header = "";
+
+    // version needed to extract
+    header += "\x0A\x00";
+    // general purpose bit flag
+    // set bit 11 if utf8
+    header += (useUTF8ForFileName || useUTF8ForComment) ? "\x00\x08" : "\x00\x00";
+    // compression method
+    header += compressedObject.compressionMethod;
+    // last mod file time
+    header += decToHex(dosTime, 2);
+    // last mod file date
+    header += decToHex(dosDate, 2);
+    // crc-32
+    header += decToHex(compressedObject.crc32, 4);
+    // compressed size
+    header += decToHex(compressedObject.compressedSize, 4);
+    // uncompressed size
+    header += decToHex(compressedObject.uncompressedSize, 4);
+    // file name length
+    header += decToHex(utfEncodedFileName.length, 2);
+    // extra field length
+    header += decToHex(extraFields.length, 2);
+
+
+    var fileRecord = signature.LOCAL_FILE_HEADER + header + utfEncodedFileName + extraFields;
+
+    var dirRecord = signature.CENTRAL_FILE_HEADER +
+    // version made by (00: DOS)
+    decToHex(versionMadeBy, 2) +
+    // file header (common to file and central directory)
+    header +
+    // file comment length
+    decToHex(utfEncodedComment.length, 2) +
+    // disk number start
+    "\x00\x00" +
+    // internal file attributes TODO
+    "\x00\x00" +
+    // external file attributes
+    decToHex(extFileAttr, 4) +
+    // relative offset of local header
+    decToHex(offset, 4) +
+    // file name
+    utfEncodedFileName +
+    // extra field
+    extraFields +
+    // file comment
+    utfEncodedComment;
+
+    return {
+        fileRecord: fileRecord,
+        dirRecord: dirRecord,
+        compressedObject: compressedObject
+    };
+};
+
+
+// return the actual prototype of JSZip
+var out = {
+    /**
+     * Read an existing zip and merge the data in the current JSZip object.
+     * The implementation is in jszip-load.js, don't forget to include it.
+     * @param {String|ArrayBuffer|Uint8Array|Buffer} stream  The stream to load
+     * @param {Object} options Options for loading the stream.
+     *  options.base64 : is the stream in base64 ? default : false
+     * @return {JSZip} the current JSZip object
+     */
+    load: function(stream, options) {
+        throw new Error("Load method is not defined. Is the file jszip-load.js included ?");
+    },
+
+    /**
+     * Filter nested files/folders with the specified function.
+     * @param {Function} search the predicate to use :
+     * function (relativePath, file) {...}
+     * It takes 2 arguments : the relative path and the file.
+     * @return {Array} An array of matching elements.
+     */
+    filter: function(search) {
+        var result = [],
+            filename, relativePath, file, fileClone;
+        for (filename in this.files) {
+            if (!this.files.hasOwnProperty(filename)) {
+                continue;
+            }
+            file = this.files[filename];
+            // return a new object, don't let the user mess with our internal objects :)
+            fileClone = new ZipObject(file.name, file._data, extend(file.options));
+            relativePath = filename.slice(this.root.length, filename.length);
+            if (filename.slice(0, this.root.length) === this.root && // the file is in the current root
+            search(relativePath, fileClone)) { // and the file matches the function
+                result.push(fileClone);
+            }
+        }
+        return result;
+    },
+
+    /**
+     * Add a file to the zip file, or search a file.
+     * @param   {string|RegExp} name The name of the file to add (if data is defined),
+     * the name of the file to find (if no data) or a regex to match files.
+     * @param   {String|ArrayBuffer|Uint8Array|Buffer} data  The file data, either raw or base64 encoded
+     * @param   {Object} o     File options
+     * @return  {JSZip|Object|Array} this JSZip object (when adding a file),
+     * a file (when searching by string) or an array of files (when searching by regex).
+     */
+    file: function(name, data, o) {
+        if (arguments.length === 1) {
+            if (utils.isRegExp(name)) {
+                var regexp = name;
+                return this.filter(function(relativePath, file) {
+                    return !file.dir && regexp.test(relativePath);
+                });
+            }
+            else { // text
+                return this.filter(function(relativePath, file) {
+                    return !file.dir && relativePath === name;
+                })[0] || null;
+            }
+        }
+        else { // more than one argument : we have data !
+            name = this.root + name;
+            fileAdd.call(this, name, data, o);
+        }
+        return this;
+    },
+
+    /**
+     * Add a directory to the zip file, or search.
+     * @param   {String|RegExp} arg The name of the directory to add, or a regex to search folders.
+     * @return  {JSZip} an object with the new directory as the root, or an array containing matching folders.
+     */
+    folder: function(arg) {
+        if (!arg) {
+            return this;
+        }
+
+        if (utils.isRegExp(arg)) {
+            return this.filter(function(relativePath, file) {
+                return file.dir && arg.test(relativePath);
+            });
+        }
+
+        // else, name is a new folder
+        var name = this.root + arg;
+        var newFolder = folderAdd.call(this, name);
+
+        // Allow chaining by returning a new object with this folder as the root
+        var ret = this.clone();
+        ret.root = newFolder.name;
+        return ret;
+    },
+
+    /**
+     * Delete a file, or a directory and all sub-files, from the zip
+     * @param {string} name the name of the file to delete
+     * @return {JSZip} this JSZip object
+     */
+    remove: function(name) {
+        name = this.root + name;
+        var file = this.files[name];
+        if (!file) {
+            // Look for any folders
+            if (name.slice(-1) != "/") {
+                name += "/";
+            }
+            file = this.files[name];
+        }
+
+        if (file && !file.dir) {
+            // file
+            delete this.files[name];
+        } else {
+            // maybe a folder, delete recursively
+            var kids = this.filter(function(relativePath, file) {
+                return file.name.slice(0, name.length) === name;
+            });
+            for (var i = 0; i < kids.length; i++) {
+                delete this.files[kids[i].name];
+            }
+        }
+
+        return this;
+    },
+
+    /**
+     * Generate the complete zip file
+     * @param {Object} options the options to generate the zip file :
+     * - base64, (deprecated, use type instead) true to generate base64.
+     * - compression, "STORE" by default.
+     * - type, "base64" by default. Values are : string, base64, uint8array, arraybuffer, blob.
+     * @return {String|Uint8Array|ArrayBuffer|Buffer|Blob} the zip file
+     */
+    generate: function(options) {
+        options = extend(options || {}, {
+            base64: true,
+            compression: "STORE",
+            compressionOptions : null,
+            type: "base64",
+            platform: "DOS",
+            comment: null,
+            mimeType: 'application/zip'
+        });
+
+        utils.checkSupport(options.type);
+
+        // accept nodejs `process.platform`
+        if(
+          options.platform === 'darwin' ||
+          options.platform === 'freebsd' ||
+          options.platform === 'linux' ||
+          options.platform === 'sunos'
+        ) {
+          options.platform = "UNIX";
+        }
+        if (options.platform === 'win32') {
+          options.platform = "DOS";
+        }
+
+        var zipData = [],
+            localDirLength = 0,
+            centralDirLength = 0,
+            writer, i,
+            utfEncodedComment = utils.transformTo("string", this.utf8encode(options.comment || this.comment || ""));
+
+        // first, generate all the zip parts.
+        for (var name in this.files) {
+            if (!this.files.hasOwnProperty(name)) {
+                continue;
+            }
+            var file = this.files[name];
+
+            var compressionName = file.options.compression || options.compression.toUpperCase();
+            var compression = compressions[compressionName];
+            if (!compression) {
+                throw new Error(compressionName + " is not a valid compression method !");
+            }
+            var compressionOptions = file.options.compressionOptions || options.compressionOptions || {};
+
+            var compressedObject = generateCompressedObjectFrom.call(this, file, compression, compressionOptions);
+
+            var zipPart = generateZipParts.call(this, name, file, compressedObject, localDirLength, options.platform);
+            localDirLength += zipPart.fileRecord.length + compressedObject.compressedSize;
+            centralDirLength += zipPart.dirRecord.length;
+            zipData.push(zipPart);
+        }
+
+        var dirEnd = "";
+
+        // end of central dir signature
+        dirEnd = signature.CENTRAL_DIRECTORY_END +
+        // number of this disk
+        "\x00\x00" +
+        // number of the disk with the start of the central directory
+        "\x00\x00" +
+        // total number of entries in the central directory on this disk
+        decToHex(zipData.length, 2) +
+        // total number of entries in the central directory
+        decToHex(zipData.length, 2) +
+        // size of the central directory   4 bytes
+        decToHex(centralDirLength, 4) +
+        // offset of start of central directory with respect to the starting disk number
+        decToHex(localDirLength, 4) +
+        // .ZIP file comment length
+        decToHex(utfEncodedComment.length, 2) +
+        // .ZIP file comment
+        utfEncodedComment;
+
+
+        // we have all the parts (and the total length)
+        // time to create a writer !
+        var typeName = options.type.toLowerCase();
+        if(typeName==="uint8array"||typeName==="arraybuffer"||typeName==="blob"||typeName==="nodebuffer") {
+            writer = new Uint8ArrayWriter(localDirLength + centralDirLength + dirEnd.length);
+        }else{
+            writer = new StringWriter(localDirLength + centralDirLength + dirEnd.length);
+        }
+
+        for (i = 0; i < zipData.length; i++) {
+            writer.append(zipData[i].fileRecord);
+            writer.append(zipData[i].compressedObject.compressedContent);
+        }
+        for (i = 0; i < zipData.length; i++) {
+            writer.append(zipData[i].dirRecord);
+        }
+
+        writer.append(dirEnd);
+
+        var zip = writer.finalize();
+
+
+
+        switch(options.type.toLowerCase()) {
+            // case "zip is an Uint8Array"
+            case "uint8array" :
+            case "arraybuffer" :
+            case "nodebuffer" :
+               return utils.transformTo(options.type.toLowerCase(), zip);
+            case "blob" :
+               return utils.arrayBuffer2Blob(utils.transformTo("arraybuffer", zip), options.mimeType);
+            // case "zip is a string"
+            case "base64" :
+               return (options.base64) ? base64.encode(zip) : zip;
+            default : // case "string" :
+               return zip;
+         }
+
+    },
+
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    crc32: function (input, crc) {
+        return crc32(input, crc);
+    },
+
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    utf8encode: function (string) {
+        return utils.transformTo("string", utf8.utf8encode(string));
+    },
+
+    /**
+     * @deprecated
+     * This method will be removed in a future version without replacement.
+     */
+    utf8decode: function (input) {
+        return utf8.utf8decode(input);
+    }
+};
+module.exports = out;
+
+},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(_dereq_,module,exports){
+'use strict';
+exports.LOCAL_FILE_HEADER = "PK\x03\x04";
+exports.CENTRAL_FILE_HEADER = "PK\x01\x02";
+exports.CENTRAL_DIRECTORY_END = "PK\x05\x06";
+exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR = "PK\x06\x07";
+exports.ZIP64_CENTRAL_DIRECTORY_END = "PK\x06\x06";
+exports.DATA_DESCRIPTOR = "PK\x07\x08";
+
+},{}],15:[function(_dereq_,module,exports){
+'use strict';
+var DataReader = _dereq_('./dataReader');
+var utils = _dereq_('./utils');
+
+function StringReader(data, optimizedBinaryString) {
+    this.data = data;
+    if (!optimizedBinaryString) {
+        this.data = utils.string2binary(this.data);
+    }
+    this.length = this.data.length;
+    this.index = 0;
+}
+StringReader.prototype = new DataReader();
+/**
+ * @see DataReader.byteAt
+ */
+StringReader.prototype.byteAt = function(i) {
+    return this.data.charCodeAt(i);
+};
+/**
+ * @see DataReader.lastIndexOfSignature
+ */
+StringReader.prototype.lastIndexOfSignature = function(sig) {
+    return this.data.lastIndexOf(sig);
+};
+/**
+ * @see DataReader.readData
+ */
+StringReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    // this will work because the constructor applied the "& 0xff" mask.
+    var result = this.data.slice(this.index, this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = StringReader;
+
+},{"./dataReader":5,"./utils":21}],16:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+
+/**
+ * An object to write any content to a string.
+ * @constructor
+ */
+var StringWriter = function() {
+    this.data = [];
+};
+StringWriter.prototype = {
+    /**
+     * Append any content to the current string.
+     * @param {Object} input the content to add.
+     */
+    append: function(input) {
+        input = utils.transformTo("string", input);
+        this.data.push(input);
+    },
+    /**
+     * Finalize the construction an return the result.
+     * @return {string} the generated string.
+     */
+    finalize: function() {
+        return this.data.join("");
+    }
+};
+
+module.exports = StringWriter;
+
+},{"./utils":21}],17:[function(_dereq_,module,exports){
+(function (Buffer){
+'use strict';
+exports.base64 = true;
+exports.array = true;
+exports.string = true;
+exports.arraybuffer = typeof ArrayBuffer !== "undefined" && typeof Uint8Array !== "undefined";
+// contains true if JSZip can read/generate nodejs Buffer, false otherwise.
+// Browserify will provide a Buffer implementation for browsers, which is
+// an augmented Uint8Array (i.e., can be used as either Buffer or U8).
+exports.nodebuffer = typeof Buffer !== "undefined";
+// contains true if JSZip can read/generate Uint8Array, false otherwise.
+exports.uint8array = typeof Uint8Array !== "undefined";
+
+if (typeof ArrayBuffer === "undefined") {
+    exports.blob = false;
+}
+else {
+    var buffer = new ArrayBuffer(0);
+    try {
+        exports.blob = new Blob([buffer], {
+            type: "application/zip"
+        }).size === 0;
+    }
+    catch (e) {
+        try {
+            var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
+            var builder = new Builder();
+            builder.append(buffer);
+            exports.blob = builder.getBlob('application/zip').size === 0;
+        }
+        catch (e) {
+            exports.blob = false;
+        }
+    }
+}
+
+}).call(this,(typeof Buffer !== "undefined" ? Buffer : undefined))
+},{}],18:[function(_dereq_,module,exports){
+'use strict';
+var DataReader = _dereq_('./dataReader');
+
+function Uint8ArrayReader(data) {
+    if (data) {
+        this.data = data;
+        this.length = this.data.length;
+        this.index = 0;
+    }
+}
+Uint8ArrayReader.prototype = new DataReader();
+/**
+ * @see DataReader.byteAt
+ */
+Uint8ArrayReader.prototype.byteAt = function(i) {
+    return this.data[i];
+};
+/**
+ * @see DataReader.lastIndexOfSignature
+ */
+Uint8ArrayReader.prototype.lastIndexOfSignature = function(sig) {
+    var sig0 = sig.charCodeAt(0),
+        sig1 = sig.charCodeAt(1),
+        sig2 = sig.charCodeAt(2),
+        sig3 = sig.charCodeAt(3);
+    for (var i = this.length - 4; i >= 0; --i) {
+        if (this.data[i] === sig0 && this.data[i + 1] === sig1 && this.data[i + 2] === sig2 && this.data[i + 3] === sig3) {
+            return i;
+        }
+    }
+
+    return -1;
+};
+/**
+ * @see DataReader.readData
+ */
+Uint8ArrayReader.prototype.readData = function(size) {
+    this.checkOffset(size);
+    if(size === 0) {
+        // in IE10, when using subarray(idx, idx), we get the array [0x00] instead of [].
+        return new Uint8Array(0);
+    }
+    var result = this.data.subarray(this.index, this.index + size);
+    this.index += size;
+    return result;
+};
+module.exports = Uint8ArrayReader;
+
+},{"./dataReader":5}],19:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+
+/**
+ * An object to write any content to an Uint8Array.
+ * @constructor
+ * @param {number} length The length of the array.
+ */
+var Uint8ArrayWriter = function(length) {
+    this.data = new Uint8Array(length);
+    this.index = 0;
+};
+Uint8ArrayWriter.prototype = {
+    /**
+     * Append any content to the current array.
+     * @param {Object} input the content to add.
+     */
+    append: function(input) {
+        if (input.length !== 0) {
+            // with an empty Uint8Array, Opera fails with a "Offset larger than array size"
+            input = utils.transformTo("uint8array", input);
+            this.data.set(input, this.index);
+            this.index += input.length;
+        }
+    },
+    /**
+     * Finalize the construction an return the result.
+     * @return {Uint8Array} the generated array.
+     */
+    finalize: function() {
+        return this.data;
+    }
+};
+
+module.exports = Uint8ArrayWriter;
+
+},{"./utils":21}],20:[function(_dereq_,module,exports){
+'use strict';
+
+var utils = _dereq_('./utils');
+var support = _dereq_('./support');
+var nodeBuffer = _dereq_('./nodeBuffer');
+
+/**
+ * The following functions come from pako, from pako/lib/utils/strings
+ * released under the MIT license, see pako https://github.com/nodeca/pako/
+ */
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+var _utf8len = new Array(256);
+for (var i=0; i<256; i++) {
+  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
+}
+_utf8len[254]=_utf8len[254]=1; // Invalid sequence start
+
+// convert string to array (typed, when possible)
+var string2buf = function (str) {
+    var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+    // count binary size
+    for (m_pos = 0; m_pos < str_len; m_pos++) {
+        c = str.charCodeAt(m_pos);
+        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+            c2 = str.charCodeAt(m_pos+1);
+            if ((c2 & 0xfc00) === 0xdc00) {
+                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+                m_pos++;
+            }
+        }
+        buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+    }
+
+    // allocate buffer
+    if (support.uint8array) {
+        buf = new Uint8Array(buf_len);
+    } else {
+        buf = new Array(buf_len);
+    }
+
+    // convert
+    for (i=0, m_pos = 0; i < buf_len; m_pos++) {
+        c = str.charCodeAt(m_pos);
+        if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+            c2 = str.charCodeAt(m_pos+1);
+            if ((c2 & 0xfc00) === 0xdc00) {
+                c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+                m_pos++;
+            }
+        }
+        if (c < 0x80) {
+            /* one byte */
+            buf[i++] = c;
+        } else if (c < 0x800) {
+            /* two bytes */
+            buf[i++] = 0xC0 | (c >>> 6);
+            buf[i++] = 0x80 | (c & 0x3f);
+        } else if (c < 0x10000) {
+            /* three bytes */
+            buf[i++] = 0xE0 | (c >>> 12);
+            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+            buf[i++] = 0x80 | (c & 0x3f);
+        } else {
+            /* four bytes */
+            buf[i++] = 0xf0 | (c >>> 18);
+            buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+            buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+            buf[i++] = 0x80 | (c & 0x3f);
+        }
+    }
+
+    return buf;
+};
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max   - length limit (mandatory);
+var utf8border = function(buf, max) {
+    var pos;
+
+    max = max || buf.length;
+    if (max > buf.length) { max = buf.length; }
+
+    // go back from last position, until start of sequence found
+    pos = max-1;
+    while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+    // Fuckup - very small and broken sequence,
+    // return max, because we should return something anyway.
+    if (pos < 0) { return max; }
+
+    // If we came to start of buffer - that means vuffer is too small,
+    // return max too.
+    if (pos === 0) { return max; }
+
+    return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+// convert array to string
+var buf2string = function (buf) {
+    var str, i, out, c, c_len;
+    var len = buf.length;
+
+    // Reserve max possible length (2 words per char)
+    // NB: by unknown reasons, Array is significantly faster for
+    //     String.fromCharCode.apply than Uint16Array.
+    var utf16buf = new Array(len*2);
+
+    for (out=0, i=0; i<len;) {
+        c = buf[i++];
+        // quick process ascii
+        if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+        c_len = _utf8len[c];
+        // skip 5 & 6 byte codes
+        if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }
+
+        // apply mask on first byte
+        c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+        // join the rest
+        while (c_len > 1 && i < len) {
+            c = (c << 6) | (buf[i++] & 0x3f);
+            c_len--;
+        }
+
+        // terminated by end of string?
+        if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+        if (c < 0x10000) {
+            utf16buf[out++] = c;
+        } else {
+            c -= 0x10000;
+            utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+            utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+        }
+    }
+
+    // shrinkBuf(utf16buf, out)
+    if (utf16buf.length !== out) {
+        if(utf16buf.subarray) {
+            utf16buf = utf16buf.subarray(0, out);
+        } else {
+            utf16buf.length = out;
+        }
+    }
+
+    // return String.fromCharCode.apply(null, utf16buf);
+    return utils.applyFromCharCode(utf16buf);
+};
+
+
+// That's all for the pako functions.
+
+
+/**
+ * Transform a javascript string into an array (typed if possible) of bytes,
+ * UTF-8 encoded.
+ * @param {String} str the string to encode
+ * @return {Array|Uint8Array|Buffer} the UTF-8 encoded string.
+ */
+exports.utf8encode = function utf8encode(str) {
+    if (support.nodebuffer) {
+        return nodeBuffer(str, "utf-8");
+    }
+
+    return string2buf(str);
+};
+
+
+/**
+ * Transform a bytes array (or a representation) representing an UTF-8 encoded
+ * string into a javascript string.
+ * @param {Array|Uint8Array|Buffer} buf the data de decode
+ * @return {String} the decoded string.
+ */
+exports.utf8decode = function utf8decode(buf) {
+    if (support.nodebuffer) {
+        return utils.transformTo("nodebuffer", buf).toString("utf-8");
+    }
+
+    buf = utils.transformTo(support.uint8array ? "uint8array" : "array", buf);
+
+    // return buf2string(buf);
+    // Chrome prefers to work with "small" chunks of data
+    // for the method buf2string.
+    // Firefox and Chrome has their own shortcut, IE doesn't seem to really care.
+    var result = [], k = 0, len = buf.length, chunk = 65536;
+    while (k < len) {
+        var nextBoundary = utf8border(buf, Math.min(k + chunk, len));
+        if (support.uint8array) {
+            result.push(buf2string(buf.subarray(k, nextBoundary)));
+        } else {
+            result.push(buf2string(buf.slice(k, nextBoundary)));
+        }
+        k = nextBoundary;
+    }
+    return result.join("");
+
+};
+// vim: set shiftwidth=4 softtabstop=4:
+
+},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(_dereq_,module,exports){
+'use strict';
+var support = _dereq_('./support');
+var compressions = _dereq_('./compressions');
+var nodeBuffer = _dereq_('./nodeBuffer');
+/**
+ * Convert a string to a "binary string" : a string containing only char codes between 0 and 255.
+ * @param {string} str the string to transform.
+ * @return {String} the binary string.
+ */
+exports.string2binary = function(str) {
+    var result = "";
+    for (var i = 0; i < str.length; i++) {
+        result += String.fromCharCode(str.charCodeAt(i) & 0xff);
+    }
+    return result;
+};
+exports.arrayBuffer2Blob = function(buffer, mimeType) {
+    exports.checkSupport("blob");
+	mimeType = mimeType || 'application/zip';
+
+    try {
+        // Blob constructor
+        return new Blob([buffer], {
+            type: mimeType
+        });
+    }
+    catch (e) {
+
+        try {
+            // deprecated, browser only, old way
+            var Builder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
+            var builder = new Builder();
+            builder.append(buffer);
+            return builder.getBlob(mimeType);
+        }
+        catch (e) {
+
+            // well, fuck ?!
+            throw new Error("Bug : can't construct the Blob.");
+        }
+    }
+
+
+};
+/**
+ * The identity function.
+ * @param {Object} input the input.
+ * @return {Object} the same input.
+ */
+function identity(input) {
+    return input;
+}
+
+/**
+ * Fill in an array with a string.
+ * @param {String} str the string to use.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to fill in (will be mutated).
+ * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated array.
+ */
+function stringToArrayLike(str, array) {
+    for (var i = 0; i < str.length; ++i) {
+        array[i] = str.charCodeAt(i) & 0xFF;
+    }
+    return array;
+}
+
+/**
+ * Transform an array-like object to a string.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} array the array to transform.
+ * @return {String} the result.
+ */
+function arrayLikeToString(array) {
+    // Performances notes :
+    // --------------------
+    // String.fromCharCode.apply(null, array) is the fastest, see
+    // see http://jsperf.com/converting-a-uint8array-to-a-string/2
+    // but the stack is limited (and we can get huge arrays !).
+    //
+    // result += String.fromCharCode(array[i]); generate too many strings !
+    //
+    // This code is inspired by http://jsperf.com/arraybuffer-to-string-apply-performance/2
+    var chunk = 65536;
+    var result = [],
+        len = array.length,
+        type = exports.getTypeOf(array),
+        k = 0,
+        canUseApply = true;
+      try {
+         switch(type) {
+            case "uint8array":
+               String.fromCharCode.apply(null, new Uint8Array(0));
+               break;
+            case "nodebuffer":
+               String.fromCharCode.apply(null, nodeBuffer(0));
+               break;
+         }
+      } catch(e) {
+         canUseApply = false;
+      }
+
+      // no apply : slow and painful algorithm
+      // default browser on android 4.*
+      if (!canUseApply) {
+         var resultStr = "";
+         for(var i = 0; i < array.length;i++) {
+            resultStr += String.fromCharCode(array[i]);
+         }
+    return resultStr;
+    }
+    while (k < len && chunk > 1) {
+        try {
+            if (type === "array" || type === "nodebuffer") {
+                result.push(String.fromCharCode.apply(null, array.slice(k, Math.min(k + chunk, len))));
+            }
+            else {
+                result.push(String.fromCharCode.apply(null, array.subarray(k, Math.min(k + chunk, len))));
+            }
+            k += chunk;
+        }
+        catch (e) {
+            chunk = Math.floor(chunk / 2);
+        }
+    }
+    return result.join("");
+}
+
+exports.applyFromCharCode = arrayLikeToString;
+
+
+/**
+ * Copy the data from an array-like to an other array-like.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayFrom the origin array.
+ * @param {Array|ArrayBuffer|Uint8Array|Buffer} arrayTo the destination array which will be mutated.
+ * @return {Array|ArrayBuffer|Uint8Array|Buffer} the updated destination array.
+ */
+function arrayLikeToArrayLike(arrayFrom, arrayTo) {
+    for (var i = 0; i < arrayFrom.length; i++) {
+        arrayTo[i] = arrayFrom[i];
+    }
+    return arrayTo;
+}
+
+// a matrix containing functions to transform everything into everything.
+var transform = {};
+
+// string to ?
+transform["string"] = {
+    "string": identity,
+    "array": function(input) {
+        return stringToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return transform["string"]["uint8array"](input).buffer;
+    },
+    "uint8array": function(input) {
+        return stringToArrayLike(input, new Uint8Array(input.length));
+    },
+    "nodebuffer": function(input) {
+        return stringToArrayLike(input, nodeBuffer(input.length));
+    }
+};
+
+// array to ?
+transform["array"] = {
+    "string": arrayLikeToString,
+    "array": identity,
+    "arraybuffer": function(input) {
+        return (new Uint8Array(input)).buffer;
+    },
+    "uint8array": function(input) {
+        return new Uint8Array(input);
+    },
+    "nodebuffer": function(input) {
+        return nodeBuffer(input);
+    }
+};
+
+// arraybuffer to ?
+transform["arraybuffer"] = {
+    "string": function(input) {
+        return arrayLikeToString(new Uint8Array(input));
+    },
+    "array": function(input) {
+        return arrayLikeToArrayLike(new Uint8Array(input), new Array(input.byteLength));
+    },
+    "arraybuffer": identity,
+    "uint8array": function(input) {
+        return new Uint8Array(input);
+    },
+    "nodebuffer": function(input) {
+        return nodeBuffer(new Uint8Array(input));
+    }
+};
+
+// uint8array to ?
+transform["uint8array"] = {
+    "string": arrayLikeToString,
+    "array": function(input) {
+        return arrayLikeToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return input.buffer;
+    },
+    "uint8array": identity,
+    "nodebuffer": function(input) {
+        return nodeBuffer(input);
+    }
+};
+
+// nodebuffer to ?
+transform["nodebuffer"] = {
+    "string": arrayLikeToString,
+    "array": function(input) {
+        return arrayLikeToArrayLike(input, new Array(input.length));
+    },
+    "arraybuffer": function(input) {
+        return transform["nodebuffer"]["uint8array"](input).buffer;
+    },
+    "uint8array": function(input) {
+        return arrayLikeToArrayLike(input, new Uint8Array(input.length));
+    },
+    "nodebuffer": identity
+};
+
+/**
+ * Transform an input into any type.
+ * The supported output type are : string, array, uint8array, arraybuffer, nodebuffer.
+ * If no output type is specified, the unmodified input will be returned.
+ * @param {String} outputType the output type.
+ * @param {String|Array|ArrayBuffer|Uint8Array|Buffer} input the input to convert.
+ * @throws {Error} an Error if the browser doesn't support the requested output type.
+ */
+exports.transformTo = function(outputType, input) {
+    if (!input) {
+        // undefined, null, etc
+        // an empty string won't harm.
+        input = "";
+    }
+    if (!outputType) {
+        return input;
+    }
+    exports.checkSupport(outputType);
+    var inputType = exports.getTypeOf(input);
+    var result = transform[inputType][outputType](input);
+    return result;
+};
+
+/**
+ * Return the type of the input.
+ * The type will be in a format valid for JSZip.utils.transformTo : string, array, uint8array, arraybuffer.
+ * @param {Object} input the input to identify.
+ * @return {String} the (lowercase) type of the input.
+ */
+exports.getTypeOf = function(input) {
+    if (typeof input === "string") {
+        return "string";
+    }
+    if (Object.prototype.toString.call(input) === "[object Array]") {
+        return "array";
+    }
+    if (support.nodebuffer && nodeBuffer.test(input)) {
+        return "nodebuffer";
+    }
+    if (support.uint8array && input instanceof Uint8Array) {
+        return "uint8array";
+    }
+    if (support.arraybuffer && input instanceof ArrayBuffer) {
+        return "arraybuffer";
+    }
+};
+
+/**
+ * Throw an exception if the type is not supported.
+ * @param {String} type the type to check.
+ * @throws {Error} an Error if the browser doesn't support the requested type.
+ */
+exports.checkSupport = function(type) {
+    var supported = support[type.toLowerCase()];
+    if (!supported) {
+        throw new Error(type + " is not supported by this browser");
+    }
+};
+exports.MAX_VALUE_16BITS = 65535;
+exports.MAX_VALUE_32BITS = -1; // well, "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF" is parsed as -1
+
+/**
+ * Prettify a string read as binary.
+ * @param {string} str the string to prettify.
+ * @return {string} a pretty string.
+ */
+exports.pretty = function(str) {
+    var res = '',
+        code, i;
+    for (i = 0; i < (str || "").length; i++) {
+        code = str.charCodeAt(i);
+        res += '\\x' + (code < 16 ? "0" : "") + code.toString(16).toUpperCase();
+    }
+    return res;
+};
+
+/**
+ * Find a compression registered in JSZip.
+ * @param {string} compressionMethod the method magic to find.
+ * @return {Object|null} the JSZip compression object, null if none found.
+ */
+exports.findCompression = function(compressionMethod) {
+    for (var method in compressions) {
+        if (!compressions.hasOwnProperty(method)) {
+            continue;
+        }
+        if (compressions[method].magic === compressionMethod) {
+            return compressions[method];
+        }
+    }
+    return null;
+};
+/**
+* Cross-window, cross-Node-context regular expression detection
+* @param  {Object}  object Anything
+* @return {Boolean}        true if the object is a regular expression,
+* false otherwise
+*/
+exports.isRegExp = function (object) {
+    return Object.prototype.toString.call(object) === "[object RegExp]";
+};
+
+
+},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(_dereq_,module,exports){
+'use strict';
+var StringReader = _dereq_('./stringReader');
+var NodeBufferReader = _dereq_('./nodeBufferReader');
+var Uint8ArrayReader = _dereq_('./uint8ArrayReader');
+var utils = _dereq_('./utils');
+var sig = _dereq_('./signature');
+var ZipEntry = _dereq_('./zipEntry');
+var support = _dereq_('./support');
+var jszipProto = _dereq_('./object');
+//  class ZipEntries {{{
+/**
+ * All the entries in the zip file.
+ * @constructor
+ * @param {String|ArrayBuffer|Uint8Array} data the binary stream to load.
+ * @param {Object} loadOptions Options for loading the stream.
+ */
+function ZipEntries(data, loadOptions) {
+    this.files = [];
+    this.loadOptions = loadOptions;
+    if (data) {
+        this.load(data);
+    }
+}
+ZipEntries.prototype = {
+    /**
+     * Check that the reader is on the speficied signature.
+     * @param {string} expectedSignature the expected signature.
+     * @throws {Error} if it is an other signature.
+     */
+    checkSignature: function(expectedSignature) {
+        var signature = this.reader.readString(4);
+        if (signature !== expectedSignature) {
+            throw new Error("Corrupted zip or bug : unexpected signature " + "(" + utils.pretty(signature) + ", expected " + utils.pretty(expectedSignature) + ")");
+        }
+    },
+    /**
+     * Read the end of the central directory.
+     */
+    readBlockEndOfCentral: function() {
+        this.diskNumber = this.reader.readInt(2);
+        this.diskWithCentralDirStart = this.reader.readInt(2);
+        this.centralDirRecordsOnThisDisk = this.reader.readInt(2);
+        this.centralDirRecords = this.reader.readInt(2);
+        this.centralDirSize = this.reader.readInt(4);
+        this.centralDirOffset = this.reader.readInt(4);
+
+        this.zipCommentLength = this.reader.readInt(2);
+        // warning : the encoding depends of the system locale
+        // On a linux machine with LANG=en_US.utf8, this field is utf8 encoded.
+        // On a windows machine, this field is encoded with the localized windows code page.
+        this.zipComment = this.reader.readString(this.zipCommentLength);
+        // To get consistent behavior with the generation part, we will assume that
+        // this is utf8 encoded.
+        this.zipComment = jszipProto.utf8decode(this.zipComment);
+    },
+    /**
+     * Read the end of the Zip 64 central directory.
+     * Not merged with the method readEndOfCentral :
+     * The end of central can coexist with its Zip64 brother,
+     * I don't want to read the wrong number of bytes !
+     */
+    readBlockZip64EndOfCentral: function() {
+        this.zip64EndOfCentralSize = this.reader.readInt(8);
+        this.versionMadeBy = this.reader.readString(2);
+        this.versionNeeded = this.reader.readInt(2);
+        this.diskNumber = this.reader.readInt(4);
+        this.diskWithCentralDirStart = this.reader.readInt(4);
+        this.centralDirRecordsOnThisDisk = this.reader.readInt(8);
+        this.centralDirRecords = this.reader.readInt(8);
+        this.centralDirSize = this.reader.readInt(8);
+        this.centralDirOffset = this.reader.readInt(8);
+
+        this.zip64ExtensibleData = {};
+        var extraDataSize = this.zip64EndOfCentralSize - 44,
+            index = 0,
+            extraFieldId,
+            extraFieldLength,
+            extraFieldValue;
+        while (index < extraDataSize) {
+            extraFieldId = this.reader.readInt(2);
+            extraFieldLength = this.reader.readInt(4);
+            extraFieldValue = this.reader.readString(extraFieldLength);
+            this.zip64ExtensibleData[extraFieldId] = {
+                id: extraFieldId,
+                length: extraFieldLength,
+                value: extraFieldValue
+            };
+        }
+    },
+    /**
+     * Read the end of the Zip 64 central directory locator.
+     */
+    readBlockZip64EndOfCentralLocator: function() {
+        this.diskWithZip64CentralDirStart = this.reader.readInt(4);
+        this.relativeOffsetEndOfZip64CentralDir = this.reader.readInt(8);
+        this.disksCount = this.reader.readInt(4);
+        if (this.disksCount > 1) {
+            throw new Error("Multi-volumes zip are not supported");
+        }
+    },
+    /**
+     * Read the local files, based on the offset read in the central part.
+     */
+    readLocalFiles: function() {
+        var i, file;
+        for (i = 0; i < this.files.length; i++) {
+            file = this.files[i];
+            this.reader.setIndex(file.localHeaderOffset);
+            this.checkSignature(sig.LOCAL_FILE_HEADER);
+            file.readLocalPart(this.reader);
+            file.handleUTF8();
+            file.processAttributes();
+        }
+    },
+    /**
+     * Read the central directory.
+     */
+    readCentralDir: function() {
+        var file;
+
+        this.reader.setIndex(this.centralDirOffset);
+        while (this.reader.readString(4) === sig.CENTRAL_FILE_HEADER) {
+            file = new ZipEntry({
+                zip64: this.zip64
+            }, this.loadOptions);
+            file.readCentralPart(this.reader);
+            this.files.push(file);
+        }
+    },
+    /**
+     * Read the end of central directory.
+     */
+    readEndOfCentral: function() {
+        var offset = this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);
+        if (offset === -1) {
+            // Check if the content is a truncated zip or complete garbage.
+            // A "LOCAL_FILE_HEADER" is not required at the beginning (auto
+            // extractible zip for example) but it can give a good hint.
+            // If an ajax request was used without responseType, we will also
+            // get unreadable data.
+            var isGarbage = true;
+            try {
+                this.reader.setIndex(0);
+                this.checkSignature(sig.LOCAL_FILE_HEADER);
+                isGarbage = false;
+            } catch (e) {}
+
+            if (isGarbage) {
+                throw new Error("Can't find end of central directory : is this a zip file ? " +
+                                "If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html");
+            } else {
+                throw new Error("Corrupted zip : can't find end of central directory");
+            }
+        }
+        this.reader.setIndex(offset);
+        this.checkSignature(sig.CENTRAL_DIRECTORY_END);
+        this.readBlockEndOfCentral();
+
+
+        /* extract from the zip spec :
+            4)  If one of the fields in the end of central directory
+                record is too small to hold required data, the field
+                should be set to -1 (0xFFFF or 0xFFFFFFFF) and the
+                ZIP64 format record should be created.
+            5)  The end of central directory record and the
+                Zip64 end of central directory locator record must
+                reside on the same disk when splitting or spanning
+                an archive.
+         */
+        if (this.diskNumber === utils.MAX_VALUE_16BITS || this.diskWithCentralDirStart === utils.MAX_VALUE_16BITS || this.centralDirRecordsOnThisDisk === utils.MAX_VALUE_16BITS || this.centralDirRecords === utils.MAX_VALUE_16BITS || this.centralDirSize === utils.MAX_VALUE_32BITS || this.centralDirOffset === utils.MAX_VALUE_32BITS) {
+            this.zip64 = true;
+
+            /*
+            Warning : the zip64 extension is supported, but ONLY if the 64bits integer read from
+            the zip file can fit into a 32bits integer. This cannot be solved : Javascript represents
+            all numbers as 64-bit double precision IEEE 754 floating point numbers.
+            So, we have 53bits for integers and bitwise operations treat everything as 32bits.
+            see https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Operators/Bitwise_Operators
+            and http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf section 8.5
+            */
+
+            // should look for a zip64 EOCD locator
+            offset = this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
+            if (offset === -1) {
+                throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");
+            }
+            this.reader.setIndex(offset);
+            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);
+            this.readBlockZip64EndOfCentralLocator();
+
+            // now the zip64 EOCD record
+            this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);
+            this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);
+            this.readBlockZip64EndOfCentral();
+        }
+    },
+    prepareReader: function(data) {
+        var type = utils.getTypeOf(data);
+        if (type === "string" && !support.uint8array) {
+            this.reader = new StringReader(data, this.loadOptions.optimizedBinaryString);
+        }
+        else if (type === "nodebuffer") {
+            this.reader = new NodeBufferReader(data);
+        }
+        else {
+            this.reader = new Uint8ArrayReader(utils.transformTo("uint8array", data));
+        }
+    },
+    /**
+     * Read a zip file and create ZipEntries.
+     * @param {String|ArrayBuffer|Uint8Array|Buffer} data the binary string representing a zip file.
+     */
+    load: function(data) {
+        this.prepareReader(data);
+        this.readEndOfCentral();
+        this.readCentralDir();
+        this.readLocalFiles();
+    }
+};
+// }}} end of ZipEntries
+module.exports = ZipEntries;
+
+},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(_dereq_,module,exports){
+'use strict';
+var StringReader = _dereq_('./stringReader');
+var utils = _dereq_('./utils');
+var CompressedObject = _dereq_('./compressedObject');
+var jszipProto = _dereq_('./object');
+
+var MADE_BY_DOS = 0x00;
+var MADE_BY_UNIX = 0x03;
+
+// class ZipEntry {{{
+/**
+ * An entry in the zip file.
+ * @constructor
+ * @param {Object} options Options of the current file.
+ * @param {Object} loadOptions Options for loading the stream.
+ */
+function ZipEntry(options, loadOptions) {
+    this.options = options;
+    this.loadOptions = loadOptions;
+}
+ZipEntry.prototype = {
+    /**
+     * say if the file is encrypted.
+     * @return {boolean} true if the file is encrypted, false otherwise.
+     */
+    isEncrypted: function() {
+        // bit 1 is set
+        return (this.bitFlag & 0x0001) === 0x0001;
+    },
+    /**
+     * say if the file has utf-8 filename/comment.
+     * @return {boolean} true if the filename/comment is in utf-8, false otherwise.
+     */
+    useUTF8: function() {
+        // bit 11 is set
+        return (this.bitFlag & 0x0800) === 0x0800;
+    },
+    /**
+     * Prepare the function used to generate the compressed content from this ZipFile.
+     * @param {DataReader} reader the reader to use.
+     * @param {number} from the offset from where we should read the data.
+     * @param {number} length the length of the data to read.
+     * @return {Function} the callback to get the compressed content (the type depends of the DataReader class).
+     */
+    prepareCompressedContent: function(reader, from, length) {
+        return function() {
+            var previousIndex = reader.index;
+            reader.setIndex(from);
+            var compressedFileData = reader.readData(length);
+            reader.setIndex(previousIndex);
+
+            return compressedFileData;
+        };
+    },
+    /**
+     * Prepare the function used to generate the uncompressed content from this ZipFile.
+     * @param {DataReader} reader the reader to use.
+     * @param {number} from the offset from where we should read the data.
+     * @param {number} length the length of the data to read.
+     * @param {JSZip.compression} compression the compression used on this file.
+     * @param {number} uncompressedSize the uncompressed size to expect.
+     * @return {Function} the callback to get the uncompressed content (the type depends of the DataReader class).
+     */
+    prepareContent: function(reader, from, length, compression, uncompressedSize) {
+        return function() {
+
+            var compressedFileData = utils.transformTo(compression.uncompressInputType, this.getCompressedContent());
+            var uncompressedFileData = compression.uncompress(compressedFileData);
+
+            if (uncompressedFileData.length !== uncompressedSize) {
+                throw new Error("Bug : uncompressed data size mismatch");
+            }
+
+            return uncompressedFileData;
+        };
+    },
+    /**
+     * Read the local part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readLocalPart: function(reader) {
+        var compression, localExtraFieldsLength;
+
+        // we already know everything from the central dir !
+        // If the central dir data are false, we are doomed.
+        // On the bright side, the local part is scary  : zip64, data descriptors, both, etc.
+        // The less data we get here, the more reliable this should be.
+        // Let's skip the whole header and dash to the data !
+        reader.skip(22);
+        // in some zip created on windows, the filename stored in the central dir contains \ instead of /.
+        // Strangely, the filename here is OK.
+        // I would love to treat these zip files as corrupted (see http://www.info-zip.org/FAQ.html#backslashes
+        // or APPNOTE#4.4.17.1, "All slashes MUST be forward slashes '/'") but there are a lot of bad zip generators...
+        // Search "unzip mismatching "local" filename continuing with "central" filename version" on
+        // the internet.
+        //
+        // I think I see the logic here : the central directory is used to display
+        // content and the local directory is used to extract the files. Mixing / and \
+        // may be used to display \ to windows users and use / when extracting the files.
+        // Unfortunately, this lead also to some issues : http://seclists.org/fulldisclosure/2009/Sep/394
+        this.fileNameLength = reader.readInt(2);
+        localExtraFieldsLength = reader.readInt(2); // can't be sure this will be the same as the central dir
+        this.fileName = reader.readString(this.fileNameLength);
+        reader.skip(localExtraFieldsLength);
+
+        if (this.compressedSize == -1 || this.uncompressedSize == -1) {
+            throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory " + "(compressedSize == -1 || uncompressedSize == -1)");
+        }
+
+        compression = utils.findCompression(this.compressionMethod);
+        if (compression === null) { // no compression found
+            throw new Error("Corrupted zip : compression " + utils.pretty(this.compressionMethod) + " unknown (inner file : " + this.fileName + ")");
+        }
+        this.decompressed = new CompressedObject();
+        this.decompressed.compressedSize = this.compressedSize;
+        this.decompressed.uncompressedSize = this.uncompressedSize;
+        this.decompressed.crc32 = this.crc32;
+        this.decompressed.compressionMethod = this.compressionMethod;
+        this.decompressed.getCompressedContent = this.prepareCompressedContent(reader, reader.index, this.compressedSize, compression);
+        this.decompressed.getContent = this.prepareContent(reader, reader.index, this.compressedSize, compression, this.uncompressedSize);
+
+        // we need to compute the crc32...
+        if (this.loadOptions.checkCRC32) {
+            this.decompressed = utils.transformTo("string", this.decompressed.getContent());
+            if (jszipProto.crc32(this.decompressed) !== this.crc32) {
+                throw new Error("Corrupted zip : CRC32 mismatch");
+            }
+        }
+    },
+
+    /**
+     * Read the central part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readCentralPart: function(reader) {
+        this.versionMadeBy = reader.readInt(2);
+        this.versionNeeded = reader.readInt(2);
+        this.bitFlag = reader.readInt(2);
+        this.compressionMethod = reader.readString(2);
+        this.date = reader.readDate();
+        this.crc32 = reader.readInt(4);
+        this.compressedSize = reader.readInt(4);
+        this.uncompressedSize = reader.readInt(4);
+        this.fileNameLength = reader.readInt(2);
+        this.extraFieldsLength = reader.readInt(2);
+        this.fileCommentLength = reader.readInt(2);
+        this.diskNumberStart = reader.readInt(2);
+        this.internalFileAttributes = reader.readInt(2);
+        this.externalFileAttributes = reader.readInt(4);
+        this.localHeaderOffset = reader.readInt(4);
+
+        if (this.isEncrypted()) {
+            throw new Error("Encrypted zip are not supported");
+        }
+
+        this.fileName = reader.readString(this.fileNameLength);
+        this.readExtraFields(reader);
+        this.parseZIP64ExtraField(reader);
+        this.fileComment = reader.readString(this.fileCommentLength);
+    },
+
+    /**
+     * Parse the external file attributes and get the unix/dos permissions.
+     */
+    processAttributes: function () {
+        this.unixPermissions = null;
+        this.dosPermissions = null;
+        var madeBy = this.versionMadeBy >> 8;
+
+        // Check if we have the DOS directory flag set.
+        // We look for it in the DOS and UNIX permissions
+        // but some unknown platform could set it as a compatibility flag.
+        this.dir = this.externalFileAttributes & 0x0010 ? true : false;
+
+        if(madeBy === MADE_BY_DOS) {
+            // first 6 bits (0 to 5)
+            this.dosPermissions = this.externalFileAttributes & 0x3F;
+        }
+
+        if(madeBy === MADE_BY_UNIX) {
+            this.unixPermissions = (this.externalFileAttributes >> 16) & 0xFFFF;
+            // the octal permissions are in (this.unixPermissions & 0x01FF).toString(8);
+        }
+
+        // fail safe : if the name ends with a / it probably means a folder
+        if (!this.dir && this.fileName.slice(-1) === '/') {
+            this.dir = true;
+        }
+    },
+
+    /**
+     * Parse the ZIP64 extra field and merge the info in the current ZipEntry.
+     * @param {DataReader} reader the reader to use.
+     */
+    parseZIP64ExtraField: function(reader) {
+
+        if (!this.extraFields[0x0001]) {
+            return;
+        }
+
+        // should be something, preparing the extra reader
+        var extraReader = new StringReader(this.extraFields[0x0001].value);
+
+        // I really hope that these 64bits integer can fit in 32 bits integer, because js
+        // won't let us have more.
+        if (this.uncompressedSize === utils.MAX_VALUE_32BITS) {
+            this.uncompressedSize = extraReader.readInt(8);
+        }
+        if (this.compressedSize === utils.MAX_VALUE_32BITS) {
+            this.compressedSize = extraReader.readInt(8);
+        }
+        if (this.localHeaderOffset === utils.MAX_VALUE_32BITS) {
+            this.localHeaderOffset = extraReader.readInt(8);
+        }
+        if (this.diskNumberStart === utils.MAX_VALUE_32BITS) {
+            this.diskNumberStart = extraReader.readInt(4);
+        }
+    },
+    /**
+     * Read the central part of a zip file and add the info in this object.
+     * @param {DataReader} reader the reader to use.
+     */
+    readExtraFields: function(reader) {
+        var start = reader.index,
+            extraFieldId,
+            extraFieldLength,
+            extraFieldValue;
+
+        this.extraFields = this.extraFields || {};
+
+        while (reader.index < start + this.extraFieldsLength) {
+            extraFieldId = reader.readInt(2);
+            extraFieldLength = reader.readInt(2);
+            extraFieldValue = reader.readString(extraFieldLength);
+
+            this.extraFields[extraFieldId] = {
+                id: extraFieldId,
+                length: extraFieldLength,
+                value: extraFieldValue
+            };
+        }
+    },
+    /**
+     * Apply an UTF8 transformation if needed.
+     */
+    handleUTF8: function() {
+        if (this.useUTF8()) {
+            this.fileName = jszipProto.utf8decode(this.fileName);
+            this.fileComment = jszipProto.utf8decode(this.fileComment);
+        } else {
+            var upath = this.findExtraFieldUnicodePath();
+            if (upath !== null) {
+                this.fileName = upath;
+            }
+            var ucomment = this.findExtraFieldUnicodeComment();
+            if (ucomment !== null) {
+                this.fileComment = ucomment;
+            }
+        }
+    },
+
+    /**
+     * Find the unicode path declared in the extra field, if any.
+     * @return {String} the unicode path, null otherwise.
+     */
+    findExtraFieldUnicodePath: function() {
+        var upathField = this.extraFields[0x7075];
+        if (upathField) {
+            var extraReader = new StringReader(upathField.value);
+
+            // wrong version
+            if (extraReader.readInt(1) !== 1) {
+                return null;
+            }
+
+            // the crc of the filename changed, this field is out of date.
+            if (jszipProto.crc32(this.fileName) !== extraReader.readInt(4)) {
+                return null;
+            }
+
+            return jszipProto.utf8decode(extraReader.readString(upathField.length - 5));
+        }
+        return null;
+    },
+
+    /**
+     * Find the unicode comment declared in the extra field, if any.
+     * @return {String} the unicode comment, null otherwise.
+     */
+    findExtraFieldUnicodeComment: function() {
+        var ucommentField = this.extraFields[0x6375];
+        if (ucommentField) {
+            var extraReader = new StringReader(ucommentField.value);
+
+            // wrong version
+            if (extraReader.readInt(1) !== 1) {
+                return null;
+            }
+
+            // the crc of the comment changed, this field is out of date.
+            if (jszipProto.crc32(this.fileComment) !== extraReader.readInt(4)) {
+                return null;
+            }
+
+            return jszipProto.utf8decode(extraReader.readString(ucommentField.length - 5));
+        }
+        return null;
+    }
+};
+module.exports = ZipEntry;
+
+},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(_dereq_,module,exports){
+// Top level file is just a mixin of submodules & constants
+'use strict';
+
+var assign    = _dereq_('./lib/utils/common').assign;
+
+var deflate   = _dereq_('./lib/deflate');
+var inflate   = _dereq_('./lib/inflate');
+var constants = _dereq_('./lib/zlib/constants');
+
+var pako = {};
+
+assign(pako, deflate, inflate, constants);
+
+module.exports = pako;
+},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(_dereq_,module,exports){
+'use strict';
+
+
+var zlib_deflate = _dereq_('./zlib/deflate.js');
+var utils = _dereq_('./utils/common');
+var strings = _dereq_('./utils/strings');
+var msg = _dereq_('./zlib/messages');
+var zstream = _dereq_('./zlib/zstream');
+
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+var Z_NO_FLUSH      = 0;
+var Z_FINISH        = 4;
+
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+
+var Z_DEFAULT_COMPRESSION = -1;
+
+var Z_DEFAULT_STRATEGY    = 0;
+
+var Z_DEFLATED  = 8;
+
+/* ===========================================================================*/
+
+
+/**
+ * class Deflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[deflate]],
+ * [[deflateRaw]] and [[gzip]].
+ **/
+
+/* internal
+ * Deflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Deflate#onData]] not overriden.
+ **/
+
+/**
+ * Deflate.result -> Uint8Array|Array
+ *
+ * Compressed result, generated by default [[Deflate#onData]]
+ * and [[Deflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Deflate#push]] with `Z_FINISH` / `true` param).
+ **/
+
+/**
+ * Deflate.err -> Number
+ *
+ * Error code after deflate finished. 0 (Z_OK) on success.
+ * You will not need it in real life, because deflate errors
+ * are possible only on wrong options or bad `onData` / `onEnd`
+ * custom handlers.
+ **/
+
+/**
+ * Deflate.msg -> String
+ *
+ * Error message, if [[Deflate.err]] != 0
+ **/
+
+
+/**
+ * new Deflate(options)
+ * - options (Object): zlib deflate options.
+ *
+ * Creates new deflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `level`
+ * - `windowBits`
+ * - `memLevel`
+ * - `strategy`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw deflate
+ * - `gzip` (Boolean) - create gzip wrapper
+ * - `to` (String) - if equal to 'string', then result will be "binary string"
+ *    (each char code [0..255])
+ * - `header` (Object) - custom header for gzip
+ *   - `text` (Boolean) - true if compressed data believed to be text
+ *   - `time` (Number) - modification time, unix timestamp
+ *   - `os` (Number) - operation system code
+ *   - `extra` (Array) - array of bytes with extra data (max 65536)
+ *   - `name` (String) - file name (binary string)
+ *   - `comment` (String) - comment (binary string)
+ *   - `hcrc` (Boolean) - true if header crc should be added
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
+ *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * var deflate = new pako.Deflate({ level: 3});
+ *
+ * deflate.push(chunk1, false);
+ * deflate.push(chunk2, true);  // true -> last chunk
+ *
+ * if (deflate.err) { throw new Error(deflate.err); }
+ *
+ * console.log(deflate.result);
+ * ```
+ **/
+var Deflate = function(options) {
+
+  this.options = utils.assign({
+    level: Z_DEFAULT_COMPRESSION,
+    method: Z_DEFLATED,
+    chunkSize: 16384,
+    windowBits: 15,
+    memLevel: 8,
+    strategy: Z_DEFAULT_STRATEGY,
+    to: ''
+  }, options || {});
+
+  var opt = this.options;
+
+  if (opt.raw && (opt.windowBits > 0)) {
+    opt.windowBits = -opt.windowBits;
+  }
+
+  else if (opt.gzip && (opt.windowBits > 0) && (opt.windowBits < 16)) {
+    opt.windowBits += 16;
+  }
+
+  this.err    = 0;      // error code, if happens (0 = Z_OK)
+  this.msg    = '';     // error message
+  this.ended  = false;  // used to avoid multiple onEnd() calls
+  this.chunks = [];     // chunks of compressed data
+
+  this.strm = new zstream();
+  this.strm.avail_out = 0;
+
+  var status = zlib_deflate.deflateInit2(
+    this.strm,
+    opt.level,
+    opt.method,
+    opt.windowBits,
+    opt.memLevel,
+    opt.strategy
+  );
+
+  if (status !== Z_OK) {
+    throw new Error(msg[status]);
+  }
+
+  if (opt.header) {
+    zlib_deflate.deflateSetHeader(this.strm, opt.header);
+  }
+};
+
+/**
+ * Deflate#push(data[, mode]) -> Boolean
+ * - data (Uint8Array|Array|String): input data. Strings will be converted to
+ *   utf8 byte sequence.
+ * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
+ *
+ * Sends input data to deflate pipe, generating [[Deflate#onData]] calls with
+ * new compressed chunks. Returns `true` on success. The last data block must have
+ * mode Z_FINISH (or `true`). That flush internal pending buffers and call
+ * [[Deflate#onEnd]].
+ *
+ * On fail call [[Deflate#onEnd]] with error code and return false.
+ *
+ * We strongly recommend to use `Uint8Array` on input for best speed (output
+ * array format is detected automatically). Also, don't skip last param and always
+ * use the same type in your code (boolean or number). That will improve JS speed.
+ *
+ * For regular `Array`-s make sure all elements are [0..255].
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true);  // push last chunk
+ * ```
+ **/
+Deflate.prototype.push = function(data, mode) {
+  var strm = this.strm;
+  var chunkSize = this.options.chunkSize;
+  var status, _mode;
+
+  if (this.ended) { return false; }
+
+  _mode = (mode === ~~mode) ? mode : ((mode === true) ? Z_FINISH : Z_NO_FLUSH);
+
+  // Convert data if needed
+  if (typeof data === 'string') {
+    // If we need to compress text, change encoding to utf8.
+    strm.input = strings.string2buf(data);
+  } else {
+    strm.input = data;
+  }
+
+  strm.next_in = 0;
+  strm.avail_in = strm.input.length;
+
+  do {
+    if (strm.avail_out === 0) {
+      strm.output = new utils.Buf8(chunkSize);
+      strm.next_out = 0;
+      strm.avail_out = chunkSize;
+    }
+    status = zlib_deflate.deflate(strm, _mode);    /* no bad return value */
+
+    if (status !== Z_STREAM_END && status !== Z_OK) {
+      this.onEnd(status);
+      this.ended = true;
+      return false;
+    }
+    if (strm.avail_out === 0 || (strm.avail_in === 0 && _mode === Z_FINISH)) {
+      if (this.options.to === 'string') {
+        this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output, strm.next_out)));
+      } else {
+        this.onData(utils.shrinkBuf(strm.output, strm.next_out));
+      }
+    }
+  } while ((strm.avail_in > 0 || strm.avail_out === 0) && status !== Z_STREAM_END);
+
+  // Finalize on the last chunk.
+  if (_mode === Z_FINISH) {
+    status = zlib_deflate.deflateEnd(this.strm);
+    this.onEnd(status);
+    this.ended = true;
+    return status === Z_OK;
+  }
+
+  return true;
+};
+
+
+/**
+ * Deflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
+ *   on js engine support. When string output requested, each chunk
+ *   will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Deflate.prototype.onData = function(chunk) {
+  this.chunks.push(chunk);
+};
+
+
+/**
+ * Deflate#onEnd(status) -> Void
+ * - status (Number): deflate status. 0 (Z_OK) on success,
+ *   other if not.
+ *
+ * Called once after you tell deflate that input stream complete
+ * or error happenned. By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Deflate.prototype.onEnd = function(status) {
+  // On success - join
+  if (status === Z_OK) {
+    if (this.options.to === 'string') {
+      this.result = this.chunks.join('');
+    } else {
+      this.result = utils.flattenChunks(this.chunks);
+    }
+  }
+  this.chunks = [];
+  this.err = status;
+  this.msg = this.strm.msg;
+};
+
+
+/**
+ * deflate(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * Compress `data` with deflate alrorythm and `options`.
+ *
+ * Supported options are:
+ *
+ * - level
+ * - windowBits
+ * - memLevel
+ * - strategy
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ *   negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be "binary string"
+ *    (each char code [0..255])
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , data = Uint8Array([1,2,3,4,5,6,7,8,9]);
+ *
+ * console.log(pako.deflate(data));
+ * ```
+ **/
+function deflate(input, options) {
+  var deflator = new Deflate(options);
+
+  deflator.push(input, true);
+
+  // That will never happens, if you don't cheat with options :)
+  if (deflator.err) { throw deflator.msg; }
+
+  return deflator.result;
+}
+
+
+/**
+ * deflateRaw(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function deflateRaw(input, options) {
+  options = options || {};
+  options.raw = true;
+  return deflate(input, options);
+}
+
+
+/**
+ * gzip(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to compress.
+ * - options (Object): zlib deflate options.
+ *
+ * The same as [[deflate]], but create gzip wrapper instead of
+ * deflate one.
+ **/
+function gzip(input, options) {
+  options = options || {};
+  options.gzip = true;
+  return deflate(input, options);
+}
+
+
+exports.Deflate = Deflate;
+exports.deflate = deflate;
+exports.deflateRaw = deflateRaw;
+exports.gzip = gzip;
+},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(_dereq_,module,exports){
+'use strict';
+
+
+var zlib_inflate = _dereq_('./zlib/inflate.js');
+var utils = _dereq_('./utils/common');
+var strings = _dereq_('./utils/strings');
+var c = _dereq_('./zlib/constants');
+var msg = _dereq_('./zlib/messages');
+var zstream = _dereq_('./zlib/zstream');
+var gzheader = _dereq_('./zlib/gzheader');
+
+
+/**
+ * class Inflate
+ *
+ * Generic JS-style wrapper for zlib calls. If you don't need
+ * streaming behaviour - use more simple functions: [[inflate]]
+ * and [[inflateRaw]].
+ **/
+
+/* internal
+ * inflate.chunks -> Array
+ *
+ * Chunks of output data, if [[Inflate#onData]] not overriden.
+ **/
+
+/**
+ * Inflate.result -> Uint8Array|Array|String
+ *
+ * Uncompressed result, generated by default [[Inflate#onData]]
+ * and [[Inflate#onEnd]] handlers. Filled after you push last chunk
+ * (call [[Inflate#push]] with `Z_FINISH` / `true` param).
+ **/
+
+/**
+ * Inflate.err -> Number
+ *
+ * Error code after inflate finished. 0 (Z_OK) on success.
+ * Should be checked if broken data possible.
+ **/
+
+/**
+ * Inflate.msg -> String
+ *
+ * Error message, if [[Inflate.err]] != 0
+ **/
+
+
+/**
+ * new Inflate(options)
+ * - options (Object): zlib inflate options.
+ *
+ * Creates new inflator instance with specified params. Throws exception
+ * on bad params. Supported options:
+ *
+ * - `windowBits`
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information on these.
+ *
+ * Additional options, for internal needs:
+ *
+ * - `chunkSize` - size of generated data chunks (16K by default)
+ * - `raw` (Boolean) - do raw inflate
+ * - `to` (String) - if equal to 'string', then result will be converted
+ *   from utf8 to utf16 (javascript) string. When string output requested,
+ *   chunk length can differ from `chunkSize`, depending on content.
+ *
+ * By default, when no options set, autodetect deflate/gzip data format via
+ * wrapper header.
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , chunk1 = Uint8Array([1,2,3,4,5,6,7,8,9])
+ *   , chunk2 = Uint8Array([10,11,12,13,14,15,16,17,18,19]);
+ *
+ * var inflate = new pako.Inflate({ level: 3});
+ *
+ * inflate.push(chunk1, false);
+ * inflate.push(chunk2, true);  // true -> last chunk
+ *
+ * if (inflate.err) { throw new Error(inflate.err); }
+ *
+ * console.log(inflate.result);
+ * ```
+ **/
+var Inflate = function(options) {
+
+  this.options = utils.assign({
+    chunkSize: 16384,
+    windowBits: 0,
+    to: ''
+  }, options || {});
+
+  var opt = this.options;
+
+  // Force window size for `raw` data, if not set directly,
+  // because we have no header for autodetect.
+  if (opt.raw && (opt.windowBits >= 0) && (opt.windowBits < 16)) {
+    opt.windowBits = -opt.windowBits;
+    if (opt.windowBits === 0) { opt.windowBits = -15; }
+  }
+
+  // If `windowBits` not defined (and mode not raw) - set autodetect flag for gzip/deflate
+  if ((opt.windowBits >= 0) && (opt.windowBits < 16) &&
+      !(options && options.windowBits)) {
+    opt.windowBits += 32;
+  }
+
+  // Gzip header has no info about windows size, we can do autodetect only
+  // for deflate. So, if window size not set, force it to max when gzip possible
+  if ((opt.windowBits > 15) && (opt.windowBits < 48)) {
+    // bit 3 (16) -> gzipped data
+    // bit 4 (32) -> autodetect gzip/deflate
+    if ((opt.windowBits & 15) === 0) {
+      opt.windowBits |= 15;
+    }
+  }
+
+  this.err    = 0;      // error code, if happens (0 = Z_OK)
+  this.msg    = '';     // error message
+  this.ended  = false;  // used to avoid multiple onEnd() calls
+  this.chunks = [];     // chunks of compressed data
+
+  this.strm   = new zstream();
+  this.strm.avail_out = 0;
+
+  var status  = zlib_inflate.inflateInit2(
+    this.strm,
+    opt.windowBits
+  );
+
+  if (status !== c.Z_OK) {
+    throw new Error(msg[status]);
+  }
+
+  this.header = new gzheader();
+
+  zlib_inflate.inflateGetHeader(this.strm, this.header);
+};
+
+/**
+ * Inflate#push(data[, mode]) -> Boolean
+ * - data (Uint8Array|Array|String): input data
+ * - mode (Number|Boolean): 0..6 for corresponding Z_NO_FLUSH..Z_TREE modes.
+ *   See constants. Skipped or `false` means Z_NO_FLUSH, `true` meansh Z_FINISH.
+ *
+ * Sends input data to inflate pipe, generating [[Inflate#onData]] calls with
+ * new output chunks. Returns `true` on success. The last data block must have
+ * mode Z_FINISH (or `true`). That flush internal pending buffers and call
+ * [[Inflate#onEnd]].
+ *
+ * On fail call [[Inflate#onEnd]] with error code and return false.
+ *
+ * We strongly recommend to use `Uint8Array` on input for best speed (output
+ * format is detected automatically). Also, don't skip last param and always
+ * use the same type in your code (boolean or number). That will improve JS speed.
+ *
+ * For regular `Array`-s make sure all elements are [0..255].
+ *
+ * ##### Example
+ *
+ * ```javascript
+ * push(chunk, false); // push one of data chunks
+ * ...
+ * push(chunk, true);  // push last chunk
+ * ```
+ **/
+Inflate.prototype.push = function(data, mode) {
+  var strm = this.strm;
+  var chunkSize = this.options.chunkSize;
+  var status, _mode;
+  var next_out_utf8, tail, utf8str;
+
+  if (this.ended) { return false; }
+  _mode = (mode === ~~mode) ? mode : ((mode === true) ? c.Z_FINISH : c.Z_NO_FLUSH);
+
+  // Convert data if needed
+  if (typeof data === 'string') {
+    // Only binary strings can be decompressed on practice
+    strm.input = strings.binstring2buf(data);
+  } else {
+    strm.input = data;
+  }
+
+  strm.next_in = 0;
+  strm.avail_in = strm.input.length;
+
+  do {
+    if (strm.avail_out === 0) {
+      strm.output = new utils.Buf8(chunkSize);
+      strm.next_out = 0;
+      strm.avail_out = chunkSize;
+    }
+
+    status = zlib_inflate.inflate(strm, c.Z_NO_FLUSH);    /* no bad return value */
+
+    if (status !== c.Z_STREAM_END && status !== c.Z_OK) {
+      this.onEnd(status);
+      this.ended = true;
+      return false;
+    }
+
+    if (strm.next_out) {
+      if (strm.avail_out === 0 || status === c.Z_STREAM_END || (strm.avail_in === 0 && _mode === c.Z_FINISH)) {
+
+        if (this.options.to === 'string') {
+
+          next_out_utf8 = strings.utf8border(strm.output, strm.next_out);
+
+          tail = strm.next_out - next_out_utf8;
+          utf8str = strings.buf2string(strm.output, next_out_utf8);
+
+          // move tail
+          strm.next_out = tail;
+          strm.avail_out = chunkSize - tail;
+          if (tail) { utils.arraySet(strm.output, strm.output, next_out_utf8, tail, 0); }
+
+          this.onData(utf8str);
+
+        } else {
+          this.onData(utils.shrinkBuf(strm.output, strm.next_out));
+        }
+      }
+    }
+  } while ((strm.avail_in > 0) && status !== c.Z_STREAM_END);
+
+  if (status === c.Z_STREAM_END) {
+    _mode = c.Z_FINISH;
+  }
+  // Finalize on the last chunk.
+  if (_mode === c.Z_FINISH) {
+    status = zlib_inflate.inflateEnd(this.strm);
+    this.onEnd(status);
+    this.ended = true;
+    return status === c.Z_OK;
+  }
+
+  return true;
+};
+
+
+/**
+ * Inflate#onData(chunk) -> Void
+ * - chunk (Uint8Array|Array|String): ouput data. Type of array depends
+ *   on js engine support. When string output requested, each chunk
+ *   will be string.
+ *
+ * By default, stores data blocks in `chunks[]` property and glue
+ * those in `onEnd`. Override this handler, if you need another behaviour.
+ **/
+Inflate.prototype.onData = function(chunk) {
+  this.chunks.push(chunk);
+};
+
+
+/**
+ * Inflate#onEnd(status) -> Void
+ * - status (Number): inflate status. 0 (Z_OK) on success,
+ *   other if not.
+ *
+ * Called once after you tell inflate that input stream complete
+ * or error happenned. By default - join collected chunks,
+ * free memory and fill `results` / `err` properties.
+ **/
+Inflate.prototype.onEnd = function(status) {
+  // On success - join
+  if (status === c.Z_OK) {
+    if (this.options.to === 'string') {
+      // Glue & convert here, until we teach pako to send
+      // utf8 alligned strings to onData
+      this.result = this.chunks.join('');
+    } else {
+      this.result = utils.flattenChunks(this.chunks);
+    }
+  }
+  this.chunks = [];
+  this.err = status;
+  this.msg = this.strm.msg;
+};
+
+
+/**
+ * inflate(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Decompress `data` with inflate/ungzip and `options`. Autodetect
+ * format via wrapper header by default. That's why we don't provide
+ * separate `ungzip` method.
+ *
+ * Supported options are:
+ *
+ * - windowBits
+ *
+ * [http://zlib.net/manual.html#Advanced](http://zlib.net/manual.html#Advanced)
+ * for more information.
+ *
+ * Sugar (options):
+ *
+ * - `raw` (Boolean) - say that we work with raw stream, if you don't wish to specify
+ *   negative windowBits implicitly.
+ * - `to` (String) - if equal to 'string', then result will be converted
+ *   from utf8 to utf16 (javascript) string. When string output requested,
+ *   chunk length can differ from `chunkSize`, depending on content.
+ *
+ *
+ * ##### Example:
+ *
+ * ```javascript
+ * var pako = require('pako')
+ *   , input = pako.deflate([1,2,3,4,5,6,7,8,9])
+ *   , output;
+ *
+ * try {
+ *   output = pako.inflate(input);
+ * } catch (err)
+ *   console.log(err);
+ * }
+ * ```
+ **/
+function inflate(input, options) {
+  var inflator = new Inflate(options);
+
+  inflator.push(input, true);
+
+  // That will never happens, if you don't cheat with options :)
+  if (inflator.err) { throw inflator.msg; }
+
+  return inflator.result;
+}
+
+
+/**
+ * inflateRaw(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * The same as [[inflate]], but creates raw data, without wrapper
+ * (header and adler32 crc).
+ **/
+function inflateRaw(input, options) {
+  options = options || {};
+  options.raw = true;
+  return inflate(input, options);
+}
+
+
+/**
+ * ungzip(data[, options]) -> Uint8Array|Array|String
+ * - data (Uint8Array|Array|String): input data to decompress.
+ * - options (Object): zlib inflate options.
+ *
+ * Just shortcut to [[inflate]], because it autodetects format
+ * by header.content. Done for convenience.
+ **/
+
+
+exports.Inflate = Inflate;
+exports.inflate = inflate;
+exports.inflateRaw = inflateRaw;
+exports.ungzip  = inflate;
+
+},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(_dereq_,module,exports){
+'use strict';
+
+
+var TYPED_OK =  (typeof Uint8Array !== 'undefined') &&
+                (typeof Uint16Array !== 'undefined') &&
+                (typeof Int32Array !== 'undefined');
+
+
+exports.assign = function (obj /*from1, from2, from3, ...*/) {
+  var sources = Array.prototype.slice.call(arguments, 1);
+  while (sources.length) {
+    var source = sources.shift();
+    if (!source) { continue; }
+
+    if (typeof(source) !== 'object') {
+      throw new TypeError(source + 'must be non-object');
+    }
+
+    for (var p in source) {
+      if (source.hasOwnProperty(p)) {
+        obj[p] = source[p];
+      }
+    }
+  }
+
+  return obj;
+};
+
+
+// reduce buffer size, avoiding mem copy
+exports.shrinkBuf = function (buf, size) {
+  if (buf.length === size) { return buf; }
+  if (buf.subarray) { return buf.subarray(0, size); }
+  buf.length = size;
+  return buf;
+};
+
+
+var fnTyped = {
+  arraySet: function (dest, src, src_offs, len, dest_offs) {
+    if (src.subarray && dest.subarray) {
+      dest.set(src.subarray(src_offs, src_offs+len), dest_offs);
+      return;
+    }
+    // Fallback to ordinary array
+    for(var i=0; i<len; i++) {
+      dest[dest_offs + i] = src[src_offs + i];
+    }
+  },
+  // Join array of chunks to single array.
+  flattenChunks: function(chunks) {
+    var i, l, len, pos, chunk, result;
+
+    // calculate data length
+    len = 0;
+    for (i=0, l=chunks.length; i<l; i++) {
+      len += chunks[i].length;
+    }
+
+    // join chunks
+    result = new Uint8Array(len);
+    pos = 0;
+    for (i=0, l=chunks.length; i<l; i++) {
+      chunk = chunks[i];
+      result.set(chunk, pos);
+      pos += chunk.length;
+    }
+
+    return result;
+  }
+};
+
+var fnUntyped = {
+  arraySet: function (dest, src, src_offs, len, dest_offs) {
+    for(var i=0; i<len; i++) {
+      dest[dest_offs + i] = src[src_offs + i];
+    }
+  },
+  // Join array of chunks to single array.
+  flattenChunks: function(chunks) {
+    return [].concat.apply([], chunks);
+  }
+};
+
+
+// Enable/Disable typed arrays use, for testing
+//
+exports.setTyped = function (on) {
+  if (on) {
+    exports.Buf8  = Uint8Array;
+    exports.Buf16 = Uint16Array;
+    exports.Buf32 = Int32Array;
+    exports.assign(exports, fnTyped);
+  } else {
+    exports.Buf8  = Array;
+    exports.Buf16 = Array;
+    exports.Buf32 = Array;
+    exports.assign(exports, fnUntyped);
+  }
+};
+
+exports.setTyped(TYPED_OK);
+},{}],28:[function(_dereq_,module,exports){
+// String encode/decode helpers
+'use strict';
+
+
+var utils = _dereq_('./common');
+
+
+// Quick check if we can use fast array to bin string conversion
+//
+// - apply(Array) can fail on Android 2.2
+// - apply(Uint8Array) can fail on iOS 5.1 Safary
+//
+var STR_APPLY_OK = true;
+var STR_APPLY_UIA_OK = true;
+
+try { String.fromCharCode.apply(null, [0]); } catch(__) { STR_APPLY_OK = false; }
+try { String.fromCharCode.apply(null, new Uint8Array(1)); } catch(__) { STR_APPLY_UIA_OK = false; }
+
+
+// Table with utf8 lengths (calculated by first byte of sequence)
+// Note, that 5 & 6-byte values and some 4-byte values can not be represented in JS,
+// because max possible codepoint is 0x10ffff
+var _utf8len = new utils.Buf8(256);
+for (var i=0; i<256; i++) {
+  _utf8len[i] = (i >= 252 ? 6 : i >= 248 ? 5 : i >= 240 ? 4 : i >= 224 ? 3 : i >= 192 ? 2 : 1);
+}
+_utf8len[254]=_utf8len[254]=1; // Invalid sequence start
+
+
+// convert string to array (typed, when possible)
+exports.string2buf = function (str) {
+  var buf, c, c2, m_pos, i, str_len = str.length, buf_len = 0;
+
+  // count binary size
+  for (m_pos = 0; m_pos < str_len; m_pos++) {
+    c = str.charCodeAt(m_pos);
+    if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+      c2 = str.charCodeAt(m_pos+1);
+      if ((c2 & 0xfc00) === 0xdc00) {
+        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+        m_pos++;
+      }
+    }
+    buf_len += c < 0x80 ? 1 : c < 0x800 ? 2 : c < 0x10000 ? 3 : 4;
+  }
+
+  // allocate buffer
+  buf = new utils.Buf8(buf_len);
+
+  // convert
+  for (i=0, m_pos = 0; i < buf_len; m_pos++) {
+    c = str.charCodeAt(m_pos);
+    if ((c & 0xfc00) === 0xd800 && (m_pos+1 < str_len)) {
+      c2 = str.charCodeAt(m_pos+1);
+      if ((c2 & 0xfc00) === 0xdc00) {
+        c = 0x10000 + ((c - 0xd800) << 10) + (c2 - 0xdc00);
+        m_pos++;
+      }
+    }
+    if (c < 0x80) {
+      /* one byte */
+      buf[i++] = c;
+    } else if (c < 0x800) {
+      /* two bytes */
+      buf[i++] = 0xC0 | (c >>> 6);
+      buf[i++] = 0x80 | (c & 0x3f);
+    } else if (c < 0x10000) {
+      /* three bytes */
+      buf[i++] = 0xE0 | (c >>> 12);
+      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+      buf[i++] = 0x80 | (c & 0x3f);
+    } else {
+      /* four bytes */
+      buf[i++] = 0xf0 | (c >>> 18);
+      buf[i++] = 0x80 | (c >>> 12 & 0x3f);
+      buf[i++] = 0x80 | (c >>> 6 & 0x3f);
+      buf[i++] = 0x80 | (c & 0x3f);
+    }
+  }
+
+  return buf;
+};
+
+// Helper (used in 2 places)
+function buf2binstring(buf, len) {
+  // use fallback for big arrays to avoid stack overflow
+  if (len < 65537) {
+    if ((buf.subarray && STR_APPLY_UIA_OK) || (!buf.subarray && STR_APPLY_OK)) {
+      return String.fromCharCode.apply(null, utils.shrinkBuf(buf, len));
+    }
+  }
+
+  var result = '';
+  for(var i=0; i < len; i++) {
+    result += String.fromCharCode(buf[i]);
+  }
+  return result;
+}
+
+
+// Convert byte array to binary string
+exports.buf2binstring = function(buf) {
+  return buf2binstring(buf, buf.length);
+};
+
+
+// Convert binary string (typed, when possible)
+exports.binstring2buf = function(str) {
+  var buf = new utils.Buf8(str.length);
+  for(var i=0, len=buf.length; i < len; i++) {
+    buf[i] = str.charCodeAt(i);
+  }
+  return buf;
+};
+
+
+// convert array to string
+exports.buf2string = function (buf, max) {
+  var i, out, c, c_len;
+  var len = max || buf.length;
+
+  // Reserve max possible length (2 words per char)
+  // NB: by unknown reasons, Array is significantly faster for
+  //     String.fromCharCode.apply than Uint16Array.
+  var utf16buf = new Array(len*2);
+
+  for (out=0, i=0; i<len;) {
+    c = buf[i++];
+    // quick process ascii
+    if (c < 0x80) { utf16buf[out++] = c; continue; }
+
+    c_len = _utf8len[c];
+    // skip 5 & 6 byte codes
+    if (c_len > 4) { utf16buf[out++] = 0xfffd; i += c_len-1; continue; }
+
+    // apply mask on first byte
+    c &= c_len === 2 ? 0x1f : c_len === 3 ? 0x0f : 0x07;
+    // join the rest
+    while (c_len > 1 && i < len) {
+      c = (c << 6) | (buf[i++] & 0x3f);
+      c_len--;
+    }
+
+    // terminated by end of string?
+    if (c_len > 1) { utf16buf[out++] = 0xfffd; continue; }
+
+    if (c < 0x10000) {
+      utf16buf[out++] = c;
+    } else {
+      c -= 0x10000;
+      utf16buf[out++] = 0xd800 | ((c >> 10) & 0x3ff);
+      utf16buf[out++] = 0xdc00 | (c & 0x3ff);
+    }
+  }
+
+  return buf2binstring(utf16buf, out);
+};
+
+
+// Calculate max possible position in utf8 buffer,
+// that will not break sequence. If that's not possible
+// - (very small limits) return max size as is.
+//
+// buf[] - utf8 bytes array
+// max   - length limit (mandatory);
+exports.utf8border = function(buf, max) {
+  var pos;
+
+  max = max || buf.length;
+  if (max > buf.length) { max = buf.length; }
+
+  // go back from last position, until start of sequence found
+  pos = max-1;
+  while (pos >= 0 && (buf[pos] & 0xC0) === 0x80) { pos--; }
+
+  // Fuckup - very small and broken sequence,
+  // return max, because we should return something anyway.
+  if (pos < 0) { return max; }
+
+  // If we came to start of buffer - that means vuffer is too small,
+  // return max too.
+  if (pos === 0) { return max; }
+
+  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
+};
+
+},{"./common":27}],29:[function(_dereq_,module,exports){
+'use strict';
+
+// Note: adler32 takes 12% for level 0 and 2% for level 6.
+// It doesn't worth to make additional optimizationa as in original.
+// Small size is preferable.
+
+function adler32(adler, buf, len, pos) {
+  var s1 = (adler & 0xffff) |0
+    , s2 = ((adler >>> 16) & 0xffff) |0
+    , n = 0;
+
+  while (len !== 0) {
+    // Set limit ~ twice less than 5552, to keep
+    // s2 in 31-bits, because we force signed ints.
+    // in other case %= will fail.
+    n = len > 2000 ? 2000 : len;
+    len -= n;
+
+    do {
+      s1 = (s1 + buf[pos++]) |0;
+      s2 = (s2 + s1) |0;
+    } while (--n);
+
+    s1 %= 65521;
+    s2 %= 65521;
+  }
+
+  return (s1 | (s2 << 16)) |0;
+}
+
+
+module.exports = adler32;
+},{}],30:[function(_dereq_,module,exports){
+module.exports = {
+
+  /* Allowed flush values; see deflate() and inflate() below for details */
+  Z_NO_FLUSH:         0,
+  Z_PARTIAL_FLUSH:    1,
+  Z_SYNC_FLUSH:       2,
+  Z_FULL_FLUSH:       3,
+  Z_FINISH:           4,
+  Z_BLOCK:            5,
+  Z_TREES:            6,
+
+  /* Return codes for the compression/decompression functions. Negative values
+  * are errors, positive values are used for special but normal events.
+  */
+  Z_OK:               0,
+  Z_STREAM_END:       1,
+  Z_NEED_DICT:        2,
+  Z_ERRNO:           -1,
+  Z_STREAM_ERROR:    -2,
+  Z_DATA_ERROR:      -3,
+  //Z_MEM_ERROR:     -4,
+  Z_BUF_ERROR:       -5,
+  //Z_VERSION_ERROR: -6,
+
+  /* compression levels */
+  Z_NO_COMPRESSION:         0,
+  Z_BEST_SPEED:             1,
+  Z_BEST_COMPRESSION:       9,
+  Z_DEFAULT_COMPRESSION:   -1,
+
+
+  Z_FILTERED:               1,
+  Z_HUFFMAN_ONLY:           2,
+  Z_RLE:                    3,
+  Z_FIXED:                  4,
+  Z_DEFAULT_STRATEGY:       0,
+
+  /* Possible values of the data_type field (though see inflate()) */
+  Z_BINARY:                 0,
+  Z_TEXT:                   1,
+  //Z_ASCII:                1, // = Z_TEXT (deprecated)
+  Z_UNKNOWN:                2,
+
+  /* The deflate compression method */
+  Z_DEFLATED:               8
+  //Z_NULL:                 null // Use -1 or null inline, depending on var type
+};
+},{}],31:[function(_dereq_,module,exports){
+'use strict';
+
+// Note: we can't get significant speed boost here.
+// So write code to minimize size - no pregenerated tables
+// and array tools dependencies.
+
+
+// Use ordinary array, since untyped makes no boost here
+function makeTable() {
+  var c, table = [];
+
+  for(var n =0; n < 256; n++){
+    c = n;
+    for(var k =0; k < 8; k++){
+      c = ((c&1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
+    }
+    table[n] = c;
+  }
+
+  return table;
+}
+
+// Create table on load. Just 255 signed longs. Not a problem.
+var crcTable = makeTable();
+
+
+function crc32(crc, buf, len, pos) {
+  var t = crcTable
+    , end = pos + len;
+
+  crc = crc ^ (-1);
+
+  for (var i = pos; i < end; i++ ) {
+    crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
+  }
+
+  return (crc ^ (-1)); // >>> 0;
+}
+
+
+module.exports = crc32;
+},{}],32:[function(_dereq_,module,exports){
+'use strict';
+
+var utils   = _dereq_('../utils/common');
+var trees   = _dereq_('./trees');
+var adler32 = _dereq_('./adler32');
+var crc32   = _dereq_('./crc32');
+var msg   = _dereq_('./messages');
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+/* Allowed flush values; see deflate() and inflate() below for details */
+var Z_NO_FLUSH      = 0;
+var Z_PARTIAL_FLUSH = 1;
+//var Z_SYNC_FLUSH    = 2;
+var Z_FULL_FLUSH    = 3;
+var Z_FINISH        = 4;
+var Z_BLOCK         = 5;
+//var Z_TREES         = 6;
+
+
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+//var Z_NEED_DICT     = 2;
+//var Z_ERRNO         = -1;
+var Z_STREAM_ERROR  = -2;
+var Z_DATA_ERROR    = -3;
+//var Z_MEM_ERROR     = -4;
+var Z_BUF_ERROR     = -5;
+//var Z_VERSION_ERROR = -6;
+
+
+/* compression levels */
+//var Z_NO_COMPRESSION      = 0;
+//var Z_BEST_SPEED          = 1;
+//var Z_BEST_COMPRESSION    = 9;
+var Z_DEFAULT_COMPRESSION = -1;
+
+
+var Z_FILTERED            = 1;
+var Z_HUFFMAN_ONLY        = 2;
+var Z_RLE                 = 3;
+var Z_FIXED               = 4;
+var Z_DEFAULT_STRATEGY    = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+//var Z_BINARY              = 0;
+//var Z_TEXT                = 1;
+//var Z_ASCII               = 1; // = Z_TEXT
+var Z_UNKNOWN             = 2;
+
+
+/* The deflate compression method */
+var Z_DEFLATED  = 8;
+
+/*============================================================================*/
+
+
+var MAX_MEM_LEVEL = 9;
+/* Maximum value for memLevel in deflateInit2 */
+var MAX_WBITS = 15;
+/* 32K LZ77 window */
+var DEF_MEM_LEVEL = 8;
+
+
+var LENGTH_CODES  = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+var LITERALS      = 256;
+/* number of literal bytes 0..255 */
+var L_CODES       = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+var D_CODES       = 30;
+/* number of distance codes */
+var BL_CODES      = 19;
+/* number of codes used to transfer the bit lengths */
+var HEAP_SIZE     = 2*L_CODES + 1;
+/* maximum heap size */
+var MAX_BITS  = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+var MIN_MATCH = 3;
+var MAX_MATCH = 258;
+var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
+
+var PRESET_DICT = 0x20;
+
+var INIT_STATE = 42;
+var EXTRA_STATE = 69;
+var NAME_STATE = 73;
+var COMMENT_STATE = 91;
+var HCRC_STATE = 103;
+var BUSY_STATE = 113;
+var FINISH_STATE = 666;
+
+var BS_NEED_MORE      = 1; /* block not completed, need more input or more output */
+var BS_BLOCK_DONE     = 2; /* block flush performed */
+var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
+var BS_FINISH_DONE    = 4; /* finish done, accept no more input or output */
+
+var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
+
+function err(strm, errorCode) {
+  strm.msg = msg[errorCode];
+  return errorCode;
+}
+
+function rank(f) {
+  return ((f) << 1) - ((f) > 4 ? 9 : 0);
+}
+
+function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+
+/* =========================================================================
+ * Flush as much pending output as possible. All deflate() output goes
+ * through this function so some applications may wish to modify it
+ * to avoid allocating a large strm->output buffer and copying into it.
+ * (See also read_buf()).
+ */
+function flush_pending(strm) {
+  var s = strm.state;
+
+  //_tr_flush_bits(s);
+  var len = s.pending;
+  if (len > strm.avail_out) {
+    len = strm.avail_out;
+  }
+  if (len === 0) { return; }
+
+  utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
+  strm.next_out += len;
+  s.pending_out += len;
+  strm.total_out += len;
+  strm.avail_out -= len;
+  s.pending -= len;
+  if (s.pending === 0) {
+    s.pending_out = 0;
+  }
+}
+
+
+function flush_block_only (s, last) {
+  trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
+  s.block_start = s.strstart;
+  flush_pending(s.strm);
+}
+
+
+function put_byte(s, b) {
+  s.pending_buf[s.pending++] = b;
+}
+
+
+/* =========================================================================
+ * Put a short in the pending buffer. The 16-bit value is put in MSB order.
+ * IN assertion: the stream state is correct and there is enough room in
+ * pending_buf.
+ */
+function putShortMSB(s, b) {
+//  put_byte(s, (Byte)(b >> 8));
+//  put_byte(s, (Byte)(b & 0xff));
+  s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
+  s.pending_buf[s.pending++] = b & 0xff;
+}
+
+
+/* ===========================================================================
+ * Read a new buffer from the current input stream, update the adler32
+ * and total number of bytes read.  All deflate() input goes through
+ * this function so some applications may wish to modify it to avoid
+ * allocating a large strm->input buffer and copying from it.
+ * (See also flush_pending()).
+ */
+function read_buf(strm, buf, start, size) {
+  var len = strm.avail_in;
+
+  if (len > size) { len = size; }
+  if (len === 0) { return 0; }
+
+  strm.avail_in -= len;
+
+  utils.arraySet(buf, strm.input, strm.next_in, len, start);
+  if (strm.state.wrap === 1) {
+    strm.adler = adler32(strm.adler, buf, len, start);
+  }
+
+  else if (strm.state.wrap === 2) {
+    strm.adler = crc32(strm.adler, buf, len, start);
+  }
+
+  strm.next_in += len;
+  strm.total_in += len;
+
+  return len;
+}
+
+
+/* ===========================================================================
+ * Set match_start to the longest match starting at the given string and
+ * return its length. Matches shorter or equal to prev_length are discarded,
+ * in which case the result is equal to prev_length and match_start is
+ * garbage.
+ * IN assertions: cur_match is the head of the hash chain for the current
+ *   string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
+ * OUT assertion: the match length is not greater than s->lookahead.
+ */
+function longest_match(s, cur_match) {
+  var chain_length = s.max_chain_length;      /* max hash chain length */
+  var scan = s.strstart; /* current string */
+  var match;                       /* matched string */
+  var len;                           /* length of current match */
+  var best_len = s.prev_length;              /* best match length so far */
+  var nice_match = s.nice_match;             /* stop if match long enough */
+  var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
+      s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
+
+  var _win = s.window; // shortcut
+
+  var wmask = s.w_mask;
+  var prev  = s.prev;
+
+  /* Stop when cur_match becomes <= limit. To simplify the code,
+   * we prevent matches with the string of window index 0.
+   */
+
+  var strend = s.strstart + MAX_MATCH;
+  var scan_end1  = _win[scan + best_len - 1];
+  var scan_end   = _win[scan + best_len];
+
+  /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
+   * It is easy to get rid of this optimization if necessary.
+   */
+  // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
+
+  /* Do not waste too much time if we already have a good match: */
+  if (s.prev_length >= s.good_match) {
+    chain_length >>= 2;
+  }
+  /* Do not look for matches beyond the end of the input. This is necessary
+   * to make deflate deterministic.
+   */
+  if (nice_match > s.lookahead) { nice_match = s.lookahead; }
+
+  // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
+
+  do {
+    // Assert(cur_match < s->strstart, "no future");
+    match = cur_match;
+
+    /* Skip to next match if the match length cannot increase
+     * or if the match length is less than 2.  Note that the checks below
+     * for insufficient lookahead only occur occasionally for performance
+     * reasons.  Therefore uninitialized memory will be accessed, and
+     * conditional jumps will be made that depend on those values.
+     * However the length of the match is limited to the lookahead, so
+     * the output of deflate is not affected by the uninitialized values.
+     */
+
+    if (_win[match + best_len]     !== scan_end  ||
+        _win[match + best_len - 1] !== scan_end1 ||
+        _win[match]                !== _win[scan] ||
+        _win[++match]              !== _win[scan + 1]) {
+      continue;
+    }
+
+    /* The check at best_len-1 can be removed because it will be made
+     * again later. (This heuristic is not always a win.)
+     * It is not necessary to compare scan[2] and match[2] since they
+     * are always equal when the other bytes match, given that
+     * the hash keys are equal and that HASH_BITS >= 8.
+     */
+    scan += 2;
+    match++;
+    // Assert(*scan == *match, "match[2]?");
+
+    /* We check for insufficient lookahead only every 8th comparison;
+     * the 256th check will be made at strstart+258.
+     */
+    do {
+      /*jshint noempty:false*/
+    } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
+             scan < strend);
+
+    // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
+
+    len = MAX_MATCH - (strend - scan);
+    scan = strend - MAX_MATCH;
+
+    if (len > best_len) {
+      s.match_start = cur_match;
+      best_len = len;
+      if (len >= nice_match) {
+        break;
+      }
+      scan_end1  = _win[scan + best_len - 1];
+      scan_end   = _win[scan + best_len];
+    }
+  } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
+
+  if (best_len <= s.lookahead) {
+    return best_len;
+  }
+  return s.lookahead;
+}
+
+
+/* ===========================================================================
+ * Fill the window when the lookahead becomes insufficient.
+ * Updates strstart and lookahead.
+ *
+ * IN assertion: lookahead < MIN_LOOKAHEAD
+ * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
+ *    At least one byte has been read, or avail_in == 0; reads are
+ *    performed for at least two bytes (required for the zip translate_eol
+ *    option -- not supported here).
+ */
+function fill_window(s) {
+  var _w_size = s.w_size;
+  var p, n, m, more, str;
+
+  //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
+
+  do {
+    more = s.window_size - s.lookahead - s.strstart;
+
+    // JS ints have 32 bit, block below not needed
+    /* Deal with !@#$% 64K limit: */
+    //if (sizeof(int) <= 2) {
+    //    if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
+    //        more = wsize;
+    //
+    //  } else if (more == (unsigned)(-1)) {
+    //        /* Very unlikely, but possible on 16 bit machine if
+    //         * strstart == 0 && lookahead == 1 (input done a byte at time)
+    //         */
+    //        more--;
+    //    }
+    //}
+
+
+    /* If the window is almost full and there is insufficient lookahead,
+     * move the upper half to the lower one to make room in the upper half.
+     */
+    if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
+
+      utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
+      s.match_start -= _w_size;
+      s.strstart -= _w_size;
+      /* we now have strstart >= MAX_DIST */
+      s.block_start -= _w_size;
+
+      /* Slide the hash table (could be avoided with 32 bit values
+       at the expense of memory usage). We slide even when level == 0
+       to keep the hash table consistent if we switch back to level > 0
+       later. (Using level 0 permanently is not an optimal usage of
+       zlib, so we don't care about this pathological case.)
+       */
+
+      n = s.hash_size;
+      p = n;
+      do {
+        m = s.head[--p];
+        s.head[p] = (m >= _w_size ? m - _w_size : 0);
+      } while (--n);
+
+      n = _w_size;
+      p = n;
+      do {
+        m = s.prev[--p];
+        s.prev[p] = (m >= _w_size ? m - _w_size : 0);
+        /* If n is not on any hash chain, prev[n] is garbage but
+         * its value will never be used.
+         */
+      } while (--n);
+
+      more += _w_size;
+    }
+    if (s.strm.avail_in === 0) {
+      break;
+    }
+
+    /* If there was no sliding:
+     *    strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
+     *    more == window_size - lookahead - strstart
+     * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
+     * => more >= window_size - 2*WSIZE + 2
+     * In the BIG_MEM or MMAP case (not yet supported),
+     *   window_size == input_size + MIN_LOOKAHEAD  &&
+     *   strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
+     * Otherwise, window_size == 2*WSIZE so more >= 2.
+     * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
+     */
+    //Assert(more >= 2, "more < 2");
+    n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
+    s.lookahead += n;
+
+    /* Initialize the hash value now that we have some input: */
+    if (s.lookahead + s.insert >= MIN_MATCH) {
+      str = s.strstart - s.insert;
+      s.ins_h = s.window[str];
+
+      /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
+//#if MIN_MATCH != 3
+//        Call update_hash() MIN_MATCH-3 more times
+//#endif
+      while (s.insert) {
+        /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
+        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH-1]) & s.hash_mask;
+
+        s.prev[str & s.w_mask] = s.head[s.ins_h];
+        s.head[s.ins_h] = str;
+        str++;
+        s.insert--;
+        if (s.lookahead + s.insert < MIN_MATCH) {
+          break;
+        }
+      }
+    }
+    /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
+     * but this is not important since only literal bytes will be emitted.
+     */
+
+  } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
+
+  /* If the WIN_INIT bytes after the end of the current data have never been
+   * written, then zero those bytes in order to avoid memory check reports of
+   * the use of uninitialized (or uninitialised as Julian writes) bytes by
+   * the longest match routines.  Update the high water mark for the next
+   * time through here.  WIN_INIT is set to MAX_MATCH since the longest match
+   * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
+   */
+//  if (s.high_water < s.window_size) {
+//    var curr = s.strstart + s.lookahead;
+//    var init = 0;
+//
+//    if (s.high_water < curr) {
+//      /* Previous high water mark below current data -- zero WIN_INIT
+//       * bytes or up to end of window, whichever is less.
+//       */
+//      init = s.window_size - curr;
+//      if (init > WIN_INIT)
+//        init = WIN_INIT;
+//      zmemzero(s->window + curr, (unsigned)init);
+//      s->high_water = curr + init;
+//    }
+//    else if (s->high_water < (ulg)curr + WIN_INIT) {
+//      /* High water mark at or above current data, but below current data
+//       * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
+//       * to end of window, whichever is less.
+//       */
+//      init = (ulg)curr + WIN_INIT - s->high_water;
+//      if (init > s->window_size - s->high_water)
+//        init = s->window_size - s->high_water;
+//      zmemzero(s->window + s->high_water, (unsigned)init);
+//      s->high_water += init;
+//    }
+//  }
+//
+//  Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
+//    "not enough room for search");
+}
+
+/* ===========================================================================
+ * Copy without compression as much as possible from the input stream, return
+ * the current block state.
+ * This function does not insert new strings in the dictionary since
+ * uncompressible data is probably not useful. This function is used
+ * only for the level=0 compression option.
+ * NOTE: this function should be optimized to avoid extra copying from
+ * window to pending_buf.
+ */
+function deflate_stored(s, flush) {
+  /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
+   * to pending_buf_size, and each stored block has a 5 byte header:
+   */
+  var max_block_size = 0xffff;
+
+  if (max_block_size > s.pending_buf_size - 5) {
+    max_block_size = s.pending_buf_size - 5;
+  }
+
+  /* Copy as much as possible from input to output: */
+  for (;;) {
+    /* Fill the window as much as possible: */
+    if (s.lookahead <= 1) {
+
+      //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
+      //  s->block_start >= (long)s->w_size, "slide too late");
+//      if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
+//        s.block_start >= s.w_size)) {
+//        throw  new Error("slide too late");
+//      }
+
+      fill_window(s);
+      if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+
+      if (s.lookahead === 0) {
+        break;
+      }
+      /* flush the current block */
+    }
+    //Assert(s->block_start >= 0L, "block gone");
+//    if (s.block_start < 0) throw new Error("block gone");
+
+    s.strstart += s.lookahead;
+    s.lookahead = 0;
+
+    /* Emit a stored block if pending_buf will be full: */
+    var max_start = s.block_start + max_block_size;
+
+    if (s.strstart === 0 || s.strstart >= max_start) {
+      /* strstart == 0 is possible when wraparound on 16-bit machine */
+      s.lookahead = s.strstart - max_start;
+      s.strstart = max_start;
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+
+
+    }
+    /* Flush if we may have to slide, otherwise block_start may become
+     * negative and the data will be gone:
+     */
+    if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+
+  s.insert = 0;
+
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+
+  if (s.strstart > s.block_start) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+
+  return BS_NEED_MORE;
+}
+
+/* ===========================================================================
+ * Compress as much as possible from the input stream, return the current
+ * block state.
+ * This function does not perform lazy evaluation of matches and inserts
+ * new strings in the dictionary only for unmatched strings or for short
+ * matches. It is used only for the fast compression options.
+ */
+function deflate_fast(s, flush) {
+  var hash_head;        /* head of the hash chain */
+  var bflush;           /* set if current block must be flushed */
+
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the next match, plus MIN_MATCH bytes to insert the
+     * string following the next match.
+     */
+    if (s.lookahead < MIN_LOOKAHEAD) {
+      fill_window(s);
+      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) {
+        break; /* flush the current block */
+      }
+    }
+
+    /* Insert the string window[strstart .. strstart+2] in the
+     * dictionary, and set hash_head to the head of the hash chain:
+     */
+    hash_head = 0/*NIL*/;
+    if (s.lookahead >= MIN_MATCH) {
+      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+      s.head[s.ins_h] = s.strstart;
+      /***/
+    }
+
+    /* Find the longest match, discarding those <= prev_length.
+     * At this point we have always match_length < MIN_MATCH
+     */
+    if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
+      /* To simplify the code, we prevent matches with the string
+       * of window index 0 (in particular we have to avoid a match
+       * of the string with itself at the start of the input file).
+       */
+      s.match_length = longest_match(s, hash_head);
+      /* longest_match() sets match_start */
+    }
+    if (s.match_length >= MIN_MATCH) {
+      // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
+
+      /*** _tr_tally_dist(s, s.strstart - s.match_start,
+                     s.match_length - MIN_MATCH, bflush); ***/
+      bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
+
+      s.lookahead -= s.match_length;
+
+      /* Insert new strings in the hash table only if the match length
+       * is not too large. This saves time but degrades compression.
+       */
+      if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
+        s.match_length--; /* string at strstart already in table */
+        do {
+          s.strstart++;
+          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+          s.head[s.ins_h] = s.strstart;
+          /***/
+          /* strstart never exceeds WSIZE-MAX_MATCH, so there are
+           * always MIN_MATCH bytes ahead.
+           */
+        } while (--s.match_length !== 0);
+        s.strstart++;
+      } else
+      {
+        s.strstart += s.match_length;
+        s.match_length = 0;
+        s.ins_h = s.window[s.strstart];
+        /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
+        s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;
+
+//#if MIN_MATCH != 3
+//                Call UPDATE_HASH() MIN_MATCH-3 more times
+//#endif
+        /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
+         * matter since it will be recomputed at next deflate call.
+         */
+      }
+    } else {
+      /* No match, output a literal byte */
+      //Tracevv((stderr,"%c", s.window[s.strstart]));
+      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+
+      s.lookahead--;
+      s.strstart++;
+    }
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = ((s.strstart < (MIN_MATCH-1)) ? s.strstart : MIN_MATCH-1);
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* ===========================================================================
+ * Same as above, but achieves better compression. We use a lazy
+ * evaluation for matches: a match is finally adopted only if there is
+ * no better match at the next window position.
+ */
+function deflate_slow(s, flush) {
+  var hash_head;          /* head of hash chain */
+  var bflush;              /* set if current block must be flushed */
+
+  var max_insert;
+
+  /* Process the input block. */
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the next match, plus MIN_MATCH bytes to insert the
+     * string following the next match.
+     */
+    if (s.lookahead < MIN_LOOKAHEAD) {
+      fill_window(s);
+      if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) { break; } /* flush the current block */
+    }
+
+    /* Insert the string window[strstart .. strstart+2] in the
+     * dictionary, and set hash_head to the head of the hash chain:
+     */
+    hash_head = 0/*NIL*/;
+    if (s.lookahead >= MIN_MATCH) {
+      /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+      s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+      hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+      s.head[s.ins_h] = s.strstart;
+      /***/
+    }
+
+    /* Find the longest match, discarding those <= prev_length.
+     */
+    s.prev_length = s.match_length;
+    s.prev_match = s.match_start;
+    s.match_length = MIN_MATCH-1;
+
+    if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
+        s.strstart - hash_head <= (s.w_size-MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
+      /* To simplify the code, we prevent matches with the string
+       * of window index 0 (in particular we have to avoid a match
+       * of the string with itself at the start of the input file).
+       */
+      s.match_length = longest_match(s, hash_head);
+      /* longest_match() sets match_start */
+
+      if (s.match_length <= 5 &&
+         (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {
+
+        /* If prev_match is also MIN_MATCH, match_start is garbage
+         * but we will ignore the current match anyway.
+         */
+        s.match_length = MIN_MATCH-1;
+      }
+    }
+    /* If there was a match at the previous step and the current
+     * match is not better, output the previous match:
+     */
+    if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
+      max_insert = s.strstart + s.lookahead - MIN_MATCH;
+      /* Do not insert strings in hash table beyond this. */
+
+      //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
+
+      /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
+                     s.prev_length - MIN_MATCH, bflush);***/
+      bflush = trees._tr_tally(s, s.strstart - 1- s.prev_match, s.prev_length - MIN_MATCH);
+      /* Insert in hash table all strings up to the end of the match.
+       * strstart-1 and strstart are already inserted. If there is not
+       * enough lookahead, the last two strings are not inserted in
+       * the hash table.
+       */
+      s.lookahead -= s.prev_length-1;
+      s.prev_length -= 2;
+      do {
+        if (++s.strstart <= max_insert) {
+          /*** INSERT_STRING(s, s.strstart, hash_head); ***/
+          s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
+          hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
+          s.head[s.ins_h] = s.strstart;
+          /***/
+        }
+      } while (--s.prev_length !== 0);
+      s.match_available = 0;
+      s.match_length = MIN_MATCH-1;
+      s.strstart++;
+
+      if (bflush) {
+        /*** FLUSH_BLOCK(s, 0); ***/
+        flush_block_only(s, false);
+        if (s.strm.avail_out === 0) {
+          return BS_NEED_MORE;
+        }
+        /***/
+      }
+
+    } else if (s.match_available) {
+      /* If there was no match at the previous position, output a
+       * single literal. If there was a match but the current match
+       * is longer, truncate the previous match to a single literal.
+       */
+      //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+      /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);
+
+      if (bflush) {
+        /*** FLUSH_BLOCK_ONLY(s, 0) ***/
+        flush_block_only(s, false);
+        /***/
+      }
+      s.strstart++;
+      s.lookahead--;
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+    } else {
+      /* There is no previous match to compare with, wait for
+       * the next step to decide.
+       */
+      s.match_available = 1;
+      s.strstart++;
+      s.lookahead--;
+    }
+  }
+  //Assert (flush != Z_NO_FLUSH, "no flush?");
+  if (s.match_available) {
+    //Tracevv((stderr,"%c", s->window[s->strstart-1]));
+    /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
+    bflush = trees._tr_tally(s, 0, s.window[s.strstart-1]);
+
+    s.match_available = 0;
+  }
+  s.insert = s.strstart < MIN_MATCH-1 ? s.strstart : MIN_MATCH-1;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+
+  return BS_BLOCK_DONE;
+}
+
+
+/* ===========================================================================
+ * For Z_RLE, simply look for runs of bytes, generate matches only of distance
+ * one.  Do not maintain a hash table.  (It will be regenerated if this run of
+ * deflate switches away from Z_RLE.)
+ */
+function deflate_rle(s, flush) {
+  var bflush;            /* set if current block must be flushed */
+  var prev;              /* byte at distance one to match */
+  var scan, strend;      /* scan goes up to strend for length of run */
+
+  var _win = s.window;
+
+  for (;;) {
+    /* Make sure that we always have enough lookahead, except
+     * at the end of the input file. We need MAX_MATCH bytes
+     * for the longest run, plus one for the unrolled loop.
+     */
+    if (s.lookahead <= MAX_MATCH) {
+      fill_window(s);
+      if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
+        return BS_NEED_MORE;
+      }
+      if (s.lookahead === 0) { break; } /* flush the current block */
+    }
+
+    /* See how many times the previous byte repeats */
+    s.match_length = 0;
+    if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
+      scan = s.strstart - 1;
+      prev = _win[scan];
+      if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
+        strend = s.strstart + MAX_MATCH;
+        do {
+          /*jshint noempty:false*/
+        } while (prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 prev === _win[++scan] && prev === _win[++scan] &&
+                 scan < strend);
+        s.match_length = MAX_MATCH - (strend - scan);
+        if (s.match_length > s.lookahead) {
+          s.match_length = s.lookahead;
+        }
+      }
+      //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
+    }
+
+    /* Emit match if have run of MIN_MATCH or longer, else emit literal */
+    if (s.match_length >= MIN_MATCH) {
+      //check_match(s, s.strstart, s.strstart - 1, s.match_length);
+
+      /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
+      bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);
+
+      s.lookahead -= s.match_length;
+      s.strstart += s.match_length;
+      s.match_length = 0;
+    } else {
+      /* No match, output a literal byte */
+      //Tracevv((stderr,"%c", s->window[s->strstart]));
+      /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+      bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+
+      s.lookahead--;
+      s.strstart++;
+    }
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = 0;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* ===========================================================================
+ * For Z_HUFFMAN_ONLY, do not look for matches.  Do not maintain a hash table.
+ * (It will be regenerated if this run of deflate switches away from Huffman.)
+ */
+function deflate_huff(s, flush) {
+  var bflush;             /* set if current block must be flushed */
+
+  for (;;) {
+    /* Make sure that we have a literal to write. */
+    if (s.lookahead === 0) {
+      fill_window(s);
+      if (s.lookahead === 0) {
+        if (flush === Z_NO_FLUSH) {
+          return BS_NEED_MORE;
+        }
+        break;      /* flush the current block */
+      }
+    }
+
+    /* Output a literal byte */
+    s.match_length = 0;
+    //Tracevv((stderr,"%c", s->window[s->strstart]));
+    /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
+    bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
+    s.lookahead--;
+    s.strstart++;
+    if (bflush) {
+      /*** FLUSH_BLOCK(s, 0); ***/
+      flush_block_only(s, false);
+      if (s.strm.avail_out === 0) {
+        return BS_NEED_MORE;
+      }
+      /***/
+    }
+  }
+  s.insert = 0;
+  if (flush === Z_FINISH) {
+    /*** FLUSH_BLOCK(s, 1); ***/
+    flush_block_only(s, true);
+    if (s.strm.avail_out === 0) {
+      return BS_FINISH_STARTED;
+    }
+    /***/
+    return BS_FINISH_DONE;
+  }
+  if (s.last_lit) {
+    /*** FLUSH_BLOCK(s, 0); ***/
+    flush_block_only(s, false);
+    if (s.strm.avail_out === 0) {
+      return BS_NEED_MORE;
+    }
+    /***/
+  }
+  return BS_BLOCK_DONE;
+}
+
+/* Values for max_lazy_match, good_match and max_chain_length, depending on
+ * the desired pack level (0..9). The values given below have been tuned to
+ * exclude worst case performance for pathological files. Better values may be
+ * found for specific files.
+ */
+var Config = function (good_length, max_lazy, nice_length, max_chain, func) {
+  this.good_length = good_length;
+  this.max_lazy = max_lazy;
+  this.nice_length = nice_length;
+  this.max_chain = max_chain;
+  this.func = func;
+};
+
+var configuration_table;
+
+configuration_table = [
+  /*      good lazy nice chain */
+  new Config(0, 0, 0, 0, deflate_stored),          /* 0 store only */
+  new Config(4, 4, 8, 4, deflate_fast),            /* 1 max speed, no lazy matches */
+  new Config(4, 5, 16, 8, deflate_fast),           /* 2 */
+  new Config(4, 6, 32, 32, deflate_fast),          /* 3 */
+
+  new Config(4, 4, 16, 16, deflate_slow),          /* 4 lazy matches */
+  new Config(8, 16, 32, 32, deflate_slow),         /* 5 */
+  new Config(8, 16, 128, 128, deflate_slow),       /* 6 */
+  new Config(8, 32, 128, 256, deflate_slow),       /* 7 */
+  new Config(32, 128, 258, 1024, deflate_slow),    /* 8 */
+  new Config(32, 258, 258, 4096, deflate_slow)     /* 9 max compression */
+];
+
+
+/* ===========================================================================
+ * Initialize the "longest match" routines for a new zlib stream
+ */
+function lm_init(s) {
+  s.window_size = 2 * s.w_size;
+
+  /*** CLEAR_HASH(s); ***/
+  zero(s.head); // Fill with NIL (= 0);
+
+  /* Set the default configuration parameters:
+   */
+  s.max_lazy_match = configuration_table[s.level].max_lazy;
+  s.good_match = configuration_table[s.level].good_length;
+  s.nice_match = configuration_table[s.level].nice_length;
+  s.max_chain_length = configuration_table[s.level].max_chain;
+
+  s.strstart = 0;
+  s.block_start = 0;
+  s.lookahead = 0;
+  s.insert = 0;
+  s.match_length = s.prev_length = MIN_MATCH - 1;
+  s.match_available = 0;
+  s.ins_h = 0;
+}
+
+
+function DeflateState() {
+  this.strm = null;            /* pointer back to this zlib stream */
+  this.status = 0;            /* as the name implies */
+  this.pending_buf = null;      /* output still pending */
+  this.pending_buf_size = 0;  /* size of pending_buf */
+  this.pending_out = 0;       /* next pending byte to output to the stream */
+  this.pending = 0;           /* nb of bytes in the pending buffer */
+  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
+  this.gzhead = null;         /* gzip header information to write */
+  this.gzindex = 0;           /* where in extra, name, or comment */
+  this.method = Z_DEFLATED; /* can only be DEFLATED */
+  this.last_flush = -1;   /* value of flush param for previous deflate call */
+
+  this.w_size = 0;  /* LZ77 window size (32K by default) */
+  this.w_bits = 0;  /* log2(w_size)  (8..16) */
+  this.w_mask = 0;  /* w_size - 1 */
+
+  this.window = null;
+  /* Sliding window. Input bytes are read into the second half of the window,
+   * and move to the first half later to keep a dictionary of at least wSize
+   * bytes. With this organization, matches are limited to a distance of
+   * wSize-MAX_MATCH bytes, but this ensures that IO is always
+   * performed with a length multiple of the block size.
+   */
+
+  this.window_size = 0;
+  /* Actual size of window: 2*wSize, except when the user input buffer
+   * is directly used as sliding window.
+   */
+
+  this.prev = null;
+  /* Link to older string with same hash index. To limit the size of this
+   * array to 64K, this link is maintained only for the last 32K strings.
+   * An index in this array is thus a window index modulo 32K.
+   */
+
+  this.head = null;   /* Heads of the hash chains or NIL. */
+
+  this.ins_h = 0;       /* hash index of string to be inserted */
+  this.hash_size = 0;   /* number of elements in hash table */
+  this.hash_bits = 0;   /* log2(hash_size) */
+  this.hash_mask = 0;   /* hash_size-1 */
+
+  this.hash_shift = 0;
+  /* Number of bits by which ins_h must be shifted at each input
+   * step. It must be such that after MIN_MATCH steps, the oldest
+   * byte no longer takes part in the hash key, that is:
+   *   hash_shift * MIN_MATCH >= hash_bits
+   */
+
+  this.block_start = 0;
+  /* Window position at the beginning of the current output block. Gets
+   * negative when the window is moved backwards.
+   */
+
+  this.match_length = 0;      /* length of best match */
+  this.prev_match = 0;        /* previous match */
+  this.match_available = 0;   /* set if previous match exists */
+  this.strstart = 0;          /* start of string to insert */
+  this.match_start = 0;       /* start of matching string */
+  this.lookahead = 0;         /* number of valid bytes ahead in window */
+
+  this.prev_length = 0;
+  /* Length of the best match at previous step. Matches not greater than this
+   * are discarded. This is used in the lazy match evaluation.
+   */
+
+  this.max_chain_length = 0;
+  /* To speed up deflation, hash chains are never searched beyond this
+   * length.  A higher limit improves compression ratio but degrades the
+   * speed.
+   */
+
+  this.max_lazy_match = 0;
+  /* Attempt to find a better match only when the current match is strictly
+   * smaller than this value. This mechanism is used only for compression
+   * levels >= 4.
+   */
+  // That's alias to max_lazy_match, don't use directly
+  //this.max_insert_length = 0;
+  /* Insert new strings in the hash table only if the match length is not
+   * greater than this length. This saves time but degrades compression.
+   * max_insert_length is used only for compression levels <= 3.
+   */
+
+  this.level = 0;     /* compression level (1..9) */
+  this.strategy = 0;  /* favor or force Huffman coding*/
+
+  this.good_match = 0;
+  /* Use a faster search when the previous match is longer than this */
+
+  this.nice_match = 0; /* Stop searching when current match exceeds this */
+
+              /* used by trees.c: */
+
+  /* Didn't use ct_data typedef below to suppress compiler warning */
+
+  // struct ct_data_s dyn_ltree[HEAP_SIZE];   /* literal and length tree */
+  // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
+  // struct ct_data_s bl_tree[2*BL_CODES+1];  /* Huffman tree for bit lengths */
+
+  // Use flat array of DOUBLE size, with interleaved fata,
+  // because JS does not support effective
+  this.dyn_ltree  = new utils.Buf16(HEAP_SIZE * 2);
+  this.dyn_dtree  = new utils.Buf16((2*D_CODES+1) * 2);
+  this.bl_tree    = new utils.Buf16((2*BL_CODES+1) * 2);
+  zero(this.dyn_ltree);
+  zero(this.dyn_dtree);
+  zero(this.bl_tree);
+
+  this.l_desc   = null;         /* desc. for literal tree */
+  this.d_desc   = null;         /* desc. for distance tree */
+  this.bl_desc  = null;         /* desc. for bit length tree */
+
+  //ush bl_count[MAX_BITS+1];
+  this.bl_count = new utils.Buf16(MAX_BITS+1);
+  /* number of codes at each bit length for an optimal tree */
+
+  //int heap[2*L_CODES+1];      /* heap used to build the Huffman trees */
+  this.heap = new utils.Buf16(2*L_CODES+1);  /* heap used to build the Huffman trees */
+  zero(this.heap);
+
+  this.heap_len = 0;               /* number of elements in the heap */
+  this.heap_max = 0;               /* element of largest frequency */
+  /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
+   * The same heap array is used to build all trees.
+   */
+
+  this.depth = new utils.Buf16(2*L_CODES+1); //uch depth[2*L_CODES+1];
+  zero(this.depth);
+  /* Depth of each subtree used as tie breaker for trees of equal frequency
+   */
+
+  this.l_buf = 0;          /* buffer index for literals or lengths */
+
+  this.lit_bufsize = 0;
+  /* Size of match buffer for literals/lengths.  There are 4 reasons for
+   * limiting lit_bufsize to 64K:
+   *   - frequencies can be kept in 16 bit counters
+   *   - if compression is not successful for the first block, all input
+   *     data is still in the window so we can still emit a stored block even
+   *     when input comes from standard input.  (This can also be done for
+   *     all blocks if lit_bufsize is not greater than 32K.)
+   *   - if compression is not successful for a file smaller than 64K, we can
+   *     even emit a stored file instead of a stored block (saving 5 bytes).
+   *     This is applicable only for zip (not gzip or zlib).
+   *   - creating new Huffman trees less frequently may not provide fast
+   *     adaptation to changes in the input data statistics. (Take for
+   *     example a binary file with poorly compressible code followed by
+   *     a highly compressible string table.) Smaller buffer sizes give
+   *     fast adaptation but have of course the overhead of transmitting
+   *     trees more frequently.
+   *   - I can't count above 4
+   */
+
+  this.last_lit = 0;      /* running index in l_buf */
+
+  this.d_buf = 0;
+  /* Buffer index for distances. To simplify the code, d_buf and l_buf have
+   * the same number of elements. To use different lengths, an extra flag
+   * array would be necessary.
+   */
+
+  this.opt_len = 0;       /* bit length of current block with optimal trees */
+  this.static_len = 0;    /* bit length of current block with static trees */
+  this.matches = 0;       /* number of string matches in current block */
+  this.insert = 0;        /* bytes at end of window left to insert */
+
+
+  this.bi_buf = 0;
+  /* Output buffer. bits are inserted starting at the bottom (least
+   * significant bits).
+   */
+  this.bi_valid = 0;
+  /* Number of valid bits in bi_buf.  All bits above the last valid bit
+   * are always zero.
+   */
+
+  // Used for window memory init. We safely ignore it for JS. That makes
+  // sense only for pointers and memory check tools.
+  //this.high_water = 0;
+  /* High water mark offset in window for initialized bytes -- bytes above
+   * this are set to zero in order to avoid memory check warnings when
+   * longest match routines access bytes past the input.  This is then
+   * updated to the new high water mark.
+   */
+}
+
+
+function deflateResetKeep(strm) {
+  var s;
+
+  if (!strm || !strm.state) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+  strm.total_in = strm.total_out = 0;
+  strm.data_type = Z_UNKNOWN;
+
+  s = strm.state;
+  s.pending = 0;
+  s.pending_out = 0;
+
+  if (s.wrap < 0) {
+    s.wrap = -s.wrap;
+    /* was made negative by deflate(..., Z_FINISH); */
+  }
+  s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
+  strm.adler = (s.wrap === 2) ?
+    0  // crc32(0, Z_NULL, 0)
+  :
+    1; // adler32(0, Z_NULL, 0)
+  s.last_flush = Z_NO_FLUSH;
+  trees._tr_init(s);
+  return Z_OK;
+}
+
+
+function deflateReset(strm) {
+  var ret = deflateResetKeep(strm);
+  if (ret === Z_OK) {
+    lm_init(strm.state);
+  }
+  return ret;
+}
+
+
+function deflateSetHeader(strm, head) {
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
+  strm.state.gzhead = head;
+  return Z_OK;
+}
+
+
+function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
+  if (!strm) { // === Z_NULL
+    return Z_STREAM_ERROR;
+  }
+  var wrap = 1;
+
+  if (level === Z_DEFAULT_COMPRESSION) {
+    level = 6;
+  }
+
+  if (windowBits < 0) { /* suppress zlib wrapper */
+    wrap = 0;
+    windowBits = -windowBits;
+  }
+
+  else if (windowBits > 15) {
+    wrap = 2;           /* write gzip wrapper instead */
+    windowBits -= 16;
+  }
+
+
+  if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
+    windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
+    strategy < 0 || strategy > Z_FIXED) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+
+  if (windowBits === 8) {
+    windowBits = 9;
+  }
+  /* until 256-byte window bug fixed */
+
+  var s = new DeflateState();
+
+  strm.state = s;
+  s.strm = strm;
+
+  s.wrap = wrap;
+  s.gzhead = null;
+  s.w_bits = windowBits;
+  s.w_size = 1 << s.w_bits;
+  s.w_mask = s.w_size - 1;
+
+  s.hash_bits = memLevel + 7;
+  s.hash_size = 1 << s.hash_bits;
+  s.hash_mask = s.hash_size - 1;
+  s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
+
+  s.window = new utils.Buf8(s.w_size * 2);
+  s.head = new utils.Buf16(s.hash_size);
+  s.prev = new utils.Buf16(s.w_size);
+
+  // Don't need mem init magic for JS.
+  //s.high_water = 0;  /* nothing written to s->window yet */
+
+  s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
+
+  s.pending_buf_size = s.lit_bufsize * 4;
+  s.pending_buf = new utils.Buf8(s.pending_buf_size);
+
+  s.d_buf = s.lit_bufsize >> 1;
+  s.l_buf = (1 + 2) * s.lit_bufsize;
+
+  s.level = level;
+  s.strategy = strategy;
+  s.method = method;
+
+  return deflateReset(strm);
+}
+
+function deflateInit(strm, level) {
+  return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
+}
+
+
+function deflate(strm, flush) {
+  var old_flush, s;
+  var beg, val; // for gzip header write only
+
+  if (!strm || !strm.state ||
+    flush > Z_BLOCK || flush < 0) {
+    return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
+  }
+
+  s = strm.state;
+
+  if (!strm.output ||
+      (!strm.input && strm.avail_in !== 0) ||
+      (s.status === FINISH_STATE && flush !== Z_FINISH)) {
+    return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
+  }
+
+  s.strm = strm; /* just in case */
+  old_flush = s.last_flush;
+  s.last_flush = flush;
+
+  /* Write the header */
+  if (s.status === INIT_STATE) {
+
+    if (s.wrap === 2) { // GZIP header
+      strm.adler = 0;  //crc32(0L, Z_NULL, 0);
+      put_byte(s, 31);
+      put_byte(s, 139);
+      put_byte(s, 8);
+      if (!s.gzhead) { // s->gzhead == Z_NULL
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, 0);
+        put_byte(s, s.level === 9 ? 2 :
+                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+                     4 : 0));
+        put_byte(s, OS_CODE);
+        s.status = BUSY_STATE;
+      }
+      else {
+        put_byte(s, (s.gzhead.text ? 1 : 0) +
+                    (s.gzhead.hcrc ? 2 : 0) +
+                    (!s.gzhead.extra ? 0 : 4) +
+                    (!s.gzhead.name ? 0 : 8) +
+                    (!s.gzhead.comment ? 0 : 16)
+                );
+        put_byte(s, s.gzhead.time & 0xff);
+        put_byte(s, (s.gzhead.time >> 8) & 0xff);
+        put_byte(s, (s.gzhead.time >> 16) & 0xff);
+        put_byte(s, (s.gzhead.time >> 24) & 0xff);
+        put_byte(s, s.level === 9 ? 2 :
+                    (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
+                     4 : 0));
+        put_byte(s, s.gzhead.os & 0xff);
+        if (s.gzhead.extra && s.gzhead.extra.length) {
+          put_byte(s, s.gzhead.extra.length & 0xff);
+          put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
+        }
+        if (s.gzhead.hcrc) {
+          strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
+        }
+        s.gzindex = 0;
+        s.status = EXTRA_STATE;
+      }
+    }
+    else // DEFLATE header
+    {
+      var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
+      var level_flags = -1;
+
+      if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
+        level_flags = 0;
+      } else if (s.level < 6) {
+        level_flags = 1;
+      } else if (s.level === 6) {
+        level_flags = 2;
+      } else {
+        level_flags = 3;
+      }
+      header |= (level_flags << 6);
+      if (s.strstart !== 0) { header |= PRESET_DICT; }
+      header += 31 - (header % 31);
+
+      s.status = BUSY_STATE;
+      putShortMSB(s, header);
+
+      /* Save the adler32 of the preset dictionary: */
+      if (s.strstart !== 0) {
+        putShortMSB(s, strm.adler >>> 16);
+        putShortMSB(s, strm.adler & 0xffff);
+      }
+      strm.adler = 1; // adler32(0L, Z_NULL, 0);
+    }
+  }
+
+//#ifdef GZIP
+  if (s.status === EXTRA_STATE) {
+    if (s.gzhead.extra/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+
+      while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            break;
+          }
+        }
+        put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
+        s.gzindex++;
+      }
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (s.gzindex === s.gzhead.extra.length) {
+        s.gzindex = 0;
+        s.status = NAME_STATE;
+      }
+    }
+    else {
+      s.status = NAME_STATE;
+    }
+  }
+  if (s.status === NAME_STATE) {
+    if (s.gzhead.name/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+      //int val;
+
+      do {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            val = 1;
+            break;
+          }
+        }
+        // JS specific: little magic to add zero terminator to end of string
+        if (s.gzindex < s.gzhead.name.length) {
+          val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
+        } else {
+          val = 0;
+        }
+        put_byte(s, val);
+      } while (val !== 0);
+
+      if (s.gzhead.hcrc && s.pending > beg){
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (val === 0) {
+        s.gzindex = 0;
+        s.status = COMMENT_STATE;
+      }
+    }
+    else {
+      s.status = COMMENT_STATE;
+    }
+  }
+  if (s.status === COMMENT_STATE) {
+    if (s.gzhead.comment/* != Z_NULL*/) {
+      beg = s.pending;  /* start of bytes to update crc */
+      //int val;
+
+      do {
+        if (s.pending === s.pending_buf_size) {
+          if (s.gzhead.hcrc && s.pending > beg) {
+            strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+          }
+          flush_pending(strm);
+          beg = s.pending;
+          if (s.pending === s.pending_buf_size) {
+            val = 1;
+            break;
+          }
+        }
+        // JS specific: little magic to add zero terminator to end of string
+        if (s.gzindex < s.gzhead.comment.length) {
+          val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
+        } else {
+          val = 0;
+        }
+        put_byte(s, val);
+      } while (val !== 0);
+
+      if (s.gzhead.hcrc && s.pending > beg) {
+        strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
+      }
+      if (val === 0) {
+        s.status = HCRC_STATE;
+      }
+    }
+    else {
+      s.status = HCRC_STATE;
+    }
+  }
+  if (s.status === HCRC_STATE) {
+    if (s.gzhead.hcrc) {
+      if (s.pending + 2 > s.pending_buf_size) {
+        flush_pending(strm);
+      }
+      if (s.pending + 2 <= s.pending_buf_size) {
+        put_byte(s, strm.adler & 0xff);
+        put_byte(s, (strm.adler >> 8) & 0xff);
+        strm.adler = 0; //crc32(0L, Z_NULL, 0);
+        s.status = BUSY_STATE;
+      }
+    }
+    else {
+      s.status = BUSY_STATE;
+    }
+  }
+//#endif
+
+  /* Flush as much pending output as possible */
+  if (s.pending !== 0) {
+    flush_pending(strm);
+    if (strm.avail_out === 0) {
+      /* Since avail_out is 0, deflate will be called again with
+       * more output space, but possibly with both pending and
+       * avail_in equal to zero. There won't be anything to do,
+       * but this is not an error situation so make sure we
+       * return OK instead of BUF_ERROR at next call of deflate:
+       */
+      s.last_flush = -1;
+      return Z_OK;
+    }
+
+    /* Make sure there is something to do and avoid duplicate consecutive
+     * flushes. For repeated and useless calls with Z_FINISH, we keep
+     * returning Z_STREAM_END instead of Z_BUF_ERROR.
+     */
+  } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
+    flush !== Z_FINISH) {
+    return err(strm, Z_BUF_ERROR);
+  }
+
+  /* User must not provide more input after the first FINISH: */
+  if (s.status === FINISH_STATE && strm.avail_in !== 0) {
+    return err(strm, Z_BUF_ERROR);
+  }
+
+  /* Start a new block or continue the current one.
+   */
+  if (strm.avail_in !== 0 || s.lookahead !== 0 ||
+    (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
+    var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
+      (s.strategy === Z_RLE ? deflate_rle(s, flush) :
+        configuration_table[s.level].func(s, flush));
+
+    if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
+      s.status = FINISH_STATE;
+    }
+    if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
+      if (strm.avail_out === 0) {
+        s.last_flush = -1;
+        /* avoid BUF_ERROR next call, see above */
+      }
+      return Z_OK;
+      /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
+       * of deflate should use the same flush parameter to make sure
+       * that the flush is complete. So we don't have to output an
+       * empty block here, this will be done at next call. This also
+       * ensures that for a very small output buffer, we emit at most
+       * one empty block.
+       */
+    }
+    if (bstate === BS_BLOCK_DONE) {
+      if (flush === Z_PARTIAL_FLUSH) {
+        trees._tr_align(s);
+      }
+      else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
+
+        trees._tr_stored_block(s, 0, 0, false);
+        /* For a full flush, this empty block will be recognized
+         * as a special marker by inflate_sync().
+         */
+        if (flush === Z_FULL_FLUSH) {
+          /*** CLEAR_HASH(s); ***/             /* forget history */
+          zero(s.head); // Fill with NIL (= 0);
+
+          if (s.lookahead === 0) {
+            s.strstart = 0;
+            s.block_start = 0;
+            s.insert = 0;
+          }
+        }
+      }
+      flush_pending(strm);
+      if (strm.avail_out === 0) {
+        s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
+        return Z_OK;
+      }
+    }
+  }
+  //Assert(strm->avail_out > 0, "bug2");
+  //if (strm.avail_out <= 0) { throw new Error("bug2");}
+
+  if (flush !== Z_FINISH) { return Z_OK; }
+  if (s.wrap <= 0) { return Z_STREAM_END; }
+
+  /* Write the trailer */
+  if (s.wrap === 2) {
+    put_byte(s, strm.adler & 0xff);
+    put_byte(s, (strm.adler >> 8) & 0xff);
+    put_byte(s, (strm.adler >> 16) & 0xff);
+    put_byte(s, (strm.adler >> 24) & 0xff);
+    put_byte(s, strm.total_in & 0xff);
+    put_byte(s, (strm.total_in >> 8) & 0xff);
+    put_byte(s, (strm.total_in >> 16) & 0xff);
+    put_byte(s, (strm.total_in >> 24) & 0xff);
+  }
+  else
+  {
+    putShortMSB(s, strm.adler >>> 16);
+    putShortMSB(s, strm.adler & 0xffff);
+  }
+
+  flush_pending(strm);
+  /* If avail_out is zero, the application will call deflate again
+   * to flush the rest.
+   */
+  if (s.wrap > 0) { s.wrap = -s.wrap; }
+  /* write the trailer only once! */
+  return s.pending !== 0 ? Z_OK : Z_STREAM_END;
+}
+
+function deflateEnd(strm) {
+  var status;
+
+  if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  status = strm.state.status;
+  if (status !== INIT_STATE &&
+    status !== EXTRA_STATE &&
+    status !== NAME_STATE &&
+    status !== COMMENT_STATE &&
+    status !== HCRC_STATE &&
+    status !== BUSY_STATE &&
+    status !== FINISH_STATE
+  ) {
+    return err(strm, Z_STREAM_ERROR);
+  }
+
+  strm.state = null;
+
+  return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
+}
+
+/* =========================================================================
+ * Copy the source state to the destination state
+ */
+//function deflateCopy(dest, source) {
+//
+//}
+
+exports.deflateInit = deflateInit;
+exports.deflateInit2 = deflateInit2;
+exports.deflateReset = deflateReset;
+exports.deflateResetKeep = deflateResetKeep;
+exports.deflateSetHeader = deflateSetHeader;
+exports.deflate = deflate;
+exports.deflateEnd = deflateEnd;
+exports.deflateInfo = 'pako deflate (from Nodeca project)';
+
+/* Not implemented
+exports.deflateBound = deflateBound;
+exports.deflateCopy = deflateCopy;
+exports.deflateSetDictionary = deflateSetDictionary;
+exports.deflateParams = deflateParams;
+exports.deflatePending = deflatePending;
+exports.deflatePrime = deflatePrime;
+exports.deflateTune = deflateTune;
+*/
+},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(_dereq_,module,exports){
+'use strict';
+
+
+function GZheader() {
+  /* true if compressed data believed to be text */
+  this.text       = 0;
+  /* modification time */
+  this.time       = 0;
+  /* extra flags (not used when writing a gzip file) */
+  this.xflags     = 0;
+  /* operating system */
+  this.os         = 0;
+  /* pointer to extra field or Z_NULL if none */
+  this.extra      = null;
+  /* extra field length (valid if extra != Z_NULL) */
+  this.extra_len  = 0; // Actually, we don't need it in JS,
+                       // but leave for few code modifications
+
+  //
+  // Setup limits is not necessary because in js we should not preallocate memory 
+  // for inflate use constant limit in 65536 bytes
+  //
+
+  /* space at extra (only when reading header) */
+  // this.extra_max  = 0;
+  /* pointer to zero-terminated file name or Z_NULL */
+  this.name       = '';
+  /* space at name (only when reading header) */
+  // this.name_max   = 0;
+  /* pointer to zero-terminated comment or Z_NULL */
+  this.comment    = '';
+  /* space at comment (only when reading header) */
+  // this.comm_max   = 0;
+  /* true if there was or will be a header crc */
+  this.hcrc       = 0;
+  /* true when done reading gzip header (not used when writing a gzip file) */
+  this.done       = false;
+}
+
+module.exports = GZheader;
+},{}],34:[function(_dereq_,module,exports){
+'use strict';
+
+// See state defs from inflate.js
+var BAD = 30;       /* got a data error -- remain here until reset */
+var TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
+
+/*
+   Decode literal, length, and distance codes and write out the resulting
+   literal and match bytes until either not enough input or output is
+   available, an end-of-block is encountered, or a data error is encountered.
+   When large enough input and output buffers are supplied to inflate(), for
+   example, a 16K input buffer and a 64K output buffer, more than 95% of the
+   inflate execution time is spent in this routine.
+
+   Entry assumptions:
+
+        state.mode === LEN
+        strm.avail_in >= 6
+        strm.avail_out >= 258
+        start >= strm.avail_out
+        state.bits < 8
+
+   On return, state.mode is one of:
+
+        LEN -- ran out of enough output space or enough available input
+        TYPE -- reached end of block code, inflate() to interpret next block
+        BAD -- error in block data
+
+   Notes:
+
+    - The maximum input bits used by a length/distance pair is 15 bits for the
+      length code, 5 bits for the length extra, 15 bits for the distance code,
+      and 13 bits for the distance extra.  This totals 48 bits, or six bytes.
+      Therefore if strm.avail_in >= 6, then there is enough input to avoid
+      checking for available input while decoding.
+
+    - The maximum bytes that a single length/distance pair can output is 258
+      bytes, which is the maximum length that can be coded.  inflate_fast()
+      requires strm.avail_out >= 258 for each loop to avoid checking for
+      output space.
+ */
+module.exports = function inflate_fast(strm, start) {
+  var state;
+  var _in;                    /* local strm.input */
+  var last;                   /* have enough input while in < last */
+  var _out;                   /* local strm.output */
+  var beg;                    /* inflate()'s initial strm.output */
+  var end;                    /* while out < end, enough space available */
+//#ifdef INFLATE_STRICT
+  var dmax;                   /* maximum distance from zlib header */
+//#endif
+  var wsize;                  /* window size or zero if not using window */
+  var whave;                  /* valid bytes in the window */
+  var wnext;                  /* window write index */
+  var window;                 /* allocated sliding window, if wsize != 0 */
+  var hold;                   /* local strm.hold */
+  var bits;                   /* local strm.bits */
+  var lcode;                  /* local strm.lencode */
+  var dcode;                  /* local strm.distcode */
+  var lmask;                  /* mask for first level of length codes */
+  var dmask;                  /* mask for first level of distance codes */
+  var here;                   /* retrieved table entry */
+  var op;                     /* code bits, operation, extra bits, or */
+                              /*  window position, window bytes to copy */
+  var len;                    /* match length, unused bytes */
+  var dist;                   /* match distance */
+  var from;                   /* where to copy match from */
+  var from_source;
+
+
+  var input, output; // JS specific, because we have no pointers
+
+  /* copy state to local variables */
+  state = strm.state;
+  //here = state.here;
+  _in = strm.next_in;
+  input = strm.input;
+  last = _in + (strm.avail_in - 5);
+  _out = strm.next_out;
+  output = strm.output;
+  beg = _out - (start - strm.avail_out);
+  end = _out + (strm.avail_out - 257);
+//#ifdef INFLATE_STRICT
+  dmax = state.dmax;
+//#endif
+  wsize = state.wsize;
+  whave = state.whave;
+  wnext = state.wnext;
+  window = state.window;
+  hold = state.hold;
+  bits = state.bits;
+  lcode = state.lencode;
+  dcode = state.distcode;
+  lmask = (1 << state.lenbits) - 1;
+  dmask = (1 << state.distbits) - 1;
+
+
+  /* decode literals and length/distances until end-of-block or not enough
+     input data or output space */
+
+  top:
+  do {
+    if (bits < 15) {
+      hold += input[_in++] << bits;
+      bits += 8;
+      hold += input[_in++] << bits;
+      bits += 8;
+    }
+
+    here = lcode[hold & lmask];
+
+    dolen:
+    for (;;) { // Goto emulation
+      op = here >>> 24/*here.bits*/;
+      hold >>>= op;
+      bits -= op;
+      op = (here >>> 16) & 0xff/*here.op*/;
+      if (op === 0) {                          /* literal */
+        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+        //        "inflate:         literal '%c'\n" :
+        //        "inflate:         literal 0x%02x\n", here.val));
+        output[_out++] = here & 0xffff/*here.val*/;
+      }
+      else if (op & 16) {                     /* length base */
+        len = here & 0xffff/*here.val*/;
+        op &= 15;                           /* number of extra bits */
+        if (op) {
+          if (bits < op) {
+            hold += input[_in++] << bits;
+            bits += 8;
+          }
+          len += hold & ((1 << op) - 1);
+          hold >>>= op;
+          bits -= op;
+        }
+        //Tracevv((stderr, "inflate:         length %u\n", len));
+        if (bits < 15) {
+          hold += input[_in++] << bits;
+          bits += 8;
+          hold += input[_in++] << bits;
+          bits += 8;
+        }
+        here = dcode[hold & dmask];
+
+        dodist:
+        for (;;) { // goto emulation
+          op = here >>> 24/*here.bits*/;
+          hold >>>= op;
+          bits -= op;
+          op = (here >>> 16) & 0xff/*here.op*/;
+
+          if (op & 16) {                      /* distance base */
+            dist = here & 0xffff/*here.val*/;
+            op &= 15;                       /* number of extra bits */
+            if (bits < op) {
+              hold += input[_in++] << bits;
+              bits += 8;
+              if (bits < op) {
+                hold += input[_in++] << bits;
+                bits += 8;
+              }
+            }
+            dist += hold & ((1 << op) - 1);
+//#ifdef INFLATE_STRICT
+            if (dist > dmax) {
+              strm.msg = 'invalid distance too far back';
+              state.mode = BAD;
+              break top;
+            }
+//#endif
+            hold >>>= op;
+            bits -= op;
+            //Tracevv((stderr, "inflate:         distance %u\n", dist));
+            op = _out - beg;                /* max distance in output */
+            if (dist > op) {                /* see if copy from window */
+              op = dist - op;               /* distance back in window */
+              if (op > whave) {
+                if (state.sane) {
+                  strm.msg = 'invalid distance too far back';
+                  state.mode = BAD;
+                  break top;
+                }
+
+// (!) This block is disabled in zlib defailts,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+//                if (len <= op - whave) {
+//                  do {
+//                    output[_out++] = 0;
+//                  } while (--len);
+//                  continue top;
+//                }
+//                len -= op - whave;
+//                do {
+//                  output[_out++] = 0;
+//                } while (--op > whave);
+//                if (op === 0) {
+//                  from = _out - dist;
+//                  do {
+//                    output[_out++] = output[from++];
+//                  } while (--len);
+//                  continue top;
+//                }
+//#endif
+              }
+              from = 0; // window index
+              from_source = window;
+              if (wnext === 0) {           /* very common case */
+                from += wsize - op;
+                if (op < len) {         /* some from window */
+                  len -= op;
+                  do {
+                    output[_out++] = window[from++];
+                  } while (--op);
+                  from = _out - dist;  /* rest from output */
+                  from_source = output;
+                }
+              }
+              else if (wnext < op) {      /* wrap around window */
+                from += wsize + wnext - op;
+                op -= wnext;
+                if (op < len) {         /* some from end of window */
+                  len -= op;
+                  do {
+                    output[_out++] = window[from++];
+                  } while (--op);
+                  from = 0;
+                  if (wnext < len) {  /* some from start of window */
+                    op = wnext;
+                    len -= op;
+                    do {
+                      output[_out++] = window[from++];
+                    } while (--op);
+                    from = _out - dist;      /* rest from output */
+                    from_source = output;
+                  }
+                }
+              }
+              else {                      /* contiguous in window */
+                from += wnext - op;
+                if (op < len) {         /* some from window */
+                  len -= op;
+                  do {
+                    output[_out++] = window[from++];
+                  } while (--op);
+                  from = _out - dist;  /* rest from output */
+                  from_source = output;
+                }
+              }
+              while (len > 2) {
+                output[_out++] = from_source[from++];
+                output[_out++] = from_source[from++];
+                output[_out++] = from_source[from++];
+                len -= 3;
+              }
+              if (len) {
+                output[_out++] = from_source[from++];
+                if (len > 1) {
+                  output[_out++] = from_source[from++];
+                }
+              }
+            }
+            else {
+              from = _out - dist;          /* copy direct from output */
+              do {                        /* minimum length is three */
+                output[_out++] = output[from++];
+                output[_out++] = output[from++];
+                output[_out++] = output[from++];
+                len -= 3;
+              } while (len > 2);
+              if (len) {
+                output[_out++] = output[from++];
+                if (len > 1) {
+                  output[_out++] = output[from++];
+                }
+              }
+            }
+          }
+          else if ((op & 64) === 0) {          /* 2nd level distance code */
+            here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+            continue dodist;
+          }
+          else {
+            strm.msg = 'invalid distance code';
+            state.mode = BAD;
+            break top;
+          }
+
+          break; // need to emulate goto via "continue"
+        }
+      }
+      else if ((op & 64) === 0) {              /* 2nd level length code */
+        here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
+        continue dolen;
+      }
+      else if (op & 32) {                     /* end-of-block */
+        //Tracevv((stderr, "inflate:         end of block\n"));
+        state.mode = TYPE;
+        break top;
+      }
+      else {
+        strm.msg = 'invalid literal/length code';
+        state.mode = BAD;
+        break top;
+      }
+
+      break; // need to emulate goto via "continue"
+    }
+  } while (_in < last && _out < end);
+
+  /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
+  len = bits >> 3;
+  _in -= len;
+  bits -= len << 3;
+  hold &= (1 << bits) - 1;
+
+  /* update state and return */
+  strm.next_in = _in;
+  strm.next_out = _out;
+  strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
+  strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
+  state.hold = hold;
+  state.bits = bits;
+  return;
+};
+
+},{}],35:[function(_dereq_,module,exports){
+'use strict';
+
+
+var utils = _dereq_('../utils/common');
+var adler32 = _dereq_('./adler32');
+var crc32   = _dereq_('./crc32');
+var inflate_fast = _dereq_('./inffast');
+var inflate_table = _dereq_('./inftrees');
+
+var CODES = 0;
+var LENS = 1;
+var DISTS = 2;
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+/* Allowed flush values; see deflate() and inflate() below for details */
+//var Z_NO_FLUSH      = 0;
+//var Z_PARTIAL_FLUSH = 1;
+//var Z_SYNC_FLUSH    = 2;
+//var Z_FULL_FLUSH    = 3;
+var Z_FINISH        = 4;
+var Z_BLOCK         = 5;
+var Z_TREES         = 6;
+
+
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+var Z_OK            = 0;
+var Z_STREAM_END    = 1;
+var Z_NEED_DICT     = 2;
+//var Z_ERRNO         = -1;
+var Z_STREAM_ERROR  = -2;
+var Z_DATA_ERROR    = -3;
+var Z_MEM_ERROR     = -4;
+var Z_BUF_ERROR     = -5;
+//var Z_VERSION_ERROR = -6;
+
+/* The deflate compression method */
+var Z_DEFLATED  = 8;
+
+
+/* STATES ====================================================================*/
+/* ===========================================================================*/
+
+
+var    HEAD = 1;       /* i: waiting for magic header */
+var    FLAGS = 2;      /* i: waiting for method and flags (gzip) */
+var    TIME = 3;       /* i: waiting for modification time (gzip) */
+var    OS = 4;         /* i: waiting for extra flags and operating system (gzip) */
+var    EXLEN = 5;      /* i: waiting for extra length (gzip) */
+var    EXTRA = 6;      /* i: waiting for extra bytes (gzip) */
+var    NAME = 7;       /* i: waiting for end of file name (gzip) */
+var    COMMENT = 8;    /* i: waiting for end of comment (gzip) */
+var    HCRC = 9;       /* i: waiting for header crc (gzip) */
+var    DICTID = 10;    /* i: waiting for dictionary check value */
+var    DICT = 11;      /* waiting for inflateSetDictionary() call */
+var        TYPE = 12;      /* i: waiting for type bits, including last-flag bit */
+var        TYPEDO = 13;    /* i: same, but skip check to exit inflate on new block */
+var        STORED = 14;    /* i: waiting for stored size (length and complement) */
+var        COPY_ = 15;     /* i/o: same as COPY below, but only first time in */
+var        COPY = 16;      /* i/o: waiting for input or output to copy stored block */
+var        TABLE = 17;     /* i: waiting for dynamic block table lengths */
+var        LENLENS = 18;   /* i: waiting for code length code lengths */
+var        CODELENS = 19;  /* i: waiting for length/lit and distance code lengths */
+var            LEN_ = 20;      /* i: same as LEN below, but only first time in */
+var            LEN = 21;       /* i: waiting for length/lit/eob code */
+var            LENEXT = 22;    /* i: waiting for length extra bits */
+var            DIST = 23;      /* i: waiting for distance code */
+var            DISTEXT = 24;   /* i: waiting for distance extra bits */
+var            MATCH = 25;     /* o: waiting for output space to copy string */
+var            LIT = 26;       /* o: waiting for output space to write literal */
+var    CHECK = 27;     /* i: waiting for 32-bit check value */
+var    LENGTH = 28;    /* i: waiting for 32-bit length (gzip) */
+var    DONE = 29;      /* finished check, done -- remain here until reset */
+var    BAD = 30;       /* got a data error -- remain here until reset */
+var    MEM = 31;       /* got an inflate() memory error -- remain here until reset */
+var    SYNC = 32;      /* looking for synchronization bytes to restart inflate() */
+
+/* ===========================================================================*/
+
+
+
+var ENOUGH_LENS = 852;
+var ENOUGH_DISTS = 592;
+//var ENOUGH =  (ENOUGH_LENS+ENOUGH_DISTS);
+
+var MAX_WBITS = 15;
+/* 32K LZ77 window */
+var DEF_WBITS = MAX_WBITS;
+
+
+function ZSWAP32(q) {
+  return  (((q >>> 24) & 0xff) +
+          ((q >>> 8) & 0xff00) +
+          ((q & 0xff00) << 8) +
+          ((q & 0xff) << 24));
+}
+
+
+function InflateState() {
+  this.mode = 0;             /* current inflate mode */
+  this.last = false;          /* true if processing last block */
+  this.wrap = 0;              /* bit 0 true for zlib, bit 1 true for gzip */
+  this.havedict = false;      /* true if dictionary provided */
+  this.flags = 0;             /* gzip header method and flags (0 if zlib) */
+  this.dmax = 0;              /* zlib header max distance (INFLATE_STRICT) */
+  this.check = 0;             /* protected copy of check value */
+  this.total = 0;             /* protected copy of output count */
+  // TODO: may be {}
+  this.head = null;           /* where to save gzip header information */
+
+  /* sliding window */
+  this.wbits = 0;             /* log base 2 of requested window size */
+  this.wsize = 0;             /* window size or zero if not using window */
+  this.whave = 0;             /* valid bytes in the window */
+  this.wnext = 0;             /* window write index */
+  this.window = null;         /* allocated sliding window, if needed */
+
+  /* bit accumulator */
+  this.hold = 0;              /* input bit accumulator */
+  this.bits = 0;              /* number of bits in "in" */
+
+  /* for string and stored block copying */
+  this.length = 0;            /* literal or length of data to copy */
+  this.offset = 0;            /* distance back to copy string from */
+
+  /* for table and code decoding */
+  this.extra = 0;             /* extra bits needed */
+
+  /* fixed and dynamic code tables */
+  this.lencode = null;          /* starting table for length/literal codes */
+  this.distcode = null;         /* starting table for distance codes */
+  this.lenbits = 0;           /* index bits for lencode */
+  this.distbits = 0;          /* index bits for distcode */
+
+  /* dynamic table building */
+  this.ncode = 0;             /* number of code length code lengths */
+  this.nlen = 0;              /* number of length code lengths */
+  this.ndist = 0;             /* number of distance code lengths */
+  this.have = 0;              /* number of code lengths in lens[] */
+  this.next = null;              /* next available space in codes[] */
+
+  this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
+  this.work = new utils.Buf16(288); /* work area for code table building */
+
+  /*
+   because we don't have pointers in js, we use lencode and distcode directly
+   as buffers so we don't need codes
+  */
+  //this.codes = new utils.Buf32(ENOUGH);       /* space for code tables */
+  this.lendyn = null;              /* dynamic table for length/literal codes (JS specific) */
+  this.distdyn = null;             /* dynamic table for distance codes (JS specific) */
+  this.sane = 0;                   /* if false, allow invalid distance too far */
+  this.back = 0;                   /* bits back of last unprocessed length/lit */
+  this.was = 0;                    /* initial length of match */
+}
+
+function inflateResetKeep(strm) {
+  var state;
+
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  strm.total_in = strm.total_out = state.total = 0;
+  strm.msg = ''; /*Z_NULL*/
+  if (state.wrap) {       /* to support ill-conceived Java test suite */
+    strm.adler = state.wrap & 1;
+  }
+  state.mode = HEAD;
+  state.last = 0;
+  state.havedict = 0;
+  state.dmax = 32768;
+  state.head = null/*Z_NULL*/;
+  state.hold = 0;
+  state.bits = 0;
+  //state.lencode = state.distcode = state.next = state.codes;
+  state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
+  state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
+
+  state.sane = 1;
+  state.back = -1;
+  //Tracev((stderr, "inflate: reset\n"));
+  return Z_OK;
+}
+
+function inflateReset(strm) {
+  var state;
+
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  state.wsize = 0;
+  state.whave = 0;
+  state.wnext = 0;
+  return inflateResetKeep(strm);
+
+}
+
+function inflateReset2(strm, windowBits) {
+  var wrap;
+  var state;
+
+  /* get the state */
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+
+  /* extract wrap request from windowBits parameter */
+  if (windowBits < 0) {
+    wrap = 0;
+    windowBits = -windowBits;
+  }
+  else {
+    wrap = (windowBits >> 4) + 1;
+    if (windowBits < 48) {
+      windowBits &= 15;
+    }
+  }
+
+  /* set number of window bits, free window if different */
+  if (windowBits && (windowBits < 8 || windowBits > 15)) {
+    return Z_STREAM_ERROR;
+  }
+  if (state.window !== null && state.wbits !== windowBits) {
+    state.window = null;
+  }
+
+  /* update state and reset the rest of it */
+  state.wrap = wrap;
+  state.wbits = windowBits;
+  return inflateReset(strm);
+}
+
+function inflateInit2(strm, windowBits) {
+  var ret;
+  var state;
+
+  if (!strm) { return Z_STREAM_ERROR; }
+  //strm.msg = Z_NULL;                 /* in case we return an error */
+
+  state = new InflateState();
+
+  //if (state === Z_NULL) return Z_MEM_ERROR;
+  //Tracev((stderr, "inflate: allocated\n"));
+  strm.state = state;
+  state.window = null/*Z_NULL*/;
+  ret = inflateReset2(strm, windowBits);
+  if (ret !== Z_OK) {
+    strm.state = null/*Z_NULL*/;
+  }
+  return ret;
+}
+
+function inflateInit(strm) {
+  return inflateInit2(strm, DEF_WBITS);
+}
+
+
+/*
+ Return state with length and distance decoding tables and index sizes set to
+ fixed code decoding.  Normally this returns fixed tables from inffixed.h.
+ If BUILDFIXED is defined, then instead this routine builds the tables the
+ first time it's called, and returns those tables the first time and
+ thereafter.  This reduces the size of the code by about 2K bytes, in
+ exchange for a little execution time.  However, BUILDFIXED should not be
+ used for threaded applications, since the rewriting of the tables and virgin
+ may not be thread-safe.
+ */
+var virgin = true;
+
+var lenfix, distfix; // We have no pointers in JS, so keep tables separate
+
+function fixedtables(state) {
+  /* build fixed huffman tables if first call (may not be thread safe) */
+  if (virgin) {
+    var sym;
+
+    lenfix = new utils.Buf32(512);
+    distfix = new utils.Buf32(32);
+
+    /* literal/length table */
+    sym = 0;
+    while (sym < 144) { state.lens[sym++] = 8; }
+    while (sym < 256) { state.lens[sym++] = 9; }
+    while (sym < 280) { state.lens[sym++] = 7; }
+    while (sym < 288) { state.lens[sym++] = 8; }
+
+    inflate_table(LENS,  state.lens, 0, 288, lenfix,   0, state.work, {bits: 9});
+
+    /* distance table */
+    sym = 0;
+    while (sym < 32) { state.lens[sym++] = 5; }
+
+    inflate_table(DISTS, state.lens, 0, 32,   distfix, 0, state.work, {bits: 5});
+
+    /* do this just once */
+    virgin = false;
+  }
+
+  state.lencode = lenfix;
+  state.lenbits = 9;
+  state.distcode = distfix;
+  state.distbits = 5;
+}
+
+
+/*
+ Update the window with the last wsize (normally 32K) bytes written before
+ returning.  If window does not exist yet, create it.  This is only called
+ when a window is already in use, or when output has been written during this
+ inflate call, but the end of the deflate stream has not been reached yet.
+ It is also called to create a window for dictionary data when a dictionary
+ is loaded.
+
+ Providing output buffers larger than 32K to inflate() should provide a speed
+ advantage, since only the last 32K of output is copied to the sliding window
+ upon return from inflate(), and since all distances after the first 32K of
+ output will fall in the output data, making match copies simpler and faster.
+ The advantage may be dependent on the size of the processor's data caches.
+ */
+function updatewindow(strm, src, end, copy) {
+  var dist;
+  var state = strm.state;
+
+  /* if it hasn't been done already, allocate space for the window */
+  if (state.window === null) {
+    state.wsize = 1 << state.wbits;
+    state.wnext = 0;
+    state.whave = 0;
+
+    state.window = new utils.Buf8(state.wsize);
+  }
+
+  /* copy state->wsize or less output bytes into the circular window */
+  if (copy >= state.wsize) {
+    utils.arraySet(state.window,src, end - state.wsize, state.wsize, 0);
+    state.wnext = 0;
+    state.whave = state.wsize;
+  }
+  else {
+    dist = state.wsize - state.wnext;
+    if (dist > copy) {
+      dist = copy;
+    }
+    //zmemcpy(state->window + state->wnext, end - copy, dist);
+    utils.arraySet(state.window,src, end - copy, dist, state.wnext);
+    copy -= dist;
+    if (copy) {
+      //zmemcpy(state->window, end - copy, copy);
+      utils.arraySet(state.window,src, end - copy, copy, 0);
+      state.wnext = copy;
+      state.whave = state.wsize;
+    }
+    else {
+      state.wnext += dist;
+      if (state.wnext === state.wsize) { state.wnext = 0; }
+      if (state.whave < state.wsize) { state.whave += dist; }
+    }
+  }
+  return 0;
+}
+
+function inflate(strm, flush) {
+  var state;
+  var input, output;          // input/output buffers
+  var next;                   /* next input INDEX */
+  var put;                    /* next output INDEX */
+  var have, left;             /* available input and output */
+  var hold;                   /* bit buffer */
+  var bits;                   /* bits in bit buffer */
+  var _in, _out;              /* save starting available input and output */
+  var copy;                   /* number of stored or match bytes to copy */
+  var from;                   /* where to copy match bytes from */
+  var from_source;
+  var here = 0;               /* current decoding table entry */
+  var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
+  //var last;                   /* parent table entry */
+  var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
+  var len;                    /* length to copy for repeats, bits to drop */
+  var ret;                    /* return code */
+  var hbuf = new utils.Buf8(4);    /* buffer for gzip header crc calculation */
+  var opts;
+
+  var n; // temporary var for NEED_BITS
+
+  var order = /* permutation of code lengths */
+    [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
+
+
+  if (!strm || !strm.state || !strm.output ||
+      (!strm.input && strm.avail_in !== 0)) {
+    return Z_STREAM_ERROR;
+  }
+
+  state = strm.state;
+  if (state.mode === TYPE) { state.mode = TYPEDO; }    /* skip check */
+
+
+  //--- LOAD() ---
+  put = strm.next_out;
+  output = strm.output;
+  left = strm.avail_out;
+  next = strm.next_in;
+  input = strm.input;
+  have = strm.avail_in;
+  hold = state.hold;
+  bits = state.bits;
+  //---
+
+  _in = have;
+  _out = left;
+  ret = Z_OK;
+
+  inf_leave: // goto emulation
+  for (;;) {
+    switch (state.mode) {
+    case HEAD:
+      if (state.wrap === 0) {
+        state.mode = TYPEDO;
+        break;
+      }
+      //=== NEEDBITS(16);
+      while (bits < 16) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if ((state.wrap & 2) && hold === 0x8b1f) {  /* gzip header */
+        state.check = 0/*crc32(0L, Z_NULL, 0)*/;
+        //=== CRC2(state.check, hold);
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        state.check = crc32(state.check, hbuf, 2, 0);
+        //===//
+
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        state.mode = FLAGS;
+        break;
+      }
+      state.flags = 0;           /* expect zlib header */
+      if (state.head) {
+        state.head.done = false;
+      }
+      if (!(state.wrap & 1) ||   /* check if zlib header allowed */
+        (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
+        strm.msg = 'incorrect header check';
+        state.mode = BAD;
+        break;
+      }
+      if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
+        strm.msg = 'unknown compression method';
+        state.mode = BAD;
+        break;
+      }
+      //--- DROPBITS(4) ---//
+      hold >>>= 4;
+      bits -= 4;
+      //---//
+      len = (hold & 0x0f)/*BITS(4)*/ + 8;
+      if (state.wbits === 0) {
+        state.wbits = len;
+      }
+      else if (len > state.wbits) {
+        strm.msg = 'invalid window size';
+        state.mode = BAD;
+        break;
+      }
+      state.dmax = 1 << len;
+      //Tracev((stderr, "inflate:   zlib header ok\n"));
+      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+      state.mode = hold & 0x200 ? DICTID : TYPE;
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      break;
+    case FLAGS:
+      //=== NEEDBITS(16); */
+      while (bits < 16) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      state.flags = hold;
+      if ((state.flags & 0xff) !== Z_DEFLATED) {
+        strm.msg = 'unknown compression method';
+        state.mode = BAD;
+        break;
+      }
+      if (state.flags & 0xe000) {
+        strm.msg = 'unknown header flags set';
+        state.mode = BAD;
+        break;
+      }
+      if (state.head) {
+        state.head.text = ((hold >> 8) & 1);
+      }
+      if (state.flags & 0x0200) {
+        //=== CRC2(state.check, hold);
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        state.check = crc32(state.check, hbuf, 2, 0);
+        //===//
+      }
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = TIME;
+      /* falls through */
+    case TIME:
+      //=== NEEDBITS(32); */
+      while (bits < 32) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if (state.head) {
+        state.head.time = hold;
+      }
+      if (state.flags & 0x0200) {
+        //=== CRC4(state.check, hold)
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        hbuf[2] = (hold >>> 16) & 0xff;
+        hbuf[3] = (hold >>> 24) & 0xff;
+        state.check = crc32(state.check, hbuf, 4, 0);
+        //===
+      }
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = OS;
+      /* falls through */
+    case OS:
+      //=== NEEDBITS(16); */
+      while (bits < 16) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if (state.head) {
+        state.head.xflags = (hold & 0xff);
+        state.head.os = (hold >> 8);
+      }
+      if (state.flags & 0x0200) {
+        //=== CRC2(state.check, hold);
+        hbuf[0] = hold & 0xff;
+        hbuf[1] = (hold >>> 8) & 0xff;
+        state.check = crc32(state.check, hbuf, 2, 0);
+        //===//
+      }
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = EXLEN;
+      /* falls through */
+    case EXLEN:
+      if (state.flags & 0x0400) {
+        //=== NEEDBITS(16); */
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.length = hold;
+        if (state.head) {
+          state.head.extra_len = hold;
+        }
+        if (state.flags & 0x0200) {
+          //=== CRC2(state.check, hold);
+          hbuf[0] = hold & 0xff;
+          hbuf[1] = (hold >>> 8) & 0xff;
+          state.check = crc32(state.check, hbuf, 2, 0);
+          //===//
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+      }
+      else if (state.head) {
+        state.head.extra = null/*Z_NULL*/;
+      }
+      state.mode = EXTRA;
+      /* falls through */
+    case EXTRA:
+      if (state.flags & 0x0400) {
+        copy = state.length;
+        if (copy > have) { copy = have; }
+        if (copy) {
+          if (state.head) {
+            len = state.head.extra_len - state.length;
+            if (!state.head.extra) {
+              // Use untyped array for more conveniend processing later
+              state.head.extra = new Array(state.head.extra_len);
+            }
+            utils.arraySet(
+              state.head.extra,
+              input,
+              next,
+              // extra field is limited to 65536 bytes
+              // - no need for additional size check
+              copy,
+              /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
+              len
+            );
+            //zmemcpy(state.head.extra + len, next,
+            //        len + copy > state.head.extra_max ?
+            //        state.head.extra_max - len : copy);
+          }
+          if (state.flags & 0x0200) {
+            state.check = crc32(state.check, input, copy, next);
+          }
+          have -= copy;
+          next += copy;
+          state.length -= copy;
+        }
+        if (state.length) { break inf_leave; }
+      }
+      state.length = 0;
+      state.mode = NAME;
+      /* falls through */
+    case NAME:
+      if (state.flags & 0x0800) {
+        if (have === 0) { break inf_leave; }
+        copy = 0;
+        do {
+          // TODO: 2 or 1 bytes?
+          len = input[next + copy++];
+          /* use constant limit because in js we should not preallocate memory */
+          if (state.head && len &&
+              (state.length < 65536 /*state.head.name_max*/)) {
+            state.head.name += String.fromCharCode(len);
+          }
+        } while (len && copy < have);
+
+        if (state.flags & 0x0200) {
+          state.check = crc32(state.check, input, copy, next);
+        }
+        have -= copy;
+        next += copy;
+        if (len) { break inf_leave; }
+      }
+      else if (state.head) {
+        state.head.name = null;
+      }
+      state.length = 0;
+      state.mode = COMMENT;
+      /* falls through */
+    case COMMENT:
+      if (state.flags & 0x1000) {
+        if (have === 0) { break inf_leave; }
+        copy = 0;
+        do {
+          len = input[next + copy++];
+          /* use constant limit because in js we should not preallocate memory */
+          if (state.head && len &&
+              (state.length < 65536 /*state.head.comm_max*/)) {
+            state.head.comment += String.fromCharCode(len);
+          }
+        } while (len && copy < have);
+        if (state.flags & 0x0200) {
+          state.check = crc32(state.check, input, copy, next);
+        }
+        have -= copy;
+        next += copy;
+        if (len) { break inf_leave; }
+      }
+      else if (state.head) {
+        state.head.comment = null;
+      }
+      state.mode = HCRC;
+      /* falls through */
+    case HCRC:
+      if (state.flags & 0x0200) {
+        //=== NEEDBITS(16); */
+        while (bits < 16) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if (hold !== (state.check & 0xffff)) {
+          strm.msg = 'header crc mismatch';
+          state.mode = BAD;
+          break;
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+      }
+      if (state.head) {
+        state.head.hcrc = ((state.flags >> 9) & 1);
+        state.head.done = true;
+      }
+      strm.adler = state.check = 0 /*crc32(0L, Z_NULL, 0)*/;
+      state.mode = TYPE;
+      break;
+    case DICTID:
+      //=== NEEDBITS(32); */
+      while (bits < 32) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      strm.adler = state.check = ZSWAP32(hold);
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = DICT;
+      /* falls through */
+    case DICT:
+      if (state.havedict === 0) {
+        //--- RESTORE() ---
+        strm.next_out = put;
+        strm.avail_out = left;
+        strm.next_in = next;
+        strm.avail_in = have;
+        state.hold = hold;
+        state.bits = bits;
+        //---
+        return Z_NEED_DICT;
+      }
+      strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
+      state.mode = TYPE;
+      /* falls through */
+    case TYPE:
+      if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
+      /* falls through */
+    case TYPEDO:
+      if (state.last) {
+        //--- BYTEBITS() ---//
+        hold >>>= bits & 7;
+        bits -= bits & 7;
+        //---//
+        state.mode = CHECK;
+        break;
+      }
+      //=== NEEDBITS(3); */
+      while (bits < 3) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      state.last = (hold & 0x01)/*BITS(1)*/;
+      //--- DROPBITS(1) ---//
+      hold >>>= 1;
+      bits -= 1;
+      //---//
+
+      switch ((hold & 0x03)/*BITS(2)*/) {
+      case 0:                             /* stored block */
+        //Tracev((stderr, "inflate:     stored block%s\n",
+        //        state.last ? " (last)" : ""));
+        state.mode = STORED;
+        break;
+      case 1:                             /* fixed block */
+        fixedtables(state);
+        //Tracev((stderr, "inflate:     fixed codes block%s\n",
+        //        state.last ? " (last)" : ""));
+        state.mode = LEN_;             /* decode codes */
+        if (flush === Z_TREES) {
+          //--- DROPBITS(2) ---//
+          hold >>>= 2;
+          bits -= 2;
+          //---//
+          break inf_leave;
+        }
+        break;
+      case 2:                             /* dynamic block */
+        //Tracev((stderr, "inflate:     dynamic codes block%s\n",
+        //        state.last ? " (last)" : ""));
+        state.mode = TABLE;
+        break;
+      case 3:
+        strm.msg = 'invalid block type';
+        state.mode = BAD;
+      }
+      //--- DROPBITS(2) ---//
+      hold >>>= 2;
+      bits -= 2;
+      //---//
+      break;
+    case STORED:
+      //--- BYTEBITS() ---// /* go to byte boundary */
+      hold >>>= bits & 7;
+      bits -= bits & 7;
+      //---//
+      //=== NEEDBITS(32); */
+      while (bits < 32) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
+        strm.msg = 'invalid stored block lengths';
+        state.mode = BAD;
+        break;
+      }
+      state.length = hold & 0xffff;
+      //Tracev((stderr, "inflate:       stored length %u\n",
+      //        state.length));
+      //=== INITBITS();
+      hold = 0;
+      bits = 0;
+      //===//
+      state.mode = COPY_;
+      if (flush === Z_TREES) { break inf_leave; }
+      /* falls through */
+    case COPY_:
+      state.mode = COPY;
+      /* falls through */
+    case COPY:
+      copy = state.length;
+      if (copy) {
+        if (copy > have) { copy = have; }
+        if (copy > left) { copy = left; }
+        if (copy === 0) { break inf_leave; }
+        //--- zmemcpy(put, next, copy); ---
+        utils.arraySet(output, input, next, copy, put);
+        //---//
+        have -= copy;
+        next += copy;
+        left -= copy;
+        put += copy;
+        state.length -= copy;
+        break;
+      }
+      //Tracev((stderr, "inflate:       stored end\n"));
+      state.mode = TYPE;
+      break;
+    case TABLE:
+      //=== NEEDBITS(14); */
+      while (bits < 14) {
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+      }
+      //===//
+      state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
+      //--- DROPBITS(5) ---//
+      hold >>>= 5;
+      bits -= 5;
+      //---//
+      state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
+      //--- DROPBITS(5) ---//
+      hold >>>= 5;
+      bits -= 5;
+      //---//
+      state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
+      //--- DROPBITS(4) ---//
+      hold >>>= 4;
+      bits -= 4;
+      //---//
+//#ifndef PKZIP_BUG_WORKAROUND
+      if (state.nlen > 286 || state.ndist > 30) {
+        strm.msg = 'too many length or distance symbols';
+        state.mode = BAD;
+        break;
+      }
+//#endif
+      //Tracev((stderr, "inflate:       table sizes ok\n"));
+      state.have = 0;
+      state.mode = LENLENS;
+      /* falls through */
+    case LENLENS:
+      while (state.have < state.ncode) {
+        //=== NEEDBITS(3);
+        while (bits < 3) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
+        //--- DROPBITS(3) ---//
+        hold >>>= 3;
+        bits -= 3;
+        //---//
+      }
+      while (state.have < 19) {
+        state.lens[order[state.have++]] = 0;
+      }
+      // We have separate tables & no pointers. 2 commented lines below not needed.
+      //state.next = state.codes;
+      //state.lencode = state.next;
+      // Switch to use dynamic table
+      state.lencode = state.lendyn;
+      state.lenbits = 7;
+
+      opts = {bits: state.lenbits};
+      ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
+      state.lenbits = opts.bits;
+
+      if (ret) {
+        strm.msg = 'invalid code lengths set';
+        state.mode = BAD;
+        break;
+      }
+      //Tracev((stderr, "inflate:       code lengths ok\n"));
+      state.have = 0;
+      state.mode = CODELENS;
+      /* falls through */
+    case CODELENS:
+      while (state.have < state.nlen + state.ndist) {
+        for (;;) {
+          here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        if (here_val < 16) {
+          //--- DROPBITS(here.bits) ---//
+          hold >>>= here_bits;
+          bits -= here_bits;
+          //---//
+          state.lens[state.have++] = here_val;
+        }
+        else {
+          if (here_val === 16) {
+            //=== NEEDBITS(here.bits + 2);
+            n = here_bits + 2;
+            while (bits < n) {
+              if (have === 0) { break inf_leave; }
+              have--;
+              hold += input[next++] << bits;
+              bits += 8;
+            }
+            //===//
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            if (state.have === 0) {
+              strm.msg = 'invalid bit length repeat';
+              state.mode = BAD;
+              break;
+            }
+            len = state.lens[state.have - 1];
+            copy = 3 + (hold & 0x03);//BITS(2);
+            //--- DROPBITS(2) ---//
+            hold >>>= 2;
+            bits -= 2;
+            //---//
+          }
+          else if (here_val === 17) {
+            //=== NEEDBITS(here.bits + 3);
+            n = here_bits + 3;
+            while (bits < n) {
+              if (have === 0) { break inf_leave; }
+              have--;
+              hold += input[next++] << bits;
+              bits += 8;
+            }
+            //===//
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            len = 0;
+            copy = 3 + (hold & 0x07);//BITS(3);
+            //--- DROPBITS(3) ---//
+            hold >>>= 3;
+            bits -= 3;
+            //---//
+          }
+          else {
+            //=== NEEDBITS(here.bits + 7);
+            n = here_bits + 7;
+            while (bits < n) {
+              if (have === 0) { break inf_leave; }
+              have--;
+              hold += input[next++] << bits;
+              bits += 8;
+            }
+            //===//
+            //--- DROPBITS(here.bits) ---//
+            hold >>>= here_bits;
+            bits -= here_bits;
+            //---//
+            len = 0;
+            copy = 11 + (hold & 0x7f);//BITS(7);
+            //--- DROPBITS(7) ---//
+            hold >>>= 7;
+            bits -= 7;
+            //---//
+          }
+          if (state.have + copy > state.nlen + state.ndist) {
+            strm.msg = 'invalid bit length repeat';
+            state.mode = BAD;
+            break;
+          }
+          while (copy--) {
+            state.lens[state.have++] = len;
+          }
+        }
+      }
+
+      /* handle error breaks in while */
+      if (state.mode === BAD) { break; }
+
+      /* check for end-of-block code (better have one) */
+      if (state.lens[256] === 0) {
+        strm.msg = 'invalid code -- missing end-of-block';
+        state.mode = BAD;
+        break;
+      }
+
+      /* build code tables -- note: do not change the lenbits or distbits
+         values here (9 and 6) without reading the comments in inftrees.h
+         concerning the ENOUGH constants, which depend on those values */
+      state.lenbits = 9;
+
+      opts = {bits: state.lenbits};
+      ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
+      // We have separate tables & no pointers. 2 commented lines below not needed.
+      // state.next_index = opts.table_index;
+      state.lenbits = opts.bits;
+      // state.lencode = state.next;
+
+      if (ret) {
+        strm.msg = 'invalid literal/lengths set';
+        state.mode = BAD;
+        break;
+      }
+
+      state.distbits = 6;
+      //state.distcode.copy(state.codes);
+      // Switch to use dynamic table
+      state.distcode = state.distdyn;
+      opts = {bits: state.distbits};
+      ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
+      // We have separate tables & no pointers. 2 commented lines below not needed.
+      // state.next_index = opts.table_index;
+      state.distbits = opts.bits;
+      // state.distcode = state.next;
+
+      if (ret) {
+        strm.msg = 'invalid distances set';
+        state.mode = BAD;
+        break;
+      }
+      //Tracev((stderr, 'inflate:       codes ok\n'));
+      state.mode = LEN_;
+      if (flush === Z_TREES) { break inf_leave; }
+      /* falls through */
+    case LEN_:
+      state.mode = LEN;
+      /* falls through */
+    case LEN:
+      if (have >= 6 && left >= 258) {
+        //--- RESTORE() ---
+        strm.next_out = put;
+        strm.avail_out = left;
+        strm.next_in = next;
+        strm.avail_in = have;
+        state.hold = hold;
+        state.bits = bits;
+        //---
+        inflate_fast(strm, _out);
+        //--- LOAD() ---
+        put = strm.next_out;
+        output = strm.output;
+        left = strm.avail_out;
+        next = strm.next_in;
+        input = strm.input;
+        have = strm.avail_in;
+        hold = state.hold;
+        bits = state.bits;
+        //---
+
+        if (state.mode === TYPE) {
+          state.back = -1;
+        }
+        break;
+      }
+      state.back = 0;
+      for (;;) {
+        here = state.lencode[hold & ((1 << state.lenbits) -1)];  /*BITS(state.lenbits)*/
+        here_bits = here >>> 24;
+        here_op = (here >>> 16) & 0xff;
+        here_val = here & 0xffff;
+
+        if (here_bits <= bits) { break; }
+        //--- PULLBYTE() ---//
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+        //---//
+      }
+      if (here_op && (here_op & 0xf0) === 0) {
+        last_bits = here_bits;
+        last_op = here_op;
+        last_val = here_val;
+        for (;;) {
+          here = state.lencode[last_val +
+                  ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((last_bits + here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        //--- DROPBITS(last.bits) ---//
+        hold >>>= last_bits;
+        bits -= last_bits;
+        //---//
+        state.back += last_bits;
+      }
+      //--- DROPBITS(here.bits) ---//
+      hold >>>= here_bits;
+      bits -= here_bits;
+      //---//
+      state.back += here_bits;
+      state.length = here_val;
+      if (here_op === 0) {
+        //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
+        //        "inflate:         literal '%c'\n" :
+        //        "inflate:         literal 0x%02x\n", here.val));
+        state.mode = LIT;
+        break;
+      }
+      if (here_op & 32) {
+        //Tracevv((stderr, "inflate:         end of block\n"));
+        state.back = -1;
+        state.mode = TYPE;
+        break;
+      }
+      if (here_op & 64) {
+        strm.msg = 'invalid literal/length code';
+        state.mode = BAD;
+        break;
+      }
+      state.extra = here_op & 15;
+      state.mode = LENEXT;
+      /* falls through */
+    case LENEXT:
+      if (state.extra) {
+        //=== NEEDBITS(state.extra);
+        n = state.extra;
+        while (bits < n) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.length += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;
+        //--- DROPBITS(state.extra) ---//
+        hold >>>= state.extra;
+        bits -= state.extra;
+        //---//
+        state.back += state.extra;
+      }
+      //Tracevv((stderr, "inflate:         length %u\n", state.length));
+      state.was = state.length;
+      state.mode = DIST;
+      /* falls through */
+    case DIST:
+      for (;;) {
+        here = state.distcode[hold & ((1 << state.distbits) -1)];/*BITS(state.distbits)*/
+        here_bits = here >>> 24;
+        here_op = (here >>> 16) & 0xff;
+        here_val = here & 0xffff;
+
+        if ((here_bits) <= bits) { break; }
+        //--- PULLBYTE() ---//
+        if (have === 0) { break inf_leave; }
+        have--;
+        hold += input[next++] << bits;
+        bits += 8;
+        //---//
+      }
+      if ((here_op & 0xf0) === 0) {
+        last_bits = here_bits;
+        last_op = here_op;
+        last_val = here_val;
+        for (;;) {
+          here = state.distcode[last_val +
+                  ((hold & ((1 << (last_bits + last_op)) -1))/*BITS(last.bits + last.op)*/ >> last_bits)];
+          here_bits = here >>> 24;
+          here_op = (here >>> 16) & 0xff;
+          here_val = here & 0xffff;
+
+          if ((last_bits + here_bits) <= bits) { break; }
+          //--- PULLBYTE() ---//
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+          //---//
+        }
+        //--- DROPBITS(last.bits) ---//
+        hold >>>= last_bits;
+        bits -= last_bits;
+        //---//
+        state.back += last_bits;
+      }
+      //--- DROPBITS(here.bits) ---//
+      hold >>>= here_bits;
+      bits -= here_bits;
+      //---//
+      state.back += here_bits;
+      if (here_op & 64) {
+        strm.msg = 'invalid distance code';
+        state.mode = BAD;
+        break;
+      }
+      state.offset = here_val;
+      state.extra = (here_op) & 15;
+      state.mode = DISTEXT;
+      /* falls through */
+    case DISTEXT:
+      if (state.extra) {
+        //=== NEEDBITS(state.extra);
+        n = state.extra;
+        while (bits < n) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        state.offset += hold & ((1 << state.extra) -1)/*BITS(state.extra)*/;
+        //--- DROPBITS(state.extra) ---//
+        hold >>>= state.extra;
+        bits -= state.extra;
+        //---//
+        state.back += state.extra;
+      }
+//#ifdef INFLATE_STRICT
+      if (state.offset > state.dmax) {
+        strm.msg = 'invalid distance too far back';
+        state.mode = BAD;
+        break;
+      }
+//#endif
+      //Tracevv((stderr, "inflate:         distance %u\n", state.offset));
+      state.mode = MATCH;
+      /* falls through */
+    case MATCH:
+      if (left === 0) { break inf_leave; }
+      copy = _out - left;
+      if (state.offset > copy) {         /* copy from window */
+        copy = state.offset - copy;
+        if (copy > state.whave) {
+          if (state.sane) {
+            strm.msg = 'invalid distance too far back';
+            state.mode = BAD;
+            break;
+          }
+// (!) This block is disabled in zlib defailts,
+// don't enable it for binary compatibility
+//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+//          Trace((stderr, "inflate.c too far\n"));
+//          copy -= state.whave;
+//          if (copy > state.length) { copy = state.length; }
+//          if (copy > left) { copy = left; }
+//          left -= copy;
+//          state.length -= copy;
+//          do {
+//            output[put++] = 0;
+//          } while (--copy);
+//          if (state.length === 0) { state.mode = LEN; }
+//          break;
+//#endif
+        }
+        if (copy > state.wnext) {
+          copy -= state.wnext;
+          from = state.wsize - copy;
+        }
+        else {
+          from = state.wnext - copy;
+        }
+        if (copy > state.length) { copy = state.length; }
+        from_source = state.window;
+      }
+      else {                              /* copy from output */
+        from_source = output;
+        from = put - state.offset;
+        copy = state.length;
+      }
+      if (copy > left) { copy = left; }
+      left -= copy;
+      state.length -= copy;
+      do {
+        output[put++] = from_source[from++];
+      } while (--copy);
+      if (state.length === 0) { state.mode = LEN; }
+      break;
+    case LIT:
+      if (left === 0) { break inf_leave; }
+      output[put++] = state.length;
+      left--;
+      state.mode = LEN;
+      break;
+    case CHECK:
+      if (state.wrap) {
+        //=== NEEDBITS(32);
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          // Use '|' insdead of '+' to make sure that result is signed
+          hold |= input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        _out -= left;
+        strm.total_out += _out;
+        state.total += _out;
+        if (_out) {
+          strm.adler = state.check =
+              /*UPDATE(state.check, put - _out, _out);*/
+              (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
+
+        }
+        _out = left;
+        // NB: crc32 stored as signed 32-bit int, ZSWAP32 returns signed too
+        if ((state.flags ? hold : ZSWAP32(hold)) !== state.check) {
+          strm.msg = 'incorrect data check';
+          state.mode = BAD;
+          break;
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        //Tracev((stderr, "inflate:   check matches trailer\n"));
+      }
+      state.mode = LENGTH;
+      /* falls through */
+    case LENGTH:
+      if (state.wrap && state.flags) {
+        //=== NEEDBITS(32);
+        while (bits < 32) {
+          if (have === 0) { break inf_leave; }
+          have--;
+          hold += input[next++] << bits;
+          bits += 8;
+        }
+        //===//
+        if (hold !== (state.total & 0xffffffff)) {
+          strm.msg = 'incorrect length check';
+          state.mode = BAD;
+          break;
+        }
+        //=== INITBITS();
+        hold = 0;
+        bits = 0;
+        //===//
+        //Tracev((stderr, "inflate:   length matches trailer\n"));
+      }
+      state.mode = DONE;
+      /* falls through */
+    case DONE:
+      ret = Z_STREAM_END;
+      break inf_leave;
+    case BAD:
+      ret = Z_DATA_ERROR;
+      break inf_leave;
+    case MEM:
+      return Z_MEM_ERROR;
+    case SYNC:
+      /* falls through */
+    default:
+      return Z_STREAM_ERROR;
+    }
+  }
+
+  // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
+
+  /*
+     Return from inflate(), updating the total counts and the check value.
+     If there was no progress during the inflate() call, return a buffer
+     error.  Call updatewindow() to create and/or update the window state.
+     Note: a memory error from inflate() is non-recoverable.
+   */
+
+  //--- RESTORE() ---
+  strm.next_out = put;
+  strm.avail_out = left;
+  strm.next_in = next;
+  strm.avail_in = have;
+  state.hold = hold;
+  state.bits = bits;
+  //---
+
+  if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
+                      (state.mode < CHECK || flush !== Z_FINISH))) {
+    if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
+      state.mode = MEM;
+      return Z_MEM_ERROR;
+    }
+  }
+  _in -= strm.avail_in;
+  _out -= strm.avail_out;
+  strm.total_in += _in;
+  strm.total_out += _out;
+  state.total += _out;
+  if (state.wrap && _out) {
+    strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
+      (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
+  }
+  strm.data_type = state.bits + (state.last ? 64 : 0) +
+                    (state.mode === TYPE ? 128 : 0) +
+                    (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
+  if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
+    ret = Z_BUF_ERROR;
+  }
+  return ret;
+}
+
+function inflateEnd(strm) {
+
+  if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
+    return Z_STREAM_ERROR;
+  }
+
+  var state = strm.state;
+  if (state.window) {
+    state.window = null;
+  }
+  strm.state = null;
+  return Z_OK;
+}
+
+function inflateGetHeader(strm, head) {
+  var state;
+
+  /* check state */
+  if (!strm || !strm.state) { return Z_STREAM_ERROR; }
+  state = strm.state;
+  if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
+
+  /* save header structure */
+  state.head = head;
+  head.done = false;
+  return Z_OK;
+}
+
+
+exports.inflateReset = inflateReset;
+exports.inflateReset2 = inflateReset2;
+exports.inflateResetKeep = inflateResetKeep;
+exports.inflateInit = inflateInit;
+exports.inflateInit2 = inflateInit2;
+exports.inflate = inflate;
+exports.inflateEnd = inflateEnd;
+exports.inflateGetHeader = inflateGetHeader;
+exports.inflateInfo = 'pako inflate (from Nodeca project)';
+
+/* Not implemented
+exports.inflateCopy = inflateCopy;
+exports.inflateGetDictionary = inflateGetDictionary;
+exports.inflateMark = inflateMark;
+exports.inflatePrime = inflatePrime;
+exports.inflateSetDictionary = inflateSetDictionary;
+exports.inflateSync = inflateSync;
+exports.inflateSyncPoint = inflateSyncPoint;
+exports.inflateUndermine = inflateUndermine;
+*/
+},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(_dereq_,module,exports){
+'use strict';
+
+
+var utils = _dereq_('../utils/common');
+
+var MAXBITS = 15;
+var ENOUGH_LENS = 852;
+var ENOUGH_DISTS = 592;
+//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
+
+var CODES = 0;
+var LENS = 1;
+var DISTS = 2;
+
+var lbase = [ /* Length codes 257..285 base */
+  3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
+  35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
+];
+
+var lext = [ /* Length codes 257..285 extra */
+  16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
+  19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
+];
+
+var dbase = [ /* Distance codes 0..29 base */
+  1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
+  257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
+  8193, 12289, 16385, 24577, 0, 0
+];
+
+var dext = [ /* Distance codes 0..29 extra */
+  16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
+  23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
+  28, 28, 29, 29, 64, 64
+];
+
+module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
+{
+  var bits = opts.bits;
+      //here = opts.here; /* table entry for duplication */
+
+  var len = 0;               /* a code's length in bits */
+  var sym = 0;               /* index of code symbols */
+  var min = 0, max = 0;          /* minimum and maximum code lengths */
+  var root = 0;              /* number of index bits for root table */
+  var curr = 0;              /* number of index bits for current table */
+  var drop = 0;              /* code bits to drop for sub-table */
+  var left = 0;                   /* number of prefix codes available */
+  var used = 0;              /* code entries in table used */
+  var huff = 0;              /* Huffman code */
+  var incr;              /* for incrementing code, index */
+  var fill;              /* index for replicating entries */
+  var low;               /* low bits for current root entry */
+  var mask;              /* mask for low root bits */
+  var next;             /* next available space in table */
+  var base = null;     /* base value table to use */
+  var base_index = 0;
+//  var shoextra;    /* extra bits table to use */
+  var end;                    /* use base and extra for symbol > end */
+  var count = new utils.Buf16(MAXBITS+1); //[MAXBITS+1];    /* number of codes of each length */
+  var offs = new utils.Buf16(MAXBITS+1); //[MAXBITS+1];     /* offsets in table for each length */
+  var extra = null;
+  var extra_index = 0;
+
+  var here_bits, here_op, here_val;
+
+  /*
+   Process a set of code lengths to create a canonical Huffman code.  The
+   code lengths are lens[0..codes-1].  Each length corresponds to the
+   symbols 0..codes-1.  The Huffman code is generated by first sorting the
+   symbols by length from short to long, and retaining the symbol order
+   for codes with equal lengths.  Then the code starts with all zero bits
+   for the first code of the shortest length, and the codes are integer
+   increments for the same length, and zeros are appended as the length
+   increases.  For the deflate format, these bits are stored backwards
+   from their more natural integer increment ordering, and so when the
+   decoding tables are built in the large loop below, the integer codes
+   are incremented backwards.
+
+   This routine assumes, but does not check, that all of the entries in
+   lens[] are in the range 0..MAXBITS.  The caller must assure this.
+   1..MAXBITS is interpreted as that code length.  zero means that that
+   symbol does not occur in this code.
+
+   The codes are sorted by computing a count of codes for each length,
+   creating from that a table of starting indices for each length in the
+   sorted table, and then entering the symbols in order in the sorted
+   table.  The sorted table is work[], with that space being provided by
+   the caller.
+
+   The length counts are used for other purposes as well, i.e. finding
+   the minimum and maximum length codes, determining if there are any
+   codes at all, checking for a valid set of lengths, and looking ahead
+   at length counts to determine sub-table sizes when building the
+   decoding tables.
+   */
+
+  /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
+  for (len = 0; len <= MAXBITS; len++) {
+    count[len] = 0;
+  }
+  for (sym = 0; sym < codes; sym++) {
+    count[lens[lens_index + sym]]++;
+  }
+
+  /* bound code lengths, force root to be within code lengths */
+  root = bits;
+  for (max = MAXBITS; max >= 1; max--) {
+    if (count[max] !== 0) { break; }
+  }
+  if (root > max) {
+    root = max;
+  }
+  if (max === 0) {                     /* no symbols to code at all */
+    //table.op[opts.table_index] = 64;  //here.op = (var char)64;    /* invalid code marker */
+    //table.bits[opts.table_index] = 1;   //here.bits = (var char)1;
+    //table.val[opts.table_index++] = 0;   //here.val = (var short)0;
+    table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+
+    //table.op[opts.table_index] = 64;
+    //table.bits[opts.table_index] = 1;
+    //table.val[opts.table_index++] = 0;
+    table[table_index++] = (1 << 24) | (64 << 16) | 0;
+
+    opts.bits = 1;
+    return 0;     /* no symbols, but wait for decoding to report error */
+  }
+  for (min = 1; min < max; min++) {
+    if (count[min] !== 0) { break; }
+  }
+  if (root < min) {
+    root = min;
+  }
+
+  /* check for an over-subscribed or incomplete set of lengths */
+  left = 1;
+  for (len = 1; len <= MAXBITS; len++) {
+    left <<= 1;
+    left -= count[len];
+    if (left < 0) {
+      return -1;
+    }        /* over-subscribed */
+  }
+  if (left > 0 && (type === CODES || max !== 1)) {
+    return -1;                      /* incomplete set */
+  }
+
+  /* generate offsets into symbol table for each length for sorting */
+  offs[1] = 0;
+  for (len = 1; len < MAXBITS; len++) {
+    offs[len + 1] = offs[len] + count[len];
+  }
+
+  /* sort symbols by length, by symbol order within each length */
+  for (sym = 0; sym < codes; sym++) {
+    if (lens[lens_index + sym] !== 0) {
+      work[offs[lens[lens_index + sym]]++] = sym;
+    }
+  }
+
+  /*
+   Create and fill in decoding tables.  In this loop, the table being
+   filled is at next and has curr index bits.  The code being used is huff
+   with length len.  That code is converted to an index by dropping drop
+   bits off of the bottom.  For codes where len is less than drop + curr,
+   those top drop + curr - len bits are incremented through all values to
+   fill the table with replicated entries.
+
+   root is the number of index bits for the root table.  When len exceeds
+   root, sub-tables are created pointed to by the root entry with an index
+   of the low root bits of huff.  This is saved in low to check for when a
+   new sub-table should be started.  drop is zero when the root table is
+   being filled, and drop is root when sub-tables are being filled.
+
+   When a new sub-table is needed, it is necessary to look ahead in the
+   code lengths to determine what size sub-table is needed.  The length
+   counts are used for this, and so count[] is decremented as codes are
+   entered in the tables.
+
+   used keeps track of how many table entries have been allocated from the
+   provided *table space.  It is checked for LENS and DIST tables against
+   the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+   the initial root table size constants.  See the comments in inftrees.h
+   for more information.
+
+   sym increments through all symbols, and the loop terminates when
+   all codes of length max, i.e. all codes, have been processed.  This
+   routine permits incomplete codes, so another loop after this one fills
+   in the rest of the decoding tables with invalid code markers.
+   */
+
+  /* set up for code type */
+  // poor man optimization - use if-else instead of switch,
+  // to avoid deopts in old v8
+  if (type === CODES) {
+      base = extra = work;    /* dummy value--not used */
+      end = 19;
+  } else if (type === LENS) {
+      base = lbase;
+      base_index -= 257;
+      extra = lext;
+      extra_index -= 257;
+      end = 256;
+  } else {                    /* DISTS */
+      base = dbase;
+      extra = dext;
+      end = -1;
+  }
+
+  /* initialize opts for loop */
+  huff = 0;                   /* starting code */
+  sym = 0;                    /* starting code symbol */
+  len = min;                  /* starting code length */
+  next = table_index;              /* current table to fill in */
+  curr = root;                /* current table index bits */
+  drop = 0;                   /* current bits to drop from code for index */
+  low = -1;                   /* trigger new sub-table when len > root */
+  used = 1 << root;          /* use root table entries */
+  mask = used - 1;            /* mask for comparing low */
+
+  /* check available table space */
+  if ((type === LENS && used > ENOUGH_LENS) ||
+    (type === DISTS && used > ENOUGH_DISTS)) {
+    return 1;
+  }
+
+  var i=0;
+  /* process all codes and make table entries */
+  for (;;) {
+    i++;
+    /* create table entry */
+    here_bits = len - drop;
+    if (work[sym] < end) {
+      here_op = 0;
+      here_val = work[sym];
+    }
+    else if (work[sym] > end) {
+      here_op = extra[extra_index + work[sym]];
+      here_val = base[base_index + work[sym]];
+    }
+    else {
+      here_op = 32 + 64;         /* end of block */
+      here_val = 0;
+    }
+
+    /* replicate for those indices with low len bits equal to huff */
+    incr = 1 << (len - drop);
+    fill = 1 << curr;
+    min = fill;                 /* save offset to next table */
+    do {
+      fill -= incr;
+      table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
+    } while (fill !== 0);
+
+    /* backwards increment the len-bit code huff */
+    incr = 1 << (len - 1);
+    while (huff & incr) {
+      incr >>= 1;
+    }
+    if (incr !== 0) {
+      huff &= incr - 1;
+      huff += incr;
+    } else {
+      huff = 0;
+    }
+
+    /* go to next symbol, update count, len */
+    sym++;
+    if (--count[len] === 0) {
+      if (len === max) { break; }
+      len = lens[lens_index + work[sym]];
+    }
+
+    /* create new sub-table if needed */
+    if (len > root && (huff & mask) !== low) {
+      /* if first time, transition to sub-tables */
+      if (drop === 0) {
+        drop = root;
+      }
+
+      /* increment past last table */
+      next += min;            /* here min is 1 << curr */
+
+      /* determine length of next table */
+      curr = len - drop;
+      left = 1 << curr;
+      while (curr + drop < max) {
+        left -= count[curr + drop];
+        if (left <= 0) { break; }
+        curr++;
+        left <<= 1;
+      }
+
+      /* check for enough space */
+      used += 1 << curr;
+      if ((type === LENS && used > ENOUGH_LENS) ||
+        (type === DISTS && used > ENOUGH_DISTS)) {
+        return 1;
+      }
+
+      /* point entry in root table to sub-table */
+      low = huff & mask;
+      /*table.op[low] = curr;
+      table.bits[low] = root;
+      table.val[low] = next - opts.table_index;*/
+      table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
+    }
+  }
+
+  /* fill in remaining table entry if code is incomplete (guaranteed to have
+   at most one remaining entry, since if the code is incomplete, the
+   maximum code length that was allowed to get this far is one bit) */
+  if (huff !== 0) {
+    //table.op[next + huff] = 64;            /* invalid code marker */
+    //table.bits[next + huff] = len - drop;
+    //table.val[next + huff] = 0;
+    table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
+  }
+
+  /* set return parameters */
+  //opts.table_index += used;
+  opts.bits = root;
+  return 0;
+};
+
+},{"../utils/common":27}],37:[function(_dereq_,module,exports){
+'use strict';
+
+module.exports = {
+  '2':    'need dictionary',     /* Z_NEED_DICT       2  */
+  '1':    'stream end',          /* Z_STREAM_END      1  */
+  '0':    '',                    /* Z_OK              0  */
+  '-1':   'file error',          /* Z_ERRNO         (-1) */
+  '-2':   'stream error',        /* Z_STREAM_ERROR  (-2) */
+  '-3':   'data error',          /* Z_DATA_ERROR    (-3) */
+  '-4':   'insufficient memory', /* Z_MEM_ERROR     (-4) */
+  '-5':   'buffer error',        /* Z_BUF_ERROR     (-5) */
+  '-6':   'incompatible version' /* Z_VERSION_ERROR (-6) */
+};
+},{}],38:[function(_dereq_,module,exports){
+'use strict';
+
+
+var utils = _dereq_('../utils/common');
+
+/* Public constants ==========================================================*/
+/* ===========================================================================*/
+
+
+//var Z_FILTERED          = 1;
+//var Z_HUFFMAN_ONLY      = 2;
+//var Z_RLE               = 3;
+var Z_FIXED               = 4;
+//var Z_DEFAULT_STRATEGY  = 0;
+
+/* Possible values of the data_type field (though see inflate()) */
+var Z_BINARY              = 0;
+var Z_TEXT                = 1;
+//var Z_ASCII             = 1; // = Z_TEXT
+var Z_UNKNOWN             = 2;
+
+/*============================================================================*/
+
+
+function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
+
+// From zutil.h
+
+var STORED_BLOCK = 0;
+var STATIC_TREES = 1;
+var DYN_TREES    = 2;
+/* The three kinds of block type */
+
+var MIN_MATCH    = 3;
+var MAX_MATCH    = 258;
+/* The minimum and maximum match lengths */
+
+// From deflate.h
+/* ===========================================================================
+ * Internal compression state.
+ */
+
+var LENGTH_CODES  = 29;
+/* number of length codes, not counting the special END_BLOCK code */
+
+var LITERALS      = 256;
+/* number of literal bytes 0..255 */
+
+var L_CODES       = LITERALS + 1 + LENGTH_CODES;
+/* number of Literal or Length codes, including the END_BLOCK code */
+
+var D_CODES       = 30;
+/* number of distance codes */
+
+var BL_CODES      = 19;
+/* number of codes used to transfer the bit lengths */
+
+var HEAP_SIZE     = 2*L_CODES + 1;
+/* maximum heap size */
+
+var MAX_BITS      = 15;
+/* All codes must not exceed MAX_BITS bits */
+
+var Buf_size      = 16;
+/* size of bit buffer in bi_buf */
+
+
+/* ===========================================================================
+ * Constants
+ */
+
+var MAX_BL_BITS = 7;
+/* Bit length codes must not exceed MAX_BL_BITS bits */
+
+var END_BLOCK   = 256;
+/* end of block literal code */
+
+var REP_3_6     = 16;
+/* repeat previous bit length 3-6 times (2 bits of repeat count) */
+
+var REPZ_3_10   = 17;
+/* repeat a zero length 3-10 times  (3 bits of repeat count) */
+
+var REPZ_11_138 = 18;
+/* repeat a zero length 11-138 times  (7 bits of repeat count) */
+
+var extra_lbits =   /* extra bits for each length code */
+  [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];
+
+var extra_dbits =   /* extra bits for each distance code */
+  [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];
+
+var extra_blbits =  /* extra bits for each bit length code */
+  [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];
+
+var bl_order =
+  [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
+/* The lengths of the bit length codes are sent in order of decreasing
+ * probability, to avoid transmitting the lengths for unused bit length codes.
+ */
+
+/* ===========================================================================
+ * Local data. These are initialized only once.
+ */
+
+// We pre-fill arrays with 0 to avoid uninitialized gaps
+
+var DIST_CODE_LEN = 512; /* see definition of array dist_code below */
+
+// !!!! Use flat array insdead of structure, Freq = i*2, Len = i*2+1
+var static_ltree  = new Array((L_CODES+2) * 2);
+zero(static_ltree);
+/* The static literal tree. Since the bit lengths are imposed, there is no
+ * need for the L_CODES extra codes used during heap construction. However
+ * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
+ * below).
+ */
+
+var static_dtree  = new Array(D_CODES * 2);
+zero(static_dtree);
+/* The static distance tree. (Actually a trivial tree since all codes use
+ * 5 bits.)
+ */
+
+var _dist_code    = new Array(DIST_CODE_LEN);
+zero(_dist_code);
+/* Distance codes. The first 256 values correspond to the distances
+ * 3 .. 258, the last 256 values correspond to the top 8 bits of
+ * the 15 bit distances.
+ */
+
+var _length_code  = new Array(MAX_MATCH-MIN_MATCH+1);
+zero(_length_code);
+/* length code for each normalized match length (0 == MIN_MATCH) */
+
+var base_length   = new Array(LENGTH_CODES);
+zero(base_length);
+/* First normalized length for each code (0 = MIN_MATCH) */
+
+var base_dist     = new Array(D_CODES);
+zero(base_dist);
+/* First normalized distance for each code (0 = distance of 1) */
+
+
+var StaticTreeDesc = function (static_tree, extra_bits, extra_base, elems, max_length) {
+
+  this.static_tree  = static_tree;  /* static tree or NULL */
+  this.extra_bits   = extra_bits;   /* extra bits for each code or NULL */
+  this.extra_base   = extra_base;   /* base index for extra_bits */
+  this.elems        = elems;        /* max number of elements in the tree */
+  this.max_length   = max_length;   /* max bit length for the codes */
+
+  // show if `static_tree` has data or dummy - needed for monomorphic objects
+  this.has_stree    = static_tree && static_tree.length;
+};
+
+
+var static_l_desc;
+var static_d_desc;
+var static_bl_desc;
+
+
+var TreeDesc = function(dyn_tree, stat_desc) {
+  this.dyn_tree = dyn_tree;     /* the dynamic tree */
+  this.max_code = 0;            /* largest code with non zero frequency */
+  this.stat_desc = stat_desc;   /* the corresponding static tree */
+};
+
+
+
+function d_code(dist) {
+  return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
+}
+
+
+/* ===========================================================================
+ * Output a short LSB first on the stream.
+ * IN assertion: there is enough room in pendingBuf.
+ */
+function put_short (s, w) {
+//    put_byte(s, (uch)((w) & 0xff));
+//    put_byte(s, (uch)((ush)(w) >> 8));
+  s.pending_buf[s.pending++] = (w) & 0xff;
+  s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
+}
+
+
+/* ===========================================================================
+ * Send a value on a given number of bits.
+ * IN assertion: length <= 16 and value fits in length bits.
+ */
+function send_bits(s, value, length) {
+  if (s.bi_valid > (Buf_size - length)) {
+    s.bi_buf |= (value << s.bi_valid) & 0xffff;
+    put_short(s, s.bi_buf);
+    s.bi_buf = value >> (Buf_size - s.bi_valid);
+    s.bi_valid += length - Buf_size;
+  } else {
+    s.bi_buf |= (value << s.bi_valid) & 0xffff;
+    s.bi_valid += length;
+  }
+}
+
+
+function send_code(s, c, tree) {
+  send_bits(s, tree[c*2]/*.Code*/, tree[c*2 + 1]/*.Len*/);
+}
+
+
+/* ===========================================================================
+ * Reverse the first len bits of a code, using straightforward code (a faster
+ * method would use a table)
+ * IN assertion: 1 <= len <= 15
+ */
+function bi_reverse(code, len) {
+  var res = 0;
+  do {
+    res |= code & 1;
+    code >>>= 1;
+    res <<= 1;
+  } while (--len > 0);
+  return res >>> 1;
+}
+
+
+/* ===========================================================================
+ * Flush the bit buffer, keeping at most 7 bits in it.
+ */
+function bi_flush(s) {
+  if (s.bi_valid === 16) {
+    put_short(s, s.bi_buf);
+    s.bi_buf = 0;
+    s.bi_valid = 0;
+
+  } else if (s.bi_valid >= 8) {
+    s.pending_buf[s.pending++] = s.bi_buf & 0xff;
+    s.bi_buf >>= 8;
+    s.bi_valid -= 8;
+  }
+}
+
+
+/* ===========================================================================
+ * Compute the optimal bit lengths for a tree and update the total bit length
+ * for the current block.
+ * IN assertion: the fields freq and dad are set, heap[heap_max] and
+ *    above are the tree nodes sorted by increasing frequency.
+ * OUT assertions: the field len is set to the optimal bit length, the
+ *     array bl_count contains the frequencies for each bit length.
+ *     The length opt_len is updated; static_len is also updated if stree is
+ *     not null.
+ */
+function gen_bitlen(s, desc)
+//    deflate_state *s;
+//    tree_desc *desc;    /* the tree descriptor */
+{
+  var tree            = desc.dyn_tree;
+  var max_code        = desc.max_code;
+  var stree           = desc.stat_desc.static_tree;
+  var has_stree       = desc.stat_desc.has_stree;
+  var extra           = desc.stat_desc.extra_bits;
+  var base            = desc.stat_desc.extra_base;
+  var max_length      = desc.stat_desc.max_length;
+  var h;              /* heap index */
+  var n, m;           /* iterate over the tree elements */
+  var bits;           /* bit length */
+  var xbits;          /* extra bits */
+  var f;              /* frequency */
+  var overflow = 0;   /* number of elements with bit length too large */
+
+  for (bits = 0; bits <= MAX_BITS; bits++) {
+    s.bl_count[bits] = 0;
+  }
+
+  /* In a first pass, compute the optimal bit lengths (which may
+   * overflow in the case of the bit length tree).
+   */
+  tree[s.heap[s.heap_max]*2 + 1]/*.Len*/ = 0; /* root of the heap */
+
+  for (h = s.heap_max+1; h < HEAP_SIZE; h++) {
+    n = s.heap[h];
+    bits = tree[tree[n*2 +1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
+    if (bits > max_length) {
+      bits = max_length;
+      overflow++;
+    }
+    tree[n*2 + 1]/*.Len*/ = bits;
+    /* We overwrite tree[n].Dad which is no longer needed */
+
+    if (n > max_code) { continue; } /* not a leaf node */
+
+    s.bl_count[bits]++;
+    xbits = 0;
+    if (n >= base) {
+      xbits = extra[n-base];
+    }
+    f = tree[n * 2]/*.Freq*/;
+    s.opt_len += f * (bits + xbits);
+    if (has_stree) {
+      s.static_len += f * (stree[n*2 + 1]/*.Len*/ + xbits);
+    }
+  }
+  if (overflow === 0) { return; }
+
+  // Trace((stderr,"\nbit length overflow\n"));
+  /* This happens for example on obj2 and pic of the Calgary corpus */
+
+  /* Find the first bit length which could increase: */
+  do {
+    bits = max_length-1;
+    while (s.bl_count[bits] === 0) { bits--; }
+    s.bl_count[bits]--;      /* move one leaf down the tree */
+    s.bl_count[bits+1] += 2; /* move one overflow item as its brother */
+    s.bl_count[max_length]--;
+    /* The brother of the overflow item also moves one step up,
+     * but this does not affect bl_count[max_length]
+     */
+    overflow -= 2;
+  } while (overflow > 0);
+
+  /* Now recompute all bit lengths, scanning in increasing frequency.
+   * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
+   * lengths instead of fixing only the wrong ones. This idea is taken
+   * from 'ar' written by Haruhiko Okumura.)
+   */
+  for (bits = max_length; bits !== 0; bits--) {
+    n = s.bl_count[bits];
+    while (n !== 0) {
+      m = s.heap[--h];
+      if (m > max_code) { continue; }
+      if (tree[m*2 + 1]/*.Len*/ !== bits) {
+        // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
+        s.opt_len += (bits - tree[m*2 + 1]/*.Len*/)*tree[m*2]/*.Freq*/;
+        tree[m*2 + 1]/*.Len*/ = bits;
+      }
+      n--;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Generate the codes for a given tree and bit counts (which need not be
+ * optimal).
+ * IN assertion: the array bl_count contains the bit length statistics for
+ * the given tree and the field len is set for all tree elements.
+ * OUT assertion: the field code is set for all tree elements of non
+ *     zero code length.
+ */
+function gen_codes(tree, max_code, bl_count)
+//    ct_data *tree;             /* the tree to decorate */
+//    int max_code;              /* largest code with non zero frequency */
+//    ushf *bl_count;            /* number of codes at each bit length */
+{
+  var next_code = new Array(MAX_BITS+1); /* next code value for each bit length */
+  var code = 0;              /* running code value */
+  var bits;                  /* bit index */
+  var n;                     /* code index */
+
+  /* The distribution counts are first used to generate the code values
+   * without bit reversal.
+   */
+  for (bits = 1; bits <= MAX_BITS; bits++) {
+    next_code[bits] = code = (code + bl_count[bits-1]) << 1;
+  }
+  /* Check that the bit counts in bl_count are consistent. The last code
+   * must be all ones.
+   */
+  //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
+  //        "inconsistent bit counts");
+  //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
+
+  for (n = 0;  n <= max_code; n++) {
+    var len = tree[n*2 + 1]/*.Len*/;
+    if (len === 0) { continue; }
+    /* Now reverse the bits */
+    tree[n*2]/*.Code*/ = bi_reverse(next_code[len]++, len);
+
+    //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
+    //     n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
+  }
+}
+
+
+/* ===========================================================================
+ * Initialize the various 'constant' tables.
+ */
+function tr_static_init() {
+  var n;        /* iterates over tree elements */
+  var bits;     /* bit counter */
+  var length;   /* length value */
+  var code;     /* code value */
+  var dist;     /* distance index */
+  var bl_count = new Array(MAX_BITS+1);
+  /* number of codes at each bit length for an optimal tree */
+
+  // do check in _tr_init()
+  //if (static_init_done) return;
+
+  /* For some embedded targets, global variables are not initialized: */
+/*#ifdef NO_INIT_GLOBAL_POINTERS
+  static_l_desc.static_tree = static_ltree;
+  static_l_desc.extra_bits = extra_lbits;
+  static_d_desc.static_tree = static_dtree;
+  static_d_desc.extra_bits = extra_dbits;
+  static_bl_desc.extra_bits = extra_blbits;
+#endif*/
+
+  /* Initialize the mapping length (0..255) -> length code (0..28) */
+  length = 0;
+  for (code = 0; code < LENGTH_CODES-1; code++) {
+    base_length[code] = length;
+    for (n = 0; n < (1<<extra_lbits[code]); n++) {
+      _length_code[length++] = code;
+    }
+  }
+  //Assert (length == 256, "tr_static_init: length != 256");
+  /* Note that the length 255 (match length 258) can be represented
+   * in two different ways: code 284 + 5 bits or code 285, so we
+   * overwrite length_code[255] to use the best encoding:
+   */
+  _length_code[length-1] = code;
+
+  /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
+  dist = 0;
+  for (code = 0 ; code < 16; code++) {
+    base_dist[code] = dist;
+    for (n = 0; n < (1<<extra_dbits[code]); n++) {
+      _dist_code[dist++] = code;
+    }
+  }
+  //Assert (dist == 256, "tr_static_init: dist != 256");
+  dist >>= 7; /* from now on, all distances are divided by 128 */
+  for ( ; code < D_CODES; code++) {
+    base_dist[code] = dist << 7;
+    for (n = 0; n < (1<<(extra_dbits[code]-7)); n++) {
+      _dist_code[256 + dist++] = code;
+    }
+  }
+  //Assert (dist == 256, "tr_static_init: 256+dist != 512");
+
+  /* Construct the codes of the static literal tree */
+  for (bits = 0; bits <= MAX_BITS; bits++) {
+    bl_count[bits] = 0;
+  }
+
+  n = 0;
+  while (n <= 143) {
+    static_ltree[n*2 + 1]/*.Len*/ = 8;
+    n++;
+    bl_count[8]++;
+  }
+  while (n <= 255) {
+    static_ltree[n*2 + 1]/*.Len*/ = 9;
+    n++;
+    bl_count[9]++;
+  }
+  while (n <= 279) {
+    static_ltree[n*2 + 1]/*.Len*/ = 7;
+    n++;
+    bl_count[7]++;
+  }
+  while (n <= 287) {
+    static_ltree[n*2 + 1]/*.Len*/ = 8;
+    n++;
+    bl_count[8]++;
+  }
+  /* Codes 286 and 287 do not exist, but we must include them in the
+   * tree construction to get a canonical Huffman tree (longest code
+   * all ones)
+   */
+  gen_codes(static_ltree, L_CODES+1, bl_count);
+
+  /* The static distance tree is trivial: */
+  for (n = 0; n < D_CODES; n++) {
+    static_dtree[n*2 + 1]/*.Len*/ = 5;
+    static_dtree[n*2]/*.Code*/ = bi_reverse(n, 5);
+  }
+
+  // Now data ready and we can init static trees
+  static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS+1, L_CODES, MAX_BITS);
+  static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0,          D_CODES, MAX_BITS);
+  static_bl_desc =new StaticTreeDesc(new Array(0), extra_blbits, 0,         BL_CODES, MAX_BL_BITS);
+
+  //static_init_done = true;
+}
+
+
+/* ===========================================================================
+ * Initialize a new block.
+ */
+function init_block(s) {
+  var n; /* iterates over tree elements */
+
+  /* Initialize the trees. */
+  for (n = 0; n < L_CODES;  n++) { s.dyn_ltree[n*2]/*.Freq*/ = 0; }
+  for (n = 0; n < D_CODES;  n++) { s.dyn_dtree[n*2]/*.Freq*/ = 0; }
+  for (n = 0; n < BL_CODES; n++) { s.bl_tree[n*2]/*.Freq*/ = 0; }
+
+  s.dyn_ltree[END_BLOCK*2]/*.Freq*/ = 1;
+  s.opt_len = s.static_len = 0;
+  s.last_lit = s.matches = 0;
+}
+
+
+/* ===========================================================================
+ * Flush the bit buffer and align the output on a byte boundary
+ */
+function bi_windup(s)
+{
+  if (s.bi_valid > 8) {
+    put_short(s, s.bi_buf);
+  } else if (s.bi_valid > 0) {
+    //put_byte(s, (Byte)s->bi_buf);
+    s.pending_buf[s.pending++] = s.bi_buf;
+  }
+  s.bi_buf = 0;
+  s.bi_valid = 0;
+}
+
+/* ===========================================================================
+ * Copy a stored block, storing first the length and its
+ * one's complement if requested.
+ */
+function copy_block(s, buf, len, header)
+//DeflateState *s;
+//charf    *buf;    /* the input data */
+//unsigned len;     /* its length */
+//int      header;  /* true if block header must be written */
+{
+  bi_windup(s);        /* align on byte boundary */
+
+  if (header) {
+    put_short(s, len);
+    put_short(s, ~len);
+  }
+//  while (len--) {
+//    put_byte(s, *buf++);
+//  }
+  utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
+  s.pending += len;
+}
+
+/* ===========================================================================
+ * Compares to subtrees, using the tree depth as tie breaker when
+ * the subtrees have equal frequency. This minimizes the worst case length.
+ */
+function smaller(tree, n, m, depth) {
+  var _n2 = n*2;
+  var _m2 = m*2;
+  return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
+         (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
+}
+
+/* ===========================================================================
+ * Restore the heap property by moving down the tree starting at node k,
+ * exchanging a node with the smallest of its two sons if necessary, stopping
+ * when the heap property is re-established (each father smaller than its
+ * two sons).
+ */
+function pqdownheap(s, tree, k)
+//    deflate_state *s;
+//    ct_data *tree;  /* the tree to restore */
+//    int k;               /* node to move down */
+{
+  var v = s.heap[k];
+  var j = k << 1;  /* left son of k */
+  while (j <= s.heap_len) {
+    /* Set j to the smallest of the two sons: */
+    if (j < s.heap_len &&
+      smaller(tree, s.heap[j+1], s.heap[j], s.depth)) {
+      j++;
+    }
+    /* Exit if v is smaller than both sons */
+    if (smaller(tree, v, s.heap[j], s.depth)) { break; }
+
+    /* Exchange v with the smallest son */
+    s.heap[k] = s.heap[j];
+    k = j;
+
+    /* And continue down the tree, setting j to the left son of k */
+    j <<= 1;
+  }
+  s.heap[k] = v;
+}
+
+
+// inlined manually
+// var SMALLEST = 1;
+
+/* ===========================================================================
+ * Send the block data compressed using the given Huffman trees
+ */
+function compress_block(s, ltree, dtree)
+//    deflate_state *s;
+//    const ct_data *ltree; /* literal tree */
+//    const ct_data *dtree; /* distance tree */
+{
+  var dist;           /* distance of matched string */
+  var lc;             /* match length or unmatched char (if dist == 0) */
+  var lx = 0;         /* running index in l_buf */
+  var code;           /* the code to send */
+  var extra;          /* number of extra bits to send */
+
+  if (s.last_lit !== 0) {
+    do {
+      dist = (s.pending_buf[s.d_buf + lx*2] << 8) | (s.pending_buf[s.d_buf + lx*2 + 1]);
+      lc = s.pending_buf[s.l_buf + lx];
+      lx++;
+
+      if (dist === 0) {
+        send_code(s, lc, ltree); /* send a literal byte */
+        //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
+      } else {
+        /* Here, lc is the match length - MIN_MATCH */
+        code = _length_code[lc];
+        send_code(s, code+LITERALS+1, ltree); /* send the length code */
+        extra = extra_lbits[code];
+        if (extra !== 0) {
+          lc -= base_length[code];
+          send_bits(s, lc, extra);       /* send the extra length bits */
+        }
+        dist--; /* dist is now the match distance - 1 */
+        code = d_code(dist);
+        //Assert (code < D_CODES, "bad d_code");
+
+        send_code(s, code, dtree);       /* send the distance code */
+        extra = extra_dbits[code];
+        if (extra !== 0) {
+          dist -= base_dist[code];
+          send_bits(s, dist, extra);   /* send the extra distance bits */
+        }
+      } /* literal or match pair ? */
+
+      /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
+      //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
+      //       "pendingBuf overflow");
+
+    } while (lx < s.last_lit);
+  }
+
+  send_code(s, END_BLOCK, ltree);
+}
+
+
+/* ===========================================================================
+ * Construct one Huffman tree and assigns the code bit strings and lengths.
+ * Update the total bit length for the current block.
+ * IN assertion: the field freq is set for all tree elements.
+ * OUT assertions: the fields len and code are set to the optimal bit length
+ *     and corresponding code. The length opt_len is updated; static_len is
+ *     also updated if stree is not null. The field max_code is set.
+ */
+function build_tree(s, desc)
+//    deflate_state *s;
+//    tree_desc *desc; /* the tree descriptor */
+{
+  var tree     = desc.dyn_tree;
+  var stree    = desc.stat_desc.static_tree;
+  var has_stree = desc.stat_desc.has_stree;
+  var elems    = desc.stat_desc.elems;
+  var n, m;          /* iterate over heap elements */
+  var max_code = -1; /* largest code with non zero frequency */
+  var node;          /* new node being created */
+
+  /* Construct the initial heap, with least frequent element in
+   * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
+   * heap[0] is not used.
+   */
+  s.heap_len = 0;
+  s.heap_max = HEAP_SIZE;
+
+  for (n = 0; n < elems; n++) {
+    if (tree[n * 2]/*.Freq*/ !== 0) {
+      s.heap[++s.heap_len] = max_code = n;
+      s.depth[n] = 0;
+
+    } else {
+      tree[n*2 + 1]/*.Len*/ = 0;
+    }
+  }
+
+  /* The pkzip format requires that at least one distance code exists,
+   * and that at least one bit should be sent even if there is only one
+   * possible code. So to avoid special checks later on we force at least
+   * two codes of non zero frequency.
+   */
+  while (s.heap_len < 2) {
+    node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
+    tree[node * 2]/*.Freq*/ = 1;
+    s.depth[node] = 0;
+    s.opt_len--;
+
+    if (has_stree) {
+      s.static_len -= stree[node*2 + 1]/*.Len*/;
+    }
+    /* node is 0 or 1 so it does not have extra bits */
+  }
+  desc.max_code = max_code;
+
+  /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
+   * establish sub-heaps of increasing lengths:
+   */
+  for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
+
+  /* Construct the Huffman tree by repeatedly combining the least two
+   * frequent nodes.
+   */
+  node = elems;              /* next internal node of the tree */
+  do {
+    //pqremove(s, tree, n);  /* n = node of least frequency */
+    /*** pqremove ***/
+    n = s.heap[1/*SMALLEST*/];
+    s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
+    pqdownheap(s, tree, 1/*SMALLEST*/);
+    /***/
+
+    m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
+
+    s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
+    s.heap[--s.heap_max] = m;
+
+    /* Create a new node father of n and m */
+    tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
+    s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
+    tree[n*2 + 1]/*.Dad*/ = tree[m*2 + 1]/*.Dad*/ = node;
+
+    /* and insert the new node in the heap */
+    s.heap[1/*SMALLEST*/] = node++;
+    pqdownheap(s, tree, 1/*SMALLEST*/);
+
+  } while (s.heap_len >= 2);
+
+  s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
+
+  /* At this point, the fields freq and dad are set. We can now
+   * generate the bit lengths.
+   */
+  gen_bitlen(s, desc);
+
+  /* The field len is now set, we can generate the bit codes */
+  gen_codes(tree, max_code, s.bl_count);
+}
+
+
+/* ===========================================================================
+ * Scan a literal or distance tree to determine the frequencies of the codes
+ * in the bit length tree.
+ */
+function scan_tree(s, tree, max_code)
+//    deflate_state *s;
+//    ct_data *tree;   /* the tree to be scanned */
+//    int max_code;    /* and its largest code of non zero frequency */
+{
+  var n;                     /* iterates over all tree elements */
+  var prevlen = -1;          /* last emitted length */
+  var curlen;                /* length of current code */
+
+  var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */
+
+  var count = 0;             /* repeat count of the current code */
+  var max_count = 7;         /* max repeat count */
+  var min_count = 4;         /* min repeat count */
+
+  if (nextlen === 0) {
+    max_count = 138;
+    min_count = 3;
+  }
+  tree[(max_code+1)*2 + 1]/*.Len*/ = 0xffff; /* guard */
+
+  for (n = 0; n <= max_code; n++) {
+    curlen = nextlen;
+    nextlen = tree[(n+1)*2 + 1]/*.Len*/;
+
+    if (++count < max_count && curlen === nextlen) {
+      continue;
+
+    } else if (count < min_count) {
+      s.bl_tree[curlen * 2]/*.Freq*/ += count;
+
+    } else if (curlen !== 0) {
+
+      if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
+      s.bl_tree[REP_3_6*2]/*.Freq*/++;
+
+    } else if (count <= 10) {
+      s.bl_tree[REPZ_3_10*2]/*.Freq*/++;
+
+    } else {
+      s.bl_tree[REPZ_11_138*2]/*.Freq*/++;
+    }
+
+    count = 0;
+    prevlen = curlen;
+
+    if (nextlen === 0) {
+      max_count = 138;
+      min_count = 3;
+
+    } else if (curlen === nextlen) {
+      max_count = 6;
+      min_count = 3;
+
+    } else {
+      max_count = 7;
+      min_count = 4;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Send a literal or distance tree in compressed form, using the codes in
+ * bl_tree.
+ */
+function send_tree(s, tree, max_code)
+//    deflate_state *s;
+//    ct_data *tree; /* the tree to be scanned */
+//    int max_code;       /* and its largest code of non zero frequency */
+{
+  var n;                     /* iterates over all tree elements */
+  var prevlen = -1;          /* last emitted length */
+  var curlen;                /* length of current code */
+
+  var nextlen = tree[0*2 + 1]/*.Len*/; /* length of next code */
+
+  var count = 0;             /* repeat count of the current code */
+  var max_count = 7;         /* max repeat count */
+  var min_count = 4;         /* min repeat count */
+
+  /* tree[max_code+1].Len = -1; */  /* guard already set */
+  if (nextlen === 0) {
+    max_count = 138;
+    min_count = 3;
+  }
+
+  for (n = 0; n <= max_code; n++) {
+    curlen = nextlen;
+    nextlen = tree[(n+1)*2 + 1]/*.Len*/;
+
+    if (++count < max_count && curlen === nextlen) {
+      continue;
+
+    } else if (count < min_count) {
+      do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
+
+    } else if (curlen !== 0) {
+      if (curlen !== prevlen) {
+        send_code(s, curlen, s.bl_tree);
+        count--;
+      }
+      //Assert(count >= 3 && count <= 6, " 3_6?");
+      send_code(s, REP_3_6, s.bl_tree);
+      send_bits(s, count-3, 2);
+
+    } else if (count <= 10) {
+      send_code(s, REPZ_3_10, s.bl_tree);
+      send_bits(s, count-3, 3);
+
+    } else {
+      send_code(s, REPZ_11_138, s.bl_tree);
+      send_bits(s, count-11, 7);
+    }
+
+    count = 0;
+    prevlen = curlen;
+    if (nextlen === 0) {
+      max_count = 138;
+      min_count = 3;
+
+    } else if (curlen === nextlen) {
+      max_count = 6;
+      min_count = 3;
+
+    } else {
+      max_count = 7;
+      min_count = 4;
+    }
+  }
+}
+
+
+/* ===========================================================================
+ * Construct the Huffman tree for the bit lengths and return the index in
+ * bl_order of the last bit length code to send.
+ */
+function build_bl_tree(s) {
+  var max_blindex;  /* index of last bit length code of non zero freq */
+
+  /* Determine the bit length frequencies for literal and distance trees */
+  scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
+  scan_tree(s, s.dyn_dtree, s.d_desc.max_code);
+
+  /* Build the bit length tree: */
+  build_tree(s, s.bl_desc);
+  /* opt_len now includes the length of the tree representations, except
+   * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
+   */
+
+  /* Determine the number of bit length codes to send. The pkzip format
+   * requires that at least 4 bit length codes be sent. (appnote.txt says
+   * 3 but the actual value used is 4.)
+   */
+  for (max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) {
+    if (s.bl_tree[bl_order[max_blindex]*2 + 1]/*.Len*/ !== 0) {
+      break;
+    }
+  }
+  /* Update opt_len to include the bit length tree and counts */
+  s.opt_len += 3*(max_blindex+1) + 5+5+4;
+  //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
+  //        s->opt_len, s->static_len));
+
+  return max_blindex;
+}
+
+
+/* ===========================================================================
+ * Send the header for a block using dynamic Huffman trees: the counts, the
+ * lengths of the bit length codes, the literal tree and the distance tree.
+ * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
+ */
+function send_all_trees(s, lcodes, dcodes, blcodes)
+//    deflate_state *s;
+//    int lcodes, dcodes, blcodes; /* number of codes for each tree */
+{
+  var rank;                    /* index in bl_order */
+
+  //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
+  //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
+  //        "too many codes");
+  //Tracev((stderr, "\nbl counts: "));
+  send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */
+  send_bits(s, dcodes-1,   5);
+  send_bits(s, blcodes-4,  4); /* not -3 as stated in appnote.txt */
+  for (rank = 0; rank < blcodes; rank++) {
+    //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
+    send_bits(s, s.bl_tree[bl_order[rank]*2 + 1]/*.Len*/, 3);
+  }
+  //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
+
+  send_tree(s, s.dyn_ltree, lcodes-1); /* literal tree */
+  //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
+
+  send_tree(s, s.dyn_dtree, dcodes-1); /* distance tree */
+  //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
+}
+
+
+/* ===========================================================================
+ * Check if the data type is TEXT or BINARY, using the following algorithm:
+ * - TEXT if the two conditions below are satisfied:
+ *    a) There are no non-portable control characters belonging to the
+ *       "black list" (0..6, 14..25, 28..31).
+ *    b) There is at least one printable character belonging to the
+ *       "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
+ * - BINARY otherwise.
+ * - The following partially-portable control characters form a
+ *   "gray list" that is ignored in this detection algorithm:
+ *   (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
+ * IN assertion: the fields Freq of dyn_ltree are set.
+ */
+function detect_data_type(s) {
+  /* black_mask is the bit mask of black-listed bytes
+   * set bits 0..6, 14..25, and 28..31
+   * 0xf3ffc07f = binary 11110011111111111100000001111111
+   */
+  var black_mask = 0xf3ffc07f;
+  var n;
+
+  /* Check for non-textual ("black-listed") bytes. */
+  for (n = 0; n <= 31; n++, black_mask >>>= 1) {
+    if ((black_mask & 1) && (s.dyn_ltree[n*2]/*.Freq*/ !== 0)) {
+      return Z_BINARY;
+    }
+  }
+
+  /* Check for textual ("white-listed") bytes. */
+  if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
+      s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
+    return Z_TEXT;
+  }
+  for (n = 32; n < LITERALS; n++) {
+    if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
+      return Z_TEXT;
+    }
+  }
+
+  /* There are no "black-listed" or "white-listed" bytes:
+   * this stream either is empty or has tolerated ("gray-listed") bytes only.
+   */
+  return Z_BINARY;
+}
+
+
+var static_init_done = false;
+
+/* ===========================================================================
+ * Initialize the tree data structures for a new zlib stream.
+ */
+function _tr_init(s)
+{
+
+  if (!static_init_done) {
+    tr_static_init();
+    static_init_done = true;
+  }
+
+  s.l_desc  = new TreeDesc(s.dyn_ltree, static_l_desc);
+  s.d_desc  = new TreeDesc(s.dyn_dtree, static_d_desc);
+  s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);
+
+  s.bi_buf = 0;
+  s.bi_valid = 0;
+
+  /* Initialize the first block of the first file: */
+  init_block(s);
+}
+
+
+/* ===========================================================================
+ * Send a stored block
+ */
+function _tr_stored_block(s, buf, stored_len, last)
+//DeflateState *s;
+//charf *buf;       /* input block */
+//ulg stored_len;   /* length of input block */
+//int last;         /* one if this is the last block for a file */
+{
+  send_bits(s, (STORED_BLOCK<<1)+(last ? 1 : 0), 3);    /* send block type */
+  copy_block(s, buf, stored_len, true); /* with header */
+}
+
+
+/* ===========================================================================
+ * Send one empty static block to give enough lookahead for inflate.
+ * This takes 10 bits, of which 7 may remain in the bit buffer.
+ */
+function _tr_align(s) {
+  send_bits(s, STATIC_TREES<<1, 3);
+  send_code(s, END_BLOCK, static_ltree);
+  bi_flush(s);
+}
+
+
+/* ===========================================================================
+ * Determine the best encoding for the current block: dynamic trees, static
+ * trees or store, and output the encoded block to the zip file.
+ */
+function _tr_flush_block(s, buf, stored_len, last)
+//DeflateState *s;
+//charf *buf;       /* input block, or NULL if too old */
+//ulg stored_len;   /* length of input block */
+//int last;         /* one if this is the last block for a file */
+{
+  var opt_lenb, static_lenb;  /* opt_len and static_len in bytes */
+  var max_blindex = 0;        /* index of last bit length code of non zero freq */
+
+  /* Build the Huffman trees unless a stored block is forced */
+  if (s.level > 0) {
+
+    /* Check if the file is binary or text */
+    if (s.strm.data_type === Z_UNKNOWN) {
+      s.strm.data_type = detect_data_type(s);
+    }
+
+    /* Construct the literal and distance trees */
+    build_tree(s, s.l_desc);
+    // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
+    //        s->static_len));
+
+    build_tree(s, s.d_desc);
+    // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
+    //        s->static_len));
+    /* At this point, opt_len and static_len are the total bit lengths of
+     * the compressed block data, excluding the tree representations.
+     */
+
+    /* Build the bit length tree for the above two trees, and get the index
+     * in bl_order of the last bit length code to send.
+     */
+    max_blindex = build_bl_tree(s);
+
+    /* Determine the best encoding. Compute the block lengths in bytes. */
+    opt_lenb = (s.opt_len+3+7) >>> 3;
+    static_lenb = (s.static_len+3+7) >>> 3;
+
+    // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
+    //        opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
+    //        s->last_lit));
+
+    if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }
+
+  } else {
+    // Assert(buf != (char*)0, "lost buf");
+    opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
+  }
+
+  if ((stored_len+4 <= opt_lenb) && (buf !== -1)) {
+    /* 4: two words for the lengths */
+
+    /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
+     * Otherwise we can't have processed more than WSIZE input bytes since
+     * the last block flush, because compression would have been
+     * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
+     * transform a block into a stored block.
+     */
+    _tr_stored_block(s, buf, stored_len, last);
+
+  } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {
+
+    send_bits(s, (STATIC_TREES<<1) + (last ? 1 : 0), 3);
+    compress_block(s, static_ltree, static_dtree);
+
+  } else {
+    send_bits(s, (DYN_TREES<<1) + (last ? 1 : 0), 3);
+    send_all_trees(s, s.l_desc.max_code+1, s.d_desc.max_code+1, max_blindex+1);
+    compress_block(s, s.dyn_ltree, s.dyn_dtree);
+  }
+  // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
+  /* The above check is made mod 2^32, for files larger than 512 MB
+   * and uLong implemented on 32 bits.
+   */
+  init_block(s);
+
+  if (last) {
+    bi_windup(s);
+  }
+  // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
+  //       s->compressed_len-7*last));
+}
+
+/* ===========================================================================
+ * Save the match info and tally the frequency counts. Return true if
+ * the current block must be flushed.
+ */
+function _tr_tally(s, dist, lc)
+//    deflate_state *s;
+//    unsigned dist;  /* distance of matched string */
+//    unsigned lc;    /* match length-MIN_MATCH or unmatched char (if dist==0) */
+{
+  //var out_length, in_length, dcode;
+
+  s.pending_buf[s.d_buf + s.last_lit * 2]     = (dist >>> 8) & 0xff;
+  s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
+
+  s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
+  s.last_lit++;
+
+  if (dist === 0) {
+    /* lc is the unmatched char */
+    s.dyn_ltree[lc*2]/*.Freq*/++;
+  } else {
+    s.matches++;
+    /* Here, lc is the match length - MIN_MATCH */
+    dist--;             /* dist = match distance - 1 */
+    //Assert((ush)dist < (ush)MAX_DIST(s) &&
+    //       (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
+    //       (ush)d_code(dist) < (ush)D_CODES,  "_tr_tally: bad match");
+
+    s.dyn_ltree[(_length_code[lc]+LITERALS+1) * 2]/*.Freq*/++;
+    s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
+  }
+
+// (!) This block is disabled in zlib defailts,
+// don't enable it for binary compatibility
+
+//#ifdef TRUNCATE_BLOCK
+//  /* Try to guess if it is profitable to stop the current block here */
+//  if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
+//    /* Compute an upper bound for the compressed length */
+//    out_length = s.last_lit*8;
+//    in_length = s.strstart - s.block_start;
+//
+//    for (dcode = 0; dcode < D_CODES; dcode++) {
+//      out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
+//    }
+//    out_length >>>= 3;
+//    //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
+//    //       s->last_lit, in_length, out_length,
+//    //       100L - out_length*100L/in_length));
+//    if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
+//      return true;
+//    }
+//  }
+//#endif
+
+  return (s.last_lit === s.lit_bufsize-1);
+  /* We avoid equality with lit_bufsize because of wraparound at 64K
+   * on 16 bit machines and because stored blocks are restricted to
+   * 64K-1 bytes.
+   */
+}
+
+exports._tr_init  = _tr_init;
+exports._tr_stored_block = _tr_stored_block;
+exports._tr_flush_block  = _tr_flush_block;
+exports._tr_tally = _tr_tally;
+exports._tr_align = _tr_align;
+},{"../utils/common":27}],39:[function(_dereq_,module,exports){
+'use strict';
+
+
+function ZStream() {
+  /* next input byte */
+  this.input = null; // JS specific, because we have no pointers
+  this.next_in = 0;
+  /* number of bytes available at input */
+  this.avail_in = 0;
+  /* total number of input bytes read so far */
+  this.total_in = 0;
+  /* next output byte should be put there */
+  this.output = null; // JS specific, because we have no pointers
+  this.next_out = 0;
+  /* remaining free space at output */
+  this.avail_out = 0;
+  /* total number of bytes output so far */
+  this.total_out = 0;
+  /* last error message, NULL if no error */
+  this.msg = ''/*Z_NULL*/;
+  /* not visible by applications */
+  this.state = null;
+  /* best guess about the data type: binary or text */
+  this.data_type = 2/*Z_UNKNOWN*/;
+  /* adler32 value of the uncompressed data */
+  this.adler = 0;
+}
+
+module.exports = ZStream;
+},{}]},{},[9])
+(9)
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/jquery/jszip/dist/jszip.min.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,14 @@
+/*!
+
+JSZip - A Javascript class for generating and reading zip files
+<http://stuartk.com/jszip>
+
+(c) 2009-2014 Stuart Knightley <stuart [at] stuartk.com>
+Dual licenced under the MIT license or GPLv3. See https://raw.github.com/Stuk/jszip/master/LICENSE.markdown.
+
+JSZip uses the library pako released under the MIT license :
+https://github.com/nodeca/pako/blob/master/LICENSE
+*/
+!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;"undefined"!=typeof window?b=window:"undefined"!=typeof global?b=global:"undefined"!=typeof self&&(b=self),b.JSZip=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=c[g]={exports:{}};b[g][0].call(j.exports,function(a){var c=b[g][1][a];return e(c?c:a)},j,j.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){"use strict";var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(a){for(var b,c,e,f,g,h,i,j="",k=0;k<a.length;)b=a.charCodeAt(k++),c=a.charCodeAt(k++),e=a.charCodeAt(k++),f=b>>2,g=(3&b)<<4|c>>4,h=(15&c)<<2|e>>6,i=63&e,isNaN(c)?h=i=64:isNaN(e)&&(i=64),j=j+d.charAt(f)+d.charAt(g)+d.charAt(h)+d.charAt(i);return j},c.decode=function(a){var b,c,e,f,g,h,i,j="",k=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");k<a.length;)f=d.indexOf(a.charAt(k++)),g=d.indexOf(a.charAt(k++)),h=d.indexOf(a.charAt(k++)),i=d.indexOf(a.charAt(k++)),b=f<<2|g>>4,c=(15&g)<<4|h>>2,e=(3&h)<<6|i,j+=String.fromCharCode(b),64!=h&&(j+=String.fromCharCode(c)),64!=i&&(j+=String.fromCharCode(e));return j}},{}],2:[function(a,b){"use strict";function c(){this.compressedSize=0,this.uncompressedSize=0,this.crc32=0,this.compressionMethod=null,this.compressedContent=null}c.prototype={getContent:function(){return null},getCompressedContent:function(){return null}},b.exports=c},{}],3:[function(a,b,c){"use strict";c.STORE={magic:"\x00\x00",compress:function(a){return a},uncompress:function(a){return a},compressInputType:null,uncompressInputType:null},c.DEFLATE=a("./flate")},{"./flate":8}],4:[function(a,b){"use strict";var c=a("./utils"),d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];b.exports=function(a,b){if("undefined"==typeof a||!a.length)return 0;var e="string"!==c.getTypeOf(a);"undefined"==typeof b&&(b=0);var f=0,g=0,h=0;b=-1^b;for(var i=0,j=a.length;j>i;i++)h=e?a[i]:a.charCodeAt(i),g=255&(b^h),f=d[g],b=b>>>8^f;return-1^b}},{"./utils":21}],5:[function(a,b){"use strict";function c(){this.data=null,this.length=0,this.index=0}var d=a("./utils");c.prototype={checkOffset:function(a){this.checkIndex(this.index+a)},checkIndex:function(a){if(this.length<a||0>a)throw new Error("End of data reached (data length = "+this.length+", asked index = "+a+"). Corrupted zip ?")},setIndex:function(a){this.checkIndex(a),this.index=a},skip:function(a){this.setIndex(this.index+a)},byteAt:function(){},readInt:function(a){var b,c=0;for(this.checkOffset(a),b=this.index+a-1;b>=this.index;b--)c=(c<<8)+this.byteAt(b);return this.index+=a,c},readString:function(a){return d.transformTo("string",this.readData(a))},readData:function(){},lastIndexOfSignature:function(){},readDate:function(){var a=this.readInt(4);return new Date((a>>25&127)+1980,(a>>21&15)-1,a>>16&31,a>>11&31,a>>5&63,(31&a)<<1)}},b.exports=c},{"./utils":21}],6:[function(a,b,c){"use strict";c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!1,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],7:[function(a,b,c){"use strict";var d=a("./utils");c.string2binary=function(a){return d.string2binary(a)},c.string2Uint8Array=function(a){return d.transformTo("uint8array",a)},c.uint8Array2String=function(a){return d.transformTo("string",a)},c.string2Blob=function(a){var b=d.transformTo("arraybuffer",a);return d.arrayBuffer2Blob(b)},c.arrayBuffer2Blob=function(a){return d.arrayBuffer2Blob(a)},c.transformTo=function(a,b){return d.transformTo(a,b)},c.getTypeOf=function(a){return d.getTypeOf(a)},c.checkSupport=function(a){return d.checkSupport(a)},c.MAX_VALUE_16BITS=d.MAX_VALUE_16BITS,c.MAX_VALUE_32BITS=d.MAX_VALUE_32BITS,c.pretty=function(a){return d.pretty(a)},c.findCompression=function(a){return d.findCompression(a)},c.isRegExp=function(a){return d.isRegExp(a)}},{"./utils":21}],8:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,e=a("pako");c.uncompressInputType=d?"uint8array":"array",c.compressInputType=d?"uint8array":"array",c.magic="\b\x00",c.compress=function(a,b){return e.deflateRaw(a,{level:b.level||-1})},c.uncompress=function(a){return e.inflateRaw(a)}},{pako:24}],9:[function(a,b){"use strict";function c(a,b){return this instanceof c?(this.files={},this.comment=null,this.root="",a&&this.load(a,b),void(this.clone=function(){var a=new c;for(var b in this)"function"!=typeof this[b]&&(a[b]=this[b]);return a})):new c(a,b)}var d=a("./base64");c.prototype=a("./object"),c.prototype.load=a("./load"),c.support=a("./support"),c.defaults=a("./defaults"),c.utils=a("./deprecatedPublicUtils"),c.base64={encode:function(a){return d.encode(a)},decode:function(a){return d.decode(a)}},c.compressions=a("./compressions"),b.exports=c},{"./base64":1,"./compressions":3,"./defaults":6,"./deprecatedPublicUtils":7,"./load":10,"./object":13,"./support":17}],10:[function(a,b){"use strict";var c=a("./base64"),d=a("./zipEntries");b.exports=function(a,b){var e,f,g,h;for(b=b||{},b.base64&&(a=c.decode(a)),f=new d(a,b),e=f.files,g=0;g<e.length;g++)h=e[g],this.file(h.fileName,h.decompressed,{binary:!0,optimizedBinaryString:!0,date:h.date,dir:h.dir,comment:h.fileComment.length?h.fileComment:null,unixPermissions:h.unixPermissions,dosPermissions:h.dosPermissions,createFolders:b.createFolders});return f.zipComment.length&&(this.comment=f.zipComment),this}},{"./base64":1,"./zipEntries":22}],11:[function(a,b){(function(a){"use strict";b.exports=function(b,c){return new a(b,c)},b.exports.test=function(b){return a.isBuffer(b)}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],12:[function(a,b){"use strict";function c(a){this.data=a,this.length=this.data.length,this.index=0}var d=a("./uint8ArrayReader");c.prototype=new d,c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./uint8ArrayReader":18}],13:[function(a,b){"use strict";var c=a("./support"),d=a("./utils"),e=a("./crc32"),f=a("./signature"),g=a("./defaults"),h=a("./base64"),i=a("./compressions"),j=a("./compressedObject"),k=a("./nodeBuffer"),l=a("./utf8"),m=a("./stringWriter"),n=a("./uint8ArrayWriter"),o=function(a){if(a._data instanceof j&&(a._data=a._data.getContent(),a.options.binary=!0,a.options.base64=!1,"uint8array"===d.getTypeOf(a._data))){var b=a._data;a._data=new Uint8Array(b.length),0!==b.length&&a._data.set(b,0)}return a._data},p=function(a){var b=o(a),e=d.getTypeOf(b);return"string"===e?!a.options.binary&&c.nodebuffer?k(b,"utf-8"):a.asBinary():b},q=function(a){var b=o(this);return null===b||"undefined"==typeof b?"":(this.options.base64&&(b=h.decode(b)),b=a&&this.options.binary?D.utf8decode(b):d.transformTo("string",b),a||this.options.binary||(b=d.transformTo("string",D.utf8encode(b))),b)},r=function(a,b,c){this.name=a,this.dir=c.dir,this.date=c.date,this.comment=c.comment,this.unixPermissions=c.unixPermissions,this.dosPermissions=c.dosPermissions,this._data=b,this.options=c,this._initialMetadata={dir:c.dir,date:c.date}};r.prototype={asText:function(){return q.call(this,!0)},asBinary:function(){return q.call(this,!1)},asNodeBuffer:function(){var a=p(this);return d.transformTo("nodebuffer",a)},asUint8Array:function(){var a=p(this);return d.transformTo("uint8array",a)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var s=function(a,b){var c,d="";for(c=0;b>c;c++)d+=String.fromCharCode(255&a),a>>>=8;return d},t=function(){var a,b,c={};for(a=0;a<arguments.length;a++)for(b in arguments[a])arguments[a].hasOwnProperty(b)&&"undefined"==typeof c[b]&&(c[b]=arguments[a][b]);return c},u=function(a){return a=a||{},a.base64!==!0||null!==a.binary&&void 0!==a.binary||(a.binary=!0),a=t(a,g),a.date=a.date||new Date,null!==a.compression&&(a.compression=a.compression.toUpperCase()),a},v=function(a,b,c){var e,f=d.getTypeOf(b);if(c=u(c),"string"==typeof c.unixPermissions&&(c.unixPermissions=parseInt(c.unixPermissions,8)),c.unixPermissions&&16384&c.unixPermissions&&(c.dir=!0),c.dosPermissions&&16&c.dosPermissions&&(c.dir=!0),c.dir&&(a=x(a)),c.createFolders&&(e=w(a))&&y.call(this,e,!0),c.dir||null===b||"undefined"==typeof b)c.base64=!1,c.binary=!1,b=null,f=null;else if("string"===f)c.binary&&!c.base64&&c.optimizedBinaryString!==!0&&(b=d.string2binary(b));else{if(c.base64=!1,c.binary=!0,!(f||b instanceof j))throw new Error("The data of '"+a+"' is in an unsupported format !");"arraybuffer"===f&&(b=d.transformTo("uint8array",b))}var g=new r(a,b,c);return this.files[a]=g,g},w=function(a){"/"==a.slice(-1)&&(a=a.substring(0,a.length-1));var b=a.lastIndexOf("/");return b>0?a.substring(0,b):""},x=function(a){return"/"!=a.slice(-1)&&(a+="/"),a},y=function(a,b){return b="undefined"!=typeof b?b:!1,a=x(a),this.files[a]||v.call(this,a,null,{dir:!0,createFolders:b}),this.files[a]},z=function(a,b,c){var f,g=new j;return a._data instanceof j?(g.uncompressedSize=a._data.uncompressedSize,g.crc32=a._data.crc32,0===g.uncompressedSize||a.dir?(b=i.STORE,g.compressedContent="",g.crc32=0):a._data.compressionMethod===b.magic?g.compressedContent=a._data.getCompressedContent():(f=a._data.getContent(),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c))):(f=p(a),(!f||0===f.length||a.dir)&&(b=i.STORE,f=""),g.uncompressedSize=f.length,g.crc32=e(f),g.compressedContent=b.compress(d.transformTo(b.compressInputType,f),c)),g.compressedSize=g.compressedContent.length,g.compressionMethod=b.magic,g},A=function(a,b){var c=a;return a||(c=b?16893:33204),(65535&c)<<16},B=function(a){return 63&(a||0)},C=function(a,b,c,g,h){var i,j,k,m,n=(c.compressedContent,d.transformTo("string",l.utf8encode(b.name))),o=b.comment||"",p=d.transformTo("string",l.utf8encode(o)),q=n.length!==b.name.length,r=p.length!==o.length,t=b.options,u="",v="",w="";k=b._initialMetadata.dir!==b.dir?b.dir:t.dir,m=b._initialMetadata.date!==b.date?b.date:t.date;var x=0,y=0;k&&(x|=16),"UNIX"===h?(y=798,x|=A(b.unixPermissions,k)):(y=20,x|=B(b.dosPermissions,k)),i=m.getHours(),i<<=6,i|=m.getMinutes(),i<<=5,i|=m.getSeconds()/2,j=m.getFullYear()-1980,j<<=4,j|=m.getMonth()+1,j<<=5,j|=m.getDate(),q&&(v=s(1,1)+s(e(n),4)+n,u+="up"+s(v.length,2)+v),r&&(w=s(1,1)+s(this.crc32(p),4)+p,u+="uc"+s(w.length,2)+w);var z="";z+="\n\x00",z+=q||r?"\x00\b":"\x00\x00",z+=c.compressionMethod,z+=s(i,2),z+=s(j,2),z+=s(c.crc32,4),z+=s(c.compressedSize,4),z+=s(c.uncompressedSize,4),z+=s(n.length,2),z+=s(u.length,2);var C=f.LOCAL_FILE_HEADER+z+n+u,D=f.CENTRAL_FILE_HEADER+s(y,2)+z+s(p.length,2)+"\x00\x00\x00\x00"+s(x,4)+s(g,4)+n+u+p;return{fileRecord:C,dirRecord:D,compressedObject:c}},D={load:function(){throw new Error("Load method is not defined. Is the file jszip-load.js included ?")},filter:function(a){var b,c,d,e,f=[];for(b in this.files)this.files.hasOwnProperty(b)&&(d=this.files[b],e=new r(d.name,d._data,t(d.options)),c=b.slice(this.root.length,b.length),b.slice(0,this.root.length)===this.root&&a(c,e)&&f.push(e));return f},file:function(a,b,c){if(1===arguments.length){if(d.isRegExp(a)){var e=a;return this.filter(function(a,b){return!b.dir&&e.test(a)})}return this.filter(function(b,c){return!c.dir&&b===a})[0]||null}return a=this.root+a,v.call(this,a,b,c),this},folder:function(a){if(!a)return this;if(d.isRegExp(a))return this.filter(function(b,c){return c.dir&&a.test(b)});var b=this.root+a,c=y.call(this,b),e=this.clone();return e.root=c.name,e},remove:function(a){a=this.root+a;var b=this.files[a];if(b||("/"!=a.slice(-1)&&(a+="/"),b=this.files[a]),b&&!b.dir)delete this.files[a];else for(var c=this.filter(function(b,c){return c.name.slice(0,a.length)===a}),d=0;d<c.length;d++)delete this.files[c[d].name];return this},generate:function(a){a=t(a||{},{base64:!0,compression:"STORE",compressionOptions:null,type:"base64",platform:"DOS",comment:null,mimeType:"application/zip"}),d.checkSupport(a.type),("darwin"===a.platform||"freebsd"===a.platform||"linux"===a.platform||"sunos"===a.platform)&&(a.platform="UNIX"),"win32"===a.platform&&(a.platform="DOS");var b,c,e=[],g=0,j=0,k=d.transformTo("string",this.utf8encode(a.comment||this.comment||""));for(var l in this.files)if(this.files.hasOwnProperty(l)){var o=this.files[l],p=o.options.compression||a.compression.toUpperCase(),q=i[p];if(!q)throw new Error(p+" is not a valid compression method !");var r=o.options.compressionOptions||a.compressionOptions||{},u=z.call(this,o,q,r),v=C.call(this,l,o,u,g,a.platform);g+=v.fileRecord.length+u.compressedSize,j+=v.dirRecord.length,e.push(v)}var w="";w=f.CENTRAL_DIRECTORY_END+"\x00\x00\x00\x00"+s(e.length,2)+s(e.length,2)+s(j,4)+s(g,4)+s(k.length,2)+k;var x=a.type.toLowerCase();for(b="uint8array"===x||"arraybuffer"===x||"blob"===x||"nodebuffer"===x?new n(g+j+w.length):new m(g+j+w.length),c=0;c<e.length;c++)b.append(e[c].fileRecord),b.append(e[c].compressedObject.compressedContent);for(c=0;c<e.length;c++)b.append(e[c].dirRecord);b.append(w);var y=b.finalize();switch(a.type.toLowerCase()){case"uint8array":case"arraybuffer":case"nodebuffer":return d.transformTo(a.type.toLowerCase(),y);case"blob":return d.arrayBuffer2Blob(d.transformTo("arraybuffer",y),a.mimeType);case"base64":return a.base64?h.encode(y):y;default:return y}},crc32:function(a,b){return e(a,b)},utf8encode:function(a){return d.transformTo("string",l.utf8encode(a))},utf8decode:function(a){return l.utf8decode(a)}};b.exports=D},{"./base64":1,"./compressedObject":2,"./compressions":3,"./crc32":4,"./defaults":6,"./nodeBuffer":11,"./signature":14,"./stringWriter":16,"./support":17,"./uint8ArrayWriter":19,"./utf8":20,"./utils":21}],14:[function(a,b,c){"use strict";c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\b"},{}],15:[function(a,b){"use strict";function c(a,b){this.data=a,b||(this.data=e.string2binary(this.data)),this.length=this.data.length,this.index=0}var d=a("./dataReader"),e=a("./utils");c.prototype=new d,c.prototype.byteAt=function(a){return this.data.charCodeAt(a)},c.prototype.lastIndexOfSignature=function(a){return this.data.lastIndexOf(a)},c.prototype.readData=function(a){this.checkOffset(a);var b=this.data.slice(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5,"./utils":21}],16:[function(a,b){"use strict";var c=a("./utils"),d=function(){this.data=[]};d.prototype={append:function(a){a=c.transformTo("string",a),this.data.push(a)},finalize:function(){return this.data.join("")}},b.exports=d},{"./utils":21}],17:[function(a,b,c){(function(a){"use strict";if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,c.nodebuffer="undefined"!=typeof a,c.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)c.blob=!1;else{var b=new ArrayBuffer(0);try{c.blob=0===new Blob([b],{type:"application/zip"}).size}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;f.append(b),c.blob=0===f.getBlob("application/zip").size}catch(d){c.blob=!1}}}}).call(this,"undefined"!=typeof Buffer?Buffer:void 0)},{}],18:[function(a,b){"use strict";function c(a){a&&(this.data=a,this.length=this.data.length,this.index=0)}var d=a("./dataReader");c.prototype=new d,c.prototype.byteAt=function(a){return this.data[a]},c.prototype.lastIndexOfSignature=function(a){for(var b=a.charCodeAt(0),c=a.charCodeAt(1),d=a.charCodeAt(2),e=a.charCodeAt(3),f=this.length-4;f>=0;--f)if(this.data[f]===b&&this.data[f+1]===c&&this.data[f+2]===d&&this.data[f+3]===e)return f;return-1},c.prototype.readData=function(a){if(this.checkOffset(a),0===a)return new Uint8Array(0);var b=this.data.subarray(this.index,this.index+a);return this.index+=a,b},b.exports=c},{"./dataReader":5}],19:[function(a,b){"use strict";var c=a("./utils"),d=function(a){this.data=new Uint8Array(a),this.index=0};d.prototype={append:function(a){0!==a.length&&(a=c.transformTo("uint8array",a),this.data.set(a,this.index),this.index+=a.length)},finalize:function(){return this.data}},b.exports=d},{"./utils":21}],20:[function(a,b,c){"use strict";for(var d=a("./utils"),e=a("./support"),f=a("./nodeBuffer"),g=new Array(256),h=0;256>h;h++)g[h]=h>=252?6:h>=248?5:h>=240?4:h>=224?3:h>=192?2:1;g[254]=g[254]=1;var i=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=e.uint8array?new Uint8Array(i):new Array(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},j=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+g[a[c]]>b?c:b},k=function(a){var b,c,e,f,h=a.length,i=new Array(2*h);for(c=0,b=0;h>b;)if(e=a[b++],128>e)i[c++]=e;else if(f=g[e],f>4)i[c++]=65533,b+=f-1;else{for(e&=2===f?31:3===f?15:7;f>1&&h>b;)e=e<<6|63&a[b++],f--;f>1?i[c++]=65533:65536>e?i[c++]=e:(e-=65536,i[c++]=55296|e>>10&1023,i[c++]=56320|1023&e)}return i.length!==c&&(i.subarray?i=i.subarray(0,c):i.length=c),d.applyFromCharCode(i)};c.utf8encode=function(a){return e.nodebuffer?f(a,"utf-8"):i(a)},c.utf8decode=function(a){if(e.nodebuffer)return d.transformTo("nodebuffer",a).toString("utf-8");a=d.transformTo(e.uint8array?"uint8array":"array",a);for(var b=[],c=0,f=a.length,g=65536;f>c;){var h=j(a,Math.min(c+g,f));b.push(e.uint8array?k(a.subarray(c,h)):k(a.slice(c,h))),c=h}return b.join("")}},{"./nodeBuffer":11,"./support":17,"./utils":21}],21:[function(a,b,c){"use strict";function d(a){return a}function e(a,b){for(var c=0;c<a.length;++c)b[c]=255&a.charCodeAt(c);return b}function f(a){var b=65536,d=[],e=a.length,f=c.getTypeOf(a),g=0,h=!0;try{switch(f){case"uint8array":String.fromCharCode.apply(null,new Uint8Array(0));break;case"nodebuffer":String.fromCharCode.apply(null,j(0))}}catch(i){h=!1}if(!h){for(var k="",l=0;l<a.length;l++)k+=String.fromCharCode(a[l]);return k}for(;e>g&&b>1;)try{d.push("array"===f||"nodebuffer"===f?String.fromCharCode.apply(null,a.slice(g,Math.min(g+b,e))):String.fromCharCode.apply(null,a.subarray(g,Math.min(g+b,e)))),g+=b}catch(i){b=Math.floor(b/2)}return d.join("")}function g(a,b){for(var c=0;c<a.length;c++)b[c]=a[c];return b}var h=a("./support"),i=a("./compressions"),j=a("./nodeBuffer");c.string2binary=function(a){for(var b="",c=0;c<a.length;c++)b+=String.fromCharCode(255&a.charCodeAt(c));return b},c.arrayBuffer2Blob=function(a,b){c.checkSupport("blob"),b=b||"application/zip";try{return new Blob([a],{type:b})}catch(d){try{var e=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,f=new e;return f.append(a),f.getBlob(b)}catch(d){throw new Error("Bug : can't construct the Blob.")}}},c.applyFromCharCode=f;var k={};k.string={string:d,array:function(a){return e(a,new Array(a.length))},arraybuffer:function(a){return k.string.uint8array(a).buffer},uint8array:function(a){return e(a,new Uint8Array(a.length))},nodebuffer:function(a){return e(a,j(a.length))}},k.array={string:f,array:d,arraybuffer:function(a){return new Uint8Array(a).buffer},uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(a)}},k.arraybuffer={string:function(a){return f(new Uint8Array(a))},array:function(a){return g(new Uint8Array(a),new Array(a.byteLength))},arraybuffer:d,uint8array:function(a){return new Uint8Array(a)},nodebuffer:function(a){return j(new Uint8Array(a))}},k.uint8array={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return a.buffer},uint8array:d,nodebuffer:function(a){return j(a)}},k.nodebuffer={string:f,array:function(a){return g(a,new Array(a.length))},arraybuffer:function(a){return k.nodebuffer.uint8array(a).buffer},uint8array:function(a){return g(a,new Uint8Array(a.length))},nodebuffer:d},c.transformTo=function(a,b){if(b||(b=""),!a)return b;c.checkSupport(a);var d=c.getTypeOf(b),e=k[d][a](b);return e},c.getTypeOf=function(a){return"string"==typeof a?"string":"[object Array]"===Object.prototype.toString.call(a)?"array":h.nodebuffer&&j.test(a)?"nodebuffer":h.uint8array&&a instanceof Uint8Array?"uint8array":h.arraybuffer&&a instanceof ArrayBuffer?"arraybuffer":void 0},c.checkSupport=function(a){var b=h[a.toLowerCase()];if(!b)throw new Error(a+" is not supported by this browser")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(a){var b,c,d="";for(c=0;c<(a||"").length;c++)b=a.charCodeAt(c),d+="\\x"+(16>b?"0":"")+b.toString(16).toUpperCase();return d},c.findCompression=function(a){for(var b in i)if(i.hasOwnProperty(b)&&i[b].magic===a)return i[b];return null},c.isRegExp=function(a){return"[object RegExp]"===Object.prototype.toString.call(a)}},{"./compressions":3,"./nodeBuffer":11,"./support":17}],22:[function(a,b){"use strict";function c(a,b){this.files=[],this.loadOptions=b,a&&this.load(a)}var d=a("./stringReader"),e=a("./nodeBufferReader"),f=a("./uint8ArrayReader"),g=a("./utils"),h=a("./signature"),i=a("./zipEntry"),j=a("./support"),k=a("./object");c.prototype={checkSignature:function(a){var b=this.reader.readString(4);if(b!==a)throw new Error("Corrupted zip or bug : unexpected signature ("+g.pretty(b)+", expected "+g.pretty(a)+")")},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2),this.zipComment=this.reader.readString(this.zipCommentLength),this.zipComment=k.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.versionMadeBy=this.reader.readString(2),this.versionNeeded=this.reader.readInt(2),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var a,b,c,d=this.zip64EndOfCentralSize-44,e=0;d>e;)a=this.reader.readInt(2),b=this.reader.readInt(4),c=this.reader.readString(b),this.zip64ExtensibleData[a]={id:a,length:b,value:c}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),this.disksCount>1)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var a,b;for(a=0;a<this.files.length;a++)b=this.files[a],this.reader.setIndex(b.localHeaderOffset),this.checkSignature(h.LOCAL_FILE_HEADER),b.readLocalPart(this.reader),b.handleUTF8(),b.processAttributes()},readCentralDir:function(){var a;for(this.reader.setIndex(this.centralDirOffset);this.reader.readString(4)===h.CENTRAL_FILE_HEADER;)a=new i({zip64:this.zip64},this.loadOptions),a.readCentralPart(this.reader),this.files.push(a)},readEndOfCentral:function(){var a=this.reader.lastIndexOfSignature(h.CENTRAL_DIRECTORY_END);if(-1===a){var b=!0;try{this.reader.setIndex(0),this.checkSignature(h.LOCAL_FILE_HEADER),b=!1}catch(c){}throw new Error(b?"Can't find end of central directory : is this a zip file ? If it is, see http://stuk.github.io/jszip/documentation/howto/read_zip.html":"Corrupted zip : can't find end of central directory")}if(this.reader.setIndex(a),this.checkSignature(h.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===g.MAX_VALUE_16BITS||this.diskWithCentralDirStart===g.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===g.MAX_VALUE_16BITS||this.centralDirRecords===g.MAX_VALUE_16BITS||this.centralDirSize===g.MAX_VALUE_32BITS||this.centralDirOffset===g.MAX_VALUE_32BITS){if(this.zip64=!0,a=this.reader.lastIndexOfSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),-1===a)throw new Error("Corrupted zip : can't find the ZIP64 end of central directory locator");this.reader.setIndex(a),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(h.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}},prepareReader:function(a){var b=g.getTypeOf(a);this.reader="string"!==b||j.uint8array?"nodebuffer"===b?new e(a):new f(g.transformTo("uint8array",a)):new d(a,this.loadOptions.optimizedBinaryString)},load:function(a){this.prepareReader(a),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},b.exports=c},{"./nodeBufferReader":12,"./object":13,"./signature":14,"./stringReader":15,"./support":17,"./uint8ArrayReader":18,"./utils":21,"./zipEntry":23}],23:[function(a,b){"use strict";function c(a,b){this.options=a,this.loadOptions=b}var d=a("./stringReader"),e=a("./utils"),f=a("./compressedObject"),g=a("./object"),h=0,i=3;c.prototype={isEncrypted:function(){return 1===(1&this.bitFlag)},useUTF8:function(){return 2048===(2048&this.bitFlag)},prepareCompressedContent:function(a,b,c){return function(){var d=a.index;a.setIndex(b);var e=a.readData(c);return a.setIndex(d),e}},prepareContent:function(a,b,c,d,f){return function(){var a=e.transformTo(d.uncompressInputType,this.getCompressedContent()),b=d.uncompress(a);if(b.length!==f)throw new Error("Bug : uncompressed data size mismatch");return b}},readLocalPart:function(a){var b,c;if(a.skip(22),this.fileNameLength=a.readInt(2),c=a.readInt(2),this.fileName=a.readString(this.fileNameLength),a.skip(c),-1==this.compressedSize||-1==this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough informations from the central directory (compressedSize == -1 || uncompressedSize == -1)");if(b=e.findCompression(this.compressionMethod),null===b)throw new Error("Corrupted zip : compression "+e.pretty(this.compressionMethod)+" unknown (inner file : "+this.fileName+")");if(this.decompressed=new f,this.decompressed.compressedSize=this.compressedSize,this.decompressed.uncompressedSize=this.uncompressedSize,this.decompressed.crc32=this.crc32,this.decompressed.compressionMethod=this.compressionMethod,this.decompressed.getCompressedContent=this.prepareCompressedContent(a,a.index,this.compressedSize,b),this.decompressed.getContent=this.prepareContent(a,a.index,this.compressedSize,b,this.uncompressedSize),this.loadOptions.checkCRC32&&(this.decompressed=e.transformTo("string",this.decompressed.getContent()),g.crc32(this.decompressed)!==this.crc32))throw new Error("Corrupted zip : CRC32 mismatch")},readCentralPart:function(a){if(this.versionMadeBy=a.readInt(2),this.versionNeeded=a.readInt(2),this.bitFlag=a.readInt(2),this.compressionMethod=a.readString(2),this.date=a.readDate(),this.crc32=a.readInt(4),this.compressedSize=a.readInt(4),this.uncompressedSize=a.readInt(4),this.fileNameLength=a.readInt(2),this.extraFieldsLength=a.readInt(2),this.fileCommentLength=a.readInt(2),this.diskNumberStart=a.readInt(2),this.internalFileAttributes=a.readInt(2),this.externalFileAttributes=a.readInt(4),this.localHeaderOffset=a.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");this.fileName=a.readString(this.fileNameLength),this.readExtraFields(a),this.parseZIP64ExtraField(a),this.fileComment=a.readString(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var a=this.versionMadeBy>>8;this.dir=16&this.externalFileAttributes?!0:!1,a===h&&(this.dosPermissions=63&this.externalFileAttributes),a===i&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileName.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var a=new d(this.extraFields[1].value);this.uncompressedSize===e.MAX_VALUE_32BITS&&(this.uncompressedSize=a.readInt(8)),this.compressedSize===e.MAX_VALUE_32BITS&&(this.compressedSize=a.readInt(8)),this.localHeaderOffset===e.MAX_VALUE_32BITS&&(this.localHeaderOffset=a.readInt(8)),this.diskNumberStart===e.MAX_VALUE_32BITS&&(this.diskNumberStart=a.readInt(4))}},readExtraFields:function(a){var b,c,d,e=a.index;for(this.extraFields=this.extraFields||{};a.index<e+this.extraFieldsLength;)b=a.readInt(2),c=a.readInt(2),d=a.readString(c),this.extraFields[b]={id:b,length:c,value:d}},handleUTF8:function(){if(this.useUTF8())this.fileName=g.utf8decode(this.fileName),this.fileComment=g.utf8decode(this.fileComment);else{var a=this.findExtraFieldUnicodePath();null!==a&&(this.fileName=a);var b=this.findExtraFieldUnicodeComment();null!==b&&(this.fileComment=b)}},findExtraFieldUnicodePath:function(){var a=this.extraFields[28789];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileName)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))
+}return null},findExtraFieldUnicodeComment:function(){var a=this.extraFields[25461];if(a){var b=new d(a.value);return 1!==b.readInt(1)?null:g.crc32(this.fileComment)!==b.readInt(4)?null:g.utf8decode(b.readString(a.length-5))}return null}},b.exports=c},{"./compressedObject":2,"./object":13,"./stringReader":15,"./utils":21}],24:[function(a,b){"use strict";var c=a("./lib/utils/common").assign,d=a("./lib/deflate"),e=a("./lib/inflate"),f=a("./lib/zlib/constants"),g={};c(g,d,e,f),b.exports=g},{"./lib/deflate":25,"./lib/inflate":26,"./lib/utils/common":27,"./lib/zlib/constants":30}],25:[function(a,b,c){"use strict";function d(a,b){var c=new s(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}function f(a,b){return b=b||{},b.gzip=!0,d(a,b)}var g=a("./zlib/deflate.js"),h=a("./utils/common"),i=a("./utils/strings"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=0,m=4,n=0,o=1,p=-1,q=0,r=8,s=function(a){this.options=h.assign({level:p,method:r,chunkSize:16384,windowBits:15,memLevel:8,strategy:q,to:""},a||{});var b=this.options;b.raw&&b.windowBits>0?b.windowBits=-b.windowBits:b.gzip&&b.windowBits>0&&b.windowBits<16&&(b.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=g.deflateInit2(this.strm,b.level,b.method,b.windowBits,b.memLevel,b.strategy);if(c!==n)throw new Error(j[c]);b.header&&g.deflateSetHeader(this.strm,b.header)};s.prototype.push=function(a,b){var c,d,e=this.strm,f=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?m:l,e.input="string"==typeof a?i.string2buf(a):a,e.next_in=0,e.avail_in=e.input.length;do{if(0===e.avail_out&&(e.output=new h.Buf8(f),e.next_out=0,e.avail_out=f),c=g.deflate(e,d),c!==o&&c!==n)return this.onEnd(c),this.ended=!0,!1;(0===e.avail_out||0===e.avail_in&&d===m)&&this.onData("string"===this.options.to?i.buf2binstring(h.shrinkBuf(e.output,e.next_out)):h.shrinkBuf(e.output,e.next_out))}while((e.avail_in>0||0===e.avail_out)&&c!==o);return d===m?(c=g.deflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===n):!0},s.prototype.onData=function(a){this.chunks.push(a)},s.prototype.onEnd=function(a){a===n&&(this.result="string"===this.options.to?this.chunks.join(""):h.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Deflate=s,c.deflate=d,c.deflateRaw=e,c.gzip=f},{"./utils/common":27,"./utils/strings":28,"./zlib/deflate.js":32,"./zlib/messages":37,"./zlib/zstream":39}],26:[function(a,b,c){"use strict";function d(a,b){var c=new m(b);if(c.push(a,!0),c.err)throw c.msg;return c.result}function e(a,b){return b=b||{},b.raw=!0,d(a,b)}var f=a("./zlib/inflate.js"),g=a("./utils/common"),h=a("./utils/strings"),i=a("./zlib/constants"),j=a("./zlib/messages"),k=a("./zlib/zstream"),l=a("./zlib/gzheader"),m=function(a){this.options=g.assign({chunkSize:16384,windowBits:0,to:""},a||{});var b=this.options;b.raw&&b.windowBits>=0&&b.windowBits<16&&(b.windowBits=-b.windowBits,0===b.windowBits&&(b.windowBits=-15)),!(b.windowBits>=0&&b.windowBits<16)||a&&a.windowBits||(b.windowBits+=32),b.windowBits>15&&b.windowBits<48&&0===(15&b.windowBits)&&(b.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new k,this.strm.avail_out=0;var c=f.inflateInit2(this.strm,b.windowBits);if(c!==i.Z_OK)throw new Error(j[c]);this.header=new l,f.inflateGetHeader(this.strm,this.header)};m.prototype.push=function(a,b){var c,d,e,j,k,l=this.strm,m=this.options.chunkSize;if(this.ended)return!1;d=b===~~b?b:b===!0?i.Z_FINISH:i.Z_NO_FLUSH,l.input="string"==typeof a?h.binstring2buf(a):a,l.next_in=0,l.avail_in=l.input.length;do{if(0===l.avail_out&&(l.output=new g.Buf8(m),l.next_out=0,l.avail_out=m),c=f.inflate(l,i.Z_NO_FLUSH),c!==i.Z_STREAM_END&&c!==i.Z_OK)return this.onEnd(c),this.ended=!0,!1;l.next_out&&(0===l.avail_out||c===i.Z_STREAM_END||0===l.avail_in&&d===i.Z_FINISH)&&("string"===this.options.to?(e=h.utf8border(l.output,l.next_out),j=l.next_out-e,k=h.buf2string(l.output,e),l.next_out=j,l.avail_out=m-j,j&&g.arraySet(l.output,l.output,e,j,0),this.onData(k)):this.onData(g.shrinkBuf(l.output,l.next_out)))}while(l.avail_in>0&&c!==i.Z_STREAM_END);return c===i.Z_STREAM_END&&(d=i.Z_FINISH),d===i.Z_FINISH?(c=f.inflateEnd(this.strm),this.onEnd(c),this.ended=!0,c===i.Z_OK):!0},m.prototype.onData=function(a){this.chunks.push(a)},m.prototype.onEnd=function(a){a===i.Z_OK&&(this.result="string"===this.options.to?this.chunks.join(""):g.flattenChunks(this.chunks)),this.chunks=[],this.err=a,this.msg=this.strm.msg},c.Inflate=m,c.inflate=d,c.inflateRaw=e,c.ungzip=d},{"./utils/common":27,"./utils/strings":28,"./zlib/constants":30,"./zlib/gzheader":33,"./zlib/inflate.js":35,"./zlib/messages":37,"./zlib/zstream":39}],27:[function(a,b,c){"use strict";var d="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;c.assign=function(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError(c+"must be non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a},c.shrinkBuf=function(a,b){return a.length===b?a:a.subarray?a.subarray(0,b):(a.length=b,a)};var e={arraySet:function(a,b,c,d,e){if(b.subarray&&a.subarray)return void a.set(b.subarray(c,c+d),e);for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){var b,c,d,e,f,g;for(d=0,b=0,c=a.length;c>b;b++)d+=a[b].length;for(g=new Uint8Array(d),e=0,b=0,c=a.length;c>b;b++)f=a[b],g.set(f,e),e+=f.length;return g}},f={arraySet:function(a,b,c,d,e){for(var f=0;d>f;f++)a[e+f]=b[c+f]},flattenChunks:function(a){return[].concat.apply([],a)}};c.setTyped=function(a){a?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,e)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,f))},c.setTyped(d)},{}],28:[function(a,b,c){"use strict";function d(a,b){if(65537>b&&(a.subarray&&g||!a.subarray&&f))return String.fromCharCode.apply(null,e.shrinkBuf(a,b));for(var c="",d=0;b>d;d++)c+=String.fromCharCode(a[d]);return c}var e=a("./common"),f=!0,g=!0;try{String.fromCharCode.apply(null,[0])}catch(h){f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(h){g=!1}for(var i=new e.Buf8(256),j=0;256>j;j++)i[j]=j>=252?6:j>=248?5:j>=240?4:j>=224?3:j>=192?2:1;i[254]=i[254]=1,c.string2buf=function(a){var b,c,d,f,g,h=a.length,i=0;for(f=0;h>f;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),i+=128>c?1:2048>c?2:65536>c?3:4;for(b=new e.Buf8(i),g=0,f=0;i>g;f++)c=a.charCodeAt(f),55296===(64512&c)&&h>f+1&&(d=a.charCodeAt(f+1),56320===(64512&d)&&(c=65536+(c-55296<<10)+(d-56320),f++)),128>c?b[g++]=c:2048>c?(b[g++]=192|c>>>6,b[g++]=128|63&c):65536>c?(b[g++]=224|c>>>12,b[g++]=128|c>>>6&63,b[g++]=128|63&c):(b[g++]=240|c>>>18,b[g++]=128|c>>>12&63,b[g++]=128|c>>>6&63,b[g++]=128|63&c);return b},c.buf2binstring=function(a){return d(a,a.length)},c.binstring2buf=function(a){for(var b=new e.Buf8(a.length),c=0,d=b.length;d>c;c++)b[c]=a.charCodeAt(c);return b},c.buf2string=function(a,b){var c,e,f,g,h=b||a.length,j=new Array(2*h);for(e=0,c=0;h>c;)if(f=a[c++],128>f)j[e++]=f;else if(g=i[f],g>4)j[e++]=65533,c+=g-1;else{for(f&=2===g?31:3===g?15:7;g>1&&h>c;)f=f<<6|63&a[c++],g--;g>1?j[e++]=65533:65536>f?j[e++]=f:(f-=65536,j[e++]=55296|f>>10&1023,j[e++]=56320|1023&f)}return d(j,e)},c.utf8border=function(a,b){var c;for(b=b||a.length,b>a.length&&(b=a.length),c=b-1;c>=0&&128===(192&a[c]);)c--;return 0>c?b:0===c?b:c+i[a[c]]>b?c:b}},{"./common":27}],29:[function(a,b){"use strict";function c(a,b,c,d){for(var e=65535&a|0,f=a>>>16&65535|0,g=0;0!==c;){g=c>2e3?2e3:c,c-=g;do e=e+b[d++]|0,f=f+e|0;while(--g);e%=65521,f%=65521}return e|f<<16|0}b.exports=c},{}],30:[function(a,b){b.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(a,b){"use strict";function c(){for(var a,b=[],c=0;256>c;c++){a=c;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;b[c]=a}return b}function d(a,b,c,d){var f=e,g=d+c;a=-1^a;for(var h=d;g>h;h++)a=a>>>8^f[255&(a^b[h])];return-1^a}var e=c();b.exports=d},{}],32:[function(a,b,c){"use strict";function d(a,b){return a.msg=G[b],b}function e(a){return(a<<1)-(a>4?9:0)}function f(a){for(var b=a.length;--b>=0;)a[b]=0}function g(a){var b=a.state,c=b.pending;c>a.avail_out&&(c=a.avail_out),0!==c&&(C.arraySet(a.output,b.pending_buf,b.pending_out,c,a.next_out),a.next_out+=c,b.pending_out+=c,a.total_out+=c,a.avail_out-=c,b.pending-=c,0===b.pending&&(b.pending_out=0))}function h(a,b){D._tr_flush_block(a,a.block_start>=0?a.block_start:-1,a.strstart-a.block_start,b),a.block_start=a.strstart,g(a.strm)}function i(a,b){a.pending_buf[a.pending++]=b}function j(a,b){a.pending_buf[a.pending++]=b>>>8&255,a.pending_buf[a.pending++]=255&b}function k(a,b,c,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,C.arraySet(b,a.input,a.next_in,e,c),1===a.state.wrap?a.adler=E(a.adler,b,e,c):2===a.state.wrap&&(a.adler=F(a.adler,b,e,c)),a.next_in+=e,a.total_in+=e,e)}function l(a,b){var c,d,e=a.max_chain_length,f=a.strstart,g=a.prev_length,h=a.nice_match,i=a.strstart>a.w_size-jb?a.strstart-(a.w_size-jb):0,j=a.window,k=a.w_mask,l=a.prev,m=a.strstart+ib,n=j[f+g-1],o=j[f+g];a.prev_length>=a.good_match&&(e>>=2),h>a.lookahead&&(h=a.lookahead);do if(c=b,j[c+g]===o&&j[c+g-1]===n&&j[c]===j[f]&&j[++c]===j[f+1]){f+=2,c++;do;while(j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&j[++f]===j[++c]&&m>f);if(d=ib-(m-f),f=m-ib,d>g){if(a.match_start=b,g=d,d>=h)break;n=j[f+g-1],o=j[f+g]}}while((b=l[b&k])>i&&0!==--e);return g<=a.lookahead?g:a.lookahead}function m(a){var b,c,d,e,f,g=a.w_size;do{if(e=a.window_size-a.lookahead-a.strstart,a.strstart>=g+(g-jb)){C.arraySet(a.window,a.window,g,g,0),a.match_start-=g,a.strstart-=g,a.block_start-=g,c=a.hash_size,b=c;do d=a.head[--b],a.head[b]=d>=g?d-g:0;while(--c);c=g,b=c;do d=a.prev[--b],a.prev[b]=d>=g?d-g:0;while(--c);e+=g}if(0===a.strm.avail_in)break;if(c=k(a.strm,a.window,a.strstart+a.lookahead,e),a.lookahead+=c,a.lookahead+a.insert>=hb)for(f=a.strstart-a.insert,a.ins_h=a.window[f],a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+1])&a.hash_mask;a.insert&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[f+hb-1])&a.hash_mask,a.prev[f&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=f,f++,a.insert--,!(a.lookahead+a.insert<hb)););}while(a.lookahead<jb&&0!==a.strm.avail_in)}function n(a,b){var c=65535;for(c>a.pending_buf_size-5&&(c=a.pending_buf_size-5);;){if(a.lookahead<=1){if(m(a),0===a.lookahead&&b===H)return sb;if(0===a.lookahead)break}a.strstart+=a.lookahead,a.lookahead=0;var d=a.block_start+c;if((0===a.strstart||a.strstart>=d)&&(a.lookahead=a.strstart-d,a.strstart=d,h(a,!1),0===a.strm.avail_out))return sb;if(a.strstart-a.block_start>=a.w_size-jb&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.strstart>a.block_start&&(h(a,!1),0===a.strm.avail_out)?sb:sb}function o(a,b){for(var c,d;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==c&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c)),a.match_length>=hb)if(d=D._tr_tally(a,a.strstart-a.match_start,a.match_length-hb),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&a.lookahead>=hb){a.match_length--;do a.strstart++,a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!==--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+1])&a.hash_mask;else d=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function p(a,b){for(var c,d,e;;){if(a.lookahead<jb){if(m(a),a.lookahead<jb&&b===H)return sb;if(0===a.lookahead)break}if(c=0,a.lookahead>=hb&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=hb-1,0!==c&&a.prev_length<a.max_lazy_match&&a.strstart-c<=a.w_size-jb&&(a.match_length=l(a,c),a.match_length<=5&&(a.strategy===S||a.match_length===hb&&a.strstart-a.match_start>4096)&&(a.match_length=hb-1)),a.prev_length>=hb&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-hb,d=D._tr_tally(a,a.strstart-1-a.prev_match,a.prev_length-hb),a.lookahead-=a.prev_length-1,a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=(a.ins_h<<a.hash_shift^a.window[a.strstart+hb-1])&a.hash_mask,c=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!==--a.prev_length);if(a.match_available=0,a.match_length=hb-1,a.strstart++,d&&(h(a,!1),0===a.strm.avail_out))return sb}else if(a.match_available){if(d=D._tr_tally(a,0,a.window[a.strstart-1]),d&&h(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return sb}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(d=D._tr_tally(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=a.strstart<hb-1?a.strstart:hb-1,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function q(a,b){for(var c,d,e,f,g=a.window;;){if(a.lookahead<=ib){if(m(a),a.lookahead<=ib&&b===H)return sb;if(0===a.lookahead)break}if(a.match_length=0,a.lookahead>=hb&&a.strstart>0&&(e=a.strstart-1,d=g[e],d===g[++e]&&d===g[++e]&&d===g[++e])){f=a.strstart+ib;do;while(d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&d===g[++e]&&f>e);a.match_length=ib-(f-e),a.match_length>a.lookahead&&(a.match_length=a.lookahead)}if(a.match_length>=hb?(c=D._tr_tally(a,1,a.match_length-hb),a.lookahead-=a.match_length,a.strstart+=a.match_length,a.match_length=0):(c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++),c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function r(a,b){for(var c;;){if(0===a.lookahead&&(m(a),0===a.lookahead)){if(b===H)return sb;break}if(a.match_length=0,c=D._tr_tally(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++,c&&(h(a,!1),0===a.strm.avail_out))return sb}return a.insert=0,b===K?(h(a,!0),0===a.strm.avail_out?ub:vb):a.last_lit&&(h(a,!1),0===a.strm.avail_out)?sb:tb}function s(a){a.window_size=2*a.w_size,f(a.head),a.max_lazy_match=B[a.level].max_lazy,a.good_match=B[a.level].good_length,a.nice_match=B[a.level].nice_length,a.max_chain_length=B[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=hb-1,a.match_available=0,a.ins_h=0}function t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Y,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new C.Buf16(2*fb),this.dyn_dtree=new C.Buf16(2*(2*db+1)),this.bl_tree=new C.Buf16(2*(2*eb+1)),f(this.dyn_ltree),f(this.dyn_dtree),f(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new C.Buf16(gb+1),this.heap=new C.Buf16(2*cb+1),f(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new C.Buf16(2*cb+1),f(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function u(a){var b;return a&&a.state?(a.total_in=a.total_out=0,a.data_type=X,b=a.state,b.pending=0,b.pending_out=0,b.wrap<0&&(b.wrap=-b.wrap),b.status=b.wrap?lb:qb,a.adler=2===b.wrap?0:1,b.last_flush=H,D._tr_init(b),M):d(a,O)}function v(a){var b=u(a);return b===M&&s(a.state),b}function w(a,b){return a&&a.state?2!==a.state.wrap?O:(a.state.gzhead=b,M):O}function x(a,b,c,e,f,g){if(!a)return O;var h=1;if(b===R&&(b=6),0>e?(h=0,e=-e):e>15&&(h=2,e-=16),1>f||f>Z||c!==Y||8>e||e>15||0>b||b>9||0>g||g>V)return d(a,O);8===e&&(e=9);var i=new t;return a.state=i,i.strm=a,i.wrap=h,i.gzhead=null,i.w_bits=e,i.w_size=1<<i.w_bits,i.w_mask=i.w_size-1,i.hash_bits=f+7,i.hash_size=1<<i.hash_bits,i.hash_mask=i.hash_size-1,i.hash_shift=~~((i.hash_bits+hb-1)/hb),i.window=new C.Buf8(2*i.w_size),i.head=new C.Buf16(i.hash_size),i.prev=new C.Buf16(i.w_size),i.lit_bufsize=1<<f+6,i.pending_buf_size=4*i.lit_bufsize,i.pending_buf=new C.Buf8(i.pending_buf_size),i.d_buf=i.lit_bufsize>>1,i.l_buf=3*i.lit_bufsize,i.level=b,i.strategy=g,i.method=c,v(a)}function y(a,b){return x(a,b,Y,$,_,W)}function z(a,b){var c,h,k,l;if(!a||!a.state||b>L||0>b)return a?d(a,O):O;if(h=a.state,!a.output||!a.input&&0!==a.avail_in||h.status===rb&&b!==K)return d(a,0===a.avail_out?Q:O);if(h.strm=a,c=h.last_flush,h.last_flush=b,h.status===lb)if(2===h.wrap)a.adler=0,i(h,31),i(h,139),i(h,8),h.gzhead?(i(h,(h.gzhead.text?1:0)+(h.gzhead.hcrc?2:0)+(h.gzhead.extra?4:0)+(h.gzhead.name?8:0)+(h.gzhead.comment?16:0)),i(h,255&h.gzhead.time),i(h,h.gzhead.time>>8&255),i(h,h.gzhead.time>>16&255),i(h,h.gzhead.time>>24&255),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,255&h.gzhead.os),h.gzhead.extra&&h.gzhead.extra.length&&(i(h,255&h.gzhead.extra.length),i(h,h.gzhead.extra.length>>8&255)),h.gzhead.hcrc&&(a.adler=F(a.adler,h.pending_buf,h.pending,0)),h.gzindex=0,h.status=mb):(i(h,0),i(h,0),i(h,0),i(h,0),i(h,0),i(h,9===h.level?2:h.strategy>=T||h.level<2?4:0),i(h,wb),h.status=qb);else{var m=Y+(h.w_bits-8<<4)<<8,n=-1;n=h.strategy>=T||h.level<2?0:h.level<6?1:6===h.level?2:3,m|=n<<6,0!==h.strstart&&(m|=kb),m+=31-m%31,h.status=qb,j(h,m),0!==h.strstart&&(j(h,a.adler>>>16),j(h,65535&a.adler)),a.adler=1}if(h.status===mb)if(h.gzhead.extra){for(k=h.pending;h.gzindex<(65535&h.gzhead.extra.length)&&(h.pending!==h.pending_buf_size||(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending!==h.pending_buf_size));)i(h,255&h.gzhead.extra[h.gzindex]),h.gzindex++;h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),h.gzindex===h.gzhead.extra.length&&(h.gzindex=0,h.status=nb)}else h.status=nb;if(h.status===nb)if(h.gzhead.name){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.name.length?255&h.gzhead.name.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.gzindex=0,h.status=ob)}else h.status=ob;if(h.status===ob)if(h.gzhead.comment){k=h.pending;do{if(h.pending===h.pending_buf_size&&(h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),g(a),k=h.pending,h.pending===h.pending_buf_size)){l=1;break}l=h.gzindex<h.gzhead.comment.length?255&h.gzhead.comment.charCodeAt(h.gzindex++):0,i(h,l)}while(0!==l);h.gzhead.hcrc&&h.pending>k&&(a.adler=F(a.adler,h.pending_buf,h.pending-k,k)),0===l&&(h.status=pb)}else h.status=pb;if(h.status===pb&&(h.gzhead.hcrc?(h.pending+2>h.pending_buf_size&&g(a),h.pending+2<=h.pending_buf_size&&(i(h,255&a.adler),i(h,a.adler>>8&255),a.adler=0,h.status=qb)):h.status=qb),0!==h.pending){if(g(a),0===a.avail_out)return h.last_flush=-1,M}else if(0===a.avail_in&&e(b)<=e(c)&&b!==K)return d(a,Q);if(h.status===rb&&0!==a.avail_in)return d(a,Q);if(0!==a.avail_in||0!==h.lookahead||b!==H&&h.status!==rb){var o=h.strategy===T?r(h,b):h.strategy===U?q(h,b):B[h.level].func(h,b);if((o===ub||o===vb)&&(h.status=rb),o===sb||o===ub)return 0===a.avail_out&&(h.last_flush=-1),M;if(o===tb&&(b===I?D._tr_align(h):b!==L&&(D._tr_stored_block(h,0,0,!1),b===J&&(f(h.head),0===h.lookahead&&(h.strstart=0,h.block_start=0,h.insert=0))),g(a),0===a.avail_out))return h.last_flush=-1,M}return b!==K?M:h.wrap<=0?N:(2===h.wrap?(i(h,255&a.adler),i(h,a.adler>>8&255),i(h,a.adler>>16&255),i(h,a.adler>>24&255),i(h,255&a.total_in),i(h,a.total_in>>8&255),i(h,a.total_in>>16&255),i(h,a.total_in>>24&255)):(j(h,a.adler>>>16),j(h,65535&a.adler)),g(a),h.wrap>0&&(h.wrap=-h.wrap),0!==h.pending?M:N)}function A(a){var b;return a&&a.state?(b=a.state.status,b!==lb&&b!==mb&&b!==nb&&b!==ob&&b!==pb&&b!==qb&&b!==rb?d(a,O):(a.state=null,b===qb?d(a,P):M)):O}var B,C=a("../utils/common"),D=a("./trees"),E=a("./adler32"),F=a("./crc32"),G=a("./messages"),H=0,I=1,J=3,K=4,L=5,M=0,N=1,O=-2,P=-3,Q=-5,R=-1,S=1,T=2,U=3,V=4,W=0,X=2,Y=8,Z=9,$=15,_=8,ab=29,bb=256,cb=bb+1+ab,db=30,eb=19,fb=2*cb+1,gb=15,hb=3,ib=258,jb=ib+hb+1,kb=32,lb=42,mb=69,nb=73,ob=91,pb=103,qb=113,rb=666,sb=1,tb=2,ub=3,vb=4,wb=3,xb=function(a,b,c,d,e){this.good_length=a,this.max_lazy=b,this.nice_length=c,this.max_chain=d,this.func=e};B=[new xb(0,0,0,0,n),new xb(4,4,8,4,o),new xb(4,5,16,8,o),new xb(4,6,32,32,o),new xb(4,4,16,16,p),new xb(8,16,32,32,p),new xb(8,16,128,128,p),new xb(8,32,128,256,p),new xb(32,128,258,1024,p),new xb(32,258,258,4096,p)],c.deflateInit=y,c.deflateInit2=x,c.deflateReset=v,c.deflateResetKeep=u,c.deflateSetHeader=w,c.deflate=z,c.deflateEnd=A,c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./messages":37,"./trees":38}],33:[function(a,b){"use strict";function c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}b.exports=c},{}],34:[function(a,b){"use strict";var c=30,d=12;b.exports=function(a,b){var e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C;e=a.state,f=a.next_in,B=a.input,g=f+(a.avail_in-5),h=a.next_out,C=a.output,i=h-(b-a.avail_out),j=h+(a.avail_out-257),k=e.dmax,l=e.wsize,m=e.whave,n=e.wnext,o=e.window,p=e.hold,q=e.bits,r=e.lencode,s=e.distcode,t=(1<<e.lenbits)-1,u=(1<<e.distbits)-1;a:do{15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=r[p&t];b:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,0===w)C[h++]=65535&v;else{if(!(16&w)){if(0===(64&w)){v=r[(65535&v)+(p&(1<<w)-1)];continue b}if(32&w){e.mode=d;break a}a.msg="invalid literal/length code",e.mode=c;break a}x=65535&v,w&=15,w&&(w>q&&(p+=B[f++]<<q,q+=8),x+=p&(1<<w)-1,p>>>=w,q-=w),15>q&&(p+=B[f++]<<q,q+=8,p+=B[f++]<<q,q+=8),v=s[p&u];c:for(;;){if(w=v>>>24,p>>>=w,q-=w,w=v>>>16&255,!(16&w)){if(0===(64&w)){v=s[(65535&v)+(p&(1<<w)-1)];continue c}a.msg="invalid distance code",e.mode=c;break a}if(y=65535&v,w&=15,w>q&&(p+=B[f++]<<q,q+=8,w>q&&(p+=B[f++]<<q,q+=8)),y+=p&(1<<w)-1,y>k){a.msg="invalid distance too far back",e.mode=c;break a}if(p>>>=w,q-=w,w=h-i,y>w){if(w=y-w,w>m&&e.sane){a.msg="invalid distance too far back",e.mode=c;break a}if(z=0,A=o,0===n){if(z+=l-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}else if(w>n){if(z+=l+n-w,w-=n,x>w){x-=w;do C[h++]=o[z++];while(--w);if(z=0,x>n){w=n,x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}}}else if(z+=n-w,x>w){x-=w;do C[h++]=o[z++];while(--w);z=h-y,A=C}for(;x>2;)C[h++]=A[z++],C[h++]=A[z++],C[h++]=A[z++],x-=3;x&&(C[h++]=A[z++],x>1&&(C[h++]=A[z++]))}else{z=h-y;do C[h++]=C[z++],C[h++]=C[z++],C[h++]=C[z++],x-=3;while(x>2);x&&(C[h++]=C[z++],x>1&&(C[h++]=C[z++]))}break}}break}}while(g>f&&j>h);x=q>>3,f-=x,q-=x<<3,p&=(1<<q)-1,a.next_in=f,a.next_out=h,a.avail_in=g>f?5+(g-f):5-(f-g),a.avail_out=j>h?257+(j-h):257-(h-j),e.hold=p,e.bits=q}},{}],35:[function(a,b,c){"use strict";function d(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)}function e(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function f(a){var b;return a&&a.state?(b=a.state,a.total_in=a.total_out=b.total=0,a.msg="",b.wrap&&(a.adler=1&b.wrap),b.mode=K,b.last=0,b.havedict=0,b.dmax=32768,b.head=null,b.hold=0,b.bits=0,b.lencode=b.lendyn=new r.Buf32(ob),b.distcode=b.distdyn=new r.Buf32(pb),b.sane=1,b.back=-1,C):F}function g(a){var b;return a&&a.state?(b=a.state,b.wsize=0,b.whave=0,b.wnext=0,f(a)):F}function h(a,b){var c,d;return a&&a.state?(d=a.state,0>b?(c=0,b=-b):(c=(b>>4)+1,48>b&&(b&=15)),b&&(8>b||b>15)?F:(null!==d.window&&d.wbits!==b&&(d.window=null),d.wrap=c,d.wbits=b,g(a))):F}function i(a,b){var c,d;return a?(d=new e,a.state=d,d.window=null,c=h(a,b),c!==C&&(a.state=null),c):F}function j(a){return i(a,rb)}function k(a){if(sb){var b;for(p=new r.Buf32(512),q=new r.Buf32(32),b=0;144>b;)a.lens[b++]=8;for(;256>b;)a.lens[b++]=9;for(;280>b;)a.lens[b++]=7;for(;288>b;)a.lens[b++]=8;for(v(x,a.lens,0,288,p,0,a.work,{bits:9}),b=0;32>b;)a.lens[b++]=5;v(y,a.lens,0,32,q,0,a.work,{bits:5}),sb=!1}a.lencode=p,a.lenbits=9,a.distcode=q,a.distbits=5}function l(a,b,c,d){var e,f=a.state;return null===f.window&&(f.wsize=1<<f.wbits,f.wnext=0,f.whave=0,f.window=new r.Buf8(f.wsize)),d>=f.wsize?(r.arraySet(f.window,b,c-f.wsize,f.wsize,0),f.wnext=0,f.whave=f.wsize):(e=f.wsize-f.wnext,e>d&&(e=d),r.arraySet(f.window,b,c-d,e,f.wnext),d-=e,d?(r.arraySet(f.window,b,c-d,d,0),f.wnext=d,f.whave=f.wsize):(f.wnext+=e,f.wnext===f.wsize&&(f.wnext=0),f.whave<f.wsize&&(f.whave+=e))),0}function m(a,b){var c,e,f,g,h,i,j,m,n,o,p,q,ob,pb,qb,rb,sb,tb,ub,vb,wb,xb,yb,zb,Ab=0,Bb=new r.Buf8(4),Cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!a||!a.state||!a.output||!a.input&&0!==a.avail_in)return F;c=a.state,c.mode===V&&(c.mode=W),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,o=i,p=j,xb=C;a:for(;;)switch(c.mode){case K:if(0===c.wrap){c.mode=W;break}for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(2&c.wrap&&35615===m){c.check=0,Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0),m=0,n=0,c.mode=L;break}if(c.flags=0,c.head&&(c.head.done=!1),!(1&c.wrap)||(((255&m)<<8)+(m>>8))%31){a.msg="incorrect header check",c.mode=lb;break}if((15&m)!==J){a.msg="unknown compression method",c.mode=lb;break}if(m>>>=4,n-=4,wb=(15&m)+8,0===c.wbits)c.wbits=wb;else if(wb>c.wbits){a.msg="invalid window size",c.mode=lb;break}c.dmax=1<<wb,a.adler=c.check=1,c.mode=512&m?T:V,m=0,n=0;break;case L:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.flags=m,(255&c.flags)!==J){a.msg="unknown compression method",c.mode=lb;break}if(57344&c.flags){a.msg="unknown header flags set",c.mode=lb;break}c.head&&(c.head.text=m>>8&1),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=M;case M:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.time=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,Bb[2]=m>>>16&255,Bb[3]=m>>>24&255,c.check=t(c.check,Bb,4,0)),m=0,n=0,c.mode=N;case N:for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.head&&(c.head.xflags=255&m,c.head.os=m>>8),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0,c.mode=O;case O:if(1024&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length=m,c.head&&(c.head.extra_len=m),512&c.flags&&(Bb[0]=255&m,Bb[1]=m>>>8&255,c.check=t(c.check,Bb,2,0)),m=0,n=0}else c.head&&(c.head.extra=null);c.mode=P;case P:if(1024&c.flags&&(q=c.length,q>i&&(q=i),q&&(c.head&&(wb=c.head.extra_len-c.length,c.head.extra||(c.head.extra=new Array(c.head.extra_len)),r.arraySet(c.head.extra,e,g,q,wb)),512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,c.length-=q),c.length))break a;c.length=0,c.mode=Q;case Q:if(2048&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.name+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.name=null);c.length=0,c.mode=R;case R:if(4096&c.flags){if(0===i)break a;q=0;do wb=e[g+q++],c.head&&wb&&c.length<65536&&(c.head.comment+=String.fromCharCode(wb));while(wb&&i>q);if(512&c.flags&&(c.check=t(c.check,e,q,g)),i-=q,g+=q,wb)break a}else c.head&&(c.head.comment=null);c.mode=S;case S:if(512&c.flags){for(;16>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(65535&c.check)){a.msg="header crc mismatch",c.mode=lb;break}m=0,n=0}c.head&&(c.head.hcrc=c.flags>>9&1,c.head.done=!0),a.adler=c.check=0,c.mode=V;break;case T:for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}a.adler=c.check=d(m),m=0,n=0,c.mode=U;case U:if(0===c.havedict)return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,E;a.adler=c.check=1,c.mode=V;case V:if(b===A||b===B)break a;case W:if(c.last){m>>>=7&n,n-=7&n,c.mode=ib;break}for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}switch(c.last=1&m,m>>>=1,n-=1,3&m){case 0:c.mode=X;break;case 1:if(k(c),c.mode=bb,b===B){m>>>=2,n-=2;break a}break;case 2:c.mode=$;break;case 3:a.msg="invalid block type",c.mode=lb}m>>>=2,n-=2;break;case X:for(m>>>=7&n,n-=7&n;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if((65535&m)!==(m>>>16^65535)){a.msg="invalid stored block lengths",c.mode=lb;break}if(c.length=65535&m,m=0,n=0,c.mode=Y,b===B)break a;case Y:c.mode=Z;case Z:if(q=c.length){if(q>i&&(q=i),q>j&&(q=j),0===q)break a;r.arraySet(f,e,g,q,h),i-=q,g+=q,j-=q,h+=q,c.length-=q;break}c.mode=V;break;case $:for(;14>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(c.nlen=(31&m)+257,m>>>=5,n-=5,c.ndist=(31&m)+1,m>>>=5,n-=5,c.ncode=(15&m)+4,m>>>=4,n-=4,c.nlen>286||c.ndist>30){a.msg="too many length or distance symbols",c.mode=lb;break}c.have=0,c.mode=_;case _:for(;c.have<c.ncode;){for(;3>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.lens[Cb[c.have++]]=7&m,m>>>=3,n-=3}for(;c.have<19;)c.lens[Cb[c.have++]]=0;if(c.lencode=c.lendyn,c.lenbits=7,yb={bits:c.lenbits},xb=v(w,c.lens,0,19,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid code lengths set",c.mode=lb;break}c.have=0,c.mode=ab;case ab:for(;c.have<c.nlen+c.ndist;){for(;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(16>sb)m>>>=qb,n-=qb,c.lens[c.have++]=sb;else{if(16===sb){for(zb=qb+2;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m>>>=qb,n-=qb,0===c.have){a.msg="invalid bit length repeat",c.mode=lb;break}wb=c.lens[c.have-1],q=3+(3&m),m>>>=2,n-=2}else if(17===sb){for(zb=qb+3;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=3+(7&m),m>>>=3,n-=3}else{for(zb=qb+7;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=qb,n-=qb,wb=0,q=11+(127&m),m>>>=7,n-=7}if(c.have+q>c.nlen+c.ndist){a.msg="invalid bit length repeat",c.mode=lb;break}for(;q--;)c.lens[c.have++]=wb}}if(c.mode===lb)break;if(0===c.lens[256]){a.msg="invalid code -- missing end-of-block",c.mode=lb;break}if(c.lenbits=9,yb={bits:c.lenbits},xb=v(x,c.lens,0,c.nlen,c.lencode,0,c.work,yb),c.lenbits=yb.bits,xb){a.msg="invalid literal/lengths set",c.mode=lb;break}if(c.distbits=6,c.distcode=c.distdyn,yb={bits:c.distbits},xb=v(y,c.lens,c.nlen,c.ndist,c.distcode,0,c.work,yb),c.distbits=yb.bits,xb){a.msg="invalid distances set",c.mode=lb;break}if(c.mode=bb,b===B)break a;case bb:c.mode=cb;case cb:if(i>=6&&j>=258){a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,u(a,p),h=a.next_out,f=a.output,j=a.avail_out,g=a.next_in,e=a.input,i=a.avail_in,m=c.hold,n=c.bits,c.mode===V&&(c.back=-1);
+break}for(c.back=0;Ab=c.lencode[m&(1<<c.lenbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(rb&&0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.lencode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,c.length=sb,0===rb){c.mode=hb;break}if(32&rb){c.back=-1,c.mode=V;break}if(64&rb){a.msg="invalid literal/length code",c.mode=lb;break}c.extra=15&rb,c.mode=db;case db:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.length+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}c.was=c.length,c.mode=eb;case eb:for(;Ab=c.distcode[m&(1<<c.distbits)-1],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(0===(240&rb)){for(tb=qb,ub=rb,vb=sb;Ab=c.distcode[vb+((m&(1<<tb+ub)-1)>>tb)],qb=Ab>>>24,rb=Ab>>>16&255,sb=65535&Ab,!(n>=tb+qb);){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}m>>>=tb,n-=tb,c.back+=tb}if(m>>>=qb,n-=qb,c.back+=qb,64&rb){a.msg="invalid distance code",c.mode=lb;break}c.offset=sb,c.extra=15&rb,c.mode=fb;case fb:if(c.extra){for(zb=c.extra;zb>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}c.offset+=m&(1<<c.extra)-1,m>>>=c.extra,n-=c.extra,c.back+=c.extra}if(c.offset>c.dmax){a.msg="invalid distance too far back",c.mode=lb;break}c.mode=gb;case gb:if(0===j)break a;if(q=p-j,c.offset>q){if(q=c.offset-q,q>c.whave&&c.sane){a.msg="invalid distance too far back",c.mode=lb;break}q>c.wnext?(q-=c.wnext,ob=c.wsize-q):ob=c.wnext-q,q>c.length&&(q=c.length),pb=c.window}else pb=f,ob=h-c.offset,q=c.length;q>j&&(q=j),j-=q,c.length-=q;do f[h++]=pb[ob++];while(--q);0===c.length&&(c.mode=cb);break;case hb:if(0===j)break a;f[h++]=c.length,j--,c.mode=cb;break;case ib:if(c.wrap){for(;32>n;){if(0===i)break a;i--,m|=e[g++]<<n,n+=8}if(p-=j,a.total_out+=p,c.total+=p,p&&(a.adler=c.check=c.flags?t(c.check,f,p,h-p):s(c.check,f,p,h-p)),p=j,(c.flags?m:d(m))!==c.check){a.msg="incorrect data check",c.mode=lb;break}m=0,n=0}c.mode=jb;case jb:if(c.wrap&&c.flags){for(;32>n;){if(0===i)break a;i--,m+=e[g++]<<n,n+=8}if(m!==(4294967295&c.total)){a.msg="incorrect length check",c.mode=lb;break}m=0,n=0}c.mode=kb;case kb:xb=D;break a;case lb:xb=G;break a;case mb:return H;case nb:default:return F}return a.next_out=h,a.avail_out=j,a.next_in=g,a.avail_in=i,c.hold=m,c.bits=n,(c.wsize||p!==a.avail_out&&c.mode<lb&&(c.mode<ib||b!==z))&&l(a,a.output,a.next_out,p-a.avail_out)?(c.mode=mb,H):(o-=a.avail_in,p-=a.avail_out,a.total_in+=o,a.total_out+=p,c.total+=p,c.wrap&&p&&(a.adler=c.check=c.flags?t(c.check,f,p,a.next_out-p):s(c.check,f,p,a.next_out-p)),a.data_type=c.bits+(c.last?64:0)+(c.mode===V?128:0)+(c.mode===bb||c.mode===Y?256:0),(0===o&&0===p||b===z)&&xb===C&&(xb=I),xb)}function n(a){if(!a||!a.state)return F;var b=a.state;return b.window&&(b.window=null),a.state=null,C}function o(a,b){var c;return a&&a.state?(c=a.state,0===(2&c.wrap)?F:(c.head=b,b.done=!1,C)):F}var p,q,r=a("../utils/common"),s=a("./adler32"),t=a("./crc32"),u=a("./inffast"),v=a("./inftrees"),w=0,x=1,y=2,z=4,A=5,B=6,C=0,D=1,E=2,F=-2,G=-3,H=-4,I=-5,J=8,K=1,L=2,M=3,N=4,O=5,P=6,Q=7,R=8,S=9,T=10,U=11,V=12,W=13,X=14,Y=15,Z=16,$=17,_=18,ab=19,bb=20,cb=21,db=22,eb=23,fb=24,gb=25,hb=26,ib=27,jb=28,kb=29,lb=30,mb=31,nb=32,ob=852,pb=592,qb=15,rb=qb,sb=!0;c.inflateReset=g,c.inflateReset2=h,c.inflateResetKeep=f,c.inflateInit=j,c.inflateInit2=i,c.inflate=m,c.inflateEnd=n,c.inflateGetHeader=o,c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":27,"./adler32":29,"./crc32":31,"./inffast":34,"./inftrees":36}],36:[function(a,b){"use strict";var c=a("../utils/common"),d=15,e=852,f=592,g=0,h=1,i=2,j=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],k=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],l=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],m=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];b.exports=function(a,b,n,o,p,q,r,s){var t,u,v,w,x,y,z,A,B,C=s.bits,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=null,O=0,P=new c.Buf16(d+1),Q=new c.Buf16(d+1),R=null,S=0;for(D=0;d>=D;D++)P[D]=0;for(E=0;o>E;E++)P[b[n+E]]++;for(H=C,G=d;G>=1&&0===P[G];G--);if(H>G&&(H=G),0===G)return p[q++]=20971520,p[q++]=20971520,s.bits=1,0;for(F=1;G>F&&0===P[F];F++);for(F>H&&(H=F),K=1,D=1;d>=D;D++)if(K<<=1,K-=P[D],0>K)return-1;if(K>0&&(a===g||1!==G))return-1;for(Q[1]=0,D=1;d>D;D++)Q[D+1]=Q[D]+P[D];for(E=0;o>E;E++)0!==b[n+E]&&(r[Q[b[n+E]]++]=E);if(a===g?(N=R=r,y=19):a===h?(N=j,O-=257,R=k,S-=257,y=256):(N=l,R=m,y=-1),M=0,E=0,D=F,x=q,I=H,J=0,v=-1,L=1<<H,w=L-1,a===h&&L>e||a===i&&L>f)return 1;for(var T=0;;){T++,z=D-J,r[E]<y?(A=0,B=r[E]):r[E]>y?(A=R[S+r[E]],B=N[O+r[E]]):(A=96,B=0),t=1<<D-J,u=1<<I,F=u;do u-=t,p[x+(M>>J)+u]=z<<24|A<<16|B|0;while(0!==u);for(t=1<<D-1;M&t;)t>>=1;if(0!==t?(M&=t-1,M+=t):M=0,E++,0===--P[D]){if(D===G)break;D=b[n+r[E]]}if(D>H&&(M&w)!==v){for(0===J&&(J=H),x+=F,I=D-J,K=1<<I;G>I+J&&(K-=P[I+J],!(0>=K));)I++,K<<=1;if(L+=1<<I,a===h&&L>e||a===i&&L>f)return 1;v=M&w,p[v]=H<<24|I<<16|x-q|0}}return 0!==M&&(p[x+M]=D-J<<24|64<<16|0),s.bits=H,0}},{"../utils/common":27}],37:[function(a,b){"use strict";b.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],38:[function(a,b,c){"use strict";function d(a){for(var b=a.length;--b>=0;)a[b]=0}function e(a){return 256>a?gb[a]:gb[256+(a>>>7)]}function f(a,b){a.pending_buf[a.pending++]=255&b,a.pending_buf[a.pending++]=b>>>8&255}function g(a,b,c){a.bi_valid>V-c?(a.bi_buf|=b<<a.bi_valid&65535,f(a,a.bi_buf),a.bi_buf=b>>V-a.bi_valid,a.bi_valid+=c-V):(a.bi_buf|=b<<a.bi_valid&65535,a.bi_valid+=c)}function h(a,b,c){g(a,c[2*b],c[2*b+1])}function i(a,b){var c=0;do c|=1&a,a>>>=1,c<<=1;while(--b>0);return c>>>1}function j(a){16===a.bi_valid?(f(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):a.bi_valid>=8&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)}function k(a,b){var c,d,e,f,g,h,i=b.dyn_tree,j=b.max_code,k=b.stat_desc.static_tree,l=b.stat_desc.has_stree,m=b.stat_desc.extra_bits,n=b.stat_desc.extra_base,o=b.stat_desc.max_length,p=0;for(f=0;U>=f;f++)a.bl_count[f]=0;for(i[2*a.heap[a.heap_max]+1]=0,c=a.heap_max+1;T>c;c++)d=a.heap[c],f=i[2*i[2*d+1]+1]+1,f>o&&(f=o,p++),i[2*d+1]=f,d>j||(a.bl_count[f]++,g=0,d>=n&&(g=m[d-n]),h=i[2*d],a.opt_len+=h*(f+g),l&&(a.static_len+=h*(k[2*d+1]+g)));if(0!==p){do{for(f=o-1;0===a.bl_count[f];)f--;a.bl_count[f]--,a.bl_count[f+1]+=2,a.bl_count[o]--,p-=2}while(p>0);for(f=o;0!==f;f--)for(d=a.bl_count[f];0!==d;)e=a.heap[--c],e>j||(i[2*e+1]!==f&&(a.opt_len+=(f-i[2*e+1])*i[2*e],i[2*e+1]=f),d--)}}function l(a,b,c){var d,e,f=new Array(U+1),g=0;for(d=1;U>=d;d++)f[d]=g=g+c[d-1]<<1;for(e=0;b>=e;e++){var h=a[2*e+1];0!==h&&(a[2*e]=i(f[h]++,h))}}function m(){var a,b,c,d,e,f=new Array(U+1);for(c=0,d=0;O-1>d;d++)for(ib[d]=c,a=0;a<1<<_[d];a++)hb[c++]=d;for(hb[c-1]=d,e=0,d=0;16>d;d++)for(jb[d]=e,a=0;a<1<<ab[d];a++)gb[e++]=d;for(e>>=7;R>d;d++)for(jb[d]=e<<7,a=0;a<1<<ab[d]-7;a++)gb[256+e++]=d;for(b=0;U>=b;b++)f[b]=0;for(a=0;143>=a;)eb[2*a+1]=8,a++,f[8]++;for(;255>=a;)eb[2*a+1]=9,a++,f[9]++;for(;279>=a;)eb[2*a+1]=7,a++,f[7]++;for(;287>=a;)eb[2*a+1]=8,a++,f[8]++;for(l(eb,Q+1,f),a=0;R>a;a++)fb[2*a+1]=5,fb[2*a]=i(a,5);kb=new nb(eb,_,P+1,Q,U),lb=new nb(fb,ab,0,R,U),mb=new nb(new Array(0),bb,0,S,W)}function n(a){var b;for(b=0;Q>b;b++)a.dyn_ltree[2*b]=0;for(b=0;R>b;b++)a.dyn_dtree[2*b]=0;for(b=0;S>b;b++)a.bl_tree[2*b]=0;a.dyn_ltree[2*X]=1,a.opt_len=a.static_len=0,a.last_lit=a.matches=0}function o(a){a.bi_valid>8?f(a,a.bi_buf):a.bi_valid>0&&(a.pending_buf[a.pending++]=a.bi_buf),a.bi_buf=0,a.bi_valid=0}function p(a,b,c,d){o(a),d&&(f(a,c),f(a,~c)),E.arraySet(a.pending_buf,a.window,b,c,a.pending),a.pending+=c}function q(a,b,c,d){var e=2*b,f=2*c;return a[e]<a[f]||a[e]===a[f]&&d[b]<=d[c]}function r(a,b,c){for(var d=a.heap[c],e=c<<1;e<=a.heap_len&&(e<a.heap_len&&q(b,a.heap[e+1],a.heap[e],a.depth)&&e++,!q(b,d,a.heap[e],a.depth));)a.heap[c]=a.heap[e],c=e,e<<=1;a.heap[c]=d}function s(a,b,c){var d,f,i,j,k=0;if(0!==a.last_lit)do d=a.pending_buf[a.d_buf+2*k]<<8|a.pending_buf[a.d_buf+2*k+1],f=a.pending_buf[a.l_buf+k],k++,0===d?h(a,f,b):(i=hb[f],h(a,i+P+1,b),j=_[i],0!==j&&(f-=ib[i],g(a,f,j)),d--,i=e(d),h(a,i,c),j=ab[i],0!==j&&(d-=jb[i],g(a,d,j)));while(k<a.last_lit);h(a,X,b)}function t(a,b){var c,d,e,f=b.dyn_tree,g=b.stat_desc.static_tree,h=b.stat_desc.has_stree,i=b.stat_desc.elems,j=-1;for(a.heap_len=0,a.heap_max=T,c=0;i>c;c++)0!==f[2*c]?(a.heap[++a.heap_len]=j=c,a.depth[c]=0):f[2*c+1]=0;for(;a.heap_len<2;)e=a.heap[++a.heap_len]=2>j?++j:0,f[2*e]=1,a.depth[e]=0,a.opt_len--,h&&(a.static_len-=g[2*e+1]);for(b.max_code=j,c=a.heap_len>>1;c>=1;c--)r(a,f,c);e=i;do c=a.heap[1],a.heap[1]=a.heap[a.heap_len--],r(a,f,1),d=a.heap[1],a.heap[--a.heap_max]=c,a.heap[--a.heap_max]=d,f[2*e]=f[2*c]+f[2*d],a.depth[e]=(a.depth[c]>=a.depth[d]?a.depth[c]:a.depth[d])+1,f[2*c+1]=f[2*d+1]=e,a.heap[1]=e++,r(a,f,1);while(a.heap_len>=2);a.heap[--a.heap_max]=a.heap[1],k(a,b),l(f,j,a.bl_count)}function u(a,b,c){var d,e,f=-1,g=b[1],h=0,i=7,j=4;for(0===g&&(i=138,j=3),b[2*(c+1)+1]=65535,d=0;c>=d;d++)e=g,g=b[2*(d+1)+1],++h<i&&e===g||(j>h?a.bl_tree[2*e]+=h:0!==e?(e!==f&&a.bl_tree[2*e]++,a.bl_tree[2*Y]++):10>=h?a.bl_tree[2*Z]++:a.bl_tree[2*$]++,h=0,f=e,0===g?(i=138,j=3):e===g?(i=6,j=3):(i=7,j=4))}function v(a,b,c){var d,e,f=-1,i=b[1],j=0,k=7,l=4;for(0===i&&(k=138,l=3),d=0;c>=d;d++)if(e=i,i=b[2*(d+1)+1],!(++j<k&&e===i)){if(l>j){do h(a,e,a.bl_tree);while(0!==--j)}else 0!==e?(e!==f&&(h(a,e,a.bl_tree),j--),h(a,Y,a.bl_tree),g(a,j-3,2)):10>=j?(h(a,Z,a.bl_tree),g(a,j-3,3)):(h(a,$,a.bl_tree),g(a,j-11,7));j=0,f=e,0===i?(k=138,l=3):e===i?(k=6,l=3):(k=7,l=4)}}function w(a){var b;for(u(a,a.dyn_ltree,a.l_desc.max_code),u(a,a.dyn_dtree,a.d_desc.max_code),t(a,a.bl_desc),b=S-1;b>=3&&0===a.bl_tree[2*cb[b]+1];b--);return a.opt_len+=3*(b+1)+5+5+4,b}function x(a,b,c,d){var e;for(g(a,b-257,5),g(a,c-1,5),g(a,d-4,4),e=0;d>e;e++)g(a,a.bl_tree[2*cb[e]+1],3);v(a,a.dyn_ltree,b-1),v(a,a.dyn_dtree,c-1)}function y(a){var b,c=4093624447;for(b=0;31>=b;b++,c>>>=1)if(1&c&&0!==a.dyn_ltree[2*b])return G;if(0!==a.dyn_ltree[18]||0!==a.dyn_ltree[20]||0!==a.dyn_ltree[26])return H;for(b=32;P>b;b++)if(0!==a.dyn_ltree[2*b])return H;return G}function z(a){pb||(m(),pb=!0),a.l_desc=new ob(a.dyn_ltree,kb),a.d_desc=new ob(a.dyn_dtree,lb),a.bl_desc=new ob(a.bl_tree,mb),a.bi_buf=0,a.bi_valid=0,n(a)}function A(a,b,c,d){g(a,(J<<1)+(d?1:0),3),p(a,b,c,!0)}function B(a){g(a,K<<1,3),h(a,X,eb),j(a)}function C(a,b,c,d){var e,f,h=0;a.level>0?(a.strm.data_type===I&&(a.strm.data_type=y(a)),t(a,a.l_desc),t(a,a.d_desc),h=w(a),e=a.opt_len+3+7>>>3,f=a.static_len+3+7>>>3,e>=f&&(e=f)):e=f=c+5,e>=c+4&&-1!==b?A(a,b,c,d):a.strategy===F||f===e?(g(a,(K<<1)+(d?1:0),3),s(a,eb,fb)):(g(a,(L<<1)+(d?1:0),3),x(a,a.l_desc.max_code+1,a.d_desc.max_code+1,h+1),s(a,a.dyn_ltree,a.dyn_dtree)),n(a),d&&o(a)}function D(a,b,c){return a.pending_buf[a.d_buf+2*a.last_lit]=b>>>8&255,a.pending_buf[a.d_buf+2*a.last_lit+1]=255&b,a.pending_buf[a.l_buf+a.last_lit]=255&c,a.last_lit++,0===b?a.dyn_ltree[2*c]++:(a.matches++,b--,a.dyn_ltree[2*(hb[c]+P+1)]++,a.dyn_dtree[2*e(b)]++),a.last_lit===a.lit_bufsize-1}var E=a("../utils/common"),F=4,G=0,H=1,I=2,J=0,K=1,L=2,M=3,N=258,O=29,P=256,Q=P+1+O,R=30,S=19,T=2*Q+1,U=15,V=16,W=7,X=256,Y=16,Z=17,$=18,_=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],bb=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],cb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],db=512,eb=new Array(2*(Q+2));d(eb);var fb=new Array(2*R);d(fb);var gb=new Array(db);d(gb);var hb=new Array(N-M+1);d(hb);var ib=new Array(O);d(ib);var jb=new Array(R);d(jb);var kb,lb,mb,nb=function(a,b,c,d,e){this.static_tree=a,this.extra_bits=b,this.extra_base=c,this.elems=d,this.max_length=e,this.has_stree=a&&a.length},ob=function(a,b){this.dyn_tree=a,this.max_code=0,this.stat_desc=b},pb=!1;c._tr_init=z,c._tr_stored_block=A,c._tr_flush_block=C,c._tr_tally=D,c._tr_align=B},{"../utils/common":27}],39:[function(a,b){"use strict";function c(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}b.exports=c},{}]},{},[9])(9)});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,271 @@
+/*
+ * 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.
+ */
+
+var noResult = {l: "No results found"};
+var category = "category";
+var catPackages = "Packages";
+var catTypes = "Types";
+var catMembers = "Members";
+var catSearchTags = "SearchTags";
+function getName(name) {
+    var anchor = "";
+    var ch = '';
+    for (i = 0; i < name.length; i++) {
+        ch = name.charAt(i);
+        switch (ch) {
+            case '(':
+            case ')':
+            case '<':
+            case '>':
+            case ',':
+                anchor += "-";
+                break;
+            case ' ':
+            case '[':
+                break;
+            case ']':
+                anchor += ":A";
+                break;
+            case '$':
+                if (i == 0)
+                    anchor += "Z:Z";
+                anchor += ":D";
+                break;
+            case '_':
+                if (i == 0)
+                    anchor += "Z:Z";
+                anchor += ch;
+                break;
+            default:
+                anchor += ch;
+        }
+    }
+    return anchor;
+}
+var watermark = 'Search';
+$(function() {
+    $("#search").prop("disabled", false);
+    $("#reset").prop("disabled", false);
+    $("#search").val(watermark).addClass('watermark');
+    $("#search").blur(function(){
+        if ($(this).val().length == 0) {
+            $(this).val(watermark).addClass('watermark');
+        }
+    });
+    $("#search").keydown(function(){
+       if ($(this).val() == watermark) {
+            $(this).val('').removeClass('watermark');
+        }
+    });
+    $("#reset").click(function(){
+       $("#search").val('');
+       $("#search").focus();
+    });
+    $("#search").focus();
+    $("#search")[0].setSelectionRange(0,0);
+});
+$.widget("custom.catcomplete", $.ui.autocomplete, {
+    _create: function() {
+        this._super();
+        this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)");
+    },
+    _renderMenu: function(ul, items) {
+        var rMenu = this,
+                currentCategory = "";
+        $.each(items, function(index, item) {
+            var li;
+            if (item.l !== noResult.l && item.category !== currentCategory) {
+                ul.append("<li class=\"ui-autocomplete-category\">" + item.category + "</li>");
+                currentCategory = item.category;
+            }
+            li = rMenu._renderItemData(ul, item);
+            if (item.category) {
+                li.attr("aria-label", item.category + " : " + item.l);
+                li.attr("class", "resultItem");
+            } else {
+                li.attr("aria-label", item.l);
+                li.attr("class", "resultItem");
+            }
+        });
+    },
+    _renderItem: function(ul, item) {
+        var result = this.element.val();
+        var regexp = new RegExp($.ui.autocomplete.escapeRegex(result), "i");
+        highlight = "<span class=\"resultHighlight\">$&</span>";
+        var label = "";
+        if (item.category === catPackages) {
+            label = item.l.replace(regexp, highlight);
+        } else if (item.category === catTypes) {
+            label += (item.p + "." + item.l).replace(regexp, highlight);
+        } else if (item.category === catMembers) {
+            label += item.p + "." + (item.c + "." + item.l).replace(regexp, highlight);
+        } else if (item.category === catSearchTags) {
+            label = item.l.replace(regexp, highlight);
+        } else {
+            label = item.l;
+        }
+        $li = $("<li/>").appendTo(ul);
+        if (item.category === catSearchTags) {
+            if (item.d) {
+                $("<a/>").attr("href", "#")
+                        .html(label + "<span class=\"searchTagHolderResult\"> (" + item.h + ")</span><br><span class=\"searchTagDescResult\">"
+                                + item.d + "</span><br>")
+                        .appendTo($li);
+            } else {
+                $("<a/>").attr("href", "#")
+                        .html(label + "<span class=\"searchTagHolderResult\"> (" + item.h + ")</span>")
+                        .appendTo($li);
+            }
+        } else {
+            $("<a/>").attr("href", "#")
+                    .html(label)
+                    .appendTo($li);
+        }
+        return $li;
+    }
+});
+$(function() {
+    $("#search").catcomplete({
+        minLength: 1,
+        delay: 100,
+        source: function(request, response) {
+            var result = new Array();
+            var tresult = new Array();
+            var mresult = new Array();
+            var tgresult = new Array();
+            var displayCount = 0;
+            var exactMatcher = new RegExp("^" + $.ui.autocomplete.escapeRegex(request.term) + "$", "i");
+            var secondaryMatcher = new RegExp($.ui.autocomplete.escapeRegex(request.term), "i");
+            if (packageSearchIndex) {
+                var pCount = 0;
+                $.each(packageSearchIndex, function(index, item) {
+                    item[category] = catPackages;
+                    if (exactMatcher.test(item.l)) {
+                        result.unshift(item);
+                        pCount++;
+                    } else if (secondaryMatcher.test(item.l)) {
+                        result.push(item);
+                    }
+                });
+                displayCount = pCount;
+            }
+            if (typeSearchIndex) {
+                var tCount = 0;
+                $.each(typeSearchIndex, function(index, item) {
+                    item[category] = catTypes;
+                    if (exactMatcher.test(item.l)) {
+                        tresult.unshift(item);
+                        tCount++;
+                    } else if (secondaryMatcher.test(item.p + "." + item.l)) {
+                        tresult.push(item);
+                    }
+                });
+                result = result.concat(tresult);
+                displayCount = (tCount > displayCount) ? tCount : displayCount;
+            }
+            if (memberSearchIndex) {
+                var mCount = 0;
+                $.each(memberSearchIndex, function(index, item) {
+                    item[category] = catMembers;
+                    if (exactMatcher.test(item.l)) {
+                        mresult.unshift(item);
+                        mCount++;
+                    } else if (secondaryMatcher.test(item.c + "." + item.l)) {
+                        mresult.push(item);
+                    }
+                });
+                result = result.concat(mresult);
+                displayCount = (mCount > displayCount) ? mCount : displayCount;
+            }
+            if (tagSearchIndex) {
+                var tgCount = 0;
+                $.each(tagSearchIndex, function(index, item) {
+                    item[category] = catSearchTags;
+                    if (exactMatcher.test(item.l)) {
+                        tgresult.unshift(item);
+                        tgCount++;
+                    } else if (secondaryMatcher.test(item.l)) {
+                        tgresult.push(item);
+                    }
+                });
+                result = result.concat(tgresult);
+                displayCount = (tgCount > displayCount) ? tgCount : displayCount;
+            }
+            displayCount = (displayCount > 500) ? displayCount : 500;
+            var counter = function() {
+                var count = {Packages: 0, Types: 0, Members: 0, SearchTags: 0};
+                var f = function(item) {
+                    count[item.category] += 1;
+                    return (count[item.category] <= displayCount);
+                };
+                return f;
+            }();
+            response(result.filter(counter));
+        },
+        response: function(event, ui) {
+            if (!ui.content.length) {
+                ui.content.push(noResult);
+            } else {
+                $("#search").empty();
+            }
+        },
+        autoFocus: true,
+        position: {
+            collision: "flip"
+        },
+        select: function(event, ui) {
+            if (ui.item.l !== noResult.l) {
+                var url = "";
+                if (ui.item.category === catPackages) {
+                    url = ui.item.l.replace(/\./g, '/') + "/package-summary.html";
+                } else if (ui.item.category === catTypes) {
+                    if (ui.item.p === "<Unnamed>") {
+                        url = "/" + ui.item.l + ".html";
+                    } else {
+                        url = ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html";
+                    }
+                } else if (ui.item.category === catMembers) {
+                    if (ui.item.p === "<Unnamed>") {
+                        url = "/" + ui.item.c + ".html" + "#";
+                    } else {
+                        url = ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#";
+                    }
+                    if (ui.item.url) {
+                        url += ui.item.url;
+                    } else {
+                        url += getName(ui.item.l);
+                    }
+                } else if (ui.item.category === catSearchTags) {
+                    url += ui.item.u;
+                }
+                if (top !== window) {
+                    parent.classFrame.location = pathtoroot + url;
+                } else {
+                    window.location.href = pathtoroot + url;
+                }
+            }
+        }
+    });
+});
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,342 @@
+doclet.build_version=Standard Doclet (Next) version {0}
+doclet.Contents=Contents
+doclet.Overview=Overview
+doclet.Window_Overview=Overview List
+doclet.Window_Overview_Summary=Overview
+doclet.Package=Package
+doclet.All_Packages=All Packages
+doclet.Tree=Tree
+doclet.Class_Hierarchy=Class Hierarchy
+doclet.Window_Class_Hierarchy=Class Hierarchy
+doclet.Interface_Hierarchy=Interface Hierarchy
+doclet.Enum_Hierarchy=Enum Hierarchy
+doclet.Annotation_Type_Hierarchy=Annotation Type Hierarchy
+doclet.Prev=Prev
+doclet.Next=Next
+doclet.Prev_Class=Prev Class
+doclet.Next_Class=Next Class
+doclet.Prev_Package=Prev Package
+doclet.Next_Package=Next Package
+doclet.Prev_Letter=Prev Letter
+doclet.Next_Letter=Next Letter
+doclet.Href_Class_Title=class in {0}
+doclet.Href_Interface_Title=interface in {0}
+doclet.Href_Annotation_Title=annotation in {0}
+doclet.Href_Enum_Title=enum in {0}
+doclet.Href_Type_Param_Title=type parameter in {0}
+doclet.Href_Class_Or_Interface_Title=class or interface in {0}
+doclet.Summary=Summary:
+doclet.Detail=Detail:
+doclet.navNested=Nested
+doclet.navAnnotationTypeOptionalMember=Optional
+doclet.navAnnotationTypeRequiredMember=Required
+doclet.navAnnotationTypeMember=Element
+doclet.navField=Field
+doclet.navProperty=Property
+doclet.navEnum=Enum Constants
+doclet.navConstructor=Constr
+doclet.navMethod=Method
+doclet.Index=Index
+doclet.Window_Single_Index=Index
+doclet.Window_Split_Index={0}-Index
+doclet.Help=Help
+doclet.Skip_navigation_links=Skip navigation links
+doclet.Navigation=Navigation
+doclet.New_Page=NewPage
+doclet.navDeprecated=Deprecated
+doclet.Window_Deprecated_List=Deprecated List
+doclet.Overrides=Overrides:
+doclet.in_class=in class
+doclet.Static_variable_in=Static variable in {0}
+doclet.Variable_in=Variable in {0}
+doclet.Constructor_for=Constructor for {0}
+doclet.Static_method_in=Static method in {0}
+doclet.Search_tag_in=Search tag in {0}
+doclet.Method_in=Method in {0}
+doclet.package=package
+doclet.MalformedURL=Malformed URL: {0}
+doclet.File_error=Error reading file: {0}
+doclet.URL_error=Error fetching URL: {0}
+doclet.see.class_or_package_not_found=Tag {0}: reference not found: {1}
+doclet.see.class_or_package_not_accessible=Tag {0}: reference not accessible: {1}
+doclet.tag.invalid_usage=invalid usage of tag {0}
+doclet.Deprecated_API=Deprecated API
+doclet.Deprecated_Packages=Deprecated Packages
+doclet.Deprecated_Classes=Deprecated Classes
+doclet.Deprecated_Enums=Deprecated Enums
+doclet.Deprecated_Interfaces=Deprecated Interfaces
+doclet.Deprecated_Exceptions=Deprecated Exceptions
+doclet.Deprecated_Annotation_Types=Deprecated Annotation Types
+doclet.Deprecated_Errors=Deprecated Errors
+doclet.Deprecated_Fields=Deprecated Fields
+doclet.Deprecated_Constructors=Deprecated Constructors
+doclet.Deprecated_Methods=Deprecated Methods
+doclet.Deprecated_Enum_Constants=Deprecated Enum Constants
+doclet.Deprecated_Annotation_Type_Members=Deprecated Annotation Type Elements
+doclet.deprecated_packages=deprecated packages
+doclet.deprecated_classes=deprecated classes
+doclet.deprecated_enums=deprecated enums
+doclet.deprecated_interfaces=deprecated interfaces
+doclet.deprecated_exceptions=deprecated exceptions
+doclet.deprecated_annotation_types=deprecated annotation types
+doclet.deprecated_errors=deprecated errors
+doclet.deprecated_fields=deprecated fields
+doclet.deprecated_constructors=deprecated constructors
+doclet.deprecated_methods=deprecated methods
+doclet.deprecated_enum_constants=deprecated enum constants
+doclet.deprecated_annotation_type_members=deprecated annotation type elements
+doclet.Generated_Docs_Untitled=Generated Documentation (Untitled)
+doclet.Other_Packages=Other Packages
+doclet.Package_Description=Package {0} Description
+doclet.Description=Description
+doclet.Specified_By=Specified by:
+doclet.in_interface=in interface
+doclet.Subclasses=Direct Known Subclasses:
+doclet.Subinterfaces=All Known Subinterfaces:
+doclet.Implementing_Classes=All Known Implementing Classes:
+doclet.Functional_Interface=Functional Interface:
+doclet.Functional_Interface_Message=This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
+doclet.also=also
+doclet.Frames=Frames
+doclet.No_Frames=No Frames
+doclet.Package_Hierarchies=Package Hierarchies:
+doclet.Hierarchy_For_Package=Hierarchy For Package {0}
+doclet.Hierarchy_For_All_Packages=Hierarchy For All Packages
+doclet.No_Script_Message=JavaScript is disabled on your browser.
+doclet.Description_From_Interface=Description copied from interface:
+doclet.Description_From_Class=Description copied from class:
+doclet.No_Non_Deprecated_Classes_To_Document=No non-deprecated classes found to document.
+doclet.Interfaces_Italic=Interfaces (italic)
+doclet.Enclosing_Class=Enclosing class:
+doclet.Enclosing_Interface=Enclosing interface:
+doclet.Window_Source_title=Source code
+doclet.Window_Help_title=API Help
+doclet.Help_line_1=How This API Document Is Organized
+doclet.Help_line_2=This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.
+doclet.Help_line_3=The {0} page is the front page of this API document and provides a list of all packages with a summary for each.  This page can also contain an overall description of the set of packages.
+doclet.Help_line_4=Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:
+doclet.Help_line_5=Class/Interface
+doclet.Help_line_6=Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:
+doclet.Help_line_7=Class inheritance diagram
+doclet.Help_line_8=Direct Subclasses
+doclet.Help_line_9=All Known Subinterfaces
+doclet.Help_line_10=All Known Implementing Classes
+doclet.Help_line_11=Class/interface declaration
+doclet.Help_line_12=Class/interface description
+doclet.Help_line_13=Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.
+doclet.Help_line_14=Use
+doclet.Help_line_15=Each documented package, class and interface has its own Use page.  This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A.  You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.
+doclet.Help_line_16=Tree (Class Hierarchy)
+doclet.Help_line_17_with_tree_link=There is a {0} page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with {1}. The interfaces do not inherit from {1}.
+doclet.Help_line_18=When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.
+doclet.Help_line_19=When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.
+doclet.Help_line_20_with_deprecated_api_link=The {0} page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.
+doclet.Help_line_21=Index
+doclet.Help_line_22=The {0} contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.
+doclet.Help_line_23=Prev/Next
+doclet.Help_line_24=These links take you to the next or previous class, interface, package, or related page.
+doclet.Help_line_25=Frames/No Frames
+doclet.Help_line_26=These links show and hide the HTML frames.  All pages are available with or without frames.
+doclet.Help_line_27=The {0} link shows all classes and interfaces except non-static nested types.
+doclet.Help_line_28=Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.
+doclet.Help_line_29=The {0} page lists the static final fields and their values.
+doclet.Help_line_30=This help file applies to API documentation generated using the standard doclet.
+doclet.Help_enum_line_1=Each enum has its own separate page with the following sections:
+doclet.Help_enum_line_2=Enum declaration
+doclet.Help_enum_line_3=Enum description
+doclet.Help_annotation_type_line_1=Each annotation type has its own separate page with the following sections:
+doclet.Help_annotation_type_line_2=Annotation Type declaration
+doclet.Help_annotation_type_line_3=Annotation Type description
+doclet.ClassUse_Packages.that.use.0=Packages that use {0}
+doclet.ClassUse_Uses.of.0.in.1=Uses of {0} in {1}
+doclet.ClassUse_Classes.in.0.used.by.1=Classes in {0} used by {1}
+doclet.ClassUse_PackageAnnotation=Packages with annotations of type {0}
+doclet.ClassUse_Annotation=Classes in {1} with annotations of type {0}
+doclet.ClassUse_TypeParameter=Classes in {1} with type parameters of type {0}
+doclet.ClassUse_MethodTypeParameter=Methods in {1} with type parameters of type {0}
+doclet.ClassUse_FieldTypeParameter=Fields in {1} with type parameters of type {0}
+doclet.ClassUse_FieldAnnotations=Fields in {1} with annotations of type {0}
+doclet.ClassUse_MethodAnnotations=Methods in {1} with annotations of type {0}
+doclet.ClassUse_MethodParameterAnnotations=Method parameters in {1} with annotations of type {0}
+doclet.ClassUse_MethodReturnTypeParameter=Methods in {1} that return types with arguments of type {0}
+doclet.ClassUse_Subclass=Subclasses of {0} in {1}
+doclet.ClassUse_Subinterface=Subinterfaces of {0} in {1}
+doclet.ClassUse_ImplementingClass=Classes in {1} that implement {0}
+doclet.ClassUse_Field=Fields in {1} declared as {0}
+doclet.ClassUse_MethodReturn=Methods in {1} that return {0}
+doclet.ClassUse_MethodArgs=Methods in {1} with parameters of type {0}
+doclet.ClassUse_MethodArgsTypeParameters=Method parameters in {1} with type arguments of type {0}
+doclet.ClassUse_MethodThrows=Methods in {1} that throw {0}
+doclet.ClassUse_ConstructorAnnotations=Constructors in {1} with annotations of type {0}
+doclet.ClassUse_ConstructorParameterAnnotations=Constructor parameters in {1} with annotations of type {0}
+doclet.ClassUse_ConstructorArgs=Constructors in {1} with parameters of type {0}
+doclet.ClassUse_ConstructorArgsTypeParameters=Constructor parameters in {1} with type arguments of type {0}
+doclet.ClassUse_ConstructorThrows=Constructors in {1} that throw {0}
+doclet.ClassUse_No.usage.of.0=No usage of {0}
+doclet.Window_ClassUse_Header=Uses of {0} {1}
+doclet.ClassUse_Title=Uses of {0}
+doclet.navClassUse=Use
+doclet.Error_in_packagelist=Error in using -group option: {0} {1}
+doclet.Groupname_already_used=In -group option, groupname already used: {0}
+doclet.Same_package_name_used=Package name format used twice: {0}
+doclet.exception_encountered=Exception encountered while processing {1}\n{0}
+
+doclet.usage.d.name=d
+doclet.usage.d.parameters=<directory>
+doclet.usage.d.description=Destination directory for output files
+
+doclet.usage.use.name=use
+doclet.usage.use.description=Create class and package usage pages
+
+doclet.usage.version.name=version
+doclet.usage.version.description=Include @version paragraphs
+
+doclet.usage.author.name=author
+doclet.usage.author.description=Include @author paragraphs
+
+doclet.usage.docfilessubdirs.name=docfilessubdirs
+doclet.usage.docfilessubdirs.description=Recursively copy doc-file subdirectories
+
+doclet.usage.splitindex.name=splitindex
+doclet.usage.splitindex.description=Split index into one file per letter
+
+doclet.usage.windowtitle.name=windowtitle
+doclet.usage.windotitle.parameters=<text>
+doclet.usage.windowtitle.description=Browser window title for the documentation
+
+doclet.usage.doctitle.name=doctitle
+doclet.usage.doctitle.parameters=<html-code>
+doclet.usage.doctitle.description=Include title for the overview page
+
+doclet.usage.header.name=header
+doclet.usage.header.parameters=<html-code>
+doclet.usage.header.description=Include header text for each page
+
+doclet.usage.html4.name=html4
+doclet.usage.html4.description=Generate HTML 4.01 output
+
+doclet.usage.html5.name=html5
+doclet.usage.html5.description=Generate HTML 5 output
+
+doclet.usage.footer.name=footer
+doclet.usage.footer.parameters=<html-code>
+doclet.usage.footer.description=Include footer text for each page
+
+doclet.usage.top.name=top
+doclet.usage.top.parameters=<html-code>
+doclet.usage.top.description=Include top text for each page
+
+doclet.usage.bottom.name=bottom
+doclet.usage.bottom.parameters=<html-code>
+doclet.usage.bottom.description=Include bottom text for each page
+
+doclet.usage.link.name=link
+doclet.usage.link.parameters=<url>
+doclet.usage.link.description=Create links to javadoc output at <url>
+
+doclet.usage.linkoffline.name=linkoffline
+doclet.usage.linkoffline.parameters=<url1> <url2>
+doclet.usage.linkoffline.description=Link to docs at <url1> using package list at <url2>
+
+doclet.usage.excludedocfilessubdir.name=excludedocfilessubdir
+doclet.usage.excludedocfilessubdir.parameters=<name>:..
+doclet.usage.excludedocfilessubdir.description=Exclude any doc-files subdirectories with given name
+
+doclet.usage.group.name=group
+doclet.usage.group.parameters=<name> <p1>:<p2>..
+doclet.usage.group.description=Group specified packages together in overview page
+
+doclet.usage.nocomment.name=nocomment
+doclet.usage.nocomment.description=Suppress description and tags, generate only declarations
+
+doclet.usage.nodeprecated.name=nodeprecated
+doclet.usage.nodeprecated.description=Do not include @deprecated information
+
+doclet.usage.noqualifier.name=noqualifier
+doclet.usage.noqualifier.parameters=<name1>:<name2>:..
+doclet.usage.noqualifier.description=Exclude the list of qualifiers from the output
+
+doclet.usage.nosince.name=nosince
+doclet.usage.nosince.description=Do not include @since information
+
+doclet.usage.notimestamp.name=notimestamp
+doclet.usage.notimestamp.description=Do not include hidden time stamp
+
+doclet.usage.nodeprecatedlist.name=nodeprecatedlist
+doclet.usage.nodeprecatedlist.description=Do not generate deprecated list
+
+doclet.usage.notree.name=notree
+doclet.usage.notree.description=Do not generate class hierarchy
+
+doclet.usage.noindex.name=noindex
+doclet.usage.noindex.description=Do not generate index
+
+doclet.usage.nohelp.name=nohelp
+doclet.usage.nohelp.description=Do not generate help link
+
+doclet.usage.nonavbar.name=nonavbar
+doclet.usage.nonavbar.description=Do not generate navigation bar
+
+doclet.usage.nooverview.name=nooverview
+doclet.usage.nooverview.description=Do not generate overview pages
+
+doclet.usage.serialwarn.name=serialwarn
+doclet.usage.serialwarn.description=Generate warning about @serial tag
+
+doclet.usage.tag.name=tag
+doclet.usage.tag.parameters=<name>:<locations>:<header>
+doclet.usage.tag.description=Specify single argument custom tags
+
+doclet.usage.taglet.name=taglet
+doclet.usage.taglet.description=The fully qualified name of Taglet to register
+
+doclet.usage.tagletpath.name=tagletpath
+doclet.usage.tagletpath.description=The path to Taglets
+
+doclet.usage.charset.name=charset
+doclet.usage.charset.parameters=<charset>
+doclet.usage.charset.description=Charset for cross-platform viewing of generated documentation
+
+doclet.usage.helpfile.name=helpfile
+doclet.usage.helpfile.parameters=<file>
+doclet.usage.helpfile.description=Include file that help link links to
+
+doclet.usage.linksource.name=linksource
+doclet.usage.linksource.description=Generate source in HTML
+
+doclet.usage.sourcetab.name=sourcetab
+doclet.usage.sourcetab.parameters=<tab length>
+doclet.usage.sourcetab.description=Specify the number of spaces each tab takes up in the source
+
+doclet.usage.keywords.name=keywords
+doclet.usage.keywords.description=Include HTML meta tags with package, class and member info
+
+doclet.usage.stylesheetfile.name=stylesheetfile
+doclet.usage.stylesheetfile.parameters=<path>
+doclet.usage.stylesheetfile.description=File to change style of the generated documentation
+
+doclet.usage.docencoding.name=docencoding
+doclet.usage.docencoding.parameters=<name>
+doclet.usage.docencoding.description=Specify the character encoding for the output
+
+doclet.xusage.xdocrootparent.name=Xdocrootparent
+doclet.xusage.xdocrootparent.parameters=<url>
+doclet.xusage.xdocrootparent.description=Replaces all @docRoot followed by /.. in doc comments with <url>
+
+doclet.xusage.xdoclint.name=Xdoclint
+doclet.xusage.xdoclint.description=Enable recommended checks for problems in javadoc comments
+
+doclet.xusage.xdoclint-extended.name=Xdoclint:
+doclet.xusage.xdoclint-extended.parameters=(all|none|[-]<group>)
+# L10N: do not localize these words: all none accessibility html missing reference syntax
+doclet.xusage.xdoclint-extended.description=Enable or disable specific checks for problems in javadoc comments,\n\
+\                                   Enable or disable specific checks for problems in javadoc comments,\n\
+\                                   where <group> is one of accessibility, html, missing, reference, or syntax.\n
+
+doclet.xusage.xdoclint-package.name=Xdoclint/package:
+doclet.xusage.xdoclint-package.parameters=([-]<packages>)
+doclet.xusage.xdoclint-package.description=Enable or disable checks in specific packages. <packages> is a comma separated\n\
+\        list of package specifiers. Package specifier is either a qualified name of a package\n\
+\        or a package name prefix followed by .*, which expands to all sub-packages of\n\
+\        the given package. Prefix the package specifier with - to disable checks for\n\
+\        the specified packages.\n
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_ja.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,193 @@
+doclet.build_version=\u6A19\u6E96Doclet\u30D0\u30FC\u30B8\u30E7\u30F3{0}
+doclet.Contents=\u30B3\u30F3\u30C6\u30F3\u30C4
+doclet.Overview=\u6982\u8981
+doclet.Window_Overview=\u6982\u8981\u30EA\u30B9\u30C8
+doclet.Window_Overview_Summary=\u6982\u8981
+doclet.Package=\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Profile=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
+doclet.All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.All_Profiles=\u3059\u3079\u3066\u306E\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
+doclet.Tree=\u968E\u5C64\u30C4\u30EA\u30FC
+doclet.Class_Hierarchy=\u30AF\u30E9\u30B9\u968E\u5C64
+doclet.Window_Class_Hierarchy=\u30AF\u30E9\u30B9\u968E\u5C64
+doclet.Interface_Hierarchy=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u968E\u5C64
+doclet.Enum_Hierarchy=\u5217\u6319\u578B\u968E\u5C64
+doclet.Annotation_Type_Hierarchy=\u6CE8\u91C8\u578B\u968E\u5C64
+doclet.Prev=\u524D
+doclet.Next=\u6B21
+doclet.Prev_Class=\u524D\u306E\u30AF\u30E9\u30B9
+doclet.Next_Class=\u6B21\u306E\u30AF\u30E9\u30B9
+doclet.Prev_Package=\u524D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Next_Package=\u6B21\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Prev_Profile=\u524D\u306E\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
+doclet.Next_Profile=\u6B21\u306E\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
+doclet.Prev_Letter=\u524D\u306E\u6587\u5B57
+doclet.Next_Letter=\u6B21\u306E\u6587\u5B57
+doclet.Href_Class_Title={0}\u5185\u306E\u30AF\u30E9\u30B9
+doclet.Href_Interface_Title={0}\u5185\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Href_Annotation_Title={0}\u5185\u306E\u6CE8\u91C8
+doclet.Href_Enum_Title={0}\u5185\u306E\u5217\u6319\u578B
+doclet.Href_Type_Param_Title={0}\u5185\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF
+doclet.Href_Class_Or_Interface_Title={0}\u5185\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Summary=\u6982\u8981:
+doclet.Detail=\u8A73\u7D30:
+doclet.navNested=\u30CD\u30B9\u30C8
+doclet.navAnnotationTypeOptionalMember=\u30AA\u30D7\u30B7\u30E7\u30F3
+doclet.navAnnotationTypeRequiredMember=\u5FC5\u9808
+doclet.navAnnotationTypeMember=\u8981\u7D20
+doclet.navField=\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.navProperty=\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.navEnum=\u5217\u6319\u578B\u5B9A\u6570
+doclet.navConstructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.navMethod=\u30E1\u30BD\u30C3\u30C9
+doclet.Index=\u7D22\u5F15
+doclet.Window_Single_Index=\u7D22\u5F15
+doclet.Window_Split_Index={0}\u306E\u7D22\u5F15
+doclet.Help=\u30D8\u30EB\u30D7
+doclet.Skip_navigation_links=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30EA\u30F3\u30AF\u3092\u30B9\u30AD\u30C3\u30D7
+doclet.Navigation=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3
+doclet.New_Page=NewPage
+doclet.navDeprecated=\u975E\u63A8\u5968
+doclet.Window_Deprecated_List=\u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8
+doclet.Overrides=\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9:
+doclet.in_class=\u30AF\u30E9\u30B9\u5185
+doclet.Static_variable_in={0}\u306Estatic\u5909\u6570
+doclet.Variable_in={0}\u306E\u5909\u6570
+doclet.Constructor_for={0}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.Static_method_in={0}\u306Estatic\u30E1\u30BD\u30C3\u30C9
+doclet.Method_in={0}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.package=\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.MalformedURL=\u4E0D\u6B63\u306AURL: {0}
+doclet.File_error=\u30D5\u30A1\u30A4\u30EB\u8AAD\u8FBC\u307F\u30A8\u30E9\u30FC: {0}
+doclet.URL_error=URL\u53D6\u51FA\u3057\u30A8\u30E9\u30FC: {0}
+doclet.see.class_or_package_not_found=\u30BF\u30B0{0}: \u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {1}
+doclet.see.class_or_package_not_accessible=\u30BF\u30B0{0}: \u53C2\u7167\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093: {1}
+doclet.Deprecated_API=\u975E\u63A8\u5968\u306EAPI
+doclet.Deprecated_Packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Deprecated_Classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9
+doclet.Deprecated_Enums=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B
+doclet.Deprecated_Interfaces=\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Deprecated_Exceptions=\u975E\u63A8\u5968\u306E\u4F8B\u5916
+doclet.Deprecated_Annotation_Types=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B
+doclet.Deprecated_Errors=\u975E\u63A8\u5968\u306E\u30A8\u30E9\u30FC
+doclet.Deprecated_Fields=\u975E\u63A8\u5968\u306E\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Deprecated_Constructors=\u975E\u63A8\u5968\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.Deprecated_Methods=\u975E\u63A8\u5968\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.Deprecated_Enum_Constants=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B\u5B9A\u6570
+doclet.Deprecated_Annotation_Type_Members=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B\u306E\u8981\u7D20
+doclet.deprecated_packages=\u975E\u63A8\u5968\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.deprecated_classes=\u975E\u63A8\u5968\u306E\u30AF\u30E9\u30B9
+doclet.deprecated_enums=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B
+doclet.deprecated_interfaces=\u975E\u63A8\u5968\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.deprecated_exceptions=\u975E\u63A8\u5968\u306E\u4F8B\u5916
+doclet.deprecated_annotation_types=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B
+doclet.deprecated_errors=\u975E\u63A8\u5968\u306E\u30A8\u30E9\u30FC
+doclet.deprecated_fields=\u975E\u63A8\u5968\u306E\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.deprecated_constructors=\u975E\u63A8\u5968\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.deprecated_methods=\u975E\u63A8\u5968\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.deprecated_enum_constants=\u975E\u63A8\u5968\u306E\u5217\u6319\u578B\u5B9A\u6570
+doclet.deprecated_annotation_type_members=\u975E\u63A8\u5968\u306E\u6CE8\u91C8\u578B\u306E\u8981\u7D20
+doclet.Generated_Docs_Untitled=\u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8(\u30BF\u30A4\u30C8\u30EB\u306A\u3057)
+doclet.Other_Packages=\u305D\u306E\u4ED6\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Package_Description=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u8AAC\u660E
+doclet.Description=\u8AAC\u660E
+doclet.Specified_By=\u5B9A\u7FA9:
+doclet.in_interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u5185
+doclet.Subclasses=\u76F4\u7CFB\u306E\u65E2\u77E5\u306E\u30B5\u30D6\u30AF\u30E9\u30B9:
+doclet.Subinterfaces=\u65E2\u77E5\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8:
+doclet.Implementing_Classes=\u65E2\u77E5\u306E\u5B9F\u88C5\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8:
+doclet.Functional_Interface=\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Functional_Interface_Message=\u3053\u308C\u306F\u6A5F\u80FD\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306A\u306E\u3067\u3001\u30E9\u30E0\u30C0\u5F0F\u307E\u305F\u306F\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u5272\u5F53\u3066\u30BF\u30FC\u30B2\u30C3\u30C8\u3068\u3057\u3066\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002 
+doclet.also=\u540C\u69D8\u306B
+doclet.Frames=\u30D5\u30EC\u30FC\u30E0
+doclet.No_Frames=\u30D5\u30EC\u30FC\u30E0\u306A\u3057
+doclet.Package_Hierarchies=\u30D1\u30C3\u30B1\u30FC\u30B8\u968E\u5C64:
+doclet.Hierarchy_For_Package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u968E\u5C64
+doclet.Hierarchy_For_All_Packages=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64
+doclet.Frame_Alert=\u30D5\u30EC\u30FC\u30E0\u95A2\u9023\u306E\u30A2\u30E9\u30FC\u30C8
+doclet.Frame_Warning_Message=\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30D5\u30EC\u30FC\u30E0\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u3066\u8868\u793A\u3059\u308B\u3088\u3046\u306B\u4F5C\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D5\u30EC\u30FC\u30E0\u3092\u8868\u793A\u3067\u304D\u306A\u3044Web\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u5834\u5408\u306B\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002{0}\u306B\u30EA\u30F3\u30AF\u3057\u307E\u3059\u3002
+doclet.No_Script_Message=\u30D6\u30E9\u30A6\u30B6\u306EJavaScript\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002
+doclet.Non_Frame_Version=\u30D5\u30EC\u30FC\u30E0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30F3
+doclet.Description_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E:
+doclet.Description_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E:
+doclet.No_Non_Deprecated_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308B\u975E\u63A8\u5968\u3067\u306A\u3044\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
+doclet.Interfaces_Italic=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u30A4\u30BF\u30EA\u30C3\u30AF)
+doclet.Enclosing_Class=\u542B\u307E\u308C\u3066\u3044\u308B\u30AF\u30E9\u30B9:
+doclet.Enclosing_Interface=\u542B\u307E\u308C\u3066\u3044\u308B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9:
+doclet.Window_Source_title=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9
+doclet.Window_Help_title=API\u30D8\u30EB\u30D7
+doclet.Help_line_1=API\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u69CB\u6210
+doclet.Help_line_2=\u3053\u306EAPI(Application Programming Interface)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u6B21\u306B\u8AAC\u660E\u3059\u308B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u3042\u308B\u9805\u76EE\u306B\u5BFE\u5FDC\u3059\u308B\u30DA\u30FC\u30B8\u304C\u542B\u307E\u308C\u307E\u3059\u3002
+doclet.Help_line_3={0}\u30DA\u30FC\u30B8\u306FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30ED\u30F3\u30C8\u30FB\u30DA\u30FC\u30B8\u3067\u3001\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u3092\u542B\u3080\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30EA\u30B9\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4E00\u9023\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u8AAC\u660E\u3082\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_4=\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u6982\u8981\u3092\u542B\u3080\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306F6\u3064\u306E\u30AB\u30C6\u30B4\u30EA\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_5=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Help_line_6=\u5404\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u500B\u5225\u306E\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u30DA\u30FC\u30B8\u306B\u306F\u6B21\u306E\u3088\u3046\u306B\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E\u3068\u3001\u6982\u8981\u8868\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u8A73\u7D30\u8AAC\u660E\u304C\u542B\u307E\u308C\u307E\u3059\u3002
+doclet.Help_line_7=\u30AF\u30E9\u30B9\u968E\u5C64\u8868\u793A
+doclet.Help_line_8=\u76F4\u7CFB\u306E\u30B5\u30D6\u30AF\u30E9\u30B9
+doclet.Help_line_9=\u65E2\u77E5\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8
+doclet.Help_line_10=\u65E2\u77E5\u306E\u5B9F\u88C5\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8
+doclet.Help_line_11=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u5BA3\u8A00
+doclet.Help_line_12=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E
+doclet.Help_line_13=\u5404\u6982\u8981\u30A8\u30F3\u30C8\u30EA\u306B\u306F\u3001\u305D\u306E\u9805\u76EE\u306E\u8A73\u7D30\u306A\u8AAC\u660E\u306E\u4E2D\u304B\u30891\u884C\u76EE\u306E\u6587\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u8A73\u7D30\u306A\u8AAC\u660E\u306F\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u306B\u73FE\u308C\u308B\u9806\u306B\u4E26\u3079\u3089\u308C\u307E\u3059\u304C\u3001\u6982\u8981\u30A8\u30F3\u30C8\u30EA\u306F\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u306B\u4E26\u3079\u3089\u308C\u307E\u3059\u3002\u3053\u308C\u306B\u3088\u3063\u3066\u3001\u30D7\u30ED\u30B0\u30E9\u30DE\u304C\u8A2D\u5B9A\u3057\u305F\u8AD6\u7406\u7684\u306A\u30B0\u30EB\u30FC\u30D7\u5206\u3051\u304C\u4FDD\u6301\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_14=\u4F7F\u7528
+doclet.Help_line_15=\u5404\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u305F\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u305D\u308C\u305E\u308C\u300C\u4F7F\u7528\u300D\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306B\u306F\u3001\u3069\u306E\u3088\u3046\u306A\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u3001\u30E1\u30BD\u30C3\u30C9\u3001\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u304C\u3001\u7279\u5B9A\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4E00\u90E8\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u304B\u304C\u8A18\u8FF0\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u305F\u3068\u3048\u3070\u3001\u30AF\u30E9\u30B9A\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9A\u306E\u5834\u5408\u3001\u305D\u306E\u300C\u4F7F\u7528\u300D\u30DA\u30FC\u30B8\u306B\u306F\u3001A\u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3001A\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u308B\u30D5\u30A3\u30FC\u30EB\u30C9\u3001A\u3092\u8FD4\u3059\u30E1\u30BD\u30C3\u30C9\u3068\u3001\u578BA\u3092\u6301\u3064\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u304C\u542B\u307E\u308C\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306B\u30A2\u30AF\u30BB\u30B9\u3059\u308B\u306B\u306F\u3001\u307E\u305A\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u79FB\u52D5\u3057\u3001\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306E\u300C\u4F7F\u7528\u300D\u30EA\u30F3\u30AF\u3092\u30AF\u30EA\u30C3\u30AF\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+doclet.Help_line_16=\u968E\u5C64\u30C4\u30EA\u30FC(\u30AF\u30E9\u30B9\u968E\u5C64)
+doclet.Help_line_17_with_tree_link=\u3059\u3079\u3066\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F{0}\u30DA\u30FC\u30B8\u304C\u3042\u308A\u3001\u3055\u3089\u306B\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u968E\u5C64\u30DA\u30FC\u30B8\u306F\u3001\u30AF\u30E9\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3092\u542B\u307F\u307E\u3059\u3002\u30AF\u30E9\u30B9\u306F{1}\u3092\u958B\u59CB\u70B9\u3068\u3059\u308B\u7D99\u627F\u69CB\u9020\u3067\u7DE8\u6210\u3055\u308C\u307E\u3059\u3002\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306F\u3001{1}\u304B\u3089\u306F\u7D99\u627F\u3057\u307E\u305B\u3093\u3002
+doclet.Help_line_18=\u6982\u8981\u30DA\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u300C\u968E\u5C64\u30C4\u30EA\u30FC\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u968E\u5C64\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_19=\u7279\u5B9A\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3092\u8868\u793A\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u300C\u968E\u5C64\u30C4\u30EA\u30FC\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u8A72\u5F53\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u307F\u306E\u968E\u5C64\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_20_with_deprecated_api_link={0}\u30DA\u30FC\u30B8\u306F\u3001\u975E\u63A8\u5968\u306EAPI\u3092\u3059\u3079\u3066\u30EA\u30B9\u30C8\u3057\u307E\u3059\u3002\u975E\u63A8\u5968\u306EAPI\u3068\u306F\u3001\u6A5F\u80FD\u6539\u826F\u306A\u3069\u306E\u7406\u7531\u304B\u3089\u4F7F\u7528\u3092\u304A\u85A6\u3081\u3067\u304D\u306A\u304F\u306A\u3063\u305FAPI\u306E\u3053\u3068\u3067\u3001\u901A\u5E38\u306F\u305D\u308C\u306B\u4EE3\u308F\u308BAPI\u304C\u63D0\u4F9B\u3055\u308C\u307E\u3059\u3002\u975E\u63A8\u5968\u306EAPI\u306F\u4ECA\u5F8C\u306E\u5B9F\u88C5\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059\u3002
+doclet.Help_line_21=\u7D22\u5F15
+doclet.Help_line_22={0}\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3001\u30E1\u30BD\u30C3\u30C9\u304A\u3088\u3073\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30A2\u30EB\u30D5\u30A1\u30D9\u30C3\u30C8\u9806\u306E\u30EA\u30B9\u30C8\u304C\u542B\u307E\u308C\u307E\u3059\u3002
+doclet.Help_line_23=\u524D/\u6B21
+doclet.Help_line_24=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306B\u3088\u308A\u3001\u524D\u307E\u305F\u306F\u6B21\u306E\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u307E\u305F\u306F\u95A2\u9023\u30DA\u30FC\u30B8\u3078\u79FB\u52D5\u3067\u304D\u307E\u3059\u3002
+doclet.Help_line_25=\u30D5\u30EC\u30FC\u30E0/\u30D5\u30EC\u30FC\u30E0\u306A\u3057
+doclet.Help_line_26=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306FHTML\u30D5\u30EC\u30FC\u30E0\u306E\u8868\u793A\u3068\u975E\u8868\u793A\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30DA\u30FC\u30B8\u306F\u30D5\u30EC\u30FC\u30E0\u3042\u308A\u3067\u3082\u3001\u30D5\u30EC\u30FC\u30E0\u306A\u3057\u3067\u3082\u8868\u793A\u3067\u304D\u307E\u3059\u3002
+doclet.Help_line_27={0}\u30EA\u30F3\u30AF\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F)\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_28=\u76F4\u5217\u5316\u53EF\u80FD\u307E\u305F\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u5404\u30AF\u30E9\u30B9\u306F\u3001\u76F4\u5217\u5316\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9\u306E\u8AAC\u660E\u3092\u542B\u307F\u307E\u3059\u3002\u3053\u306E\u60C5\u5831\u306F\u3001API\u3092\u4F7F\u7528\u3059\u308B\u958B\u767A\u8005\u3067\u306F\u306A\u304F\u3001\u518D\u5B9F\u88C5\u3092\u884C\u3046\u62C5\u5F53\u8005\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u30EA\u30F3\u30AF\u304C\u306A\u3044\u5834\u5408\u3001\u76F4\u5217\u5316\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306B\u79FB\u52D5\u3057\u3066\u3001\u30AF\u30E9\u30B9\u8A18\u8FF0\u306E\u300C\u95A2\u9023\u9805\u76EE\u300D\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3042\u308B\u300C\u76F4\u5217\u5316\u3055\u308C\u305F\u5F62\u5F0F\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u3053\u306E\u60C5\u5831\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002
+doclet.Help_line_29={0}\u30DA\u30FC\u30B8\u306B\u306F\u3001static final\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u305D\u306E\u5024\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u3002
+doclet.Help_line_30=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u6A19\u6E96doclet\u3092\u4F7F\u7528\u3057\u3066\u751F\u6210\u3055\u308C\u305FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002
+doclet.Help_enum_line_1=\u5404\u5217\u6319\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059:
+doclet.Help_enum_line_2=\u5217\u6319\u578B\u306E\u5BA3\u8A00
+doclet.Help_enum_line_3=\u5217\u6319\u578B\u306E\u8AAC\u660E
+doclet.Help_annotation_type_line_1=\u5404\u6CE8\u91C8\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059:
+doclet.Help_annotation_type_line_2=\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00
+doclet.Help_annotation_type_line_3=\u6CE8\u91C8\u578B\u306E\u8AAC\u660E
+doclet.ClassUse_Packages.that.use.0={0}\u3092\u4F7F\u7528\u3057\u3066\u3044\u308B\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.ClassUse_Uses.of.0.in.1={1}\u3067\u306E{0}\u306E\u4F7F\u7528
+doclet.ClassUse_Classes.in.0.used.by.1={1}\u306B\u3088\u308A\u4F7F\u7528\u3055\u308C\u308B{0}\u306E\u30AF\u30E9\u30B9
+doclet.ClassUse_PackageAnnotation={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.ClassUse_Annotation={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_TypeParameter={0}\u578B\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30AF\u30E9\u30B9
+doclet.ClassUse_MethodTypeParameter={0}\u578B\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_FieldTypeParameter={0}\u578B\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.ClassUse_FieldAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.ClassUse_MethodAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_MethodParameterAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF
+doclet.ClassUse_MethodReturnTypeParameter={0}\u578B\u306E\u5F15\u6570\u3092\u6301\u3064\u578B\u3092\u8FD4\u3059{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_Subclass={1}\u3067\u306E{0}\u306E\u30B5\u30D6\u30AF\u30E9\u30B9
+doclet.ClassUse_Subinterface={1}\u3067\u306E{0}\u306E\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.ClassUse_ImplementingClass={0}\u3092\u5B9F\u88C5\u3057\u3066\u3044\u308B{1}\u306E\u30AF\u30E9\u30B9
+doclet.ClassUse_Field={0}\u3068\u3057\u3066\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B{1}\u306E\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.ClassUse_MethodReturn={0}\u3092\u8FD4\u3059{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_MethodArgs={0}\u578B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_MethodArgsTypeParameters={0}\u578B\u306E\u578B\u5F15\u6570\u3092\u6301\u3064{1}\u306E\u30E1\u30BD\u30C3\u30C9\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF
+doclet.ClassUse_MethodThrows={0}\u3092\u30B9\u30ED\u30FC\u3059\u308B{1}\u306E\u30E1\u30BD\u30C3\u30C9
+doclet.ClassUse_ConstructorAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.ClassUse_ConstructorParameterAnnotations={0}\u578B\u306E\u6CE8\u91C8\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF
+doclet.ClassUse_ConstructorArgs={0}\u578B\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.ClassUse_ConstructorArgsTypeParameters={0}\u578B\u306E\u578B\u5F15\u6570\u3092\u6301\u3064{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u30FB\u30D1\u30E9\u30E1\u30FC\u30BF
+doclet.ClassUse_ConstructorThrows={0}\u3092\u30B9\u30ED\u30FC\u3059\u308B{1}\u306E\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.ClassUse_No.usage.of.0={0}\u306F\u3069\u3053\u304B\u3089\u3082\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+doclet.Window_ClassUse_Header={0} {1}\u306E\u4F7F\u7528
+doclet.ClassUse_Title={0}\u306E\u4F7F\u7528
+doclet.navClassUse=\u4F7F\u7528
+doclet.Error_in_packagelist=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u4F7F\u7528\u65B9\u6CD5\u306E\u30A8\u30E9\u30FC: {0} {1}
+doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.exception_encountered={1}\u306E\u51E6\u7406\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n{0}
+doclet.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n-d <directory>                    \u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n-use                              \u30AF\u30E9\u30B9\u3068\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4F7F\u7528\u30DA\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\n-version                          @version\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-author                           @author\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-docfilessubdirs                  doc-file\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u518D\u5E30\u7684\u306B\u30B3\u30D4\u30FC\u3059\u308B\n-splitindex                       1\u5B57\u3054\u3068\u306B1\u30D5\u30A1\u30A4\u30EB\u306B\u7D22\u5F15\u3092\u5206\u5272\u3059\u308B\n-windowtitle <text>               \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7528\u306E\u30D6\u30E9\u30A6\u30B6\u30FB\u30A6\u30A3\u30F3\u30C9\u30A6\u30FB\u30BF\u30A4\u30C8\u30EB\n-doctitle <html-code>             \u6982\u8981\u30DA\u30FC\u30B8\u306B\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u3081\u308B\n-header <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u30D8\u30C3\u30C0\u30FC\u3092\u542B\u3081\u308B\n-footer <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u30D5\u30C3\u30BF\u30FC\u3092\u542B\u3081\u308B\n-top    <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u4E0A\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-bottom <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u4E0B\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-link <url>                       <url>\u306Bjavadoc\u51FA\u529B\u3078\u306E\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3059\u308B\n-linkoffline <url> <url2>         <url2>\u306B\u3042\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066<url>\u306Edocs\u306B\u30EA\u30F3\u30AF\u3059\u308B\n-excludedocfilessubdir <name1>:.. \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3059\u308B\n-group <name> <p1>:<p2>..         \u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\n-nocomment                        \u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n-nodeprecated                     @deprecated\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-noqualifier <name1>:<name2>:...  \u51FA\u529B\u304B\u3089\u4FEE\u98FE\u5B50\u306E\u30EA\u30B9\u30C8\u3092\u9664\u5916\u3059\u308B\n-nosince                          @since\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-notimestamp                      \u975E\u8868\u793A\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u9664\u5916\u3059\u308B\n-nodeprecatedlist                 \u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u306A\u3044\n-notree                           \u30AF\u30E9\u30B9\u968E\u5C64\u3092\u751F\u6210\u3057\u306A\u3044\n-noindex                          \u7D22\u5F15\u3092\u751F\u6210\u3057\u306A\u3044\n-nohelp                           \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u3092\u751F\u6210\u3057\u306A\u3044\n-nonavbar                         \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u3092\u751F\u6210\u3057\u306A\u3044\n-serialwarn                       @serial\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8B66\u544A\u3092\u751F\u6210\u3059\u308B\n-tag <name>:<locations>:<header>  \u5358\u4E00\u306E\u5F15\u6570\u3092\u6301\u3064\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u3092\u6307\u5B9A\u3059\u308B\n-taglet                           \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u767B\u9332\u3059\u308B\n-tagletpath                       \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u30D1\u30B9\n-charset \
+<charset>                \u751F\u6210\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\n-helpfile <file>                  \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u306E\u30EA\u30F3\u30AF\u5148\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B\n-linksource                       HTML\u5F62\u5F0F\u3067\u30BD\u30FC\u30B9\u3092\u751F\u6210\u3059\u308B\n-sourcetab <tab length>           \u30BD\u30FC\u30B9\u5185\u306E\u30BF\u30D6\u306E\u7A7A\u767D\u6587\u5B57\u306E\u6570\u3092\u6307\u5B9A\u3059\u308B\n-keywords                         HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u308B\n-stylesheetfile <path>            \u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB\n-docencoding <name>               \u51FA\u529B\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B
+
+
+# L10N: do not localize these words: all none accessibility html missing reference syntax
+doclet.X.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n  -Xdocrootparent <url>            doc\u30B3\u30E1\u30F3\u30C8\u5185\u306E/..\u304C\u5F8C\u306B\u7D9A\u304F@docRoot\u306E\u3059\u3079\u3066\u3092\n                                   <url>\u3067\u7F6E\u63DB\u3057\u307E\u3059\n  -Xdoclint                        javadoc\u30B3\u30E1\u30F3\u30C8\u5185\u306E\u554F\u984C\u306B\u5BFE\u3059\u308B\u63A8\u5968\u3055\u308C\u308B\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n  -Xdoclint:(all|none|[-]<group>) \n        javadoc\u30B3\u30E1\u30F3\u30C8\u5185\u306E\u554F\u984C\u306B\u5BFE\u3059\u308B\u7279\u5B9A\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\n        \u3053\u3053\u3067\u3001<group>\u306Fhtml\u3001missing\u3001reference\u307E\u305F\u306Fsyntax\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002\n
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/standard_zh_CN.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,192 @@
+doclet.build_version=\u6807\u51C6 Doclet \u7248\u672C {0}
+doclet.Contents=\u76EE\u5F55
+doclet.Overview=\u6982\u89C8
+doclet.Window_Overview=\u6982\u89C8\u5217\u8868
+doclet.Window_Overview_Summary=\u6982\u89C8
+doclet.Package=\u7A0B\u5E8F\u5305
+doclet.Profile=\u914D\u7F6E\u6587\u4EF6
+doclet.All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305
+doclet.All_Profiles=\u6240\u6709\u914D\u7F6E\u6587\u4EF6
+doclet.Tree=\u6811
+doclet.Class_Hierarchy=\u7C7B\u5206\u5C42\u7ED3\u6784
+doclet.Window_Class_Hierarchy=\u7C7B\u5206\u5C42\u7ED3\u6784
+doclet.Interface_Hierarchy=\u63A5\u53E3\u5206\u5C42\u7ED3\u6784
+doclet.Enum_Hierarchy=\u679A\u4E3E\u5206\u5C42\u7ED3\u6784
+doclet.Annotation_Type_Hierarchy=\u6CE8\u91CA\u7C7B\u578B\u5206\u5C42\u7ED3\u6784
+doclet.Prev=\u4E0A\u4E00\u4E2A
+doclet.Next=\u4E0B\u4E00\u4E2A
+doclet.Prev_Class=\u4E0A\u4E00\u4E2A\u7C7B
+doclet.Next_Class=\u4E0B\u4E00\u4E2A\u7C7B
+doclet.Prev_Package=\u4E0A\u4E00\u4E2A\u7A0B\u5E8F\u5305
+doclet.Next_Package=\u4E0B\u4E00\u4E2A\u7A0B\u5E8F\u5305
+doclet.Prev_Profile=\u4E0A\u4E00\u914D\u7F6E\u6587\u4EF6
+doclet.Next_Profile=\u4E0B\u4E00\u914D\u7F6E\u6587\u4EF6
+doclet.Prev_Letter=\u4E0A\u4E00\u4E2A\u5B57\u6BCD
+doclet.Next_Letter=\u4E0B\u4E00\u4E2A\u5B57\u6BCD
+doclet.Href_Class_Title={0}\u4E2D\u7684\u7C7B
+doclet.Href_Interface_Title={0}\u4E2D\u7684\u63A5\u53E3
+doclet.Href_Annotation_Title={0}\u4E2D\u7684\u6CE8\u91CA
+doclet.Href_Enum_Title={0}\u4E2D\u7684\u679A\u4E3E
+doclet.Href_Type_Param_Title={0}\u4E2D\u7684\u7C7B\u578B\u53C2\u6570
+doclet.Href_Class_Or_Interface_Title={0}\u4E2D\u7684\u7C7B\u6216\u63A5\u53E3
+doclet.Summary=\u6982\u8981:
+doclet.Detail=\u8BE6\u7EC6\u8D44\u6599:
+doclet.navNested=\u5D4C\u5957
+doclet.navAnnotationTypeOptionalMember=\u53EF\u9009
+doclet.navAnnotationTypeRequiredMember=\u5FC5\u9700
+doclet.navAnnotationTypeMember=\u5143\u7D20
+doclet.navField=\u5B57\u6BB5
+doclet.navProperty=\u5C5E\u6027
+doclet.navEnum=\u679A\u4E3E\u5E38\u91CF
+doclet.navConstructor=\u6784\u9020\u5668
+doclet.navMethod=\u65B9\u6CD5
+doclet.Index=\u7D22\u5F15
+doclet.Window_Single_Index=\u7D22\u5F15
+doclet.Window_Split_Index={0} - \u7D22\u5F15
+doclet.Help=\u5E2E\u52A9
+doclet.Skip_navigation_links=\u8DF3\u8FC7\u5BFC\u822A\u94FE\u63A5
+doclet.Navigation=\u5BFC\u822A
+doclet.New_Page=NewPage
+doclet.navDeprecated=\u5DF2\u8FC7\u65F6
+doclet.Window_Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868
+doclet.Overrides=\u8986\u76D6:
+doclet.in_class=\u5728\u7C7B\u4E2D
+doclet.Static_variable_in={0}\u4E2D\u7684\u9759\u6001\u53D8\u91CF
+doclet.Variable_in={0}\u4E2D\u7684\u53D8\u91CF
+doclet.Constructor_for={0}\u7684\u6784\u9020\u5668
+doclet.Static_method_in={0}\u4E2D\u7684\u9759\u6001\u65B9\u6CD5
+doclet.Method_in={0}\u4E2D\u7684\u65B9\u6CD5
+doclet.package=\u7A0B\u5E8F\u5305
+doclet.MalformedURL=\u683C\u5F0F\u9519\u8BEF\u7684 URL: {0}
+doclet.File_error=\u8BFB\u53D6\u6587\u4EF6\u65F6\u51FA\u9519: {0}
+doclet.URL_error=\u83B7\u53D6 URL \u65F6\u51FA\u9519: {0}
+doclet.see.class_or_package_not_found=\u6807\u8BB0{0}: \u627E\u4E0D\u5230\u5F15\u7528: {1}
+doclet.see.class_or_package_not_accessible=\u6807\u8BB0{0}: \u65E0\u6CD5\u8BBF\u95EE\u5F15\u7528: {1}
+doclet.Deprecated_API=\u5DF2\u8FC7\u65F6\u7684 API
+doclet.Deprecated_Packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305
+doclet.Deprecated_Classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B
+doclet.Deprecated_Enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E
+doclet.Deprecated_Interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3
+doclet.Deprecated_Exceptions=\u5DF2\u8FC7\u65F6\u7684\u5F02\u5E38\u9519\u8BEF
+doclet.Deprecated_Annotation_Types=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B
+doclet.Deprecated_Errors=\u5DF2\u8FC7\u65F6\u7684\u9519\u8BEF
+doclet.Deprecated_Fields=\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5
+doclet.Deprecated_Constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668
+doclet.Deprecated_Methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5
+doclet.Deprecated_Enum_Constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF
+doclet.Deprecated_Annotation_Type_Members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
+doclet.deprecated_packages=\u5DF2\u8FC7\u65F6\u7A0B\u5E8F\u5305
+doclet.deprecated_classes=\u5DF2\u8FC7\u65F6\u7684\u7C7B
+doclet.deprecated_enums=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E
+doclet.deprecated_interfaces=\u5DF2\u8FC7\u65F6\u7684\u63A5\u53E3
+doclet.deprecated_exceptions=\u5DF2\u8FC7\u65F6\u7684\u5F02\u5E38\u9519\u8BEF
+doclet.deprecated_annotation_types=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B
+doclet.deprecated_errors=\u5DF2\u8FC7\u65F6\u7684\u9519\u8BEF
+doclet.deprecated_fields=\u5DF2\u8FC7\u65F6\u7684\u5B57\u6BB5
+doclet.deprecated_constructors=\u5DF2\u8FC7\u65F6\u7684\u6784\u9020\u5668
+doclet.deprecated_methods=\u5DF2\u8FC7\u65F6\u7684\u65B9\u6CD5
+doclet.deprecated_enum_constants=\u5DF2\u8FC7\u65F6\u7684\u679A\u4E3E\u5E38\u91CF
+doclet.deprecated_annotation_type_members=\u5DF2\u8FC7\u65F6\u7684\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
+doclet.Generated_Docs_Untitled=\u751F\u6210\u7684\u6587\u6863 (\u65E0\u6807\u9898)
+doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305
+doclet.Package_Description=\u7A0B\u5E8F\u5305{0}\u7684\u8BF4\u660E
+doclet.Description=\u8BF4\u660E
+doclet.Specified_By=\u6307\u5B9A\u8005:
+doclet.in_interface=\u5728\u63A5\u53E3\u4E2D
+doclet.Subclasses=\u76F4\u63A5\u5DF2\u77E5\u5B50\u7C7B:
+doclet.Subinterfaces=\u6240\u6709\u5DF2\u77E5\u5B50\u63A5\u53E3:
+doclet.Implementing_Classes=\u6240\u6709\u5DF2\u77E5\u5B9E\u73B0\u7C7B:
+doclet.Functional_Interface=\u51FD\u6570\u63A5\u53E3:
+doclet.Functional_Interface_Message=\u8FD9\u662F\u4E00\u4E2A\u51FD\u6570\u63A5\u53E3, \u56E0\u6B64\u53EF\u7528\u4F5C lambda \u8868\u8FBE\u5F0F\u6216\u65B9\u6CD5\u5F15\u7528\u7684\u8D4B\u503C\u76EE\u6807\u3002
+doclet.also=\u5E76
+doclet.Frames=\u6846\u67B6
+doclet.No_Frames=\u65E0\u6846\u67B6
+doclet.Package_Hierarchies=\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784:
+doclet.Hierarchy_For_Package=\u7A0B\u5E8F\u5305{0}\u7684\u5206\u5C42\u7ED3\u6784
+doclet.Hierarchy_For_All_Packages=\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784
+doclet.Frame_Alert=\u6846\u67B6\u9884\u8B66
+doclet.Frame_Warning_Message=\u8BF7\u4F7F\u7528\u6846\u67B6\u529F\u80FD\u67E5\u770B\u6B64\u6587\u6863\u3002\u5982\u679C\u770B\u5230\u6B64\u6D88\u606F, \u5219\u8868\u660E\u60A8\u4F7F\u7528\u7684\u662F\u4E0D\u652F\u6301\u6846\u67B6\u7684 Web \u5BA2\u6237\u673A\u3002\u94FE\u63A5\u5230{0}\u3002
+doclet.No_Script_Message=\u60A8\u7684\u6D4F\u89C8\u5668\u5DF2\u7981\u7528 JavaScript\u3002
+doclet.Non_Frame_Version=\u975E\u6846\u67B6\u7248\u672C
+doclet.Description_From_Interface=\u4ECE\u63A5\u53E3\u590D\u5236\u7684\u8BF4\u660E:
+doclet.Description_From_Class=\u4ECE\u7C7B\u590D\u5236\u7684\u8BF4\u660E:
+doclet.No_Non_Deprecated_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u672A\u8FC7\u65F6\u7684\u7C7B\u3002
+doclet.Interfaces_Italic=\u63A5\u53E3 (\u659C\u4F53)
+doclet.Enclosing_Class=\u5C01\u95ED\u7C7B:
+doclet.Enclosing_Interface=\u5C01\u95ED\u63A5\u53E3:
+doclet.Window_Source_title=\u6E90\u4EE3\u7801
+doclet.Window_Help_title=API \u5E2E\u52A9
+doclet.Help_line_1=\u6B64 API \u6587\u6863\u7684\u7EC4\u7EC7\u65B9\u5F0F
+doclet.Help_line_2=\u6B64 API (\u5E94\u7528\u7A0B\u5E8F\u7F16\u7A0B\u63A5\u53E3) \u6587\u6863\u5305\u542B\u5BF9\u5E94\u4E8E\u5BFC\u822A\u680F\u4E2D\u7684\u9879\u76EE\u7684\u9875\u9762, \u5982\u4E0B\u6240\u8FF0\u3002
+doclet.Help_line_3={0} \u9875\u9762\u662F\u6B64 API \u6587\u6863\u7684\u9996\u9875, \u63D0\u4F9B\u4E86\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u4E5F\u53EF\u80FD\u5305\u542B\u8FD9\u4E9B\u7A0B\u5E8F\u5305\u7684\u603B\u4F53\u8BF4\u660E\u3002
+doclet.Help_line_4=\u6BCF\u4E2A\u7A0B\u5E8F\u5305\u90FD\u6709\u4E00\u4E2A\u9875\u9762, \u5176\u4E2D\u5305\u542B\u5B83\u7684\u7C7B\u548C\u63A5\u53E3\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u53EF\u4EE5\u5305\u542B\u516D\u4E2A\u7C7B\u522B:
+doclet.Help_line_5=\u7C7B/\u63A5\u53E3
+doclet.Help_line_6=\u6BCF\u4E2A\u7C7B, \u63A5\u53E3, \u5D4C\u5957\u7C7B\u548C\u5D4C\u5957\u63A5\u53E3\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762\u3002\u5176\u4E2D\u6BCF\u4E2A\u9875\u9762\u90FD\u7531\u4E09\u90E8\u5206 (\u7C7B/\u63A5\u53E3\u8BF4\u660E, \u6982\u8981\u8868, \u4EE5\u53CA\u8BE6\u7EC6\u7684\u6210\u5458\u8BF4\u660E) \u7EC4\u6210:
+doclet.Help_line_7=\u7C7B\u7EE7\u627F\u56FE
+doclet.Help_line_8=\u76F4\u63A5\u5B50\u7C7B
+doclet.Help_line_9=\u6240\u6709\u5DF2\u77E5\u5B50\u63A5\u53E3
+doclet.Help_line_10=\u6240\u6709\u5DF2\u77E5\u5B9E\u73B0\u7C7B
+doclet.Help_line_11=\u7C7B/\u63A5\u53E3\u58F0\u660E
+doclet.Help_line_12=\u7C7B/\u63A5\u53E3\u8BF4\u660E
+doclet.Help_line_13=\u6BCF\u4E2A\u6982\u8981\u6761\u76EE\u90FD\u5305\u542B\u8BE5\u9879\u76EE\u7684\u8BE6\u7EC6\u8BF4\u660E\u7684\u7B2C\u4E00\u53E5\u3002\u6982\u8981\u6761\u76EE\u6309\u5B57\u6BCD\u987A\u5E8F\u6392\u5217, \u800C\u8BE6\u7EC6\u8BF4\u660E\u5219\u6309\u5176\u5728\u6E90\u4EE3\u7801\u4E2D\u51FA\u73B0\u7684\u987A\u5E8F\u6392\u5217\u3002\u8FD9\u6837\u4FDD\u6301\u4E86\u7A0B\u5E8F\u5458\u6240\u5EFA\u7ACB\u7684\u903B\u8F91\u5206\u7EC4\u3002
+doclet.Help_line_14=\u4F7F\u7528
+doclet.Help_line_15=\u6BCF\u4E2A\u5DF2\u6587\u6863\u5316\u7684\u7A0B\u5E8F\u5305, \u7C7B\u548C\u63A5\u53E3\u90FD\u6709\u5404\u81EA\u7684\u201C\u4F7F\u7528\u201D\u9875\u9762\u3002\u6B64\u9875\u9762\u4ECB\u7ECD\u4E86\u4F7F\u7528\u7ED9\u5B9A\u7C7B\u6216\u7A0B\u5E8F\u5305\u7684\u4EFB\u4F55\u90E8\u5206\u7684\u7A0B\u5E8F\u5305, \u7C7B, \u65B9\u6CD5, \u6784\u9020\u5668\u548C\u5B57\u6BB5\u3002\u5BF9\u4E8E\u7ED9\u5B9A\u7684\u7C7B\u6216\u63A5\u53E3 A, \u5176\u201C\u4F7F\u7528\u201D\u9875\u9762\u5305\u542B A \u7684\u5B50\u7C7B, \u58F0\u660E\u4E3A A \u7684\u5B57\u6BB5, \u8FD4\u56DE A \u7684\u65B9\u6CD5, \u4EE5\u53CA\u5E26\u6709\u7C7B\u578B\u4E3A A \u7684\u53C2\u6570\u7684\u65B9\u6CD5\u548C\u6784\u9020\u5668\u3002\u8BBF\u95EE\u6B64\u9875\u9762\u7684\u65B9\u6CD5\u662F: \u9996\u5148\u8F6C\u81F3\u7A0B\u5E8F\u5305, \u7C7B\u6216\u63A5\u53E3, \u7136\u540E\u5355\u51FB\u5BFC\u822A\u680F\u4E2D\u7684 "\u4F7F\u7528" \u94FE\u63A5\u3002
+doclet.Help_line_16=\u6811 (\u7C7B\u5206\u5C42\u7ED3\u6784)
+doclet.Help_line_17_with_tree_link=\u5BF9\u4E8E\u6240\u6709\u7A0B\u5E8F\u5305, \u6709\u4E00\u4E2A{0}\u9875\u9762, \u4EE5\u53CA\u6BCF\u4E2A\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784\u3002\u6BCF\u4E2A\u5206\u5C42\u7ED3\u6784\u9875\u9762\u90FD\u5305\u542B\u7C7B\u7684\u5217\u8868\u548C\u63A5\u53E3\u7684\u5217\u8868\u3002\u4ECE{1}\u5F00\u59CB, \u6309\u7EE7\u627F\u7ED3\u6784\u5BF9\u7C7B\u8FDB\u884C\u6392\u5217\u3002\u63A5\u53E3\u4E0D\u4ECE{1}\u7EE7\u627F\u3002
+doclet.Help_line_18=\u67E5\u770B\u201C\u6982\u89C8\u201D\u9875\u9762\u65F6, \u5355\u51FB "\u6811" \u5C06\u663E\u793A\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784\u3002
+doclet.Help_line_19=\u67E5\u770B\u7279\u5B9A\u7A0B\u5E8F\u5305, \u7C7B\u6216\u63A5\u53E3\u9875\u9762\u65F6, \u5355\u51FB "\u6811" \u5C06\u4EC5\u663E\u793A\u8BE5\u7A0B\u5E8F\u5305\u7684\u5206\u5C42\u7ED3\u6784\u3002
+doclet.Help_line_20_with_deprecated_api_link={0} \u9875\u9762\u5217\u51FA\u4E86\u6240\u6709\u5DF2\u8FC7\u65F6\u7684 API\u3002\u4E00\u822C\u7531\u4E8E\u8FDB\u884C\u4E86\u6539\u8FDB\u5E76\u4E14\u901A\u5E38\u63D0\u4F9B\u4E86\u66FF\u4EE3\u7684 API, \u6240\u4EE5\u5EFA\u8BAE\u4E0D\u8981\u4F7F\u7528\u5DF2\u8FC7\u65F6\u7684 API\u3002\u5728\u5C06\u6765\u7684\u5B9E\u73B0\u8FC7\u7A0B\u4E2D, \u53EF\u80FD\u4F1A\u5220\u9664\u5DF2\u8FC7\u65F6\u7684 API\u3002
+doclet.Help_line_21=\u7D22\u5F15
+doclet.Help_line_22={0} \u5305\u542B\u6309\u5B57\u6BCD\u987A\u5E8F\u6392\u5217\u7684\u6240\u6709\u7C7B, \u63A5\u53E3, \u6784\u9020\u5668, \u65B9\u6CD5\u548C\u5B57\u6BB5\u7684\u5217\u8868\u3002
+doclet.Help_line_23=\u4E0A\u4E00\u4E2A/\u4E0B\u4E00\u4E2A
+doclet.Help_line_24=\u8FD9\u4E9B\u94FE\u63A5\u4F7F\u60A8\u53EF\u4EE5\u8F6C\u81F3\u4E0B\u4E00\u4E2A\u6216\u4E0A\u4E00\u4E2A\u7C7B, \u63A5\u53E3, \u7A0B\u5E8F\u5305\u6216\u76F8\u5173\u9875\u9762\u3002
+doclet.Help_line_25=\u6846\u67B6/\u65E0\u6846\u67B6
+doclet.Help_line_26=\u8FD9\u4E9B\u94FE\u63A5\u7528\u4E8E\u663E\u793A\u548C\u9690\u85CF HTML \u6846\u67B6\u3002\u6240\u6709\u9875\u9762\u5747\u5177\u6709\u6709\u6846\u67B6\u548C\u65E0\u6846\u67B6\u4E24\u79CD\u663E\u793A\u65B9\u5F0F\u3002
+doclet.Help_line_27={0}\u94FE\u63A5\u663E\u793A\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)\u3002
+doclet.Help_line_28=\u6BCF\u4E2A\u53EF\u5E8F\u5217\u5316\u6216\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u90FD\u6709\u5176\u5E8F\u5217\u5316\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u8BF4\u660E\u3002\u6B64\u4FE1\u606F\u5BF9\u91CD\u65B0\u5B9E\u73B0\u8005\u6709\u7528, \u800C\u5BF9\u4F7F\u7528 API \u7684\u5F00\u53D1\u8005\u5219\u6CA1\u6709\u4EC0\u4E48\u7528\u5904\u3002\u5C3D\u7BA1\u5BFC\u822A\u680F\u4E2D\u6CA1\u6709\u94FE\u63A5, \u4F46\u60A8\u53EF\u4EE5\u901A\u8FC7\u4E0B\u5217\u65B9\u5F0F\u83B7\u53D6\u6B64\u4FE1\u606F: \u8F6C\u81F3\u4EFB\u4F55\u5E8F\u5217\u5316\u7C7B, \u7136\u540E\u5355\u51FB\u7C7B\u8BF4\u660E\u7684 "\u53E6\u8BF7\u53C2\u9605" \u90E8\u5206\u4E2D\u7684 "\u5E8F\u5217\u5316\u8868\u683C"\u3002
+doclet.Help_line_29={0}\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002
+doclet.Help_line_30=\u6B64\u5E2E\u52A9\u6587\u4EF6\u9002\u7528\u4E8E\u4F7F\u7528\u6807\u51C6 doclet \u751F\u6210\u7684 API \u6587\u6863\u3002
+doclet.Help_enum_line_1=\u6BCF\u4E2A\u679A\u4E3E\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206:
+doclet.Help_enum_line_2=\u679A\u4E3E\u58F0\u660E
+doclet.Help_enum_line_3=\u679A\u4E3E\u8BF4\u660E
+doclet.Help_annotation_type_line_1=\u6BCF\u4E2A\u6CE8\u91CA\u7C7B\u578B\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206:
+doclet.Help_annotation_type_line_2=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E
+doclet.Help_annotation_type_line_3=\u6CE8\u91CA\u7C7B\u578B\u8BF4\u660E
+doclet.ClassUse_Packages.that.use.0=\u4F7F\u7528{0}\u7684\u7A0B\u5E8F\u5305
+doclet.ClassUse_Uses.of.0.in.1={1}\u4E2D{0}\u7684\u4F7F\u7528
+doclet.ClassUse_Classes.in.0.used.by.1={1}\u4F7F\u7528\u7684{0}\u4E2D\u7684\u7C7B
+doclet.ClassUse_PackageAnnotation=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684\u7A0B\u5E8F\u5305
+doclet.ClassUse_Annotation=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u7C7B
+doclet.ClassUse_TypeParameter=\u7C7B\u578B\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u7C7B
+doclet.ClassUse_MethodTypeParameter=\u7C7B\u578B\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5
+doclet.ClassUse_FieldTypeParameter=\u7C7B\u578B\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u5B57\u6BB5
+doclet.ClassUse_FieldAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u5B57\u6BB5
+doclet.ClassUse_MethodAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5
+doclet.ClassUse_MethodParameterAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5\u53C2\u6570
+doclet.ClassUse_MethodReturnTypeParameter=\u8FD4\u56DE\u53D8\u91CF\u7C7B\u578B\u4E3A{0}\u7684\u7C7B\u578B\u7684{1}\u4E2D\u7684\u65B9\u6CD5
+doclet.ClassUse_Subclass={1}\u4E2D{0}\u7684\u5B50\u7C7B
+doclet.ClassUse_Subinterface={1}\u4E2D{0}\u7684\u5B50\u63A5\u53E3
+doclet.ClassUse_ImplementingClass=\u5B9E\u73B0{0}\u7684{1}\u4E2D\u7684\u7C7B
+doclet.ClassUse_Field=\u58F0\u660E\u4E3A{0}\u7684{1}\u4E2D\u7684\u5B57\u6BB5
+doclet.ClassUse_MethodReturn=\u8FD4\u56DE{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5
+doclet.ClassUse_MethodArgs=\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5
+doclet.ClassUse_MethodArgsTypeParameters=\u7C7B\u578B\u53D8\u91CF\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5\u53C2\u6570
+doclet.ClassUse_MethodThrows=\u629B\u51FA{0}\u7684{1}\u4E2D\u7684\u65B9\u6CD5
+doclet.ClassUse_ConstructorAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668
+doclet.ClassUse_ConstructorParameterAnnotations=\u6CE8\u91CA\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668\u53C2\u6570
+doclet.ClassUse_ConstructorArgs=\u53C2\u6570\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668
+doclet.ClassUse_ConstructorArgsTypeParameters=\u7C7B\u578B\u53D8\u91CF\u7C7B\u578B\u4E3A{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668\u53C2\u6570
+doclet.ClassUse_ConstructorThrows=\u629B\u51FA{0}\u7684{1}\u4E2D\u7684\u6784\u9020\u5668
+doclet.ClassUse_No.usage.of.0=\u6CA1\u6709{0}\u7684\u7528\u6CD5
+doclet.Window_ClassUse_Header={0} {1}\u7684\u4F7F\u7528
+doclet.ClassUse_Title={0}\u7684\u4F7F\u7528
+doclet.navClassUse=\u4F7F\u7528
+doclet.Error_in_packagelist=\u4F7F\u7528 -group \u9009\u9879\u65F6\u51FA\u9519: {0} {1}
+doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0}
+doclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0}
+doclet.exception_encountered=\u5904\u7406{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\n{0}
+doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n  -d <directory>                   \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n  -use                             \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n  -version                         \u5305\u542B @version \u6BB5\n  -author                          \u5305\u542B @author \u6BB5\n  -docfilessubdirs                 \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n  -splitindex                      \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n  -windowtitle <text>              \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n  -doctitle <html-code>            \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n  -header <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n  -footer <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n  -top    <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n  -bottom <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n  -link <url>                      \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E <url> \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n  -linkoffline <url> <url2>        \u5229\u7528\u4F4D\u4E8E <url2> \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E <url> \u7684\u6587\u6863\n  -excludedocfilessubdir <name1>:.. \u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n  -group <name> <p1>:<p2>..        \u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n  -nocomment                       \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n  -nodeprecated                    \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n  -noqualifier <name1>:<name2>:... \u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u6307\u5B9A\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n  -nosince                         \u4E0D\u5305\u542B @since \u4FE1\u606F\n  -notimestamp                     \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n  -nodeprecatedlist                \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n  -notree                          \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n  -noindex                         \u4E0D\u751F\u6210\u7D22\u5F15\n  -nohelp                          \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n  -nonavbar                        \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n  -serialwarn                      \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n  -tag <name>:<locations>:<header> \u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n  -taglet                          \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n  -tagletpath                      Taglet \u7684\u8DEF\u5F84\n  -charset <charset>               \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n  -helpfile <file>                 \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n  -linksource                      \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n  -sourcetab <tab length>          \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n  -keywords                        \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n  -stylesheetfile <path>           \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n  -docencoding <name>              \u6307\u5B9A\u8F93\u51FA\u7684\u5B57\u7B26\u7F16\u7801
+
+
+# L10N: do not localize these words: all none accessibility html missing reference syntax
+doclet.X.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n  -Xdocrootparent <url>            \u4F7F\u7528 <url> \u66FF\u6362\u6587\u6863\u6CE8\u91CA\u4E2D\u51FA\u73B0\u7684\n                                   \u6240\u6709\u5176\u540E\u8DDF\u968F /.. \u7684 @docRoot\n  -Xdoclint                        \u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u5EFA\u8BAE\u7684\u68C0\u67E5\n  -Xdoclint:(all|none|[-]<group>) \n        \u5BF9 javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u68C0\u67E5\u3002\n        \u5176\u4E2D <group> \u662F accessibility, html, missing, reference \u6216 syntax \u4E4B\u4E00\u3002\n
Binary file src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/x.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2003, 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.
+ */
+
+/**
+    <p><b>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.</b>
+*/
+
+package jdk.javadoc.internal.doclets;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/standard/Standard.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,65 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.standard;
+
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
+
+public class Standard implements Doclet {
+
+    private final HtmlDoclet htmlDoclet;
+
+    public Standard() {
+        htmlDoclet = new HtmlDoclet();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        htmlDoclet.init(locale, reporter);
+    }
+
+    public String getName() {
+        return "Standard";
+    }
+
+    public Set<Doclet.Option> getSupportedOptions() {
+        return htmlDoclet.getSupportedOptions();
+    }
+
+    public SourceVersion getSupportedSourceVersion() {
+        return htmlDoclet.sourceVersion();
+    }
+
+    public boolean run(DocletEnvironment root) {
+        return htmlDoclet.run(root);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AbstractDoclet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder;
+import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.DocPaths;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.PackageListWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static javax.tools.Diagnostic.Kind.*;
+
+/**
+ * An abstract implementation of a Doclet.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public abstract class AbstractDoclet {
+
+    /**
+     * The global configuration information for this run.
+     */
+    public Configuration configuration;
+    /*
+     *  a handle to our utility methods
+     */
+    protected Utils utils;
+
+    /**
+     * The only doclet that may use this toolkit is {@value}
+     */
+    private static final String TOOLKIT_DOCLET_NAME =
+        jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.class.getName();
+
+    /**
+     * Verify that the only doclet that is using this toolkit is
+     * {@value #TOOLKIT_DOCLET_NAME}.
+     */
+    private boolean isValidDoclet() {
+        if (!getClass().getName().equals(TOOLKIT_DOCLET_NAME)) {
+            configuration.message.error("doclet.Toolkit_Usage_Violation",
+                TOOLKIT_DOCLET_NAME);
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * The method that starts the execution of the doclet.
+     *
+     * @param root   the {@link DocletEnvironment} that points to the source to document.
+     * @return true if the doclet executed without error.  False otherwise.
+     */
+    public boolean startDoclet(DocletEnvironment root) {
+        configuration = configuration();
+        configuration.root = root;
+        configuration.cmtUtils = new CommentUtils(configuration);
+        configuration.utils = new Utils(configuration);
+        utils = configuration.utils;
+        configuration.workArounds = new WorkArounds(configuration);
+        if (!isValidDoclet()) {
+            return false;
+        }
+
+        try {
+            startGeneration(root);
+        } catch (Configuration.Fault f) {
+            configuration.reporter.print(ERROR, f.getMessage());
+            return false;
+        } catch (DocletAbortException e) {
+            Throwable cause = e.getCause();
+            // e.printStackTrace();
+            if (cause != null) {
+                if (cause.getLocalizedMessage() != null) {
+                    configuration.reporter.print(ERROR, cause.getLocalizedMessage());
+                } else {
+                    configuration.reporter.print(ERROR, cause.toString());
+                }
+            }
+            return false;
+        } catch (Exception exc) {
+            return false;
+        }
+        return true;
+    }
+
+    /**
+     * Returns the SourceVersion indicating the features supported by this doclet.
+     * @return SourceVersion
+     */
+    public SourceVersion sourceVersion() {
+        return SourceVersion.RELEASE_8;
+    }
+
+
+    /**
+     * Create the configuration instance and returns it.
+     * @return the configuration of the doclet.
+     */
+    public abstract Configuration configuration();
+
+    /**
+     * Start the generation of files. Call generate methods in the individual
+     * writers, which will in turn generate 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.
+     *
+     * @see jdk.doclet.DocletEnvironment
+     */
+    private void startGeneration(DocletEnvironment root) throws Configuration.Fault, Exception {
+        if (root.getIncludedClasses().isEmpty()) {
+            configuration.message.
+                error("doclet.No_Public_Classes_To_Document");
+            return;
+        }
+        if (!configuration.setOptions()) {
+            return;
+        }
+        configuration.getDocletSpecificMsg().notice("doclet.build_version",
+            configuration.getDocletSpecificBuildDate());
+        ClassTree classtree = new ClassTree(configuration, configuration.nodeprecated);
+
+        generateClassFiles(root, classtree);
+        configuration.utils.copyDocFiles(DocPaths.DOC_FILES);
+
+        PackageListWriter.generate(configuration);
+        generatePackageFiles(classtree);
+
+        generateOtherFiles(root, classtree);
+        configuration.tagletManager.printReport();
+    }
+
+    /**
+     * Generate additional documentation that is added to the API documentation.
+     *
+     * @param root     the DocletEnvironment of source to document.
+     * @param classtree the data structure representing the class tree.
+     */
+    protected void generateOtherFiles(DocletEnvironment root, ClassTree classtree) throws Exception {
+        BuilderFactory builderFactory = configuration.getBuilderFactory();
+        AbstractBuilder constantsSummaryBuilder = builderFactory.getConstantsSummaryBuilder();
+        constantsSummaryBuilder.build();
+        AbstractBuilder serializedFormBuilder = builderFactory.getSerializedFormBuilder();
+        serializedFormBuilder.build();
+    }
+
+    /**
+     * Generate the package documentation.
+     *
+     * @param classtree the data structure representing the class tree.
+     */
+    protected abstract void generatePackageFiles(ClassTree classtree) throws Exception;
+
+    /**
+     * Generate the class documentation.
+     *
+     * @param classtree the data structure representing the class tree.
+     */
+    protected abstract void generateClassFiles(SortedSet<TypeElement> arr, ClassTree classtree);
+
+    /**
+     * Iterate through all classes and construct documentation for them.
+     *
+     * @param root      the DocletEnvironment of source to document.
+     * @param classtree the data structure representing the class tree.
+     */
+    protected void generateClassFiles(DocletEnvironment root, ClassTree classtree) {
+        generateClassFiles(classtree);
+        SortedSet<PackageElement> packages = new TreeSet<>(utils.makePackageComparator());
+        packages.addAll(utils.getSpecifiedPackages());
+        packages.stream().forEach((pkg) -> {
+            generateClassFiles(utils.getAllClasses(pkg), classtree);
+        });
+    }
+
+    /**
+     * Generate the class files for single classes specified on the command line.
+     *
+     * @param classtree the data structure representing the class tree.
+     */
+    private void generateClassFiles(ClassTree classtree) {
+        SortedSet<PackageElement> packages = configuration.typeElementCatalog.packages();
+        packages.stream().forEach((pkg) -> {
+            generateClassFiles(configuration.typeElementCatalog.allClasses(pkg), classtree);
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeFieldWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,132 @@
+/*
+ * Copyright (c) 2013, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+/**
+ * The interface for writing annotation type field output.
+ *
+ *  <p><b>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.</b>
+ *
+ *
+ * @author Bhavesh Patel
+ */
+
+public interface AnnotationTypeFieldWriter {
+
+    /**
+     * Add the annotation type member tree header.
+     *
+     * @return content tree for the member tree header
+     */
+    public Content getMemberTreeHeader();
+
+    /**
+     * Add the annotation type field details marker.
+     *
+     * @param memberDetails the content tree representing field details marker
+     */
+    public void addAnnotationFieldDetailsMarker(Content memberDetails);
+
+    /**
+     * Add the annotation type details tree header.
+     *
+     * @param typeElement the annotation type being documented
+     * @param memberDetailsTree the content tree representing member details
+     */
+    public void addAnnotationDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the annotation type documentation tree header.
+     *
+     * @param member the annotation type being documented
+     * @param annotationDetailsTree the content tree representing annotation type details
+     * @return content tree for the annotation type documentation header
+     */
+    public Content getAnnotationDocTreeHeader(Element member, Content annotationDetailsTree);
+
+    /**
+     * Get the annotation type details tree.
+     *
+     * @param annotationDetailsTree the content tree representing annotation type details
+     * @return content tree for the annotation type details
+     */
+    public Content getAnnotationDetails(Content annotationDetailsTree);
+
+    /**
+     * Get the annotation type documentation.
+     *
+     * @param annotationDocTree the content tree representing annotation type documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the annotation type documentation
+     */
+    public Content getAnnotationDoc(Content annotationDocTree, boolean isLastContent);
+
+    /**
+     * Get the signature for the given member.
+     *
+     * @param member the member being documented
+     * @return content tree for the annotation type signature
+     */
+    public Content getSignature(Element member);
+
+    /**
+     * Add the deprecated output for the given member.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(Element member, Content annotationDocTree);
+
+    /**
+     * Add the comments for the given member.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree the content tree to which the comments will be added
+     */
+    public void addComments(Element member, Content annotationDocTree);
+
+    /**
+     * Add the tags for the given member.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree the content tree to which the tags will be added
+     */
+    public void addTags(Element member, Content annotationDocTree);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeOptionalMemberWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import javax.lang.model.element.Element;
+
+/**
+ * The interface for writing annotation type optional member output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface AnnotationTypeOptionalMemberWriter extends
+        AnnotationTypeRequiredMemberWriter {
+
+    /**
+     * Add the the default value documentation.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree content tree to which the default value will be added
+     */
+    public void addDefaultValueInfo(Element member, Content annotationDocTree);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeRequiredMemberWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,133 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+/**
+ * The interface for writing annotation type required member output.
+ *
+ *  <p><b>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.</b>
+ *
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface AnnotationTypeRequiredMemberWriter {
+
+    /**
+     * Add the annotation type member tree header.
+     *
+     * @return content tree for the member tree header
+     */
+    public Content getMemberTreeHeader();
+
+    /**
+     * Add the annotation type details marker.
+     *
+     * @param memberDetails the content tree representing details marker
+     */
+    public void addAnnotationDetailsMarker(Content memberDetails);
+
+    /**
+     * Add the annotation type details tree header.
+     *
+     * @param typeElement the annotation type being documented
+     * @param memberDetailsTree the content tree representing member details
+     */
+    public void addAnnotationDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the annotation type documentation tree header.
+     *
+     * @param member the annotation type being documented
+     * @param annotationDetailsTree the content tree representing annotation type details
+     * @return content tree for the annotation type documentation header
+     */
+    public Content getAnnotationDocTreeHeader(Element member,
+            Content annotationDetailsTree);
+
+    /**
+     * Get the annotation type details tree.
+     *
+     * @param annotationDetailsTree the content tree representing annotation type details
+     * @return content tree for the annotation type details
+     */
+    public Content getAnnotationDetails(Content annotationDetailsTree);
+
+    /**
+     * Get the annotation type documentation.
+     *
+     * @param annotationDocTree the content tree representing annotation type documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the annotation type documentation
+     */
+    public Content getAnnotationDoc(Content annotationDocTree, boolean isLastContent);
+
+    /**
+     * Get the signature for the given member.
+     *
+     * @param member the member being documented
+     * @return content tree for the annotation type signature
+     */
+    public Content getSignature(Element member);
+
+    /**
+     * Add the deprecated output for the given member.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(Element member, Content annotationDocTree);
+
+    /**
+     * Add the comments for the given member.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree the content tree to which the comments will be added
+     */
+    public void addComments(Element member, Content annotationDocTree);
+
+    /**
+     * Add the tags for the given member.
+     *
+     * @param member the member being documented
+     * @param annotationDocTree the content tree to which the tags will be added
+     */
+    public void addTags(Element member, Content annotationDocTree);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/AnnotationTypeWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,169 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.TypeElement;
+
+/**
+ * The interface for writing annotation type output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface AnnotationTypeWriter {
+
+    /**
+     * Get the header of the page.
+     *
+     * @param header the header string to write
+     * @return a content tree for the header documentation
+     */
+    public Content getHeader(String header);
+
+    /**
+     * Get the annotation content header.
+     *
+     * @return annotation content header that needs to be added to the documentation
+     */
+    public Content getAnnotationContentHeader();
+
+    /**
+     * Get the annotation information tree header.
+     *
+     * @return annotation information tree header that needs to be added to the documentation
+     */
+    public Content getAnnotationInfoTreeHeader();
+
+    /**
+     * Get the annotation information.
+     *
+     * @param annotationInfoTree content tree containing the annotation information
+     * @return a content tree for the annotation
+     */
+    public Content getAnnotationInfo(Content annotationInfoTree);
+
+    /**
+     * Add the signature of the current annotation type.
+     *
+     * @param modifiers the modifiers for the signature
+     * @param annotationInfoTree the annotation content tree to which the signature will be added
+     */
+    public void addAnnotationTypeSignature(String modifiers, Content annotationInfoTree);
+
+    /**
+     * Build the annotation type description.
+     *
+     * @param annotationInfoTree content tree to which the description will be added
+     */
+    public void addAnnotationTypeDescription(Content annotationInfoTree);
+
+    /**
+     * Add the tag information for the current annotation type.
+     *
+     * @param annotationInfoTree content tree to which the tag information will be added
+     */
+    public void addAnnotationTypeTagInfo(Content annotationInfoTree);
+
+    /**
+     * If this annotation is deprecated, add the appropriate information.
+     *
+     * @param annotationInfoTree content tree to which the deprecated information will be added
+     */
+    public void addAnnotationTypeDeprecationInfo (Content annotationInfoTree);
+
+    /**
+     * Get the member tree header for the annotation type.
+     *
+     * @return a content tree for the member tree header
+     */
+    public Content getMemberTreeHeader();
+
+    /**
+     * Add the annotation content tree to the documentation content tree.
+     *
+     * @param contentTree content tree to which the annotation content will be added
+     * @param annotationContentTree annotation content tree which will be added to the content tree
+     */
+    public void addAnnotationContentTree(Content contentTree, Content annotationContentTree);
+
+    /**
+     * Get the member tree.
+     *
+     * @param memberTree the content tree that will be modified and returned
+     * @return a content tree for the member
+     */
+    public Content getMemberTree(Content memberTree);
+
+    /**
+     * Get the member summary tree.
+     *
+     * @param memberTree the content tree that will be used to build the summary tree
+     * @return a content tree for the member summary
+     */
+    public Content getMemberSummaryTree(Content memberTree);
+
+    /**
+     * Get the member details tree.
+     *
+     * @param memberTree the content tree that will be used to build the details tree
+     * @return a content tree for the member details
+     */
+    public Content getMemberDetailsTree(Content memberTree);
+
+    /**
+     * Add the footer of the page.
+     *
+     * @param contentTree content tree to which the footer will be added
+     */
+    public void addFooter(Content contentTree);
+
+    /**
+     * Print the document.
+     *
+     * @param contentTree content tree that will be printed as a document
+     */
+    public void printDocument(Content contentTree) throws IOException;
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+
+    /**
+     * Return the {@link TypeElement} being documented.
+     *
+     * @return the TypeElement representing the annotation being documented.
+     */
+    public TypeElement getAnnotationTypeElement();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ClassWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.TypeElement;
+
+/**
+ * The interface for writing class output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface ClassWriter {
+
+    /**
+     * Get the header of the page.
+     *
+     * @param header the header string to write
+     * @return header content that needs to be added to the documentation
+     */
+    public Content getHeader(String header);
+
+    /**
+     * Get the class content header.
+     *
+     * @return class content header that needs to be added to the documentation
+     */
+    public Content getClassContentHeader();
+
+    /**
+     * Add the class tree documentation.
+     *
+     * @param classContentTree class content tree to which the documentation will be added
+     */
+    public void addClassTree(Content classContentTree);
+
+    /**
+     * Get the class information tree header.
+     *
+     * @return class informaion tree header that needs to be added to the documentation
+     */
+    public Content getClassInfoTreeHeader();
+
+    /**
+     * Add the type parameter information.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addTypeParamInfo(Content classInfoTree);
+
+    /**
+     * Add all super interfaces if this is an interface.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addSuperInterfacesInfo(Content classInfoTree);
+
+    /**
+     * Add all implemented interfaces if this is a class.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addImplementedInterfacesInfo(Content classInfoTree);
+
+    /**
+     * Add all the classes that extend this one.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addSubClassInfo(Content classInfoTree);
+
+    /**
+     * Add all the interfaces that extend this one.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addSubInterfacesInfo(Content classInfoTree);
+
+    /**
+     * If this is an interface, add all classes that implement this
+     * interface.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addInterfaceUsageInfo(Content classInfoTree);
+
+    /**
+     * If this is an functional interface, display appropriate message.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addFunctionalInterfaceInfo(Content classInfoTree);
+
+    /**
+     * If this is an inner class or interface, add the enclosing class or
+     * interface.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addNestedClassInfo (Content classInfoTree);
+
+    /**
+     * Get the class information.
+     *
+     * @param classInfoTree content tree conatining the class information
+     * @return a content tree for the class
+     */
+    public Content getClassInfo(Content classInfoTree);
+
+    /**
+     * If this class is deprecated, add the appropriate information.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addClassDeprecationInfo (Content classInfoTree);
+
+    /**
+     * Add the signature of the current class content tree.
+     *
+     * @param modifiers the modifiers for the signature
+     * @param classInfoTree the class content tree to which the signature will be added
+     */
+    public void addClassSignature(String modifiers, Content classInfoTree);
+
+    /**
+     * Build the class description.
+     *
+     * @param classInfoTree content tree to which the documentation will be added
+     */
+    public void addClassDescription(Content classInfoTree);
+
+    /**
+     * Add the tag information for the current class.
+     *
+     * @param classInfoTree content tree to which the tag information will be added
+     */
+    public void addClassTagInfo(Content classInfoTree);
+
+    /**
+     * Get the member tree header for the class.
+     *
+     * @return a content tree for the member tree header
+     */
+    public Content getMemberTreeHeader();
+
+    /**
+     * Add the class content tree.
+     *
+     * @param contentTree content tree to which the class content will be added
+     * @param classContentTree class content tree which will be added to the content tree
+     */
+    public void addClassContentTree(Content contentTree, Content classContentTree);
+
+    /**
+     * Add the footer of the page.
+     *
+     * @param contentTree content tree to which the footer will be added
+     */
+    public void addFooter(Content contentTree);
+
+    /**
+     * Print the document.
+     *
+     * @param contentTree content tree that will be printed as a document
+     */
+    public void printDocument(Content contentTree) throws IOException;
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+
+    /**
+     * Return the TypeElement being documented.
+     *
+     * @return the TypeElement being documented.
+     */
+    public TypeElement getTypeElement();
+
+    /**
+     * Get the member summary tree.
+     *
+     * @param memberTree the content tree used to build the summary tree
+     * @return a content tree for the member summary
+     */
+    public Content getMemberSummaryTree(Content memberTree);
+
+    /**
+     * Get the member details tree.
+     *
+     * @param memberTree the content tree used to build the details tree
+     * @return a content tree for the member details
+     */
+    public Content getMemberDetailsTree(Content memberTree);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/CommentUtils.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2015, 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.
+ */
+
+/**
+ *  A utility class.
+ *
+ *  <p><b>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.</b>
+ */
+
+package jdk.javadoc.internal.doclets.toolkit;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.IdentifierTree;
+import com.sun.source.doctree.ReferenceTree;
+import com.sun.source.doctree.TextTree;
+import com.sun.source.util.DocTreeFactory;
+import com.sun.source.util.DocTreePath;
+import com.sun.source.util.DocTrees;
+import com.sun.source.util.TreePath;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.Elements;
+import javax.tools.FileObject;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+public class CommentUtils {
+
+    final Configuration configuration;
+    final DocTreeFactory treeFactory;
+    final HashMap<Element, DocCommentDuo> dcTreesMap = new HashMap<>();
+    final DocTrees trees;
+    final Elements elementUtils;
+
+    protected CommentUtils(Configuration configuration) {
+        this.configuration = configuration;
+        trees = configuration.root.getDocTrees();
+        treeFactory = trees.getDocTreeFactory();
+        elementUtils = configuration.root.getElementUtils();
+    }
+
+    public List<? extends DocTree> makePropertyDescriptionTree(List<? extends DocTree> content) {
+        List<DocTree> out = new ArrayList<>();
+        Name name = elementUtils.getName("propertyDescription");
+        out.add(treeFactory.newUnknownBlockTagTree(name, content));
+        return out;
+    }
+
+    public List<? extends DocTree> makePropertyDescriptionTree(String content) {
+        List<DocTree> inlist = new ArrayList<>();
+        inlist.add(treeFactory.newCommentTree(content));
+        List<DocTree> out = new ArrayList<>();
+        Name name = elementUtils.getName("propertyDescription");
+        out.add(treeFactory.newUnknownBlockTagTree(name, inlist));
+        return out;
+    }
+
+    public List<? extends DocTree> makeFirstSentenceTree(String content) {
+        List<DocTree> out = new ArrayList<>();
+        out.add(treeFactory.newTextTree(content));
+        return out;
+    }
+
+    public DocTree makeSeeTree(String sig, Element e) {
+        List<DocTree> list = new ArrayList<>();
+        list.add(treeFactory.newReferenceTree(sig));
+        return treeFactory.newSeeTree(list);
+    }
+
+    public DocTree makeTextTree(String content) {
+        TextTree text = treeFactory.newTextTree(content);
+        return (DocTree) text;
+    }
+
+    public void setEnumValuesTree(Configuration config, Element e) {
+        Utils utils = config.utils;
+        String klassName = utils.getSimpleName(utils.getEnclosingTypeElement(e));
+
+        List<DocTree> fs = new ArrayList<>();
+        fs.add(treeFactory.newTextTree(config.getText("doclet.enum_values_doc.firstsentence")));
+
+        List<DocTree> body = new ArrayList<>();
+        body.add(treeFactory.newTextTree(config.getText("doclet.enum_values_doc.body", klassName)));
+
+        List<DocTree> descriptions = new ArrayList<>();
+        descriptions.add(treeFactory.newTextTree(config.getText("doclet.enum_values_doc.return")));
+
+        List<DocTree> tags = new ArrayList<>();
+        tags.add(treeFactory.newReturnTree(descriptions));
+        DocCommentTree docTree = treeFactory.newDocCommentTree(fs, body, tags);
+        dcTreesMap.put(e, new DocCommentDuo(null, docTree));
+    }
+
+    public void setEnumValueOfTree(Configuration config, Element e) {
+        List<DocTree> fs = new ArrayList<>();
+        fs.add(treeFactory.newTextTree(config.getText("doclet.enum_valueof_doc.firstsentence")));
+
+        List<DocTree> body = new ArrayList<>();
+        body.add(treeFactory.newTextTree(config.getText("doclet.enum_valueof_doc.body")));
+
+        List<DocTree> tags = new ArrayList<>();
+
+        List<DocTree> paramDescs = new ArrayList<>();
+        paramDescs.add(treeFactory.newTextTree(config.getText("doclet.enum_valueof_doc.param_name")));
+        ExecutableElement ee = (ExecutableElement) e;
+        java.util.List<? extends VariableElement> parameters = ee.getParameters();
+        VariableElement param = parameters.get(0);
+        IdentifierTree id = treeFactory.newIdentifierTree(elementUtils.getName(param.getSimpleName().toString()));
+        tags.add(treeFactory.newParamTree(false, id, paramDescs));
+
+        List<DocTree> returnDescs = new ArrayList<>();
+        returnDescs.add(treeFactory.newTextTree(config.getText("doclet.enum_valueof_doc.return")));
+        tags.add(treeFactory.newReturnTree(returnDescs));
+
+        List<DocTree> throwsDescs = new ArrayList<>();
+        throwsDescs.add(treeFactory.newTextTree(config.getText("doclet.enum_valueof_doc.throws_ila")));
+
+        ReferenceTree ref = treeFactory.newReferenceTree("java.lang.IllegalArgumentException");
+        tags.add(treeFactory.newThrowsTree(ref, throwsDescs));
+
+        throwsDescs = new ArrayList<>();
+        throwsDescs.add(treeFactory.newTextTree(config.getText("doclet.enum_valueof_doc.throws_npe")));
+
+        ref = treeFactory.newReferenceTree("java.lang.NullPointerException");
+        tags.add(treeFactory.newThrowsTree(ref, throwsDescs));
+
+        DocCommentTree docTree = treeFactory.newDocCommentTree(fs, body, tags);
+
+        dcTreesMap.put(e, new DocCommentDuo(null, docTree));
+    }
+
+    /*
+     * Returns the TreePath/DocCommentTree duo for synthesized element.
+     */
+    public DocCommentDuo getSyntheticCommentDuo(Element e) {
+        return dcTreesMap.get(e);
+    }
+
+    /*
+     * Returns the TreePath/DocCommentTree duo for html sources.
+     */
+    public DocCommentDuo getHtmlCommentDuo(Element e) {
+        FileObject fo = null;
+        if (e.getKind().equals(ElementKind.OTHER)) {
+            fo = configuration.getOverviewPath();
+        } else if (e.getKind().equals(ElementKind.PACKAGE)) {
+            fo = configuration.workArounds.getJavaFileObject((PackageElement)e);
+        }
+        if (fo == null) {
+            return null;
+        }
+
+        DocCommentTree dcTree = trees.getDocCommentTree(fo);
+        if (dcTree == null) {
+            return null;
+        }
+        DocTreePath treePath = trees.getDocTreePath(fo);
+        return new DocCommentDuo(treePath.getTreePath(), dcTree);
+    }
+
+    public void setDocCommentTree(Element element, List<DocTree> firstSentence,
+            List<DocTree> bodyTags, List<DocTree> blockTags, Utils utils) {
+        DocCommentTree docTree = treeFactory.newDocCommentTree(firstSentence,
+                                                      bodyTags,
+                                                      blockTags);
+        dcTreesMap.put(element, new DocCommentDuo(null, docTree));
+        // There maybe an entry with the original comments usually null,
+        // therefore remove that entry if it exists, and allow a new one
+        // to be reestablished.
+        utils.removeCommentHelper(element);
+    }
+
+    /**
+     * A simplistic container to transport a TreePath, DocCommentTree pair.
+     * Here is why we need this:
+     * a. not desirable to add javac's pair.
+     * b. DocTreePath is not a viable  option either, as a null TreePath is required
+     * to represent synthetic comments for Enum.values, valuesOf, javafx properties.
+     */
+    public static class DocCommentDuo {
+        public final TreePath treePath;
+        public final DocCommentTree dcTree;
+
+        public DocCommentDuo(TreePath treePath, DocCommentTree dcTree) {
+            this.treePath = treePath;
+            this.dcTree = dcTree;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Configuration.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,1221 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+
+import com.sun.source.util.DocTreePath;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.internal.doclets.toolkit.builders.BuilderFactory;
+import jdk.javadoc.internal.doclets.toolkit.taglets.TagletManager;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFile;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFileFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletConstants;
+import jdk.javadoc.internal.doclets.toolkit.util.Extern;
+import jdk.javadoc.internal.doclets.toolkit.util.Group;
+import jdk.javadoc.internal.doclets.toolkit.util.MessageRetriever;
+import jdk.javadoc.internal.doclets.toolkit.util.MetaKeywords;
+import jdk.javadoc.internal.doclets.toolkit.util.TypeElementCatalog;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap.GetterSetter;
+
+import static javax.tools.Diagnostic.Kind.*;
+
+/**
+ * Configure the output based on the options. Doclets should sub-class
+ * Configuration, to configure and add their own options. This class contains
+ * all user options which are supported by the 1.1 doclet and the standard
+ * doclet.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field.
+ * @author Atul Dambalkar.
+ * @author Jamie Ho
+ */
+public abstract class Configuration {
+
+    /**
+     * Exception used to report a problem during setOptions.
+     */
+    public static class Fault extends Exception {
+        private static final long serialVersionUID = 0;
+
+        Fault(String msg) {
+            super(msg);
+        }
+
+        Fault(String msg, Exception cause) {
+            super(msg, cause);
+        }
+    }
+
+    /**
+     * The factory for builders.
+     */
+    protected BuilderFactory builderFactory;
+
+    /**
+     * The taglet manager.
+     */
+    public TagletManager tagletManager;
+
+    /**
+     * The path to the builder XML input file.
+     */
+    public String builderXMLPath;
+
+    /**
+     * The default path to the builder XML.
+     */
+    private static final String DEFAULT_BUILDER_XML = "resources/doclet.xml";
+
+    /**
+     * The path to Taglets
+     */
+    public String tagletpath = "";
+
+    /**
+     * This is true if option "-serialwarn" is used. Defualt value is false to
+     * suppress excessive warnings about serial tag.
+     */
+    public boolean serialwarn = false;
+
+    /**
+     * The specified amount of space between tab stops.
+     */
+    public int sourcetab;
+
+    public String tabSpaces;
+
+    /**
+     * True if we should generate browsable sources.
+     */
+    public boolean linksource = false;
+
+    /**
+     * True if command line option "-nosince" is used. Default value is
+     * false.
+     */
+    public boolean nosince = false;
+
+    /**
+     * True if we should recursively copy the doc-file subdirectories
+     */
+    public boolean copydocfilesubdirs = false;
+
+    /**
+     * Maintain backward compatibility with previous javadoc version
+     */
+    public boolean backwardCompatibility = true;
+
+    /**
+     * The META charset tag used for cross-platform viewing.
+     */
+    public String charset = "";
+
+    /**
+     * True if user wants to add member names as meta keywords.
+     * Set to false because meta keywords are ignored in general
+     * by most Internet search engines.
+     */
+    public boolean keywords = false;
+
+    /**
+     * The meta tag keywords instance.
+     */
+    public final MetaKeywords metakeywords;
+
+    /**
+     * The list of doc-file subdirectories to exclude
+     */
+    protected Set<String> excludedDocFileDirs;
+
+    /**
+     * The list of qualifiers to exclude
+     */
+    protected Set<String> excludedQualifiers;
+
+    /**
+     * The Root of the generated Program Structure from the Doclet API.
+     */
+    public DocletEnvironment root;
+
+    /**
+     * An utility class for commonly used helpers
+     */
+    public Utils utils;
+
+    /**
+     * All the temporary accessors to javac internals.
+     */
+    public WorkArounds workArounds;
+
+    /**
+     * Destination directory name, in which doclet will generate the entire
+     * documentation. Default is current directory.
+     */
+    public String destDirName = "";
+
+    /**
+     * Destination directory name, in which doclet will copy the doc-files to.
+     */
+    public String docFileDestDirName = "";
+
+    /**
+     * Encoding for this document. Default is default encoding for this
+     * platform.
+     */
+    public String docencoding = null;
+
+    /**
+     * True if user wants to suppress descriptions and tags.
+     */
+    public boolean nocomment = false;
+
+    /**
+     * Encoding for this document. Default is default encoding for this
+     * platform.
+     */
+    public String encoding = null;
+
+    /**
+     * Generate author specific information for all the classes if @author
+     * tag is used in the doc comment and if -author option is used.
+     * <code>showauthor</code> is set to true if -author option is used.
+     * Default is don't show author information.
+     */
+    public boolean showauthor = false;
+
+    /**
+     * Generate documentation for JavaFX getters and setters automatically
+     * by copying it from the appropriate property definition.
+     */
+    public boolean javafx = false;
+
+    /**
+     * Generate version specific information for the all the classes
+     * if @version tag is used in the doc comment and if -version option is
+     * used. <code>showversion</code> is set to true if -version option is
+     * used.Default is don't show version information.
+     */
+    public boolean showversion = false;
+
+    /**
+     * Sourcepath from where to read the source files. Default is classpath.
+     *
+     */
+    public String sourcepath = "";
+
+    /**
+     * Don't generate deprecated API information at all, if -nodeprecated
+     * option is used. <code>nodepracted</code> is set to true if
+     * -nodeprecated option is used. Default is generate deprected API
+     * information.
+     */
+    public boolean nodeprecated = false;
+
+    /**
+     * The catalog of classes specified on the command-line
+     */
+    public TypeElementCatalog typeElementCatalog;
+
+    /**
+     * Message Retriever for the doclet, to retrieve message from the resource
+     * file for this Configuration, which is common for 1.1 and standard
+     * doclets.
+     *
+     * TODO:  Make this private!!!
+     */
+    public MessageRetriever message = null;
+
+    /**
+     * True if user wants to suppress time stamp in output.
+     * Default is false.
+     */
+    public boolean notimestamp= false;
+
+    /**
+     * The package grouping instance.
+     */
+    public final Group group = new Group(this);
+
+    /**
+     * The tracker of external package links.
+     */
+    public final Extern extern = new Extern(this);
+
+    public  Reporter reporter;
+
+    public Locale locale;
+
+    /**
+     * Suppress all messages
+     */
+    public boolean quiet = false;
+
+    private String urlForLink;
+
+    private String pkglistUrlForLink;
+
+    private String urlForLinkOffline;
+
+    private String pkglistUrlForLinkOffline;
+
+    private List<GroupContainer> groups;
+
+    /**
+     * Return the build date for the doclet.
+     */
+    public abstract String getDocletSpecificBuildDate();
+
+    /**
+     * This method should be defined in all those doclets(configurations),
+     * which want to derive themselves from this Configuration. This method
+     * can be used to finish up the options setup.
+     */
+
+    public abstract boolean finishOptionSettings();
+
+    /**
+     * Return the doclet specific {@link MessageRetriever}
+     * @return the doclet specific MessageRetriever.
+     */
+    public abstract MessageRetriever getDocletSpecificMsg();
+
+    public CommentUtils cmtUtils;
+
+    /**
+     * A sorted set of packages specified on the command-line merged with a
+     * collection of packages that contain the classes specified on the
+     * command-line.
+     */
+    public SortedSet<PackageElement> packages;
+
+    protected final List<Doclet.Option> optionsProcessed;
+
+    public final OverviewElement overviewElement;
+
+    // The following three fields provide caches for use by all instances of VisibleMemberMap.
+    public final Map<TypeElement, List<Element>> propertiesCache = new HashMap<>();
+    public final Map<Element, Element> classPropertiesMap = new HashMap<>();
+    public final Map<Element, GetterSetter> getterSetterMap = new HashMap<>();
+
+    public DocFileFactory docFileFactory;
+
+    /**
+     * Constructor. Constructs the message retriever with resource file.
+     */
+    public Configuration() {
+        message = new MessageRetriever(this, "jdk.javadoc.internal.doclets.toolkit.resources.doclets");
+        excludedDocFileDirs = new HashSet<>();
+        excludedQualifiers = new HashSet<>();
+        setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH);
+        metakeywords = new MetaKeywords(this);
+        optionsProcessed = new ArrayList<>();
+        groups = new ArrayList<>(0);
+        overviewElement = new OverviewElement(root);
+    }
+
+    /**
+     * Return the builder factory for this doclet.
+     *
+     * @return the builder factory for this doclet.
+     */
+    public BuilderFactory getBuilderFactory() {
+        if (builderFactory == null) {
+            builderFactory = new BuilderFactory(this);
+        }
+        return builderFactory;
+    }
+
+    public Reporter getReporter() {
+        return this.reporter;
+    }
+
+    private void initPackages() {
+        packages = new TreeSet<>(utils.makePackageComparator());
+        packages.addAll(utils.getSpecifiedPackages());
+        for (TypeElement aClass : utils.getSpecifiedClasses()) {
+            packages.add(utils.containingPackage(aClass));
+        }
+    }
+
+    public Set<Doclet.Option> getSupportedOptions() {
+        Doclet.Option[] options = {
+            new Option(this, "author") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    showauthor = true;
+                    return true;
+                }
+            },
+            new Hidden(this, "classpath", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    if (sourcepath.length() == 0) {
+                        optionsProcessed.add(this);
+                        sourcepath = args.next();
+                    }
+                    return true;
+                }
+            },
+            new Hidden(this, "cp", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    if (sourcepath.length() == 0) {
+                        optionsProcessed.add(this);
+                        sourcepath = args.next();
+                    }
+                    return true;
+                }
+            },
+            new Option(this, "d", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    destDirName = addTrailingFileSep(args.next());
+                    return true;
+                }
+            },
+            new Option(this, "docencoding", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    docencoding = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "docfilessubdirs") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    copydocfilesubdirs = true;
+                    return true;
+                }
+            },
+            new Hidden(this, "encoding", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    encoding = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "excludedocfilessubdir", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    addToSet(excludedDocFileDirs, args.next());
+                    return true;
+                }
+            },
+            new Option(this, "group", 2) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    groups.add(new GroupContainer(args.next(), args.next()));
+                    return true;
+                }
+            },
+            new Hidden(this, "javafx") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    javafx = true;
+                    return true;
+                }
+            },
+            new Option(this, "keywords") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    keywords = true;
+                    return true;
+                }
+            },
+            new Option(this, "link", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    urlForLink = args.next();
+                    pkglistUrlForLink = urlForLink;
+                    return true;
+                }
+            },
+            new Option(this, "linksource") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    linksource = true;
+                    return true;
+                }
+            },
+            new Option(this, "linkoffline", 2) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    urlForLinkOffline = args.next();
+                    pkglistUrlForLinkOffline = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "nocomment") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nocomment = true;
+                    return true;
+                }
+            },
+            new Option(this, "nodeprecated") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nodeprecated = true;
+                    return true;
+                }
+            },
+            new Option(this, "nosince") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    nosince = true;
+                    return true;
+                }
+            },
+            new Option(this, "notimestamp") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    notimestamp = true;
+                    return true;
+                }
+            },
+            new Option(this, "noqualifier", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    addToSet(excludedQualifiers, args.next());
+                    return true;
+                }
+            },
+            new Hidden(this, "quiet") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    quiet = true;
+                    return true;
+                }
+            },
+            new Option(this, "serialwarn") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    serialwarn = true;
+                    return true;
+                }
+            },
+            new Hidden(this, "sourcepath", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    sourcepath = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "sourcetab", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    linksource = true;
+                    try {
+                        setTabWidth(Integer.parseInt(args.next()));
+                    } catch (NumberFormatException e) {
+                             //Set to -1 so that warning will be printed
+                        //to indicate what is valid argument.
+                        sourcetab = -1;
+                    }
+                    if (sourcetab <= 0) {
+                        message.warning("doclet.sourcetab_warning");
+                        setTabWidth(DocletConstants.DEFAULT_TAB_STOP_LENGTH);
+                    }
+                    return true;
+                }
+            },
+            new Option(this, "tag", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    ArrayList<String> list = new ArrayList<>();
+                    list.add(opt);
+                    list.add(args.next());
+                    customTagStrs.add(list);
+                    return true;
+                }
+            },
+             new Option(this, "taglet", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    ArrayList<String> list = new ArrayList<>();
+                    list.add(opt);
+                    list.add(args.next());
+                    customTagStrs.add(list);
+                    return true;
+                }
+            },
+            new Option(this, "tagletpath", 1) {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    tagletpath = args.next();
+                    return true;
+                }
+            },
+            new Option(this, "version") {
+                @Override
+                public boolean process(String opt, ListIterator<String> args) {
+                    optionsProcessed.add(this);
+                    showversion = true;
+                    return true;
+                }
+            }
+        };
+        Set<Doclet.Option> set = new TreeSet<>();
+        set.addAll(Arrays.asList(options));
+        return set;
+    }
+
+    final LinkedHashSet<List<String>> customTagStrs = new LinkedHashSet<>();
+
+    /*
+     * when this is called all the option have been set, this method,
+     * initializes certain components before anything else is started.
+     */
+    private void finishOptionSettings0() throws Fault {
+        ensureOutputDirExists();
+        if (urlForLink != null && pkglistUrlForLink != null)
+            extern.link(urlForLink, pkglistUrlForLink, reporter, false);
+        if (urlForLinkOffline != null && pkglistUrlForLinkOffline != null)
+            extern.link(urlForLinkOffline, pkglistUrlForLinkOffline, reporter, true);
+        if (sourcepath.length() == 0) {
+            sourcepath = System.getProperty("env.class.path", "");
+        }
+        if (docencoding == null) {
+            docencoding = encoding;
+        }
+        typeElementCatalog = new TypeElementCatalog(utils.getSpecifiedClasses(), this);
+        initTagletManager(customTagStrs);
+        groups.stream().forEach((grp) -> {
+            group.checkPackageGroups(grp.value1, grp.value2);
+        });
+    }
+
+    /**
+     * Set the command line options supported by this configuration.
+     *
+     * @return
+     * @throws DocletAbortException
+     */
+    public boolean setOptions() {
+        try {
+            initPackages();
+            finishOptionSettings0();
+            if (!finishOptionSettings())
+                return false;
+
+        } catch (Fault f) {
+            throw new DocletAbortException(f.getMessage());
+        }
+        return true;
+    }
+
+    private void ensureOutputDirExists() throws Fault {
+        DocFile destDir = DocFile.createFileForDirectory(this, destDirName);
+        if (!destDir.exists()) {
+            //Create the output directory (in case it doesn't exist yet)
+            if (!destDirName.isEmpty())
+                reporter.print(NOTE, getText("doclet.dest_dir_create", destDirName));
+            destDir.mkdirs();
+        } else if (!destDir.isDirectory()) {
+            throw new Fault(getText(
+                "doclet.destination_directory_not_directory_0",
+                destDir.getPath()));
+        } else if (!destDir.canWrite()) {
+            throw new Fault(getText(
+                "doclet.destination_directory_not_writable_0",
+                destDir.getPath()));
+        }
+    }
+
+    /**
+     * Initialize the taglet manager.  The strings to initialize the simple custom tags should
+     * be in the following format:  "[tag name]:[location str]:[heading]".
+     * @param customTagStrs the set two dimensional arrays of strings.  These arrays contain
+     * either -tag or -taglet arguments.
+     */
+    private void initTagletManager(Set<List<String>> customTagStrs) {
+        tagletManager = tagletManager == null ?
+            new TagletManager(nosince, showversion, showauthor, javafx, message) :
+            tagletManager;
+        for (List<String> args : customTagStrs) {
+            if (args.get(0).equals("-taglet")) {
+                tagletManager.addCustomTag(args.get(1), getFileManager(), tagletpath);
+                continue;
+            }
+            List<String> tokens = tokenize(args.get(1), TagletManager.SIMPLE_TAGLET_OPT_SEPARATOR, 3);
+            if (tokens.size() == 1) {
+                String tagName = args.get(1);
+                if (tagletManager.isKnownCustomTag(tagName)) {
+                    //reorder a standard tag
+                    tagletManager.addNewSimpleCustomTag(tagName, null, "");
+                } else {
+                    //Create a simple tag with the heading that has the same name as the tag.
+                    StringBuilder heading = new StringBuilder(tagName + ":");
+                    heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0)));
+                    tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a");
+                }
+            } else if (tokens.size() == 2) {
+                //Add simple taglet without heading, probably to excluding it in the output.
+                tagletManager.addNewSimpleCustomTag(tokens.get(0), tokens.get(1), "");
+            } else if (tokens.size() >= 3) {
+                tagletManager.addNewSimpleCustomTag(tokens.get(0), tokens.get(2), tokens.get(1));
+            } else {
+                message.error("doclet.Error_invalid_custom_tag_argument", args.get(1));
+            }
+        }
+    }
+
+    /**
+     * Given a string, return an array of tokens.  The separator can be escaped
+     * with the '\' character.  The '\' character may also be escaped by the
+     * '\' character.
+     *
+     * @param s         the string to tokenize.
+     * @param separator the separator char.
+     * @param maxTokens the maximum number of tokens returned.  If the
+     *                  max is reached, the remaining part of s is appended
+     *                  to the end of the last token.
+     *
+     * @return an array of tokens.
+     */
+    private List<String> tokenize(String s, char separator, int maxTokens) {
+        List<String> tokens = new ArrayList<>();
+        StringBuilder  token = new StringBuilder ();
+        boolean prevIsEscapeChar = false;
+        for (int i = 0; i < s.length(); i += Character.charCount(i)) {
+            int currentChar = s.codePointAt(i);
+            if (prevIsEscapeChar) {
+                // Case 1:  escaped character
+                token.appendCodePoint(currentChar);
+                prevIsEscapeChar = false;
+            } else if (currentChar == separator && tokens.size() < maxTokens-1) {
+                // Case 2:  separator
+                tokens.add(token.toString());
+                token = new StringBuilder();
+            } else if (currentChar == '\\') {
+                // Case 3:  escape character
+                prevIsEscapeChar = true;
+            } else {
+                // Case 4:  regular character
+                token.appendCodePoint(currentChar);
+            }
+        }
+        if (token.length() > 0) {
+            tokens.add(token.toString());
+        }
+        return tokens;
+    }
+
+    private void addToSet(Set<String> s, String str){
+        StringTokenizer st = new StringTokenizer(str, ":");
+        String current;
+        while(st.hasMoreTokens()){
+            current = st.nextToken();
+            s.add(current);
+        }
+    }
+
+    /**
+     * Add a trailing file separator, if not found. Remove superfluous
+     * file separators if any. Preserve the front double file separator for
+     * UNC paths.
+     *
+     * @param path Path under consideration.
+     * @return String Properly constructed path string.
+     */
+    public static String addTrailingFileSep(String path) {
+        String fs = System.getProperty("file.separator");
+        String dblfs = fs + fs;
+        int indexDblfs;
+        while ((indexDblfs = path.indexOf(dblfs, 1)) >= 0) {
+            path = path.substring(0, indexDblfs) +
+                path.substring(indexDblfs + fs.length());
+        }
+        if (!path.endsWith(fs))
+            path += fs;
+        return path;
+    }
+
+    /**
+     * This checks for the validity of the options used by the user.
+     * This works exactly like DocErrorReporter. This will validate the options which are shared
+     * by our doclets. For example, this method will flag an error using
+     * the DocErrorReporter if user has used "-nohelp" and "-helpfile" option
+     * together.
+     *
+     * @return true if all the options are valid.
+     */
+    public boolean generalValidOptions() {
+        boolean docencodingfound = false;
+        for (Doclet.Option opt : optionsProcessed) {
+            if (opt.matches("-docencoding")) {
+                docencodingfound = true;
+                if (!checkOutputFileEncoding(docencoding)) {
+                    return false;
+                }
+            };
+        }
+        if (!docencodingfound && (encoding != null && !encoding.isEmpty())) {
+            if (!checkOutputFileEncoding(encoding)) {
+                return false;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Check the validity of the given Source or Output File encoding on this
+     * platform.
+     *
+     * @param docencoding output file encoding.
+     * @param reporter    used to report errors.
+     */
+    private boolean checkOutputFileEncoding(String docencoding) {
+        OutputStream ost= new ByteArrayOutputStream();
+        OutputStreamWriter osw = null;
+        try {
+            osw = new OutputStreamWriter(ost, docencoding);
+        } catch (UnsupportedEncodingException exc) {
+            reporter.print(ERROR, getText("doclet.Encoding_not_supported", docencoding));
+            return false;
+        } finally {
+            try {
+                if (osw != null) {
+                    osw.close();
+                }
+            } catch (IOException exc) {
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Return true if the given doc-file subdirectory should be excluded and
+     * false otherwise.
+     * @param docfilesubdir the doc-files subdirectory to check.
+     * @return true if the directory is excluded.
+     */
+    public boolean shouldExcludeDocFileDir(String docfilesubdir){
+        return excludedDocFileDirs.contains(docfilesubdir);
+    }
+
+    /**
+     * Return true if the given qualifier should be excluded and false otherwise.
+     * @param qualifier the qualifier to check.
+     */
+    public boolean shouldExcludeQualifier(String qualifier){
+        if (excludedQualifiers.contains("all") ||
+            excludedQualifiers.contains(qualifier) ||
+            excludedQualifiers.contains(qualifier + ".*")) {
+            return true;
+        } else {
+            int index = -1;
+            while ((index = qualifier.indexOf(".", index + 1)) != -1) {
+                if (excludedQualifiers.contains(qualifier.substring(0, index + 1) + "*")) {
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * Return the qualified name of the Element if its qualifier is not excluded.
+     * Otherwise return the unqualified Element name.
+     * @param te the TypeElement to check.
+     * @return the class name
+     */
+    public String getClassName(TypeElement te) {
+        PackageElement pkg = utils.containingPackage(te);
+        return shouldExcludeQualifier(utils.getPackageName(pkg))
+                ? utils.getSimpleName(te)
+                : utils.getFullyQualifiedName(te);
+    }
+
+    public String getText(String key) {
+        try {
+            //Check the doclet specific properties file.
+            return getDocletSpecificMsg().getText(key);
+        } catch (Exception e) {
+            //Check the shared properties file.
+            return message.getText(key);
+        }
+    }
+
+    public String getText(String key, String a1) {
+        try {
+            //Check the doclet specific properties file.
+            return getDocletSpecificMsg().getText(key, a1);
+        } catch (MissingResourceException e) {
+            //Check the shared properties file.
+            return message.getText(key, a1);
+        }
+    }
+
+    public String getText(String key, String a1, String a2) {
+        try {
+            //Check the doclet specific properties file.
+            return getDocletSpecificMsg().getText(key, a1, a2);
+        } catch (MissingResourceException e) {
+            //Check the shared properties file.
+            return message.getText(key, a1, a2);
+        }
+    }
+
+    public String getText(String key, String a1, String a2, String a3) {
+        try {
+            //Check the doclet specific properties file.
+            return getDocletSpecificMsg().getText(key, a1, a2, a3);
+        } catch (MissingResourceException e) {
+            //Check the shared properties file.
+            return message.getText(key, a1, a2, a3);
+        }
+    }
+
+    public abstract Content newContent();
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @return a content tree for the text
+     */
+    public Content getResource(String key) {
+        Content c = newContent();
+        c.addContent(getText(key));
+        return c;
+    }
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @param o   string or content argument added to configuration text
+     * @return a content tree for the text
+     */
+    public Content getResource(String key, Object o) {
+        return getResource(key, o, null, null);
+    }
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @param o1 resource argument
+     * @param o2 resource argument
+     * @return a content tree for the text
+     */
+    public Content getResource(String key, Object o1, Object o2) {
+        return getResource(key, o1, o2, null);
+    }
+
+    /**
+     * Get the configuration string as a content.
+     *
+     * @param key the key to look for in the configuration file
+     * @param o0  string or content argument added to configuration text
+     * @param o1  string or content argument added to configuration text
+     * @param o2  string or content argument added to configuration text
+     * @return a content tree for the text
+     */
+    public Content getResource(String key, Object o0, Object o1, Object o2) {
+        Content c = newContent();
+        Pattern p = Pattern.compile("\\{([012])\\}");
+        String text = getText(key);
+        Matcher m = p.matcher(text);
+        int start = 0;
+        while (m.find(start)) {
+            c.addContent(text.substring(start, m.start()));
+
+            Object o = null;
+            switch (m.group(1).charAt(0)) {
+                case '0': o = o0; break;
+                case '1': o = o1; break;
+                case '2': o = o2; break;
+            }
+
+            if (o == null) {
+                c.addContent("{" + m.group(1) + "}");
+            } else if (o instanceof String) {
+                c.addContent((String) o);
+            } else if (o instanceof Content) {
+                c.addContent((Content) o);
+            }
+
+            start = m.end();
+        }
+
+        c.addContent(text.substring(start));
+        return c;
+    }
+
+
+    /**
+     * Return true if the TypeElement element is getting documented, depending upon
+     * -nodeprecated option and the deprecation information. Return true if
+     * -nodeprecated is not used. Return false if -nodeprecated is used and if
+     * either TypeElement element is deprecated or the containing package is deprecated.
+     *
+     * @param te the TypeElement for which the page generation is checked
+     * @return true if it is a generated doc.
+     */
+    public boolean isGeneratedDoc(TypeElement te) {
+        if (!nodeprecated) {
+            return true;
+        }
+        return !(utils.isDeprecated(te) || utils.isDeprecated(utils.containingPackage(te)));
+    }
+
+    /**
+     * Return the doclet specific instance of a writer factory.
+     * @return the {@link WriterFactory} for the doclet.
+     */
+    public abstract WriterFactory getWriterFactory();
+
+    /**
+     * Return the input stream to the builder XML.
+     *
+     * @return the input steam to the builder XML.
+     * @throws FileNotFoundException when the given XML file cannot be found.
+     */
+    public InputStream getBuilderXML() throws IOException {
+        return builderXMLPath == null ?
+            Configuration.class.getResourceAsStream(DEFAULT_BUILDER_XML) :
+            DocFile.createFileForInput(this, builderXMLPath).openInputStream();
+    }
+
+    /**
+     * Return the Locale for this document.
+     * @return the current locale
+     */
+    public abstract Locale getLocale();
+
+    /**
+     * Return the path of the overview file and null if it does not exist.
+     *
+     * @return the path of the overview file.
+     */
+    public abstract JavaFileObject getOverviewPath();
+
+    /**
+     * Return the current file manager.
+     * @return JavaFileManager
+     */
+    public abstract JavaFileManager getFileManager();
+
+    private void setTabWidth(int n) {
+        sourcetab = n;
+        tabSpaces = String.format("%" + n + "s", "");
+    }
+
+    public abstract boolean showMessage(DocTreePath path, String key);
+
+    public abstract boolean showMessage(Element e, String key);
+
+    public static abstract class Option implements Doclet.Option, Comparable<Option> {
+        private final String name;
+        private final String parameters;
+        private final String description;
+        private final int argCount;
+
+        protected final Configuration c;
+
+        protected Option(Configuration config, String keyName, String name, int argCount) {
+            c = config;
+            String key = keyName + "name";
+            String oname = getOptionsMessage(key);
+            if (oname.isEmpty()) {
+                this.name = name;
+                this.parameters = "<MISSING KEY>";
+                this.description = "<MISSING KEY>";
+            } else {
+                this.name = oname;
+                this.parameters = getOptionsMessage(keyName + "parameters");
+                this.description = getOptionsMessage(keyName + "description");
+            }
+            this.argCount = argCount;
+        }
+
+        protected Option(String prefix, Configuration config, String name, int argCount) {
+            this(config, prefix + name.toLowerCase() + ".", name, argCount);
+        }
+
+        protected Option(Configuration config, String name, int argCount) {
+            this("doclet.usage.", config,  name, argCount);
+        }
+
+        protected Option(Configuration config, String name) {
+            this(config, name, 0);
+        }
+
+        private String getOptionsMessage(String key) {
+            try {
+                return c.getDocletSpecificMsg().getText(key, (Object[]) null);
+            } catch (MissingResourceException ignore) {
+                return "";
+            }
+        }
+
+        @Override
+        public String getDescription() {
+            return description;
+        }
+
+        @Override
+        public Option.Kind getKind() {
+            return Doclet.Option.Kind.STANDARD;
+        }
+
+        @Override
+        public String getName() {
+            return name;
+        }
+
+        @Override
+        public String getParameters() {
+            return parameters;
+        }
+
+        /**
+         * Maintains the formatting for javadoc -help. Note the space
+         * alignment.
+         */
+        @Override
+        public String toString() {
+            String opt = name + " " + parameters;
+            int optlen = opt.length();
+            int spaces = 32 - optlen;
+            StringBuffer sb = new StringBuffer("  -").append(opt);
+            for (int i = 0; i < spaces; i++) {
+                sb.append(" ");
+            }
+            sb.append(description);
+            return sb.toString();
+        }
+
+        @Override
+        public int getArgumentCount() {
+            return argCount;
+        }
+
+        @Override
+        public boolean matches(String option) {
+            String arg = option.startsWith("-") ? option.substring(1) : option;
+            return name.toLowerCase().equals(arg.toLowerCase());
+        }
+
+        @Override
+        public int compareTo(Option that) {
+            return this.getName().compareTo(that.getName());
+        }
+    }
+
+    public abstract class XOption extends Option {
+
+        public XOption(Configuration config, String keyname, String name, int argCount) {
+            super(config, keyname, name, argCount);
+        }
+
+        public XOption(Configuration config, String name, int argCount) {
+            super("doclet.xusage.", config, name, argCount);
+        }
+
+        public XOption(Configuration config, String name) {
+            this(config, name, 0);
+        }
+
+        @Override
+        public Option.Kind getKind() {
+            return Doclet.Option.Kind.EXTENDED;
+        }
+    }
+
+    public abstract class Hidden extends Option {
+
+        public Hidden(Configuration config, String name, int argCount) {
+            super("doclet.xusage.", config, name, argCount);
+        }
+
+        public Hidden(Configuration config, String name) {
+            this(config, name, 0);
+        }
+
+        @Override
+        public Option.Kind getKind() {
+            return Doclet.Option.Kind.OTHER;
+        }
+    }
+
+    /*
+     * Stores a pair of Strings.
+     */
+    protected static class GroupContainer {
+        final String value1;
+        final String value2;
+        public GroupContainer(String value1, String value2) {
+            this.value1 = value1;
+            this.value2 = value2;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ConstantsSummaryWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,155 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+/**
+ * The interface for writing constants summary output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface ConstantsSummaryWriter {
+
+    /**
+     * Close the writer.
+     */
+    public abstract void close() throws IOException;
+
+    /**
+     * Get the header for the constant summary documentation.
+     *
+     * @return header that needs to be added to the documentation
+     */
+    public abstract Content getHeader();
+
+    /**
+     * Get the header for the constant content list.
+     *
+     * @return content header that needs to be added to the documentation
+     */
+    public abstract Content getContentsHeader();
+
+    /**
+     * Adds the given package name link to the constant content list tree.
+     *
+     * @param pkg                    the {@link PackageElement} to index.
+     * @param writtenPackageHeaders  the set of package headers that have already
+     *                               been indexed, we want to index utmost once.
+     * @param contentListTree        the content tree to which the link will be added
+     */
+    public abstract void addLinkToPackageContent(PackageElement pkg,
+            Set<PackageElement> writtenPackageHeaders, Content contentListTree);
+
+    /**
+     * Add the content list to the documentation tree.
+     *
+     * @param contentTree the tree to which the contents list will be added
+     * @param contentListTree the content that will be added to the list
+     */
+    public abstract void addContentsList(Content contentTree, Content contentListTree);
+
+    /**
+     * Get the constant summaries for the document.
+     *
+     * @return constant summaries header to be added to the documentation tree
+     */
+    public abstract Content getConstantSummaries();
+
+    /**
+     * Adds the given package name.
+     *
+     * @param pkg  the parsed package name.  We only Write the
+     *                          first 2 directory levels of the package
+     *                          name. For example, java.lang.ref would be
+     *                          indexed as java.lang.*.
+     * @param summariesTree the summaries documentation tree
+     * @param first true if the first package is listed
+     *                    be written
+     */
+    public abstract void addPackageName(PackageElement pkg, Content summariesTree, boolean first);
+
+    /**
+     * Get the class summary header for the constants summary.
+     *
+     * @return the header content for the class constants summary
+     */
+    public abstract Content getClassConstantHeader();
+
+    /**
+     * Add the content list to the documentation summaries tree.
+     *
+     * @param summariesTree the tree to which the class constants list will be added
+     * @param classConstantTree the class constant tree that will be added to the list
+     */
+    public abstract void addClassConstant(Content summariesTree, Content classConstantTree);
+
+    /**
+     * Adds the constant member table to the documentation tree.
+     *
+     * @param typeElement the class whose constants are being documented.
+     * @param fields the constants being documented.
+     * @param classConstantTree the documentation tree to which theconstant member
+     *                    table content will be added
+     */
+    public abstract void addConstantMembers(TypeElement typeElement, Collection<VariableElement> fields,
+            Content classConstantTree);
+
+    /**
+     * Add the summaries list to the content tree.
+     *
+     * @param contentTree the tree to which the summaries list will be added
+     * @param summariesTree the summaries content tree that will be added to the list
+     */
+    public abstract void addConstantSummaries(Content contentTree, Content summariesTree);
+
+    /**
+     * Adds the footer for the summary documentation.
+     *
+     * @param contentTree content tree to which the footer will be added
+     */
+    public abstract void addFooter(Content contentTree);
+
+    /**
+     * Print the constants summary document.
+     *
+     * @param contentTree content tree which should be printed
+     */
+    public abstract void printDocument(Content contentTree) throws IOException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/ConstructorWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+/**
+ * The interface for writing constructor output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface ConstructorWriter {
+
+    /**
+     * Get the constructor details tree header.
+     *
+     * @param typeElement the class being documented
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the constructor details header
+     */
+    public Content getConstructorDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the constructor documentation tree header.
+     *
+     * @param constructor the constructor being documented
+     * @param constructorDetailsTree the content tree representing constructor details
+     * @return content tree for the constructor documentation header
+     */
+    public Content getConstructorDocTreeHeader(ExecutableElement constructor,
+            Content constructorDetailsTree);
+
+    /**
+     * Get the signature for the given constructor.
+     *
+     * @param constructor the constructor being documented
+     * @return content tree for the constructor signature
+     */
+    public Content getSignature(ExecutableElement constructor);
+
+    /**
+     * Add the deprecated output for the given constructor.
+     *
+     * @param constructor the constructor being documented
+     * @param constructorDocTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(ExecutableElement constructor, Content constructorDocTree);
+
+    /**
+     * Add the comments for the given constructor.
+     *
+     * @param constructor the constructor being documented
+     * @param constructorDocTree the content tree to which the comments will be added
+     */
+    public void addComments(ExecutableElement constructor, Content constructorDocTree);
+
+    /**
+     * Add the tags for the given constructor.
+     *
+     * @param constructor the constructor being documented
+     * @param constructorDocTree the content tree to which the tags will be added
+     */
+    public void addTags(ExecutableElement constructor, Content constructorDocTree);
+
+    /**
+     * Get the constructor details tree.
+     *
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the constructor details
+     */
+    public Content getConstructorDetails(Content memberDetailsTree);
+
+    /**
+     * Get the constructor documentation.
+     *
+     * @param constructorDocTree the content tree representing constructor documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the constructor documentation
+     */
+    public Content getConstructorDoc(Content constructorDocTree, boolean isLastContent);
+
+    /**
+     * Let the writer know whether a non public constructor was found.
+     *
+     * @param foundNonPubConstructor true if we found a non public constructor.
+     */
+    public void setFoundNonPubConstructor(boolean foundNonPubConstructor);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Content.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Objects;
+
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+
+/**
+ * A class to create content for javadoc output pages.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public abstract class Content {
+
+    /**
+     * Returns a string representation of the content.
+     *
+     * @return string representation of the content
+     */
+    @Override
+    public String toString() {
+        StringWriter out = new StringWriter();
+        try {
+            write(out, true);
+        } catch (IOException e) {
+            // cannot happen from StringWriter
+            throw new DocletAbortException(e);
+        }
+        return out.toString();
+    }
+
+    /**
+     * Adds content to the existing content.
+     *
+     * @param content content that needs to be added
+     */
+    public abstract void addContent(Content content);
+
+    /**
+     * Adds a string content to the existing content.
+     *
+     * @param stringContent the string content to be added
+     */
+    public abstract void addContent(String stringContent);
+
+    /**
+     * Writes content to a writer.
+     *
+     */
+    public abstract boolean write(Writer writer, boolean atNewline) throws IOException ;
+
+    /**
+     * Returns true if the content is empty.
+     *
+     * @return true if no content to be displayed else return false
+     */
+    public abstract boolean isEmpty();
+
+    /**
+     * Returns true if the content is valid.
+     *
+     * @return true if the content is valid else return false
+     */
+    public boolean isValid() {
+        return !isEmpty();
+    }
+
+    /**
+     * Return the number of characters of plain text content in this object
+     * (optional operation.)
+     * @return the number of characters of plain text content in this
+     */
+    public int charCount() {
+        return 0;
+    }
+
+    /**
+     * Checks for null values.
+     *
+     * @param t reference type to check for null values
+     * @return the reference type if not null or else throws a null pointer exception
+     */
+    protected static <T> T nullCheck(T t) {
+        return Objects.requireNonNull(t);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/EnumConstantWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+/**
+ * The interface for writing enum constant output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface EnumConstantWriter {
+
+    /**
+     * Get the enum constants details tree header.
+     *
+     * @param typeElement the class being documented
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the enum constants details header
+     */
+    public Content getEnumConstantsDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the enum constants documentation tree header.
+     *
+     * @param enumConstant the enum constant being documented
+     * @param enumConstantsDetailsTree the content tree representing enum constant details
+     * @return content tree for the enum constant documentation header
+     */
+    public Content getEnumConstantsTreeHeader(VariableElement enumConstant,
+            Content enumConstantsDetailsTree);
+
+    /**
+     * Get the signature for the given enum constant.
+     *
+     * @param enumConstant the enum constant being documented
+     * @return content tree for the enum constant signature
+     */
+    public Content getSignature(VariableElement enumConstant);
+
+    /**
+     * Add the deprecated output for the given enum constant.
+     *
+     * @param enumConstant the enum constant being documented
+     * @param enumConstantsTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(VariableElement enumConstant, Content enumConstantsTree);
+
+    /**
+     * Add the comments for the given enum constant.
+     *
+     * @param enumConstant the enum constant being documented
+     * @param enumConstantsTree the content tree to which the comments will be added
+     */
+    public void addComments(VariableElement enumConstant, Content enumConstantsTree);
+
+    /**
+     * Add the tags for the given enum constant.
+     *
+     * @param enumConstant the enum constant being documented
+     * @param enumConstantsTree the content tree to which the tags will be added
+     */
+    public void addTags(VariableElement enumConstant, Content enumConstantsTree);
+
+    /**
+     * Get the enum constants details tree.
+     *
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the enum constant details
+     */
+    public Content getEnumConstantsDetails(Content memberDetailsTree);
+
+    /**
+     * Get the enum constants documentation.
+     *
+     * @param enumConstantsTree the content tree representing enum constants documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the enum constants documentation
+     */
+    public Content getEnumConstants(Content enumConstantsTree, boolean isLastContent);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/FieldWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+
+/**
+ * The interface for writing field output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface FieldWriter {
+
+    /**
+     * Get the field details tree header.
+     *
+     * @param typeElement the class being documented
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the field details header
+     */
+    public Content getFieldDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the field documentation tree header.
+     *
+     * @param field the constructor being documented
+     * @param fieldDetailsTree the content tree representing field details
+     * @return content tree for the field documentation header
+     */
+    public Content getFieldDocTreeHeader(VariableElement field,
+            Content fieldDetailsTree);
+
+    /**
+     * Get the signature for the given field.
+     *
+     * @param field the field being documented
+     * @return content tree for the field signature
+     */
+    public Content getSignature(VariableElement field);
+
+    /**
+     * Add the deprecated output for the given field.
+     *
+     * @param field the field being documented
+     * @param fieldDocTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(VariableElement field, Content fieldDocTree);
+
+    /**
+     * Add the comments for the given field.
+     *
+     * @param field the field being documented
+     * @param fieldDocTree the content tree to which the comments will be added
+     */
+    public void addComments(VariableElement field, Content fieldDocTree);
+
+    /**
+     * Add the tags for the given field.
+     *
+     * @param field the field being documented
+     * @param fieldDocTree the content tree to which the tags will be added
+     */
+    public void addTags(VariableElement field, Content fieldDocTree);
+
+    /**
+     * Get the field details tree.
+     *
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the field details
+     */
+    public Content getFieldDetails(Content memberDetailsTree);
+
+    /**
+     * Get the field documentation.
+     *
+     * @param fieldDocTree the content tree representing field documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the field documentation
+     */
+    public Content getFieldDoc(Content fieldDocTree, boolean isLastContent);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MemberSummaryWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.doctree.DocTree;
+
+/**
+ * The interface for writing member summary output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface MemberSummaryWriter {
+
+    /**
+     * Get the member summary header for the given class.
+     *
+     * @param typeElement the class the summary belongs to
+     * @param memberSummaryTree the content tree to which the member summary will be added
+     * @return a content tree for the member summary header
+     */
+    public Content getMemberSummaryHeader(TypeElement typeElement,
+            Content memberSummaryTree);
+
+    /**
+     * Get the summary table for the given class.
+     *
+     * @param typeElement the class the summary table belongs to
+     * @param tableContents list of contents that will be added to the summary table
+     * @return a content tree for the member summary table
+     */
+    public Content getSummaryTableTree(TypeElement typeElement,
+            List<Content> tableContents);
+
+    /**
+     * Add the member summary for the given class and member.
+     *
+     * @param typeElement the class the summary belongs to
+     * @param member the member that is documented
+     * @param firstSentenceTags the tags for the sentence being documented
+     * @param tableContents list of contents to which the summary will be added
+     * @param counter the counter for determining id and style for the table row
+     */
+    public void addMemberSummary(TypeElement typeElement, Element member,
+            List<? extends DocTree> firstSentenceTags, List<Content> tableContents, int counter);
+
+    /**
+     * Get the inherited member summary header for the given class.
+     *
+     * @param typeElement the class the summary belongs to
+     * @return a content tree containing the inherited summary header
+     */
+    public Content getInheritedSummaryHeader(TypeElement typeElement);
+
+    /**
+     * Add the inherited member summary for the given class and member.
+     *
+     * @param typeElement the class the inherited member belongs to
+     * @param member the inherited member that is being documented
+     * @param isFirst true if this is the first member in the list
+     * @param isLast true if this is the last member in the list
+     * @param linksTree the content tree to which the links will be added
+     */
+    public void addInheritedMemberSummary(TypeElement typeElement,
+        Element member, boolean isFirst, boolean isLast,
+        Content linksTree);
+
+    /**
+     * Get inherited summary links.
+     *
+     * @return a content tree containing the inherited summary links
+     */
+    public Content getInheritedSummaryLinksTree();
+
+    /**
+     * Add the member tree to the member summary tree.
+     *
+     * @param memberSummaryTree the content tree representing the member summary
+     * @param memberTree the content tree representing the member
+     */
+    public void addMemberTree(Content memberSummaryTree, Content memberTree);
+
+    /**
+     * Get the member tree.
+     *
+     * @param memberTree the content tree representing the member
+     * @return a content tree for the member
+     */
+    public Content getMemberTree(Content memberTree);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/MethodWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,122 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+/**
+ * The interface for writing method output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface MethodWriter {
+
+    /**
+     * Get the method details tree header.
+     *
+     * @param typeElement the class being documented
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the method details header
+     */
+    public Content getMethodDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the method documentation tree header.
+     *
+     * @param method the method being documented
+     * @param methodDetailsTree the content tree representing method details
+     * @return content tree for the method documentation header
+     */
+    public Content getMethodDocTreeHeader(ExecutableElement method,
+            Content methodDetailsTree);
+
+    /**
+     * Get the signature for the given method.
+     *
+     * @param method the method being documented
+     * @return content tree for the method signature
+     */
+    public Content getSignature(ExecutableElement method);
+
+    /**
+     * Add the deprecated output for the given method.
+     *
+     * @param method the method being documented
+     * @param methodDocTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(ExecutableElement method, Content methodDocTree);
+
+    /**
+     * Add the comments for the given method.
+     *
+     * @param holder the holder type (not erasure) of the method
+     * @param method the method being documented
+     * @param methodDocTree the content tree to which the comments will be added
+     */
+    public void addComments(TypeMirror holder, ExecutableElement method, Content methodDocTree);
+
+    /**
+     * Add the tags for the given method.
+     *
+     * @param method the method being documented
+     * @param methodDocTree the content tree to which the tags will be added
+     */
+    public void addTags(ExecutableElement method, Content methodDocTree);
+
+    /**
+     * Get the method details tree.
+     *
+     * @param methodDetailsTree the content tree representing method details
+     * @return content tree for the method details
+     */
+    public Content getMethodDetails(Content methodDetailsTree);
+
+    /**
+     * Get the method documentation.
+     *
+     * @param methodDocTree the content tree representing method documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the method documentation
+     */
+    public Content getMethodDoc(Content methodDocTree, boolean isLastContent);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/NestedClassWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+/**
+ * The interface for writing class output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface NestedClassWriter {
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/OverviewElement.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2015, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ElementVisitor;
+import javax.lang.model.element.Name;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+/**
+ * This is a pseudo element wrapper for the root element, essentially to
+ * associate overview documentation's DocCommentTree to this Element.
+ *
+ *  <p><b>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.</b>
+ */
+public class OverviewElement implements Element {
+
+    public final DocletEnvironment root;
+
+    OverviewElement(DocletEnvironment root) {
+        this.root = root;
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public TypeMirror asType() {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public ElementKind getKind() {
+        return ElementKind.OTHER;
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public Set<javax.lang.model.element.Modifier> getModifiers() {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public Name getSimpleName() {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public Element getEnclosingElement() {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public java.util.List<? extends Element> getEnclosedElements() {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public java.util.List<? extends AnnotationMirror> getAnnotationMirrors() {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public <A extends Annotation> A getAnnotation(Class<A> annotationType) {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public <R, P> R accept(ElementVisitor<R, P> v, P p) {
+        return v.visitUnknown(this, p);
+    }
+
+    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+    public <A extends Annotation> A[] getAnnotationsByType(Class<A> annotationType) {
+        throw new UnsupportedOperationException("Unsupported method");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/PackageSummaryWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import java.util.List;
+import java.util.SortedSet;
+
+import javax.lang.model.element.TypeElement;
+
+/**
+ * The interface for writing package summary output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface PackageSummaryWriter {
+
+    /**
+     * Get the header for the summary.
+     *
+     * @param heading Package name.
+     * @return the header to be added to the content tree
+     */
+    public abstract Content getPackageHeader(String heading);
+
+    /**
+     * Get the header for the package content.
+     *
+     * @return a content tree for the package content header
+     */
+    public abstract Content getContentHeader();
+
+    /**
+     * Get the header for the package summary.
+     *
+     * @return a content tree with the package summary header
+     */
+    public abstract Content getSummaryHeader();
+
+    /**
+     * Adds the table of classes to the documentation tree.
+     *
+     * @param classes the array of classes to document.
+     * @param label the label for this table.
+     * @param tableSummary the summary string for the table
+     * @param tableHeader array of table headers
+     * @param summaryContentTree the content tree to which the summaries will be added
+     */
+    public abstract void addClassesSummary(SortedSet<TypeElement> classes, String label,
+            String tableSummary, List<String> tableHeader, Content summaryContentTree);
+
+    /**
+     * Adds the package description from the "packages.html" file to the documentation
+     * tree.
+     *
+     * @param packageContentTree the content tree to which the package description
+     *                           will be added
+     */
+    public abstract void addPackageDescription(Content packageContentTree);
+
+    /**
+     * Adds the tag information from the "packages.html" file to the documentation
+     * tree.
+     *
+     * @param packageContentTree the content tree to which the package tags will
+     *                           be added
+     */
+    public abstract void addPackageTags(Content packageContentTree);
+
+    /**
+     * Adds the tag information from the "packages.html" or "package-info.java" file to the
+     * documentation tree.
+     *
+     * @param contentTree the content tree to which the package content tree will be added
+     * @param packageContentTree the package content tree to be added
+     */
+    public abstract void addPackageContent(Content contentTree, Content packageContentTree);
+
+    /**
+     * Adds the footer to the documentation tree.
+     *
+     * @param contentTree the tree to which the footer will be added
+     */
+    public abstract void addPackageFooter(Content contentTree);
+
+    /**
+     * Print the package summary document.
+     *
+     * @param contentTree the content tree that will be printed
+     */
+    public abstract void printDocument(Content contentTree) throws IOException;
+
+    /**
+     * Close the writer.
+     */
+    public abstract void close() throws IOException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/PropertyWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+/**
+ * The interface for writing property output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+
+public interface PropertyWriter {
+
+    /**
+     * Get the property details tree header.
+     *
+     * @param typeElement the class being documented
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the property details header
+     */
+    public Content getPropertyDetailsTreeHeader(TypeElement typeElement,
+            Content memberDetailsTree);
+
+    /**
+     * Get the property documentation tree header.
+     *
+     * @param property the property being documented
+     * @param propertyDetailsTree the content tree representing property details
+     * @return content tree for the property documentation header
+     */
+    public Content getPropertyDocTreeHeader(ExecutableElement property,
+            Content propertyDetailsTree);
+
+    /**
+     * Get the signature for the given property.
+     *
+     * @param property the property being documented
+     * @return content tree for the property signature
+     */
+    public Content getSignature(ExecutableElement property);
+
+    /**
+     * Add the deprecated output for the given property.
+     *
+     * @param property the property being documented
+     * @param propertyDocTree content tree to which the deprecated information will be added
+     */
+    public void addDeprecated(ExecutableElement property, Content propertyDocTree);
+
+    /**
+     * Add the comments for the given property.
+     *
+     * @param property the property being documented
+     * @param propertyDocTree the content tree to which the comments will be added
+     */
+    public void addComments(ExecutableElement property, Content propertyDocTree);
+
+    /**
+     * Add the tags for the given property.
+     *
+     * @param property the property being documented
+     * @param propertyDocTree the content tree to which the tags will be added
+     */
+    public void addTags(ExecutableElement property, Content propertyDocTree);
+
+    /**
+     * Get the property details tree.
+     *
+     * @param memberDetailsTree the content tree representing member details
+     * @return content tree for the property details
+     */
+    public Content getPropertyDetails(Content memberDetailsTree);
+
+    /**
+     * Get the property documentation.
+     *
+     * @param propertyDocTree the content tree representing property documentation
+     * @param isLastContent true if the content to be added is the last content
+     * @return content tree for the property documentation
+     */
+    public Content getPropertyDoc(Content propertyDocTree, boolean isLastContent);
+
+    /**
+     * Close the writer.
+     */
+    public void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/SerializedFormWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,325 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.io.*;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import com.sun.source.doctree.DocTree;
+
+/**
+ * The interface for writing serialized form output.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public interface SerializedFormWriter {
+
+    /**
+     * Get the header.
+     *
+     * @param header the header to write.
+     * @return the header content tree
+     */
+    public Content getHeader(String header);
+
+    /**
+     * Get the serialized form summaries header.
+     *
+     * @return the serialized form summary header tree
+     */
+    public Content getSerializedSummariesHeader();
+
+    /**
+     * Get the package serialized form header.
+     *
+     * @return the package serialized form header tree
+     */
+    public Content getPackageSerializedHeader();
+
+    /**
+     * Add the serialized tree per package to the serialized summaries tree.
+     *
+     * @param serializedSummariesTree the serialized tree to which the package serialized tree will be added
+     * @param packageSerializedTree the serialized tree per package that needs to be added
+     */
+    public void addPackageSerializedTree(Content serializedSummariesTree, Content packageSerializedTree);
+
+    /**
+     * Get the given package header.
+     *
+     * @param packageName the package header to write
+     * @return a content tree for the package header
+     */
+    public Content getPackageHeader(String packageName);
+
+    /**
+     * Get the serialized class header.
+     *
+     * @return a content tree for the serialized class header
+     */
+    public Content getClassSerializedHeader();
+
+    /**
+     * Get the heading for the serializable class.
+     *
+     * @param typeElement the class being processed
+     * @return a content tree for the class heading
+     */
+    public Content getClassHeader(TypeElement typeElement);
+
+    /**
+     * Get the serial UID info header.
+     *
+     * @return a content tree for the serial uid info header
+     */
+    public Content getSerialUIDInfoHeader();
+
+    /**
+     * Adds the serial UID info.
+     *
+     * @param header the header that will show up before the UID.
+     * @param serialUID the serial UID to print.
+     * @param serialUidTree the serial UID tree to which the content will be added.
+     */
+    public void addSerialUIDInfo(String header, String serialUID,
+            Content serialUidTree);
+
+    /**
+     * Get the class serialize content header.
+     *
+     * @return a content tree for the class serialize content header
+     */
+    public Content getClassContentHeader();
+
+    /**
+     * Return an instance of a SerialFieldWriter.
+     *
+     * @return an instance of a SerialFieldWriter.
+     */
+    public SerialFieldWriter getSerialFieldWriter(TypeElement typeElement);
+
+    /**
+     * Return an instance of a SerialMethodWriter.
+     *
+     * @return an instance of a SerialMethodWriter.
+     */
+    public SerialMethodWriter getSerialMethodWriter(TypeElement typeElement);
+
+    /**
+     * Close the writer.
+     */
+    public abstract void close() throws IOException;
+
+    /**
+     * Get the serialized content.
+     *
+     * @param serializedTreeContent content for serialized data
+     * @return a content tree for serialized information
+     */
+    public Content getSerializedContent(Content serializedTreeContent);
+
+    /**
+     * Add the footer.
+     *
+     * @param serializedTree the serialized tree to be added
+     */
+    public void addFooter(Content serializedTree);
+
+    /**
+     * Print the serialized form document.
+     *
+     * @param serializedTree the content tree that will be printed
+     */
+    public abstract void printDocument(Content serializedTree) throws IOException;
+
+    /**
+     * Write the serialized form for a given field.
+     */
+    public interface SerialFieldWriter {
+
+        /**
+         * Get the serializable field header.
+         *
+         * @return serialized fields header content tree
+         */
+        public Content getSerializableFieldsHeader();
+
+        /**
+         * Get the field content header.
+         *
+         * @param isLastContent true if this is the last content to be documented
+         * @return fields header content tree
+         */
+        public Content getFieldsContentHeader(boolean isLastContent);
+
+        /**
+         * Get the fields content.
+         *
+         * @param heading the heading to write.
+         * @param contentTree content tree to which the heading will be added
+         * @return serializable fields content tree
+         */
+        public Content getSerializableFields(String heading, Content contentTree);
+
+        /**
+         * Adds the deprecated information for this member.
+         *
+         * @param field the field to document.
+         * @param contentTree content tree to which the deprecated information will be added
+         */
+        public void addMemberDeprecatedInfo(VariableElement field, Content contentTree);
+
+        /**
+         * Adds the description text for this member.
+         *
+         * @param field the field to document.
+         * @param contentTree content tree to which the member description will be added
+         */
+        public void addMemberDescription(VariableElement field, Content contentTree);
+
+        /**
+         * Adds the description text for this member represented by the tag.
+         *
+         * @param serialFieldTag the field to document (represented by tag).
+         * @param contentTree content tree to which the member description will be added
+         */
+        public void addMemberDescription(VariableElement field, DocTree serialFieldTag, Content contentTree);
+
+        /**
+         * Adds the tag information for this member.
+         *
+         * @param field the field to document.
+         * @param contentTree content tree to which the member tags will be added
+         */
+        public void addMemberTags(VariableElement field, Content contentTree);
+
+        /**
+         * Adds the member header.
+         *
+         * @param fieldType the type of the field.
+         * @param fieldTypeStr the type of the field in string format.  We will
+         * print this out if we can't link to the type.
+         * @param fieldDimensions the dimensions of the field.
+         * @param fieldName the name of the field.
+         * @param contentTree content tree to which the member header will be added
+         */
+        public void addMemberHeader(TypeElement fieldType, String fieldTypeStr,
+            String fieldDimensions, String fieldName, Content contentTree);
+
+        /**
+         * Check to see if overview details should be printed. If
+         * nocomment option set or if there is no text to be printed
+         * for deprecation info, inline comment or tags,
+         * do not print overview details.
+         *
+         * @param field the field to check overview details for.
+         * @return true if overview details need to be printed
+         */
+        public boolean shouldPrintOverview(VariableElement field);
+    }
+
+    /**
+     * Write the serialized form for a given field.
+     */
+    public interface SerialMethodWriter {
+
+        /**
+         * Get the serializable method header.
+         *
+         * @return serializable methods content tree
+         */
+        public Content getSerializableMethodsHeader();
+
+        /**
+         * Get the method content header.
+         *
+         * @param isLastContent true if this is the last content to be documented
+         * @return methods content tree
+         */
+        public Content getMethodsContentHeader(boolean isLastContent);
+
+        /**
+         * Write the given heading.
+         *
+         * @param heading the heading to write
+         * @param serializableMethodTree content tree which will be added
+         * @return serializable methods content tree
+         */
+        public Content getSerializableMethods(String heading, Content serializableMethodTree);
+
+        /**
+         * Write a warning that no serializable methods exist.
+         *
+         * @param msg the warning to print
+         * @return no customization message tree
+         */
+        public Content getNoCustomizationMsg(String msg);
+
+        /**
+         * Adds the header.
+         *
+         * @param member the member to write the header for
+         * @param methodsContentTree content tree to which the header will be added
+         */
+        public void addMemberHeader(ExecutableElement member, Content methodsContentTree);
+
+        /**
+         * Adds the deprecated information for this member.
+         *
+         * @param member the member to write the deprecated information for
+         * @param methodsContentTree content tree to which the deprecated
+         * information will be added
+         */
+        public void addDeprecatedMemberInfo(ExecutableElement member, Content methodsContentTree);
+
+        /**
+         * Adds the description for this member.
+         *
+         * @param member the member to write the information for
+         * @param methodsContentTree content tree to which the member
+         * information will be added
+         */
+        public void addMemberDescription(ExecutableElement member, Content methodsContentTree);
+
+        /**
+         * Adds the tag information for this member.
+         *
+         * @param member the member to write the tags information for
+         * @param methodsContentTree content tree to which the tags
+         * information will be added
+         */
+        public void addMemberTags(ExecutableElement member, Content methodsContentTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WorkArounds.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,535 @@
+/*
+ * Copyright (c) 2015, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.SortedSet;
+import java.util.TreeSet;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.Elements;
+import javax.tools.JavaFileObject;
+
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.util.JavacTask;
+import com.sun.source.util.TreePath;
+import com.sun.tools.doclint.DocLint;
+import com.sun.tools.javac.api.BasicJavacTask;
+import com.sun.tools.javac.code.Attribute;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.code.Scope;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.code.Symbol.VarSymbol;
+import com.sun.tools.javac.comp.AttrContext;
+import com.sun.tools.javac.comp.Env;
+import com.sun.tools.javac.model.JavacTypes;
+import com.sun.tools.javac.util.Names;
+
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.tool.DocEnv;
+import jdk.javadoc.internal.tool.RootDocImpl;
+
+import static com.sun.tools.javac.code.Kinds.Kind.*;
+import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
+import static javax.lang.model.element.ElementKind.*;
+
+/**
+ * A quarantine class to isolate all the workarounds and bridges to
+ * a locality. This class should eventually disappear once all the
+ * standard APIs support the needed interfaces.
+ *
+ *
+ *  <p><b>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.</b>
+ */
+public class WorkArounds {
+
+    public final Configuration configuration;
+    public final DocEnv env;
+    public final Utils utils;
+
+    private DocLint doclint;
+
+    public WorkArounds(Configuration configuration) {
+        this.configuration = configuration;
+        this.utils = this.configuration.utils;
+        this.env = ((RootDocImpl)this.configuration.root).env;
+    }
+
+    Map<CompilationUnitTree, Boolean> shouldCheck = new HashMap<>();
+    // TODO: fix this up correctly
+    public void runDocLint(TreePath path) {
+        CompilationUnitTree unit = path.getCompilationUnit();
+        if (doclint != null && shouldCheck.computeIfAbsent(unit, doclint::shouldCheck)) {
+            doclint.scan(path);
+        }
+    }
+
+    // TODO: fix this up correctly
+    public void initDocLint(Collection<String> opts, Collection<String> customTagNames, String htmlVersion) {
+        ArrayList<String> doclintOpts = new ArrayList<>();
+        boolean msgOptionSeen = false;
+
+        for (String opt : opts) {
+            if (opt.startsWith(DocLint.XMSGS_OPTION)) {
+                if (opt.equals(DocLint.XMSGS_CUSTOM_PREFIX + "none"))
+                    return;
+                msgOptionSeen = true;
+            }
+            doclintOpts.add(opt);
+        }
+
+        if (!msgOptionSeen) {
+            doclintOpts.add(DocLint.XMSGS_OPTION);
+        }
+
+        String sep = "";
+        StringBuilder customTags = new StringBuilder();
+        for (String customTag : customTagNames) {
+            customTags.append(sep);
+            customTags.append(customTag);
+            sep = DocLint.SEPARATOR;
+        }
+        doclintOpts.add(DocLint.XCUSTOM_TAGS_PREFIX + customTags.toString());
+        doclintOpts.add(DocLint.XHTML_VERSION_PREFIX + htmlVersion);
+
+        JavacTask t = BasicJavacTask.instance(env.context);
+        doclint = new DocLint();
+        // standard doclet normally generates H1, H2
+        doclintOpts.add(DocLint.XIMPLICIT_HEADERS + "2");
+        doclint.init(t, doclintOpts.toArray(new String[doclintOpts.size()]), false);
+    }
+
+    // TODO: fix this up correctly
+    public boolean haveDocLint() {
+        return (doclint == null);
+    }
+
+    // TODO: jx.l.m directSuperTypes don't work for things like Enum,
+    // so we use javac directly, investigate why jx.l.m is not cutting it.
+    public List<TypeMirror> interfaceTypesOf(TypeMirror type) {
+        com.sun.tools.javac.util.List<com.sun.tools.javac.code.Type> interfaces =
+                ((RootDocImpl)configuration.root).env.getTypes().interfaces((com.sun.tools.javac.code.Type)type);
+        if (interfaces.isEmpty()) {
+            return Collections.emptyList();
+        }
+        List<TypeMirror> list = new ArrayList<>(interfaces.size());
+        for (com.sun.tools.javac.code.Type t : interfaces) {
+            list.add((TypeMirror)t);
+        }
+        return list;
+    }
+
+    /*
+     * TODO: This method exists because of a bug in javac which does not
+     * handle "@deprecated tag in package-info.java", when this issue
+     * is fixed this method and its uses must be jettisoned.
+     */
+    public boolean isDeprecated0(Element e) {
+        if (!utils.getDeprecatedTrees(e).isEmpty()) {
+            return true;
+        }
+        JavacTypes jctypes = ((RootDocImpl)configuration.root).env.typeutils;
+        TypeMirror deprecatedType = utils.getDeprecatedType();
+        for (AnnotationMirror anno : e.getAnnotationMirrors()) {
+            if (jctypes.isSameType(anno.getAnnotationType().asElement().asType(), deprecatedType))
+                return true;
+        }
+        return false;
+    }
+
+    // TODO: fix jx.l.m add this method.
+    public boolean isSynthesized(AnnotationMirror aDesc) {
+        return ((Attribute)aDesc).isSynthesized();
+    }
+
+    // TODO: implement using jx.l.model
+    public boolean isVisible(TypeElement te) {
+        return env.isVisible((ClassSymbol)te);
+    }
+
+    // TODO: fix the caller
+    public Object getConstValue(VariableElement ve) {
+        return ((VarSymbol)ve).getConstValue();
+    }
+
+    //TODO: DocTrees: Trees.getPath(Element e) is slow a factor 4-5 times.
+    public Map<Element, TreePath> getElementToTreePath() {
+        return env.elementToTreePath;
+    }
+
+    // TODO: needs to ported to jx.l.m.
+    public TypeElement searchClass(TypeElement klass, String className) {
+        // search by qualified name first
+        TypeElement te = configuration.root.getElementUtils().getTypeElement(className);
+        if (te != null) {
+            return te;
+        }
+
+        // search inner classes
+        for (TypeElement ite : utils.getClasses(klass)) {
+            TypeElement innerClass = searchClass(ite, className);
+            if (innerClass != null) {
+                return innerClass;
+            }
+        }
+
+        // check in this package
+        te = utils.findClassInPackageElement(utils.containingPackage(klass), className);
+        if (te != null) {
+            return te;
+        }
+
+        ClassSymbol tsym = (ClassSymbol)klass;
+        // make sure that this symbol has been completed
+        // TODO: do we need this anymore ?
+        if (tsym.completer != null) {
+            tsym.complete();
+        }
+
+        // search imports
+        if (tsym.sourcefile != null) {
+
+            //### This information is available only for source classes.
+            Env<AttrContext> compenv = env.getEnv(tsym);
+            if (compenv == null) {
+                return null;
+            }
+            Names names = tsym.name.table.names;
+            Scope s = compenv.toplevel.namedImportScope;
+            for (Symbol sym : s.getSymbolsByName(names.fromString(className))) {
+                if (sym.kind == TYP) {
+                    return (TypeElement)sym;
+                }
+            }
+
+            s = compenv.toplevel.starImportScope;
+            for (Symbol sym : s.getSymbolsByName(names.fromString(className))) {
+                if (sym.kind == TYP) {
+                    return (TypeElement)sym;
+                }
+            }
+        }
+
+        return null; // not found
+    }
+
+    // TODO:  need to re-implement this using j.l.m. correctly!, this has
+    // implications on testInterface, the note here is that javac's supertype
+    // does the right thing returning Parameters in scope.
+    /**
+     * Return the type containing the method that this method overrides.
+     * It may be a <code>TypeElement</code> or a <code>TypeParameterElement</code>.
+     * @param method target
+     * @return a type
+     */
+    public TypeMirror overriddenType(ExecutableElement method) {
+        if (utils.isStatic(method)) {
+            return null;
+        }
+        MethodSymbol sym = (MethodSymbol)method;
+        ClassSymbol origin = (ClassSymbol) sym.owner;
+        for (com.sun.tools.javac.code.Type t = env.getTypes().supertype(origin.type);
+                t.hasTag(com.sun.tools.javac.code.TypeTag.CLASS);
+                t = env.getTypes().supertype(t)) {
+            ClassSymbol c = (ClassSymbol) t.tsym;
+            for (com.sun.tools.javac.code.Symbol sym2 : c.members().getSymbolsByName(sym.name)) {
+                if (sym.overrides(sym2, origin, env.getTypes(), true)) {
+                    return t;
+                }
+            }
+        }
+        return null;
+    }
+
+    // TODO: investigate and reimplement without javac dependencies.
+    public boolean shouldDocument(Element e) {
+        return env.shouldDocument(e);
+    }
+
+    //------------------Start of Serializable Implementation---------------------//
+    private final static Map<TypeElement, NewSerializedForm> serializedForms = new HashMap<>();
+
+    public SortedSet<VariableElement> getSerializableFields(Utils utils, TypeElement klass) {
+        NewSerializedForm sf = serializedForms.get(klass);
+        if (sf == null) {
+            sf = new NewSerializedForm(utils, configuration.root.getElementUtils(), klass);
+            serializedForms.put(klass, sf);
+        }
+        return sf.fields;
+    }
+
+    public SortedSet<ExecutableElement>  getSerializationMethods(Utils utils, TypeElement klass) {
+        NewSerializedForm sf = serializedForms.get(klass);
+        if (sf == null) {
+            sf = new NewSerializedForm(utils, configuration.root.getElementUtils(), klass);
+            serializedForms.put(klass, sf);
+        }
+        return sf.methods;
+    }
+
+    public boolean definesSerializableFields(Utils utils, TypeElement klass) {
+        if (!utils.isSerializable(klass) || utils.isExternalizable(klass)) {
+            return false;
+        } else {
+            NewSerializedForm sf = serializedForms.get(klass);
+            if (sf == null) {
+                sf = new NewSerializedForm(utils, configuration.root.getElementUtils(), klass);
+                serializedForms.put(klass, sf);
+            }
+            return sf.definesSerializableFields;
+        }
+    }
+
+    /* TODO we need a clean port to jx.l.m
+     * The serialized form is the specification of a class' serialization state.
+     * <p>
+     *
+     * It consists of the following information:
+     * <p>
+     *
+     * <pre>
+     * 1. Whether class is Serializable or Externalizable.
+     * 2. Javadoc for serialization methods.
+     *    a. For Serializable, the optional readObject, writeObject,
+     *       readResolve and writeReplace.
+     *       serialData tag describes, in prose, the sequence and type
+     *       of optional data written by writeObject.
+     *    b. For Externalizable, writeExternal and readExternal.
+     *       serialData tag describes, in prose, the sequence and type
+     *       of optional data written by writeExternal.
+     * 3. Javadoc for serialization data layout.
+     *    a. For Serializable, the name,type and description
+     *       of each Serializable fields.
+     *    b. For Externalizable, data layout is described by 2(b).
+     * </pre>
+     *
+     */
+    static class NewSerializedForm {
+
+        final Utils utils;
+        final Elements elements;
+
+        final SortedSet<ExecutableElement> methods;
+
+        /* List of FieldDocImpl - Serializable fields.
+         * Singleton list if class defines Serializable fields explicitly.
+         * Otherwise, list of default serializable fields.
+         * 0 length list for Externalizable.
+         */
+        final SortedSet<VariableElement> fields;
+
+        /* True if class specifies serializable fields explicitly.
+         * using special static member, serialPersistentFields.
+         */
+        boolean definesSerializableFields = false;
+
+        // Specially treated field/method names defined by Serialization.
+        private static final String SERIALIZABLE_FIELDS = "serialPersistentFields";
+        private static final String READOBJECT = "readObject";
+        private static final String WRITEOBJECT = "writeObject";
+        private static final String READRESOLVE = "readResolve";
+        private static final String WRITEREPLACE = "writeReplace";
+        private static final String READOBJECTNODATA = "readObjectNoData";
+
+        NewSerializedForm(Utils utils, Elements elements, TypeElement te) {
+            this.utils = utils;
+            this.elements = elements;
+            methods = new TreeSet<>(utils.makeGeneralPurposeComparator());
+            fields = new TreeSet<>(utils.makeGeneralPurposeComparator());
+            if (utils.isExternalizable(te)) {
+                /* look up required public accessible methods,
+                 *   writeExternal and readExternal.
+                 */
+                String[] readExternalParamArr = {"java.io.ObjectInput"};
+                String[] writeExternalParamArr = {"java.io.ObjectOutput"};
+
+                ExecutableElement md = findMethod(te, "readExternal", Arrays.asList(readExternalParamArr));
+                if (md != null) {
+                    methods.add(md);
+                }
+                md = findMethod((ClassSymbol) te, "writeExternal", Arrays.asList(writeExternalParamArr));
+                if (md != null) {
+                    methods.add(md);
+                }
+            } else if (utils.isSerializable(te)) {
+                VarSymbol dsf = getDefinedSerializableFields((ClassSymbol) te);
+                if (dsf != null) {
+                    /* Define serializable fields with array of ObjectStreamField.
+                     * Each ObjectStreamField should be documented by a
+                     * serialField tag.
+                     */
+                    definesSerializableFields = true;
+                    fields.add((VariableElement) dsf);
+                } else {
+
+                    /* Calculate default Serializable fields as all
+                     * non-transient, non-static fields.
+                     * Fields should be documented by serial tag.
+                     */
+                    computeDefaultSerializableFields((ClassSymbol) te);
+                }
+
+                /* Check for optional customized readObject, writeObject,
+                 * readResolve and writeReplace, which can all contain
+                 * the serialData tag.        */
+                addMethodIfExist((ClassSymbol) te, READOBJECT);
+                addMethodIfExist((ClassSymbol) te, WRITEOBJECT);
+                addMethodIfExist((ClassSymbol) te, READRESOLVE);
+                addMethodIfExist((ClassSymbol) te, WRITEREPLACE);
+                addMethodIfExist((ClassSymbol) te, READOBJECTNODATA);
+            }
+        }
+
+        private VarSymbol getDefinedSerializableFields(ClassSymbol def) {
+            Names names = def.name.table.names;
+
+            /* SERIALIZABLE_FIELDS can be private,
+             */
+            for (Symbol sym : def.members().getSymbolsByName(names.fromString(SERIALIZABLE_FIELDS))) {
+                if (sym.kind == VAR) {
+                    VarSymbol f = (VarSymbol) sym;
+                    if ((f.flags() & Flags.STATIC) != 0
+                            && (f.flags() & Flags.PRIVATE) != 0) {
+                        return f;
+                    }
+                }
+            }
+            return null;
+        }
+
+        /*
+         * Catalog Serializable method if it exists in current ClassSymbol.
+         * Do not look for method in superclasses.
+         *
+         * Serialization requires these methods to be non-static.
+         *
+         * @param method should be an unqualified Serializable method
+         *               name either READOBJECT, WRITEOBJECT, READRESOLVE
+         *               or WRITEREPLACE.
+         * @param visibility the visibility flag for the given method.
+         */
+        private void addMethodIfExist(ClassSymbol def, String methodName) {
+            Names names = def.name.table.names;
+
+            for (Symbol sym : def.members().getSymbolsByName(names.fromString(methodName))) {
+                if (sym.kind == MTH) {
+                    MethodSymbol md = (MethodSymbol) sym;
+                    if ((md.flags() & Flags.STATIC) == 0) {
+                        /*
+                         * WARNING: not robust if unqualifiedMethodName is overloaded
+                         *          method. Signature checking could make more robust.
+                         * READOBJECT takes a single parameter, java.io.ObjectInputStream.
+                         * WRITEOBJECT takes a single parameter, java.io.ObjectOutputStream.
+                         */
+                        methods.add(md);
+                    }
+                }
+            }
+        }
+
+        /*
+         * Compute default Serializable fields from all members of ClassSymbol.
+         *
+         * must walk over all members of ClassSymbol.
+         */
+        private void computeDefaultSerializableFields(ClassSymbol te) {
+            for (Symbol sym : te.members().getSymbols(NON_RECURSIVE)) {
+                if (sym != null && sym.kind == VAR) {
+                    VarSymbol f = (VarSymbol) sym;
+                    if ((f.flags() & Flags.STATIC) == 0
+                            && (f.flags() & Flags.TRANSIENT) == 0) {
+                        //### No modifier filtering applied here.
+                        //### Add to beginning.
+                        //### Preserve order used by old 'javadoc'.
+                        fields.add(f);
+                    }
+                }
+            }
+        }
+
+        /**
+         * Find a method in this class scope. Search order: this class, interfaces, superclasses,
+         * outerclasses. Note that this is not necessarily what the compiler would do!
+         *
+         * @param methodName the unqualified name to search for.
+         * @param paramTypes the array of Strings for method parameter types.
+         * @return the first MethodDocImpl which matches, null if not found.
+         */
+        public ExecutableElement findMethod(TypeElement te, String methodName,
+                List<String> paramTypes) {
+            List<? extends Element> allMembers = this.elements.getAllMembers(te);
+            loop:
+            for (Element e : allMembers) {
+                if (e.getKind() != METHOD) {
+                    continue;
+                }
+                ExecutableElement ee = (ExecutableElement) e;
+                if (!ee.getSimpleName().contentEquals(methodName)) {
+                    continue;
+                }
+                List<? extends VariableElement> parameters = ee.getParameters();
+                if (paramTypes.size() != parameters.size()) {
+                    continue;
+                }
+                for (int i = 0; i < parameters.size(); i++) {
+                    VariableElement ve = parameters.get(i);
+                    if (!ve.asType().toString().equals(paramTypes.get(i))) {
+                        break loop;
+                    }
+                }
+                return ee;
+            }
+            TypeElement encl = utils.getEnclosingTypeElement(te);
+            if (encl == null) {
+                return null;
+            }
+            return findMethod(encl, methodName, paramTypes);
+        }
+    }
+
+    // TODO: this is a fast way to get the JavaFileObject for
+    // a package.html file, however we need to eliminate this.
+    public JavaFileObject getJavaFileObject(PackageElement pe) {
+        return env.pkgToJavaFOMap.get(pe);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/WriterFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+/**
+ * The interface for a factory creates writers.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public interface WriterFactory {
+
+    /**
+     * Return the writer for the constant summary.
+     *
+     * @return the writer for the constant summary.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract ConstantsSummaryWriter getConstantsSummaryWriter()
+        throws Exception;
+
+    /**
+     * Return the writer for the package summary.
+     *
+     * @param packageElement the package being documented.
+     * @param prevPkg the previous package that was documented.
+     * @param nextPkg the next package being documented.
+     * @return the writer for the package summary.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract PackageSummaryWriter getPackageSummaryWriter(PackageElement
+        packageElement, PackageElement prevPkg, PackageElement nextPkg)
+    throws Exception;
+
+    /**
+     * Return the writer for a class.
+     *
+     * @param typeElement the class being documented.
+     * @param prevClass the previous class that was documented.
+     * @param nextClass the next class being documented.
+     * @param classTree the class tree.
+     * @return the writer for the class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract ClassWriter getClassWriter(TypeElement typeElement,
+        TypeElement prevClass, TypeElement nextClass, ClassTree classTree)
+            throws Exception;
+
+    /**
+     * Return the writer for an annotation type.
+     *
+     * @param annotationType the type being documented.
+     * @param prevType the previous type that was documented.
+     * @param nextType the next type being documented.
+     * @return the writer for the annotation type.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract AnnotationTypeWriter getAnnotationTypeWriter(
+        TypeElement annotationType, TypeMirror prevType, TypeMirror nextType)
+            throws Exception;
+
+    /**
+     * Return the method writer for a given class.
+     *
+     * @param classWriter the writer for the class being documented.
+     * @return the method writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract MethodWriter getMethodWriter(ClassWriter classWriter)
+            throws Exception;
+
+    /**
+     * Return the annotation type field writer for a given annotation type.
+     *
+     * @param annotationTypeWriter the writer for the annotation type
+     *        being documented.
+     * @return the member writer for the given annotation type.  Return null if
+     *         this writer is not supported by the doclet.
+     */
+    public abstract AnnotationTypeFieldWriter
+            getAnnotationTypeFieldWriter(
+        AnnotationTypeWriter annotationTypeWriter) throws Exception;
+
+    /**
+     * Return the annotation type optional member writer for a given annotation
+     * type.
+     *
+     * @param annotationTypeWriter the writer for the annotation type
+     *        being documented.
+     * @return the member writer for the given annotation type.  Return null if
+     *         this writer is not supported by the doclet.
+     */
+    public abstract AnnotationTypeOptionalMemberWriter
+            getAnnotationTypeOptionalMemberWriter(
+        AnnotationTypeWriter annotationTypeWriter) throws Exception;
+
+    /**
+     * Return the annotation type required member writer for a given annotation type.
+     *
+     * @param annotationTypeWriter the writer for the annotation type
+     *        being documented.
+     * @return the member writer for the given annotation type.  Return null if
+     *         this writer is not supported by the doclet.
+     */
+    public abstract AnnotationTypeRequiredMemberWriter
+            getAnnotationTypeRequiredMemberWriter(
+        AnnotationTypeWriter annotationTypeWriter) throws Exception;
+
+    /**
+     * Return the enum constant writer for a given class.
+     *
+     * @param classWriter the writer for the class being documented.
+     * @return the enum constant writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract EnumConstantWriter getEnumConstantWriter(
+        ClassWriter classWriter) throws Exception;
+
+    /**
+     * Return the field writer for a given class.
+     *
+     * @param classWriter the writer for the class being documented.
+     * @return the field writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract FieldWriter getFieldWriter(ClassWriter classWriter)
+            throws Exception;
+
+    /**
+     * Return the property writer for a given class.
+     *
+     * @param classWriter the writer for the class being documented.
+     * @return the property writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract PropertyWriter getPropertyWriter(ClassWriter classWriter)
+            throws Exception;
+
+    /**
+     * Return the constructor writer for a given class.
+     *
+     * @param classWriter the writer for the class being documented.
+     * @return the method writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public abstract ConstructorWriter getConstructorWriter(
+        ClassWriter classWriter)
+    throws Exception;
+
+    /**
+     * Return the specified member summary writer for a given class.
+     *
+     * @param classWriter the writer for the class being documented.
+     * @param memberType  the {@link VisibleMemberMap} member type indicating
+     *                    the type of member summary that should be returned.
+     * @return the summary writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     *
+     * @see VisibleMemberMap
+     * @throws IllegalArgumentException if memberType is unknown.
+     */
+    public abstract MemberSummaryWriter getMemberSummaryWriter(
+        ClassWriter classWriter, VisibleMemberMap.Kind memberType)
+    throws Exception;
+
+    /**
+     * Return the specified member summary writer for a given annotation type.
+     *
+     * @param annotationTypeWriter the writer for the annotation type being
+     *                             documented.
+     * @param memberType  the {@link VisibleMemberMap} member type indicating
+     *                    the type of member summary that should be returned.
+     * @return the summary writer for the give class.  Return null if this
+     * writer is not supported by the doclet.
+     *
+     * @see VisibleMemberMap
+     * @throws IllegalArgumentException if memberType is unknown.
+     */
+    public abstract MemberSummaryWriter getMemberSummaryWriter(
+        AnnotationTypeWriter annotationTypeWriter, VisibleMemberMap.Kind memberType)
+    throws Exception;
+
+    /**
+     * Return the writer for the serialized form.
+     *
+     * @return the writer for the serialized form.
+     */
+    public SerializedFormWriter getSerializedFormWriter() throws Exception;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+import java.lang.reflect.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static javax.tools.Diagnostic.Kind.*;
+
+/**
+ * The superclass for all builders.  A builder is a class that provides
+ * the structure and content of API documentation.  A builder is completely
+ * doclet independent which means that any doclet can use builders to
+ * construct documentation, as long as it impelements the appropriate
+ * writer interfaces.  For example, if a doclet wanted to use
+ * {@link ConstantsSummaryBuilder} to build a constant summary, all it has to
+ * do is implement the ConstantsSummaryWriter interface and pass it to the
+ * builder using a WriterFactory.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public abstract class AbstractBuilder {
+    public static class Context {
+        /**
+         * The configuration used in this run of the doclet.
+         */
+        final Configuration configuration;
+
+        /**
+         * Keep track of which packages we have seen for
+         * efficiency purposes.  We don't want to copy the
+         * doc files multiple times for a single package.
+         */
+        final Set<PackageElement> containingPackagesSeen;
+
+        /**
+         * Shared parser for the builder XML file
+         */
+        final LayoutParser layoutParser;
+
+        Context(Configuration configuration,
+                Set<PackageElement> containingPackagesSeen,
+                LayoutParser layoutParser) {
+            this.configuration = configuration;
+            this.containingPackagesSeen = containingPackagesSeen;
+            this.layoutParser = layoutParser;
+        }
+    }
+
+    /**
+     * The configuration used in this run of the doclet.
+     */
+    protected final Configuration configuration;
+
+    protected final Utils utils;
+
+    /**
+     * Keep track of which packages we have seen for
+     * efficiency purposes.  We don't want to copy the
+     * doc files multiple times for a single package.
+     */
+    protected final Set<PackageElement> containingPackagesSeen;
+
+    protected final LayoutParser layoutParser;
+
+    /**
+     * True if we want to print debug output.
+     */
+    protected static final boolean DEBUG = false;
+
+    /**
+     * Construct a Builder.
+     * @param configuration the configuration used in this run
+     *        of the doclet.
+     */
+    public AbstractBuilder(Context c) {
+        this.configuration = c.configuration;
+        this.utils = configuration.utils;
+        this.containingPackagesSeen = c.containingPackagesSeen;
+        this.layoutParser = c.layoutParser;
+    }
+
+    /**
+     * Return the name of this builder.
+     *
+     * @return the name of the builder.
+     */
+    public abstract String getName();
+
+    /**
+     * Build the documentation.
+     *
+     * @throws IOException there was a problem writing the output.
+     */
+    public abstract void build() throws IOException;
+
+    /**
+     * Build the documentation, as specified by the given XML element.
+     *
+     * @param node the XML element that specifies which component to document.
+     * @param contentTree content tree to which the documentation will be added
+     */
+    protected void build(XMLNode node, Content contentTree) {
+        String component = node.name;
+        try {
+            invokeMethod("build" + component,
+                    new Class<?>[]{XMLNode.class, Content.class},
+                    new Object[]{node, contentTree});
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            configuration.reporter.print(ERROR, "Unknown element: " + component);
+            throw new DocletAbortException(e);
+        } catch (InvocationTargetException e) {
+            throw new DocletAbortException(e.getCause());
+        } catch (Exception e) {
+            e.printStackTrace();
+            configuration.reporter.print(ERROR, "Exception " +
+                    e.getClass().getName() +
+                    " thrown while processing element: " + component);
+            throw new DocletAbortException(e);
+        }
+    }
+
+    /**
+     * Build the documentation, as specified by the children of the given XML element.
+     *
+     * @param node the XML element that specifies which components to document.
+     * @param contentTree content tree to which the documentation will be added
+     */
+    protected void buildChildren(XMLNode node, Content contentTree) {
+        for (XMLNode child : node.children)
+            build(child, contentTree);
+    }
+
+    /**
+     * Given the name and parameters, invoke the method in the builder.  This
+     * method is required to invoke the appropriate build method as instructed
+     * by the builder XML file.
+     *
+     * @param methodName   the name of the method that we would like to invoke.
+     * @param paramClasses the types for each parameter.
+     * @param params       the parameters of the method.
+     */
+    protected void invokeMethod(String methodName, Class<?>[] paramClasses,
+            Object[] params)
+    throws Exception {
+        if (DEBUG) {
+            configuration.reporter.print(ERROR, "DEBUG: " +
+                    this.getClass().getName() + "." + methodName);
+        }
+        Method method = this.getClass().getMethod(methodName, paramClasses);
+        method.invoke(this, params);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AbstractMemberBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+
+/**
+ * The superclass for all member builders.  Member builders are only executed
+ * within Class Builders.  They essentially build sub-components.  For example,
+ * method documentation is a sub-component of class documentation.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public abstract class AbstractMemberBuilder extends AbstractBuilder {
+
+    /**
+     * Construct a SubBuilder.
+     * @param configuration the configuration used in this run
+     *        of the doclet.
+     */
+    public AbstractMemberBuilder(Context context) {
+        super(context);
+    }
+
+    /**
+     * This method is not supported by sub-builders.
+     *
+     * @throws DocletAbortException this method will always throw a
+     * DocletAbortException because it is not supported.
+     */
+    public void build() throws DocletAbortException {
+        //You may not call the build method in a subbuilder.
+        throw new DocletAbortException("not supported");
+    }
+
+
+    /**
+     * Build the sub component if there is anything to document.
+     *
+     * @param node the XML element that specifies which components to document.
+     * @param contentTree content tree to which the documentation will be added
+     */
+    @Override
+    public void build(XMLNode node, Content contentTree) {
+        if (hasMembersToDocument()) {
+            super.build(node, contentTree);
+        }
+    }
+
+    /**
+     * Return true if this subbuilder has anything to document.
+     *
+     * @return true if this subbuilder has anything to document.
+     */
+    public abstract boolean hasMembersToDocument();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+
+/**
+ * Builds the summary for a given annotation type.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class AnnotationTypeBuilder extends AbstractBuilder {
+
+    /**
+     * The root element of the annotation type XML is {@value}.
+     */
+    public static final String ROOT = "AnnotationTypeDoc";
+
+    /**
+     * The annotation type being documented.
+     */
+    private final TypeElement annotationType;
+
+    /**
+     * The doclet specific writer.
+     */
+    private final AnnotationTypeWriter writer;
+
+    /**
+     * The content tree for the annotation documentation.
+     */
+    private Content contentTree;
+
+    /**
+     * Construct a new ClassBuilder.
+     *
+     * @param context           the build context.
+     * @param annotationTypeElement the class being documented.
+     * @param writer            the doclet specific writer.
+     */
+    private AnnotationTypeBuilder(Context context,
+            TypeElement annotationTypeElement,
+            AnnotationTypeWriter writer) {
+        super(context);
+        this.annotationType = annotationTypeElement;
+        this.writer = writer;
+    }
+
+    /**
+     * Construct a new ClassBuilder.
+     *
+     * @param context           the build context.
+     * @param annotationTypeDoc the class being documented.
+     * @param writer            the doclet specific writer.
+     */
+    public static AnnotationTypeBuilder getInstance(Context context,
+            TypeElement annotationTypeDoc,
+            AnnotationTypeWriter writer)
+            throws Exception {
+        return new AnnotationTypeBuilder(context, annotationTypeDoc, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void build() throws IOException {
+        build(layoutParser.parseXML(ROOT), contentTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return ROOT;
+    }
+
+    /**
+      * Build the annotation type documentation.
+      *
+      * @param node the XML element that specifies which components to document
+      * @param contentTree the content tree to which the documentation will be added
+      */
+     public void buildAnnotationTypeDoc(XMLNode node, Content contentTree) throws Exception {
+         contentTree = writer.getHeader(configuration.getText("doclet.AnnotationType") +
+                " " + utils.getSimpleName(annotationType));
+         Content annotationContentTree = writer.getAnnotationContentHeader();
+         buildChildren(node, annotationContentTree);
+         writer.addAnnotationContentTree(contentTree, annotationContentTree);
+         writer.addFooter(contentTree);
+         writer.printDocument(contentTree);
+         writer.close();
+         copyDocFiles();
+     }
+
+     /**
+      * Copy the doc files for the current TypeElement if necessary.
+      */
+     private void copyDocFiles() {
+        PackageElement containingPackage = utils.containingPackage(annotationType);
+        if((configuration.packages == null ||
+            !configuration.packages.contains(containingPackage) &&
+            !containingPackagesSeen.contains(containingPackage))){
+            //Only copy doc files dir if the containing package is not
+            //documented AND if we have not documented a class from the same
+            //package already. Otherwise, we are making duplicate copies.
+            utils.copyDocFiles(containingPackage);
+            containingPackagesSeen.add(containingPackage);
+        }
+     }
+
+    /**
+     * Build the annotation information tree documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationContentTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeInfo(XMLNode node, Content annotationContentTree) {
+        Content annotationInfoTree = writer.getAnnotationInfoTreeHeader();
+        buildChildren(node, annotationInfoTree);
+        annotationContentTree.addContent(writer.getAnnotationInfo(annotationInfoTree));
+    }
+
+    /**
+     * If this annotation is deprecated, build the appropriate information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationInfoTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo (XMLNode node, Content annotationInfoTree) {
+        writer.addAnnotationTypeDeprecationInfo(annotationInfoTree);
+    }
+
+    /**
+     * Build the signature of the current annotation type.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationInfoTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeSignature(XMLNode node, Content annotationInfoTree) {
+        writer.addAnnotationTypeSignature(utils.modifiersToString(annotationType, true),
+                annotationInfoTree);
+    }
+
+    /**
+     * Build the annotation type description.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationInfoTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeDescription(XMLNode node, Content annotationInfoTree) {
+        writer.addAnnotationTypeDescription(annotationInfoTree);
+    }
+
+    /**
+     * Build the tag information for the current annotation type.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationInfoTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeTagInfo(XMLNode node, Content annotationInfoTree) {
+        writer.addAnnotationTypeTagInfo(annotationInfoTree);
+    }
+
+    /**
+     * Build the member summary contents of the page.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationContentTree the content tree to which the documentation will be added
+     */
+    public void buildMemberSummary(XMLNode node, Content annotationContentTree)
+            throws Exception {
+        Content memberSummaryTree = writer.getMemberTreeHeader();
+        configuration.getBuilderFactory().
+                getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree);
+        annotationContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
+    }
+
+    /**
+     * Build the member details contents of the page.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationContentTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeMemberDetails(XMLNode node, Content annotationContentTree) {
+        Content memberDetailsTree = writer.getMemberTreeHeader();
+        buildChildren(node, memberDetailsTree);
+        if (memberDetailsTree.isValid()) {
+            annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
+        }
+    }
+
+    /**
+     * Build the annotation type field documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeFieldDetails(XMLNode node, Content memberDetailsTree)
+            throws Exception {
+        configuration.getBuilderFactory().
+                getAnnotationTypeFieldsBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the annotation type optional member documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeOptionalMemberDetails(XMLNode node, Content memberDetailsTree)
+            throws Exception {
+        configuration.getBuilderFactory().
+                getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the annotation type required member documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeRequiredMemberDetails(XMLNode node, Content memberDetailsTree)
+            throws Exception {
+        configuration.getBuilderFactory().
+                getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeFieldBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,235 @@
+/*
+ * Copyright (c) 2013, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeFieldWriter;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for annotation type fields.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The annotation type whose members are being documented.
+     */
+    protected TypeElement typeElement;
+
+    /**
+     * The visible members for the given class.
+     */
+    protected VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the member documentation.
+     */
+    protected AnnotationTypeFieldWriter writer;
+
+    /**
+     * The list of members being documented.
+     */
+    protected SortedSet<Element> members;
+
+    /**
+     * The index of the current member that is being documented at this point
+     * in time.
+     */
+    protected Element currentMember;
+
+    /**
+     * Construct a new AnnotationTypeFieldsBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     * @param memberType the type of member that is being documented.
+     */
+    protected AnnotationTypeFieldBuilder(Context context,
+            TypeElement typeElement,
+            AnnotationTypeFieldWriter writer,
+            VisibleMemberMap.Kind memberType) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        this.visibleMemberMap = new VisibleMemberMap(typeElement, memberType, configuration);
+        this.members = this.visibleMemberMap.getMembersFor(typeElement);
+    }
+
+
+    /**
+     * Construct a new AnnotationTypeFieldBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static AnnotationTypeFieldBuilder getInstance(
+            Context context, TypeElement typeElement,
+            AnnotationTypeFieldWriter writer) {
+        return new AnnotationTypeFieldBuilder(context, typeElement,
+                    writer, VisibleMemberMap.Kind.ANNOTATION_TYPE_FIELDS);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "AnnotationTypeFieldDetails";
+    }
+
+    /**
+     * Returns a list of members that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param typeElement the TypeElement we want to check.
+     * @return a list of members that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Returns the visible member map for the members of this class.
+     *
+     * @return the visible member map for the members of this class.
+     */
+    public VisibleMemberMap getVisibleMemberMap() {
+        return visibleMemberMap;
+    }
+
+    /**
+     * summaryOrder.size()
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return members.size() > 0;
+    }
+
+    /**
+     * Build the annotation type field documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeField(XMLNode node, Content memberDetailsTree) {
+        buildAnnotationTypeMember(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the member documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        if (!members.isEmpty()) {
+            writer.addAnnotationFieldDetailsMarker(memberDetailsTree);
+            for (Element element : members) {
+                currentMember = element;
+                Content detailsTree = writer.getMemberTreeHeader();
+                writer.addAnnotationDetailsTreeHeader(typeElement, detailsTree);
+                Content annotationDocTree = writer.getAnnotationDocTreeHeader(element, detailsTree);
+                buildChildren(node, annotationDocTree);
+                detailsTree.addContent(writer.getAnnotationDoc(
+                        annotationDocTree, currentMember == members.last()));
+                memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
+            }
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content annotationDocTree) {
+        annotationDocTree.addContent(
+                writer.getSignature(currentMember));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) {
+        writer.addDeprecated(currentMember, annotationDocTree);
+    }
+
+    /**
+     * Build the comments for the member.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildMemberComments(XMLNode node, Content annotationDocTree) {
+        if(! configuration.nocomment){
+            writer.addComments(currentMember, annotationDocTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content annotationDocTree) {
+        writer.addTags(currentMember, annotationDocTree);
+    }
+
+    /**
+     * Return the annotation type field writer for this builder.
+     *
+     * @return the annotation type field writer for this builder.
+     */
+    public AnnotationTypeFieldWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeOptionalMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for optional annotation type members.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class AnnotationTypeOptionalMemberBuilder extends AnnotationTypeRequiredMemberBuilder {
+
+    /**
+     * Construct a new AnnotationTypeMemberBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    private AnnotationTypeOptionalMemberBuilder(Context context,
+            TypeElement typeElement,
+            AnnotationTypeOptionalMemberWriter writer) {
+        super(context, typeElement, writer,
+                VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL);
+    }
+
+
+    /**
+     * Construct a new AnnotationTypeMemberBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static AnnotationTypeOptionalMemberBuilder getInstance(
+            Context context, TypeElement typeElement,
+            AnnotationTypeOptionalMemberWriter writer) {
+        return new AnnotationTypeOptionalMemberBuilder(context,
+                typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "AnnotationTypeOptionalMemberDetails";
+    }
+
+    /**
+     * Build the annotation type optional member documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeOptionalMember(XMLNode node, Content memberDetailsTree) {
+        buildAnnotationTypeMember(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the default value for this optional member.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildDefaultValueInfo(XMLNode node, Content annotationDocTree) {
+        ((AnnotationTypeOptionalMemberWriter) writer).addDefaultValueInfo(currentMember,
+                annotationDocTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public AnnotationTypeRequiredMemberWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,238 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeRequiredMemberWriter;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for required annotation type members.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class AnnotationTypeRequiredMemberBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The annotation type whose members are being documented.
+     */
+    protected TypeElement typeElement;
+
+    /**
+     * The visible members for the given class.
+     */
+    protected VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the member documentation.
+     */
+    protected AnnotationTypeRequiredMemberWriter writer;
+
+    /**
+     * The list of members being documented.
+     */
+    protected SortedSet<Element> members;
+
+    /**
+     * The index of the current member that is being documented at this point
+     * in time.
+     */
+    protected Element currentMember;
+
+    /**
+     * Construct a new AnnotationTypeRequiredMemberBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    protected AnnotationTypeRequiredMemberBuilder(Context context,
+            TypeElement typeElement,
+            AnnotationTypeRequiredMemberWriter writer,
+            VisibleMemberMap.Kind memberType) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        this.visibleMemberMap = new VisibleMemberMap(typeElement, memberType, configuration);
+        this.members = this.visibleMemberMap.getMembersFor(typeElement);
+    }
+
+
+    /**
+     * Construct a new AnnotationTypeMemberBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static AnnotationTypeRequiredMemberBuilder getInstance(
+            Context context, TypeElement typeElement,
+            AnnotationTypeRequiredMemberWriter writer) {
+        return new AnnotationTypeRequiredMemberBuilder(context, typeElement,
+                    writer,
+                    VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_REQUIRED);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "AnnotationTypeRequiredMemberDetails";
+    }
+
+    /**
+     * Returns a list of members that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param typeElement the {@link TypeElement} we want to check.
+     * @return a list of members that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Returns the visible member map for the members of this class.
+     *
+     * @return the visible member map for the members of this class.
+     */
+    public VisibleMemberMap getVisibleMemberMap() {
+        return visibleMemberMap;
+    }
+
+    /**
+     * summaryOrder.size()
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return members.size() > 0;
+    }
+
+    /**
+     * Build the annotation type required member documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeRequiredMember(XMLNode node, Content memberDetailsTree) {
+        buildAnnotationTypeMember(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the member documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        int size = members.size();
+        if (size > 0) {
+            writer.addAnnotationDetailsMarker(memberDetailsTree);
+            for (Element element : members) {
+                currentMember = element;
+                Content detailsTree = writer.getMemberTreeHeader();
+                writer.addAnnotationDetailsTreeHeader(typeElement, detailsTree);
+                Content annotationDocTree = writer.getAnnotationDocTreeHeader(
+                        element, detailsTree);
+                buildChildren(node, annotationDocTree);
+                detailsTree.addContent(writer.getAnnotationDoc(
+                        annotationDocTree, currentMember == members.last()));
+                memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
+            }
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content annotationDocTree) {
+        annotationDocTree.addContent(writer.getSignature(currentMember));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) {
+        writer.addDeprecated(currentMember, annotationDocTree);
+    }
+
+    /**
+     * Build the comments for the member.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildMemberComments(XMLNode node, Content annotationDocTree) {
+        if(! configuration.nocomment) {
+            writer.addComments(currentMember, annotationDocTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param annotationDocTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content annotationDocTree) {
+        writer.addTags(currentMember, annotationDocTree);
+    }
+
+    /**
+     * Return the annotation type required member writer for this builder.
+     *
+     * @return the annotation type required member constant writer for this
+     * builder.
+     */
+    public AnnotationTypeRequiredMemberWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/BuilderFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
+import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.PropertyWriter;
+import jdk.javadoc.internal.doclets.toolkit.WriterFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.ClassTree;
+
+/**
+ * The factory for constructing builders.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public class BuilderFactory {
+
+    /**
+     * The current configuration of the doclet.
+     */
+    private final Configuration configuration;
+
+    /**
+     * The factory to retrieve the required writers from.
+     */
+    private final WriterFactory writerFactory;
+
+    private final AbstractBuilder.Context context;
+
+    /**
+     * Construct a builder factory using the given configuration.
+     * @param configuration the configuration for the current doclet
+     * being executed.
+     */
+    public BuilderFactory (Configuration configuration) {
+        this.configuration = configuration;
+        this.writerFactory = configuration.getWriterFactory();
+
+        Set<PackageElement> containingPackagesSeen = new HashSet<>();
+        context = new AbstractBuilder.Context(configuration, containingPackagesSeen,
+                LayoutParser.getInstance(configuration));
+    }
+
+    /**
+     * Return the builder that builds the constant summary.
+     * @return the builder that builds the constant summary.
+     */
+    public AbstractBuilder getConstantsSummaryBuilder() throws Exception {
+        return ConstantsSummaryBuilder.getInstance(context,
+            writerFactory.getConstantsSummaryWriter());
+    }
+
+    /**
+     * Return the builder that builds the package summary.
+     *
+     * @param pkg the package being documented.
+     * @param prevPkg the previous package being documented.
+     * @param nextPkg the next package being documented.
+     * @return the builder that builds the constant summary.
+     */
+    public AbstractBuilder getPackageSummaryBuilder(PackageElement pkg, PackageElement prevPkg,
+            PackageElement nextPkg) throws Exception {
+        return PackageSummaryBuilder.getInstance(context, pkg,
+            writerFactory.getPackageSummaryWriter(pkg, prevPkg, nextPkg));
+    }
+
+    /**
+     * Return the builder for the class.
+     *
+     * @param typeElement the class being documented.
+     * @param prevClass the previous class that was documented.
+     * @param nextClass the next class being documented.
+     * @param classTree the class tree.
+     * @return the writer for the class.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public AbstractBuilder getClassBuilder(TypeElement typeElement,
+            TypeElement prevClass, TypeElement nextClass, ClassTree classTree)
+            throws Exception {
+        return ClassBuilder.getInstance(context, typeElement,
+            writerFactory.getClassWriter(typeElement, prevClass, nextClass, classTree));
+    }
+
+    /**
+     * Return the builder for the annotation type.
+     *
+     * @param annotationType the annotation type being documented.
+     * @param prevType the previous type that was documented.
+     * @param nextType the next type being documented.
+     * @return the writer for the annotation type.  Return null if this
+     * writer is not supported by the doclet.
+     */
+    public AbstractBuilder getAnnotationTypeBuilder(
+        TypeElement annotationType, TypeMirror prevType, TypeMirror nextType)
+            throws Exception {
+        return AnnotationTypeBuilder.getInstance(context, annotationType,
+            writerFactory.getAnnotationTypeWriter(annotationType, prevType, nextType));
+    }
+
+    /**
+     * Return an instance of the method builder for the given class.
+     *
+     * @return an instance of the method builder for the given class.
+     */
+    public AbstractBuilder getMethodBuilder(ClassWriter classWriter)
+           throws Exception {
+        return MethodBuilder.getInstance(context, classWriter.getTypeElement(),
+            writerFactory.getMethodWriter(classWriter));
+    }
+
+    /**
+     * Return an instance of the annotation type fields builder for the given
+     * class.
+     *
+     * @return an instance of the annotation type field builder for the given
+     *         annotation type.
+     */
+    public AbstractBuilder getAnnotationTypeFieldsBuilder(
+            AnnotationTypeWriter annotationTypeWriter)
+    throws Exception {
+        return AnnotationTypeFieldBuilder.getInstance(context,
+                annotationTypeWriter.getAnnotationTypeElement(),
+                writerFactory.getAnnotationTypeFieldWriter(annotationTypeWriter));
+    }
+
+    /**
+     * Return an instance of the annotation type member builder for the given
+     * class.
+     *
+     * @return an instance of the annotation type member builder for the given
+     *         annotation type.
+     */
+    public AbstractBuilder getAnnotationTypeOptionalMemberBuilder(
+            AnnotationTypeWriter annotationTypeWriter)
+    throws Exception {
+        return AnnotationTypeOptionalMemberBuilder.getInstance(context,
+            annotationTypeWriter.getAnnotationTypeElement(),
+            writerFactory.getAnnotationTypeOptionalMemberWriter(annotationTypeWriter));
+    }
+
+    /**
+     * Return an instance of the annotation type member builder for the given
+     * class.
+     *
+     * @return an instance of the annotation type member builder for the given
+     *         annotation type.
+     */
+    public AbstractBuilder getAnnotationTypeRequiredMemberBuilder(
+            AnnotationTypeWriter annotationTypeWriter)
+    throws Exception {
+        return AnnotationTypeRequiredMemberBuilder.getInstance(context,
+            annotationTypeWriter.getAnnotationTypeElement(),
+            writerFactory.getAnnotationTypeRequiredMemberWriter(annotationTypeWriter));
+    }
+
+    /**
+     * Return an instance of the enum constants builder for the given class.
+     *
+     * @return an instance of the enum constants builder for the given class.
+     */
+    public AbstractBuilder getEnumConstantsBuilder(ClassWriter classWriter)
+            throws Exception {
+        return EnumConstantBuilder.getInstance(context, classWriter.getTypeElement(),
+                writerFactory.getEnumConstantWriter(classWriter));
+    }
+
+    /**
+     * Return an instance of the field builder for the given class.
+     *
+     * @return an instance of the field builder for the given class.
+     */
+    public AbstractBuilder getFieldBuilder(ClassWriter classWriter) throws Exception {
+        return FieldBuilder.getInstance(context, classWriter.getTypeElement(),
+            writerFactory.getFieldWriter(classWriter));
+    }
+
+    /**
+     * Return an instance of the property builder for the given class.
+     *
+     * @return an instance of the field builder for the given class.
+     */
+    public AbstractBuilder getPropertyBuilder(ClassWriter classWriter) throws Exception {
+        final PropertyWriter propertyWriter =
+                writerFactory.getPropertyWriter(classWriter);
+        return PropertyBuilder.getInstance(context,
+                                           classWriter.getTypeElement(),
+                                           propertyWriter);
+    }
+
+    /**
+     * Return an instance of the constructor builder for the given class.
+     *
+     * @return an instance of the constructor builder for the given class.
+     */
+    public AbstractBuilder getConstructorBuilder(ClassWriter classWriter)
+            throws Exception {
+        return ConstructorBuilder.getInstance(context, classWriter.getTypeElement(),
+            writerFactory.getConstructorWriter(classWriter));
+    }
+
+    /**
+     * Return an instance of the member summary builder for the given class.
+     *
+     * @return an instance of the member summary builder for the given class.
+     */
+    public AbstractBuilder getMemberSummaryBuilder(ClassWriter classWriter)
+            throws Exception {
+        return MemberSummaryBuilder.getInstance(classWriter, context);
+    }
+
+    /**
+     * Return an instance of the member summary builder for the given annotation
+     * type.
+     *
+     * @return an instance of the member summary builder for the given
+     *         annotation type.
+     */
+    public AbstractBuilder getMemberSummaryBuilder(
+            AnnotationTypeWriter annotationTypeWriter)
+    throws Exception {
+        return MemberSummaryBuilder.getInstance(annotationTypeWriter, context);
+    }
+
+    /**
+     * Return the builder that builds the serialized form.
+     *
+     * @return the builder that builds the serialized form.
+     */
+    public AbstractBuilder getSerializedFormBuilder()
+            throws Exception {
+        return SerializedFormBuilder.getInstance(context);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ClassBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,400 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * Builds the summary for a given class.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class ClassBuilder extends AbstractBuilder {
+
+    /**
+     * The root element of the class XML is {@value}.
+     */
+    public static final String ROOT = "ClassDoc";
+
+    /**
+     * The class being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * The doclet specific writer.
+     */
+    private final ClassWriter writer;
+
+    /**
+     * Keep track of whether or not this typeElement is an interface.
+     */
+    private final boolean isInterface;
+
+    /**
+     * Keep track of whether or not this typeElement is an enum.
+     */
+    private final boolean isEnum;
+
+    /**
+     * The content tree for the class documentation.
+     */
+    private Content contentTree;
+
+    private final Utils utils;
+
+    /**
+     * Construct a new ClassBuilder.
+     *
+     * @param context  the build context
+     * @param typeElement the class being documented.
+     * @param writer the doclet specific writer.
+     */
+    private ClassBuilder(Context context, TypeElement typeElement, ClassWriter writer) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        this.utils = configuration.utils;
+        if (utils.isInterface(typeElement)) {
+            isInterface = true;
+            isEnum = false;
+        } else if (utils.isEnum(typeElement)) {
+            isInterface = false;
+            isEnum = true;
+            utils.setEnumDocumentation(typeElement);
+        } else {
+            isInterface = false;
+            isEnum = false;
+        }
+    }
+
+    /**
+     * Construct a new ClassBuilder.
+     *
+     * @param context  the build context
+     * @param typeElement the class being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static ClassBuilder getInstance(Context context,
+            TypeElement typeElement, ClassWriter writer) {
+        return new ClassBuilder(context, typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void build() throws IOException {
+        build(layoutParser.parseXML(ROOT), contentTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return ROOT;
+    }
+
+     /**
+      * Handles the {@literal <TypeElement>} tag.
+      *
+      * @param node the XML element that specifies which components to document
+      * @param contentTree the content tree to which the documentation will be added
+      */
+     public void buildClassDoc(XMLNode node, Content contentTree) throws Exception {
+         String key;
+         if (isInterface) {
+             key =  "doclet.Interface";
+         } else if (isEnum) {
+             key = "doclet.Enum";
+         } else {
+             key =  "doclet.Class";
+         }
+         contentTree = writer.getHeader(configuration.getText(key) + " " +
+                 utils.getSimpleName(typeElement));
+         Content classContentTree = writer.getClassContentHeader();
+         buildChildren(node, classContentTree);
+         writer.addClassContentTree(contentTree, classContentTree);
+         writer.addFooter(contentTree);
+         writer.printDocument(contentTree);
+         writer.close();
+         copyDocFiles();
+     }
+
+     /**
+      * Build the class tree documentation.
+      *
+      * @param node the XML element that specifies which components to document
+      * @param classContentTree the content tree to which the documentation will be added
+      */
+    public void buildClassTree(XMLNode node, Content classContentTree) {
+        writer.addClassTree(classContentTree);
+    }
+
+    /**
+     * Build the class information tree documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classContentTree the content tree to which the documentation will be added
+     */
+    public void buildClassInfo(XMLNode node, Content classContentTree) {
+        Content classInfoTree = writer.getClassInfoTreeHeader();
+        buildChildren(node, classInfoTree);
+        classContentTree.addContent(writer.getClassInfo(classInfoTree));
+    }
+
+    /**
+     * Build the typeparameters of this class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildTypeParamInfo(XMLNode node, Content classInfoTree) {
+        writer.addTypeParamInfo(classInfoTree);
+    }
+
+    /**
+     * If this is an interface, list all super interfaces.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildSuperInterfacesInfo(XMLNode node, Content classInfoTree) {
+        writer.addSuperInterfacesInfo(classInfoTree);
+    }
+
+    /**
+     * If this is a class, list all interfaces implemented by this class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildImplementedInterfacesInfo(XMLNode node, Content classInfoTree) {
+        writer.addImplementedInterfacesInfo(classInfoTree);
+    }
+
+    /**
+     * List all the classes extend this one.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildSubClassInfo(XMLNode node, Content classInfoTree) {
+        writer.addSubClassInfo(classInfoTree);
+    }
+
+    /**
+     * List all the interfaces that extend this one.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildSubInterfacesInfo(XMLNode node, Content classInfoTree) {
+        writer.addSubInterfacesInfo(classInfoTree);
+    }
+
+    /**
+     * If this is an interface, list all classes that implement this interface.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildInterfaceUsageInfo(XMLNode node, Content classInfoTree) {
+        writer.addInterfaceUsageInfo(classInfoTree);
+    }
+
+    /**
+     * If this is an functional interface, display appropriate message.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildFunctionalInterfaceInfo(XMLNode node, Content classInfoTree) {
+        writer.addFunctionalInterfaceInfo(classInfoTree);
+    }
+
+    /**
+     * If this class is deprecated, build the appropriate information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo (XMLNode node, Content classInfoTree) {
+        writer.addClassDeprecationInfo(classInfoTree);
+    }
+
+    /**
+     * If this is an inner class or interface, list the enclosing class or interface.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildNestedClassInfo (XMLNode node, Content classInfoTree) {
+        writer.addNestedClassInfo(classInfoTree);
+    }
+
+    /**
+     * Copy the doc files.
+     */
+     private void copyDocFiles() {
+        PackageElement containingPackage = utils.containingPackage(typeElement);
+        if((configuration.packages == null ||
+            !configuration.packages.contains(containingPackage)) &&
+            !containingPackagesSeen.contains(containingPackage)) {
+            //Only copy doc files dir if the containing package is not
+            //documented AND if we have not documented a class from the same
+            //package already. Otherwise, we are making duplicate copies.
+            utils.copyDocFiles(containingPackage);
+            containingPackagesSeen.add(containingPackage);
+        }
+     }
+
+    /**
+     * Build the signature of the current class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildClassSignature(XMLNode node, Content classInfoTree) {
+        writer.addClassSignature(utils.modifiersToString(typeElement, true), classInfoTree);
+    }
+
+    /**
+     * Build the class description.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildClassDescription(XMLNode node, Content classInfoTree) {
+       writer.addClassDescription(classInfoTree);
+    }
+
+    /**
+     * Build the tag information for the current class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classInfoTree the content tree to which the documentation will be added
+     */
+    public void buildClassTagInfo(XMLNode node, Content classInfoTree) {
+       writer.addClassTagInfo(classInfoTree);
+    }
+
+    /**
+     * Build the member summary contents of the page.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classContentTree the content tree to which the documentation will be added
+     */
+    public void buildMemberSummary(XMLNode node, Content classContentTree) throws Exception {
+        Content memberSummaryTree = writer.getMemberTreeHeader();
+        configuration.getBuilderFactory().
+                getMemberSummaryBuilder(writer).buildChildren(node, memberSummaryTree);
+        classContentTree.addContent(writer.getMemberSummaryTree(memberSummaryTree));
+    }
+
+    /**
+     * Build the member details contents of the page.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classContentTree the content tree to which the documentation will be added
+     */
+    public void buildMemberDetails(XMLNode node, Content classContentTree) {
+        Content memberDetailsTree = writer.getMemberTreeHeader();
+        buildChildren(node, memberDetailsTree);
+        classContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
+    }
+
+    /**
+     * Build the enum constants documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildEnumConstantsDetails(XMLNode node,
+            Content memberDetailsTree) throws Exception {
+        configuration.getBuilderFactory().
+                getEnumConstantsBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the field documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildFieldDetails(XMLNode node,
+            Content memberDetailsTree) throws Exception {
+        configuration.getBuilderFactory().
+                getFieldBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the property documentation.
+     *
+     * @param elements the XML elements that specify how a field is documented.
+     */
+    public void buildPropertyDetails(XMLNode node,
+            Content memberDetailsTree) throws Exception {
+        configuration.getBuilderFactory().
+                getPropertyBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the constructor documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildConstructorDetails(XMLNode node,
+            Content memberDetailsTree) throws Exception {
+        configuration.getBuilderFactory().
+                getConstructorBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+
+    /**
+     * Build the method documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildMethodDetails(XMLNode node,
+            Content memberDetailsTree) throws Exception {
+        configuration.getBuilderFactory().
+                getMethodBuilder(writer).buildChildren(node, memberDetailsTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstantsSummaryBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,365 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import jdk.javadoc.internal.doclets.toolkit.ConstantsSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds the Constants Summary Page.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class ConstantsSummaryBuilder extends AbstractBuilder {
+
+    /**
+     * The root element of the constant summary XML is {@value}.
+     */
+    public static final String ROOT = "ConstantSummary";
+
+    /**
+     * The maximum number of package directories shown in the constant
+     * value index.
+     */
+    public static final int MAX_CONSTANT_VALUE_INDEX_LENGTH = 2;
+
+    /**
+     * The writer used to write the results.
+     */
+    protected final ConstantsSummaryWriter writer;
+
+    /**
+     * The set of TypeElements that have constant fields.
+     */
+    protected final Set<TypeElement> typeElementsWithConstFields;
+
+    /**
+     * The set of printed package headers.
+     */
+    protected final Set<PackageElement> printedPackageHeaders;
+
+    /**
+     * The current package being documented.
+     */
+    private PackageElement currentPackage;
+
+    /**
+     * The current class being documented.
+     */
+    private TypeElement currentClass;
+
+    /**
+     * The content tree for the constant summary documentation.
+     */
+    private Content contentTree;
+
+    /**
+     * True if first package is listed.
+     */
+    private boolean first = true;
+
+    /**
+     * Construct a new ConstantsSummaryBuilder.
+     *
+     * @param context       the build context.
+     * @param writer        the writer for the summary.
+     */
+    private ConstantsSummaryBuilder(Context context,
+            ConstantsSummaryWriter writer) {
+        super(context);
+        this.writer = writer;
+        this.typeElementsWithConstFields = new HashSet<>();
+        this.printedPackageHeaders = new TreeSet<>(utils.makePackageComparator());
+    }
+
+    /**
+     * Construct a ConstantsSummaryBuilder.
+     *
+     * @param context       the build context.
+     * @param writer        the writer for the summary.
+     */
+    public static ConstantsSummaryBuilder getInstance(Context context,
+            ConstantsSummaryWriter writer) {
+        return new ConstantsSummaryBuilder(context, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void build() throws IOException {
+        if (writer == null) {
+            //Doclet does not support this output.
+            return;
+        }
+        build(layoutParser.parseXML(ROOT), contentTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return ROOT;
+    }
+
+    /**
+     * Build the constant summary.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param contentTree the content tree to which the documentation will be added
+     */
+    public void buildConstantSummary(XMLNode node, Content contentTree) throws Exception {
+        contentTree = writer.getHeader();
+        buildChildren(node, contentTree);
+        writer.addFooter(contentTree);
+        writer.printDocument(contentTree);
+        writer.close();
+    }
+
+    /**
+     * Build the list of packages.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param contentTree the content tree to which the content list will be added
+     */
+    public void buildContents(XMLNode node, Content contentTree) {
+        Content contentListTree = writer.getContentsHeader();
+        printedPackageHeaders.clear();
+        for (PackageElement pkg : configuration.packages) {
+            if (hasConstantField(pkg) && !hasPrintedPackageIndex(pkg)) {
+                writer.addLinkToPackageContent(pkg, printedPackageHeaders, contentListTree);
+            }
+        }
+        writer.addContentsList(contentTree, contentListTree);
+    }
+
+    /**
+     * Build the summary for each documented package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param contentTree the tree to which the summaries will be added
+     */
+    public void buildConstantSummaries(XMLNode node, Content contentTree) {
+        printedPackageHeaders.clear();
+        Content summariesTree = writer.getConstantSummaries();
+        for (PackageElement aPackage : configuration.packages) {
+            if (hasConstantField(aPackage)) {
+                currentPackage = aPackage;
+                //Build the documentation for the current package.
+                buildChildren(node, summariesTree);
+                first = false;
+            }
+        }
+        writer.addConstantSummaries(contentTree, summariesTree);
+    }
+
+    /**
+     * Build the header for the given package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summariesTree the tree to which the package header will be added
+     */
+    public void buildPackageHeader(XMLNode node, Content summariesTree) {
+        String parsedPackageName = utils.parsePackageName(currentPackage);
+        PackageElement p = utils.elementUtils.getPackageElement(parsedPackageName);
+        if (!printedPackageHeaders.contains(p)) {
+            writer.addPackageName(currentPackage, summariesTree, first);
+            printedPackageHeaders.add(p);
+        }
+    }
+
+    /**
+     * Build the summary for the current class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summariesTree the tree to which the class constant summary will be added
+     */
+    public void buildClassConstantSummary(XMLNode node, Content summariesTree) {
+        SortedSet<TypeElement> classes = !currentPackage.isUnnamed()
+                ? utils.getAllClasses(currentPackage)
+                : configuration.typeElementCatalog.allUnnamedClasses();
+        Content classConstantTree = writer.getClassConstantHeader();
+        for (TypeElement te : classes) {
+            if (!typeElementsWithConstFields.contains(te) ||
+                !utils.isIncluded(te)) {
+                continue;
+            }
+            currentClass = te;
+            //Build the documentation for the current class.
+            buildChildren(node, classConstantTree);
+        }
+        writer.addClassConstant(summariesTree, classConstantTree);
+    }
+
+    /**
+     * Build the summary of constant members in the class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classConstantTree the tree to which the constant members table
+     *                          will be added
+     */
+    public void buildConstantMembers(XMLNode node, Content classConstantTree) {
+        new ConstantFieldBuilder(currentClass).buildMembersSummary(node, classConstantTree);
+    }
+
+    /**
+     * Return true if the given package has constant fields to document.
+     *
+     * @param pkg   the package being checked.
+     * @return true if the given package has constant fields to document.
+     */
+    private boolean hasConstantField(PackageElement pkg) {
+        SortedSet<TypeElement> classes = !pkg.isUnnamed()
+                  ? utils.getAllClasses(pkg)
+                  : configuration.typeElementCatalog.allUnnamedClasses();
+        boolean found = false;
+        for (TypeElement te : classes) {
+            if (utils.isIncluded(te) && hasConstantField(te)) {
+                found = true;
+            }
+        }
+        return found;
+    }
+
+    /**
+     * Return true if the given class has constant fields to document.
+     *
+     * @param typeElement the class being checked.
+     * @return true if the given package has constant fields to document.
+     */
+    private boolean hasConstantField (TypeElement typeElement) {
+        VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(typeElement,
+            VisibleMemberMap.Kind.FIELDS, configuration);
+        SortedSet<Element> fields = visibleMemberMapFields.getLeafClassMembers();
+        for (Element f : fields) {
+            VariableElement field = (VariableElement)f;
+            if (field.getConstantValue() != null) {
+                typeElementsWithConstFields.add(typeElement);
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Return true if the given package name has been printed.  Also
+     * return true if the root of this package has been printed.
+     *
+     * @param pkgname the name of the package to check.
+     */
+    private boolean hasPrintedPackageIndex(PackageElement pkg) {
+        for (PackageElement printedPkg : printedPackageHeaders) {
+            if (utils.getPackageName(pkg).startsWith(utils.parsePackageName(printedPkg))) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Print the table of constants.
+     *
+     * @author Jamie Ho
+     */
+    private class ConstantFieldBuilder {
+
+        /**
+         * The map used to get the visible variables.
+         */
+        protected VisibleMemberMap visibleMemberMapFields = null;
+
+        /**
+         * The map used to get the visible variables.
+         */
+        protected VisibleMemberMap visibleMemberMapEnumConst = null;
+
+        /**
+         * The typeElement that we are examining constants for.
+         */
+        protected TypeElement typeElement;
+
+        /**
+         * Construct a ConstantFieldSubWriter.
+         * @param typeElement the typeElement that we are examining constants for.
+         */
+        public ConstantFieldBuilder(TypeElement typeElement) {
+            this.typeElement = typeElement;
+            visibleMemberMapFields = new VisibleMemberMap(typeElement,
+                VisibleMemberMap.Kind.FIELDS, configuration);
+            visibleMemberMapEnumConst = new VisibleMemberMap(typeElement,
+                VisibleMemberMap.Kind.ENUM_CONSTANTS, configuration);
+        }
+
+        /**
+         * Builds the table of constants for a given class.
+         *
+         * @param node the XML element that specifies which components to document
+         * @param classConstantTree the tree to which the class constants table
+         *                          will be added
+         */
+        protected void buildMembersSummary(XMLNode node, Content classConstantTree) {
+            SortedSet<VariableElement> members = members();
+            if (!members.isEmpty()) {
+                writer.addConstantMembers(typeElement, members, classConstantTree);
+            }
+        }
+
+        /**
+         * Return the list of visible constant fields for the given TypeElement.
+         * @return the list of visible constant fields for the given TypeElement.
+         */
+        protected SortedSet<VariableElement> members() {
+            SortedSet<Element> list = visibleMemberMapFields.getLeafClassMembers();
+            list.addAll(visibleMemberMapEnumConst.getLeafClassMembers());
+            SortedSet<VariableElement> inclList =
+                    new TreeSet<>(utils.makeGeneralPurposeComparator());
+            for (Element element : list) {
+                VariableElement member = (VariableElement)element;
+                if (member.getConstantValue() != null) {
+                    inclList.add(member);
+                }
+            }
+            return inclList;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/ConstructorBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,226 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.ConstructorWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for a constructor.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class ConstructorBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The name of this builder.
+     */
+    public static final String NAME = "ConstructorDetails";
+
+    /**
+     * The current constructor that is being documented at this point in time.
+     */
+    private ExecutableElement constructor;
+
+    /**
+     * The class whose constructors are being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * The visible constructors for the given class.
+     */
+    private final VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the constructor documentation.
+     */
+    private final ConstructorWriter writer;
+
+    /**
+     * The constructors being documented.
+     */
+    private final SortedSet<Element> constructors;
+
+    /**
+     * Construct a new ConstructorBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    private ConstructorBuilder(Context context,
+            TypeElement typeElement,
+            ConstructorWriter writer) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        visibleMemberMap =
+                new VisibleMemberMap(
+                typeElement,
+                VisibleMemberMap.Kind.CONSTRUCTORS,
+                configuration);
+        constructors = visibleMemberMap.getMembersFor(typeElement);
+        for (Element ctor : constructors) {
+            if (utils.isProtected(ctor) || utils.isPrivate(ctor)) {
+                writer.setFoundNonPubConstructor(true);
+            }
+        }
+    }
+
+    /**
+     * Construct a new ConstructorBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static ConstructorBuilder getInstance(Context context,
+            TypeElement typeElement, ConstructorWriter writer) {
+        return new ConstructorBuilder(context, typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return !constructors.isEmpty();
+    }
+
+    /**
+     * Returns a list of constructors that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @return a list of constructors that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Return the constructor writer for this builder.
+     *
+     * @return the constructor writer for this builder.
+     */
+    public ConstructorWriter getWriter() {
+        return writer;
+    }
+
+    /**
+     * Build the constructor documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildConstructorDoc(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        int size = constructors.size();
+        if (size > 0) {
+            Content constructorDetailsTree = writer.getConstructorDetailsTreeHeader(typeElement,
+                    memberDetailsTree);
+            for (Element ctor : constructors) {
+                constructor = (ExecutableElement)ctor;
+                Content constructorDocTree = writer.getConstructorDocTreeHeader(
+                        constructor, constructorDetailsTree);
+                buildChildren(node, constructorDocTree);
+                constructorDetailsTree.addContent(writer.getConstructorDoc(constructorDocTree,
+                        constructors.last().equals(constructor)));
+            }
+            memberDetailsTree.addContent(
+                    writer.getConstructorDetails(constructorDetailsTree));
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param constructorDocTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content constructorDocTree) {
+        constructorDocTree.addContent(writer.getSignature(constructor));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param constructorDocTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content constructorDocTree) {
+        writer.addDeprecated(constructor, constructorDocTree);
+    }
+
+    /**
+     * Build the comments for the constructor.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param constructorDocTree the content tree to which the documentation will be added
+     */
+    public void buildConstructorComments(XMLNode node, Content constructorDocTree) {
+        if (!configuration.nocomment) {
+            writer.addComments(constructor, constructorDocTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param constructorDocTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content constructorDocTree) {
+        writer.addTags(constructor, constructorDocTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/EnumConstantBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.EnumConstantWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for a enum constants.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class EnumConstantBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The class whose enum constants are being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * The visible enum constantss for the given class.
+     */
+    private final VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the enum constants documentation.
+     */
+    private final EnumConstantWriter writer;
+
+    /**
+     * The list of enum constants being documented.
+     */
+    private final SortedSet<Element> enumConstants;
+
+    /**
+     * The current enum constant that is being documented at this point
+     * in time.
+     */
+    private VariableElement currentElement;
+
+    /**
+     * Construct a new EnumConstantsBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whose members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    private EnumConstantBuilder(Context context,
+            TypeElement typeElement, EnumConstantWriter writer) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        visibleMemberMap =
+                new VisibleMemberMap(
+                typeElement,
+                VisibleMemberMap.Kind.ENUM_CONSTANTS,
+                configuration);
+        enumConstants = visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Construct a new EnumConstantsBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static EnumConstantBuilder getInstance(Context context,
+            TypeElement typeElement, EnumConstantWriter writer) {
+        return new EnumConstantBuilder(context, typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "EnumConstantDetails";
+    }
+
+    /**
+     * Returns a list of enum constants that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param typeElement the {@link TypeElement} we want to check.
+     * @return a list of enum constants that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Returns the visible member map for the enum constants of this class.
+     *
+     * @return the visible member map for the enum constants of this class.
+     */
+    public VisibleMemberMap getVisibleMemberMap() {
+        return visibleMemberMap;
+    }
+
+    /**
+     * summaryOrder.size()
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return enumConstants.size() > 0;
+    }
+
+    /**
+     * Build the enum constant documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildEnumConstant(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        if (!enumConstants.isEmpty()) {
+            Content enumConstantsDetailsTree = writer.getEnumConstantsDetailsTreeHeader(typeElement,
+                    memberDetailsTree);
+            for (Element element : enumConstants) {
+                currentElement = (VariableElement)element;
+                Content enumConstantsTree = writer.getEnumConstantsTreeHeader(currentElement,
+                        enumConstantsDetailsTree);
+                buildChildren(node, enumConstantsTree);
+                enumConstantsDetailsTree.addContent(writer.getEnumConstants(
+                        enumConstantsTree, currentElement.equals(enumConstants.last())));
+            }
+            memberDetailsTree.addContent(
+                    writer.getEnumConstantsDetails(enumConstantsDetailsTree));
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param enumConstantsTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content enumConstantsTree) {
+        enumConstantsTree.addContent(writer.getSignature(currentElement));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param enumConstantsTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content enumConstantsTree) {
+        writer.addDeprecated(currentElement, enumConstantsTree);
+    }
+
+    /**
+     * Build the comments for the enum constant.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param enumConstantsTree the content tree to which the documentation will be added
+     */
+    public void buildEnumConstantComments(XMLNode node, Content enumConstantsTree) {
+        if (!configuration.nocomment) {
+            writer.addComments(currentElement, enumConstantsTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param enumConstantsTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content enumConstantsTree) {
+        writer.addTags(currentElement, enumConstantsTree);
+    }
+
+    /**
+     * Return the enum constant writer for this builder.
+     *
+     * @return the enum constant writer for this builder.
+     */
+    public EnumConstantWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/FieldBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,225 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.FieldWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for a field.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class FieldBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The class whose fields are being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * The visible fields for the given class.
+     */
+    private final VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the field documentation.
+     */
+    private final FieldWriter writer;
+
+    /**
+     * The list of fields being documented.
+     */
+    private final SortedSet<Element> fields;
+
+    /**
+     * The index of the current field that is being documented at this point
+     * in time.
+     */
+    private VariableElement currentElement;
+
+    /**
+     * Construct a new FieldBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    private FieldBuilder(Context context,
+            TypeElement typeElement,
+            FieldWriter writer) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        visibleMemberMap =
+                new VisibleMemberMap(
+                typeElement,
+                VisibleMemberMap.Kind.FIELDS,
+                configuration);
+        fields = visibleMemberMap.getLeafClassMembers();
+    }
+
+    /**
+     * Construct a new FieldBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static FieldBuilder getInstance(Context context,
+            TypeElement typeElement,
+            FieldWriter writer) {
+        return new FieldBuilder(context, typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "FieldDetails";
+    }
+
+    /**
+     * Returns a list of fields that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param typeElement the {@link TypeElement} we want to check.
+     * @return a list of fields that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Returns the visible member map for the fields of this class.
+     *
+     * @return the visible member map for the fields of this class.
+     */
+    public VisibleMemberMap getVisibleMemberMap() {
+        return visibleMemberMap;
+    }
+
+    /**
+     * summaryOrder.size()
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return !fields.isEmpty();
+    }
+
+    /**
+     * Build the field documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildFieldDoc(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        if (!fields.isEmpty()) {
+            Content fieldDetailsTree = writer.getFieldDetailsTreeHeader(typeElement, memberDetailsTree);
+            for (Element element : fields) {
+                currentElement = (VariableElement)element;
+                Content fieldDocTree = writer.getFieldDocTreeHeader(currentElement, fieldDetailsTree);
+                buildChildren(node, fieldDocTree);
+                fieldDetailsTree.addContent(writer.getFieldDoc(
+                        fieldDocTree, currentElement.equals(fields.last())));
+            }
+            memberDetailsTree.addContent(
+                    writer.getFieldDetails(fieldDetailsTree));
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldDocTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content fieldDocTree) {
+        fieldDocTree.addContent(writer.getSignature(currentElement));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldDocTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content fieldDocTree) {
+        writer.addDeprecated(currentElement, fieldDocTree);
+    }
+
+    /**
+     * Build the comments for the field.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldDocTree the content tree to which the documentation will be added
+     */
+    public void buildFieldComments(XMLNode node, Content fieldDocTree) {
+        if (!configuration.nocomment) {
+            writer.addComments(currentElement, fieldDocTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldDocTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content fieldDocTree) {
+        writer.addTags(currentElement, fieldDocTree);
+    }
+
+    /**
+     * Return the field writer for this builder.
+     *
+     * @return the field writer for this builder.
+     */
+    public FieldWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/LayoutParser.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,129 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+import java.util.*;
+
+import javax.xml.parsers.*;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import org.xml.sax.*;
+import org.xml.sax.helpers.DefaultHandler;
+
+
+/**
+ * Parse the XML that specified the order of operation for the builders.  This
+ * Parser uses SAX parsing.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @see SAXParser
+ */
+public class LayoutParser extends DefaultHandler {
+
+    /**
+     * The map of XML elements that have been parsed.
+     */
+    private Map<String,XMLNode> xmlElementsMap;
+    private XMLNode currentNode;
+    private final Configuration configuration;
+    private String currentRoot;
+    private boolean isParsing;
+
+    private LayoutParser(Configuration configuration) {
+        xmlElementsMap = new HashMap<>();
+        this.configuration = configuration;
+    }
+
+    /**
+     * Return an instance of the BuilderXML.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @return an instance of the BuilderXML.
+     */
+    public static LayoutParser getInstance(Configuration configuration) {
+        return new LayoutParser(configuration);
+    }
+
+    /**
+     * Parse the XML specifying the layout of the documentation.
+     *
+     * @return the list of XML elements parsed.
+     */
+    public XMLNode parseXML(String root) {
+        if (xmlElementsMap.containsKey(root)) {
+            return xmlElementsMap.get(root);
+        }
+        try {
+            currentRoot = root;
+            isParsing = false;
+            SAXParserFactory factory = SAXParserFactory.newInstance();
+            SAXParser saxParser = factory.newSAXParser();
+            InputStream in = configuration.getBuilderXML();
+            saxParser.parse(in, this);
+            return xmlElementsMap.get(root);
+        } catch (Throwable t) {
+            t.printStackTrace();
+            throw new DocletAbortException(t);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void startElement(String namespaceURI, String sName, String qName,
+        Attributes attrs)
+    throws SAXException {
+        if (isParsing || qName.equals(currentRoot)) {
+            isParsing = true;
+            currentNode = new XMLNode(currentNode, qName);
+            for (int i = 0; i < attrs.getLength(); i++)
+                currentNode.attrs.put(attrs.getLocalName(i), attrs.getValue(i));
+            if (qName.equals(currentRoot))
+                xmlElementsMap.put(qName, currentNode);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void endElement(String namespaceURI, String sName, String qName)
+    throws SAXException {
+        if (! isParsing) {
+            return;
+        }
+        currentNode = currentNode.parent;
+        isParsing = ! qName.equals(currentRoot);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MemberSummaryBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,539 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.text.MessageFormat;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.DocTree.Kind;
+import jdk.javadoc.internal.doclets.toolkit.AnnotationTypeWriter;
+import jdk.javadoc.internal.doclets.toolkit.ClassWriter;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MemberSummaryWriter;
+import jdk.javadoc.internal.doclets.toolkit.WriterFactory;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+import jdk.javadoc.internal.doclets.toolkit.CommentUtils;
+
+/**
+ * Builds the member summary.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class MemberSummaryBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The XML root for this builder.
+     */
+    public static final String NAME = "MemberSummary";
+
+    /**
+     * The visible members for the given class.
+     */
+    private final EnumMap<VisibleMemberMap.Kind, VisibleMemberMap> visibleMemberMaps;
+    /**
+     * The member summary writers for the given class.
+     */
+    private final EnumMap<VisibleMemberMap.Kind, MemberSummaryWriter> memberSummaryWriters;
+
+    /**
+     * The type being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * Construct a new MemberSummaryBuilder.
+     *
+     * @param classWriter   the writer for the class whose members are being
+     *                      summarized.
+     * @param context       the build context.
+     */
+    private MemberSummaryBuilder(Context context, TypeElement typeElement) {
+        super(context);
+        this.typeElement = typeElement;
+        memberSummaryWriters = new EnumMap<>(VisibleMemberMap.Kind.class);
+        visibleMemberMaps = new EnumMap<>(VisibleMemberMap.Kind.class);
+        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
+            visibleMemberMaps.put(kind,
+                    new VisibleMemberMap(
+                    typeElement,
+                    kind,
+                    configuration));
+        }
+    }
+
+    /**
+     * Construct a new MemberSummaryBuilder.
+     *
+     * @param classWriter   the writer for the class whose members are being
+     *                      summarized.
+     * @param context       the build context.
+     */
+    public static MemberSummaryBuilder getInstance(
+            ClassWriter classWriter, Context context)
+            throws Exception {
+        MemberSummaryBuilder builder = new MemberSummaryBuilder(context,
+                classWriter.getTypeElement());
+        WriterFactory wf = context.configuration.getWriterFactory();
+        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
+            MemberSummaryWriter msw = builder.visibleMemberMaps.get(kind).noVisibleMembers()
+                    ? null
+                    : wf.getMemberSummaryWriter(classWriter, kind);
+            builder.memberSummaryWriters.put(kind, msw);
+        }
+        return builder;
+    }
+
+    /**
+     * Construct a new MemberSummaryBuilder.
+     *
+     * @param annotationTypeWriter the writer for the class whose members are
+     *                             being summarized.
+     * @param configuration the current configuration of the doclet.
+     */
+    public static MemberSummaryBuilder getInstance(
+            AnnotationTypeWriter annotationTypeWriter, Context context)
+            throws Exception {
+        MemberSummaryBuilder builder = new MemberSummaryBuilder(context,
+                annotationTypeWriter.getAnnotationTypeElement());
+        WriterFactory wf = context.configuration.getWriterFactory();
+        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
+            MemberSummaryWriter msw = builder.visibleMemberMaps.get(kind).noVisibleMembers()
+                    ? null
+                    : wf.getMemberSummaryWriter(annotationTypeWriter, kind);
+            builder.memberSummaryWriters.put(kind, msw);
+        }
+        return builder;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return NAME;
+    }
+
+    /**
+     * Return the specified visible member map.
+     *
+     * @param type the type of visible member map to return.
+     * @return the specified visible member map.
+     * @throws ArrayIndexOutOfBoundsException when the type is invalid.
+     * @see VisibleMemberMap
+     */
+    public VisibleMemberMap getVisibleMemberMap(VisibleMemberMap.Kind type) {
+        return visibleMemberMaps.get(type);
+    }
+
+    /**.
+     * Return the specified member summary writer.
+     *
+     * @param type the type of member summary writer to return.
+     * @return the specified member summary writer.
+     * @throws ArrayIndexOutOfBoundsException when the type is invalid.
+     * @see VisibleMemberMap
+     */
+    public MemberSummaryWriter getMemberSummaryWriter(VisibleMemberMap.Kind type) {
+        return memberSummaryWriters.get(type);
+    }
+
+    /**
+     * Returns a list of methods that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param type the type of members to return.
+     * @return a list of methods that will be documented.
+     * @see VisibleMemberMap
+     */
+    public SortedSet<Element> members(VisibleMemberMap.Kind type) {
+        return visibleMemberMaps.get(type).getLeafClassMembers();
+    }
+
+    /**
+     * Return true it there are any members to summarize.
+     *
+     * @return true if there are any members to summarize.
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        if (utils.isAnnotationType(typeElement)) {
+            return !utils.getAnnotationMethods(typeElement).isEmpty();
+        }
+        for (VisibleMemberMap.Kind kind : VisibleMemberMap.Kind.values()) {
+            VisibleMemberMap members = visibleMemberMaps.get(kind);
+            if (!members.noVisibleMembers()) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Build the summary for the enum constants.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildEnumConstantsSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.ENUM_CONSTANTS);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.ENUM_CONSTANTS);
+        addSummary(writer, visibleMemberMap, false, memberSummaryTree);
+    }
+
+    /**
+     * Build the summary for fields.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeFieldsSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_FIELDS);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_FIELDS);
+        addSummary(writer, visibleMemberMap, false, memberSummaryTree);
+    }
+
+    /**
+     * Build the summary for the optional members.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_OPTIONAL);
+        addSummary(writer, visibleMemberMap, false, memberSummaryTree);
+    }
+
+    /**
+     * Build the summary for the optional members.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildAnnotationTypeRequiredMemberSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_REQUIRED);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.ANNOTATION_TYPE_MEMBER_REQUIRED);
+        addSummary(writer, visibleMemberMap, false, memberSummaryTree);
+    }
+
+    /**
+     * Build the summary for the fields.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildFieldsSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.FIELDS);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.FIELDS);
+        addSummary(writer, visibleMemberMap, true, memberSummaryTree);
+    }
+
+    /**
+     * Build the summary for the fields.
+     */
+    public void buildPropertiesSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.PROPERTIES);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.PROPERTIES);
+        addSummary(writer, visibleMemberMap, true, memberSummaryTree);
+    }
+
+    /**
+     * Build the summary for the nested classes.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildNestedClassesSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.INNER_CLASSES);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.INNER_CLASSES);
+        addSummary(writer, visibleMemberMap, true, memberSummaryTree);
+    }
+
+    /**
+     * Build the method summary.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.METHODS);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.METHODS);
+        addSummary(writer, visibleMemberMap, true, memberSummaryTree);
+    }
+
+    /**
+     * Build the constructor summary.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    public void buildConstructorsSummary(XMLNode node, Content memberSummaryTree) {
+        MemberSummaryWriter writer =
+                memberSummaryWriters.get(VisibleMemberMap.Kind.CONSTRUCTORS);
+        VisibleMemberMap visibleMemberMap =
+                visibleMemberMaps.get(VisibleMemberMap.Kind.CONSTRUCTORS);
+        addSummary(writer, visibleMemberMap, false, memberSummaryTree);
+    }
+
+    /**
+     * Build the member summary for the given members.
+     *
+     * @param writer the summary writer to write the output.
+     * @param visibleMemberMap the given members to summarize.
+     * @param summaryTreeList list of content trees to which the documentation will be added
+     */
+    private void buildSummary(MemberSummaryWriter writer,
+            VisibleMemberMap visibleMemberMap, LinkedList<Content> summaryTreeList) {
+        SortedSet<Element> members = visibleMemberMap.getLeafClassMembers();
+        if (!members.isEmpty()) {
+            List<Content> tableContents = new LinkedList<>();
+            int counter = 0;
+            for (Element member : members) {
+                final Element property = visibleMemberMap.getPropertyMemberDoc(member);
+                if (property != null) {
+                    processProperty(visibleMemberMap, member, property);
+                }
+                List<? extends DocTree> firstSentenceTags = utils.getFirstSentenceTrees(member);
+                if (utils.isExecutableElement(member) && firstSentenceTags.isEmpty()) {
+                    //Inherit comments from overriden or implemented method if
+                    //necessary.
+                    DocFinder.Output inheritedDoc =
+                            DocFinder.search(configuration,
+                                    new DocFinder.Input(utils, (ExecutableElement) member));
+                    if (inheritedDoc.holder != null
+                            && !utils.getFirstSentenceTrees(inheritedDoc.holder).isEmpty()) {
+                        // let the comment helper know of the overridden element
+                        CommentHelper ch = utils.getCommentHelper(member);
+                        ch.setOverrideElement(inheritedDoc.holder);
+                        firstSentenceTags = utils.getFirstSentenceTrees(inheritedDoc.holder);
+                    }
+                }
+                writer.addMemberSummary(typeElement, member, firstSentenceTags,
+                        tableContents, counter);
+                counter++;
+            }
+            summaryTreeList.add(writer.getSummaryTableTree(typeElement, tableContents));
+        }
+    }
+
+    /**
+     * Process the property method, property setter and/or property getter
+     * comment text so that it contains the documentation from
+     * the property field. The method adds the leading sentence,
+     * copied documentation including the defaultValue tag and
+     * the see tags if the appropriate property getter and setter are
+     * available.
+     *
+     * @param visibleMemberMap the members information.
+     * @param member the member which is to be augmented.
+     * @param property the original property documentation.
+     */
+    private void processProperty(VisibleMemberMap visibleMemberMap,
+                                 Element member,
+                                 Element property) {
+        CommentUtils cmtutils = configuration.cmtUtils;
+        final boolean isSetter = isSetter(member);
+        final boolean isGetter = isGetter(member);
+        List<DocTree> firstSentence = new ArrayList<>();
+        List<DocTree> bodyTags = new ArrayList<>();
+        List<DocTree> blockTags = new ArrayList<>();
+        if (isGetter || isSetter) {
+            //add "[GS]ets the value of the property PROPERTY_NAME."
+            if (isSetter) {
+                String text = MessageFormat.format(
+                        configuration.getText("doclet.PropertySetterWithName"),
+                        utils.propertyName((ExecutableElement)member));
+                firstSentence.addAll(cmtutils.makeFirstSentenceTree(text));
+            }
+            if (isGetter) {
+                String text = MessageFormat.format(
+                        configuration.getText("doclet.PropertyGetterWithName"),
+                        utils.propertyName((ExecutableElement) member));
+                firstSentence.addAll(cmtutils.makeFirstSentenceTree(text));
+            }
+            List<? extends DocTree> propertyTags = utils.getBlockTags(property, "propertyDescription");
+            if (propertyTags.isEmpty()) {
+                List<? extends DocTree> comment = utils.getBody(property);
+                blockTags.addAll(cmtutils.makePropertyDescriptionTree(comment));
+            }
+        } else {
+            firstSentence.addAll(utils.getBody(property));
+        }
+
+        // copy certain tags
+        List<? extends DocTree> tags = utils.getBlockTags(property, Kind.SINCE);
+        blockTags.addAll(tags);
+
+        List<? extends DocTree> bTags = utils.getBlockTags(property, Kind.UNKNOWN_BLOCK_TAG);
+        CommentHelper ch = utils.getCommentHelper(property);
+        for (DocTree dt : bTags) {
+            String tagName = ch.getTagName(dt);
+            if ( "defaultValue".equals(tagName)) {
+                blockTags.add(dt);
+            }
+        }
+
+        //add @see tags
+        if (!isGetter && !isSetter) {
+            ExecutableElement getter = (ExecutableElement) visibleMemberMap.getGetterForProperty(member);
+            ExecutableElement setter = (ExecutableElement) visibleMemberMap.getSetterForProperty(member);
+
+            if (null != getter) {
+                StringBuilder sb = new StringBuilder("#");
+                sb.append(utils.getSimpleName(getter)).append("()");
+                blockTags.add(cmtutils.makeSeeTree(sb.toString(), getter));
+            }
+
+            if (null != setter) {
+                VariableElement param = setter.getParameters().get(0);
+                String typeName = utils.getTypeName(param.asType(), false);
+                // Removal of type parameters and package information.
+                typeName = typeName.split("<")[0];
+                if (typeName.contains(".")) {
+                    typeName = typeName.substring(typeName.lastIndexOf(".") + 1);
+                }
+                StringBuilder sb = new StringBuilder("#");
+                sb.append(utils.getSimpleName(setter));
+                if (!utils.isTypeVariable(param.asType())) {
+                    sb.append("(").append(typeName).append(")");
+                }
+                blockTags.add(cmtutils.makeSeeTree(sb.toString(), setter));
+            }
+        }
+        cmtutils.setDocCommentTree(member, firstSentence, bodyTags, blockTags, utils);
+    }
+
+    /**
+     * Test whether the method is a getter.
+     * @param element property method documentation. Needs to be either property
+     * method, property getter, or property setter.
+     * @return true if the given documentation belongs to a getter.
+     */
+    private boolean isGetter(Element element) {
+        final String pedName = element.getSimpleName().toString();
+        return pedName.startsWith("get") || pedName.startsWith("is");
+    }
+
+    /**
+     * Test whether the method is a setter.
+     * @param element property method documentation. Needs to be either property
+     * method, property getter, or property setter.
+     * @return true if the given documentation belongs to a setter.
+     */
+    private boolean isSetter(Element element) {
+        return element.getSimpleName().toString().startsWith("set");
+    }
+
+    /**
+     * Build the inherited member summary for the given methods.
+     *
+     * @param writer the writer for this member summary.
+     * @param visibleMemberMap the map for the members to document.
+     * @param summaryTreeList list of content trees to which the documentation will be added
+     */
+    private void buildInheritedSummary(MemberSummaryWriter writer,
+            VisibleMemberMap visibleMemberMap, LinkedList<Content> summaryTreeList) {
+        for (TypeElement inhclass : visibleMemberMap.getVisibleClasses()) {
+            if (!(utils.isPublic(inhclass) || utils.isLinkable(inhclass))) {
+                continue;
+            }
+            if (inhclass == typeElement) {
+                continue;
+            }
+            SortedSet<Element> inhmembers = visibleMemberMap.getMembersFor(inhclass);
+            if (!inhmembers.isEmpty()) {
+                Content inheritedTree = writer.getInheritedSummaryHeader(inhclass);
+                Content linksTree = writer.getInheritedSummaryLinksTree();
+                for (Element member : inhmembers) {
+                    TypeElement t= inhclass;
+                    if (utils.isPackagePrivate(inhclass) && !utils.isLinkable(inhclass)) {
+                        t = typeElement;
+                    }
+                    writer.addInheritedMemberSummary(t, member, inhmembers.first() == member,
+                            inhmembers.last() == member, linksTree);
+                }
+                inheritedTree.addContent(linksTree);
+                summaryTreeList.add(writer.getMemberTree(inheritedTree));
+            }
+        }
+    }
+
+    /**
+     * Add the summary for the documentation.
+     *
+     * @param writer the writer for this member summary.
+     * @param visibleMemberMap the map for the members to document.
+     * @param showInheritedSummary true if inherited summary should be documented
+     * @param memberSummaryTree the content tree to which the documentation will be added
+     */
+    private void addSummary(MemberSummaryWriter writer,
+            VisibleMemberMap visibleMemberMap, boolean showInheritedSummary,
+            Content memberSummaryTree) {
+        LinkedList<Content> summaryTreeList = new LinkedList<>();
+        buildSummary(writer, visibleMemberMap, summaryTreeList);
+        if (showInheritedSummary)
+            buildInheritedSummary(writer, visibleMemberMap, summaryTreeList);
+        if (!summaryTreeList.isEmpty()) {
+            Content memberTree = writer.getMemberSummaryHeader(typeElement, memberSummaryTree);
+            summaryTreeList.stream().forEach((aSummaryTreeList) -> {
+                memberTree.addContent(aSummaryTreeList);
+            });
+            writer.addMemberTree(memberSummaryTree, memberTree);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/MethodBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,240 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.formats.html.ConfigurationImpl;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.MethodWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for a method.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class MethodBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The index of the current field that is being documented at this point
+     * in time.
+     */
+    private ExecutableElement currentMethod;
+
+    /**
+     * The class whose methods are being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * The visible methods for the given class.
+     */
+    private final VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the method documentation.
+     */
+    private final MethodWriter writer;
+
+    /**
+     * The methods being documented.
+     */
+    private final SortedSet<Element> methods;
+
+
+    /**
+     * Construct a new MethodBuilder.
+     *
+     * @param context       the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    private MethodBuilder(Context context,
+            TypeElement typeElement,
+            MethodWriter writer) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        visibleMemberMap = new VisibleMemberMap(
+                typeElement,
+                VisibleMemberMap.Kind.METHODS,
+                configuration);
+        methods = visibleMemberMap.getLeafClassMembers();
+    }
+
+    /**
+     * Construct a new MethodBuilder.
+     *
+     * @param context       the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     *
+     * @return an instance of a MethodBuilder.
+     */
+    public static MethodBuilder getInstance(Context context,
+            TypeElement typeElement, MethodWriter writer) {
+        return new MethodBuilder(context, typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "MethodDetails";
+    }
+
+    /**
+     * Returns a list of methods that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param typeElement the {@link TypeElement} we want to check.
+     * @return a list of methods that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Returns the visible member map for the methods of this class.
+     *
+     * @return the visible member map for the methods of this class.
+     */
+    public VisibleMemberMap getVisibleMemberMap() {
+        return visibleMemberMap;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return !methods.isEmpty();
+    }
+
+    /**
+     * Build the method documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildMethodDoc(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        if (!methods.isEmpty()) {
+            Content methodDetailsTree = writer.getMethodDetailsTreeHeader(typeElement,
+                    memberDetailsTree);
+            Set<Element> methodDetailSet = ((ConfigurationImpl)configuration).sortedMethodDetails
+                    ? methods
+                    : visibleMemberMap.getLeafClassMembersSourceOrder();
+            for (Element e : methodDetailSet) {
+                currentMethod = (ExecutableElement) e;
+                Content methodDocTree = writer.getMethodDocTreeHeader(currentMethod, methodDetailsTree);
+                buildChildren(node, methodDocTree);
+                methodDetailsTree.addContent(writer.getMethodDoc(
+                        methodDocTree, currentMethod == methods.last()));
+            }
+            memberDetailsTree.addContent(writer.getMethodDetails(methodDetailsTree));
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodDocTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content methodDocTree) {
+        methodDocTree.addContent(writer.getSignature(currentMethod));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodDocTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content methodDocTree) {
+        writer.addDeprecated(currentMethod, methodDocTree);
+    }
+
+    /**
+     * Build the comments for the method.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodDocTree the content tree to which the documentation will be added
+     */
+    public void buildMethodComments(XMLNode node, Content methodDocTree) {
+        if (!configuration.nocomment) {
+            ExecutableElement method = currentMethod;
+            if (utils.getBody(currentMethod).isEmpty()) {
+                DocFinder.Output docs = DocFinder.search(configuration,
+                        new DocFinder.Input(utils, currentMethod));
+                if (docs.inlineTags != null && !docs.inlineTags.isEmpty())
+                        method = (ExecutableElement)docs.holder;
+            }
+            TypeMirror containingType = method.getEnclosingElement().asType();
+            writer.addComments(containingType, method, methodDocTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodDocTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content methodDocTree) {
+        writer.addTags(currentMethod, methodDocTree);
+    }
+
+    /**
+     * Return the method writer for this builder.
+     *
+     * @return the method writer for this builder.
+     */
+    public MethodWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PackageSummaryBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,348 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+import java.util.SortedSet;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.PackageSummaryWriter;
+
+
+/**
+ * Builds the summary for a given package.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class PackageSummaryBuilder extends AbstractBuilder {
+    /**
+     * The root element of the package summary XML is {@value}.
+     */
+    public static final String ROOT = "PackageDoc";
+
+    /**
+     * The package being documented.
+     */
+    private final PackageElement packageElement;
+
+    /**
+     * The doclet specific writer that will output the result.
+     */
+    private final PackageSummaryWriter packageWriter;
+
+    /**
+     * The content that will be added to the package summary documentation tree.
+     */
+    private Content contentTree;
+
+    /**
+     * Construct a new PackageSummaryBuilder.
+     *
+     * @param context  the build context.
+     * @param pkg the package being documented.
+     * @param packageWriter the doclet specific writer that will output the
+     *        result.
+     */
+    private PackageSummaryBuilder(Context context,
+            PackageElement pkg,
+            PackageSummaryWriter packageWriter) {
+        super(context);
+        this.packageElement = pkg;
+        this.packageWriter = packageWriter;
+    }
+
+    /**
+     * Construct a new PackageSummaryBuilder.
+     *
+     * @param context  the build context.
+     * @param pkg the package being documented.
+     * @param packageWriter the doclet specific writer that will output the
+     *        result.
+     *
+     * @return an instance of a PackageSummaryBuilder.
+     */
+    public static PackageSummaryBuilder getInstance(Context context,
+            PackageElement pkg, PackageSummaryWriter packageWriter) {
+        return new PackageSummaryBuilder(context, pkg, packageWriter);
+    }
+
+    /**
+     * Build the package summary.
+     */
+    public void build() throws IOException {
+        if (packageWriter == null) {
+            //Doclet does not support this output.
+            return;
+        }
+        build(layoutParser.parseXML(ROOT), contentTree);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return ROOT;
+    }
+
+    /**
+     * Build the package documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param contentTree the content tree to which the documentation will be added
+     */
+    public void buildPackageDoc(XMLNode node, Content contentTree) throws Exception {
+        contentTree = packageWriter.getPackageHeader(utils.getPackageName(packageElement));
+        buildChildren(node, contentTree);
+        packageWriter.addPackageFooter(contentTree);
+        packageWriter.printDocument(contentTree);
+        packageWriter.close();
+        utils.copyDocFiles(packageElement);
+    }
+
+    /**
+     * Build the content for the package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param contentTree the content tree to which the package contents
+     *                    will be added
+     */
+    public void buildContent(XMLNode node, Content contentTree) {
+        Content packageContentTree = packageWriter.getContentHeader();
+        buildChildren(node, packageContentTree);
+        packageWriter.addPackageContent(contentTree, packageContentTree);
+    }
+
+    /**
+     * Build the package summary.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param packageContentTree the package content tree to which the summaries will
+     *                           be added
+     */
+    public void buildSummary(XMLNode node, Content packageContentTree) {
+        Content summaryContentTree = packageWriter.getSummaryHeader();
+        buildChildren(node, summaryContentTree);
+        packageContentTree.addContent(summaryContentTree);
+    }
+
+    /**
+     * Build the summary for the interfaces in this package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summaryContentTree the summary tree to which the interface summary
+     *                           will be added
+     */
+    public void buildInterfaceSummary(XMLNode node, Content summaryContentTree) {
+        String interfaceTableSummary =
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Interface_Summary"),
+                configuration.getText("doclet.interfaces"));
+        List<String> interfaceTableHeader = Arrays.asList(configuration.getText("doclet.Interface"),
+        configuration.getText("doclet.Description"));
+
+        SortedSet<TypeElement> ilist = utils.isIncluded(packageElement)
+                        ? utils.getTypeElementsAsSortedSet(utils.getInterfaces(packageElement))
+                        : configuration.typeElementCatalog.interfaces(packageElement);
+        SortedSet<TypeElement> interfaces = utils.filterOutPrivateClasses(ilist, configuration.javafx);
+        if (!interfaces.isEmpty()) {
+            packageWriter.addClassesSummary(interfaces,
+                    configuration.getText("doclet.Interface_Summary"),
+                    interfaceTableSummary, interfaceTableHeader, summaryContentTree);
+        }
+    }
+
+    /**
+     * Build the summary for the classes in this package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summaryContentTree the summary tree to which the class summary will
+     *                           be added
+     */
+    public void buildClassSummary(XMLNode node, Content summaryContentTree) {
+        String classTableSummary =
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Class_Summary"),
+                configuration.getText("doclet.classes"));
+        List<String> classTableHeader = Arrays.asList(configuration.getText("doclet.Class"),
+                configuration.getText("doclet.Description"));
+        SortedSet<TypeElement> clist = utils.isIncluded(packageElement)
+            ? utils.getTypeElementsAsSortedSet(utils.getOrdinaryClasses(packageElement))
+            : configuration.typeElementCatalog.ordinaryClasses(packageElement);
+        SortedSet<TypeElement> classes = utils.filterOutPrivateClasses(clist, configuration.javafx);
+        if (!classes.isEmpty()) {
+            packageWriter.addClassesSummary(classes,
+                    configuration.getText("doclet.Class_Summary"),
+                    classTableSummary, classTableHeader, summaryContentTree);
+        }
+    }
+
+    /**
+     * Build the summary for the enums in this package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summaryContentTree the summary tree to which the enum summary will
+     *                           be added
+     */
+    public void buildEnumSummary(XMLNode node, Content summaryContentTree) {
+        String enumTableSummary =
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Enum_Summary"),
+                configuration.getText("doclet.enums"));
+        List<String> enumTableHeader = Arrays.asList(configuration.getText("doclet.Enum"),
+                configuration.getText("doclet.Description"));
+        SortedSet<TypeElement> elist = utils.isIncluded(packageElement)
+            ? utils.getTypeElementsAsSortedSet(utils.getEnums(packageElement))
+            : configuration.typeElementCatalog.enums(packageElement);
+        SortedSet<TypeElement> enums = utils.filterOutPrivateClasses(elist, configuration.javafx);
+        if (!enums.isEmpty()) {
+            packageWriter.addClassesSummary(enums,
+                    configuration.getText("doclet.Enum_Summary"),
+                    enumTableSummary, enumTableHeader, summaryContentTree);
+        }
+    }
+
+    /**
+     * Build the summary for the exceptions in this package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summaryContentTree the summary tree to which the exception summary will
+     *                           be added
+     */
+    public void buildExceptionSummary(XMLNode node, Content summaryContentTree) {
+        String exceptionTableSummary =
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Exception_Summary"),
+                configuration.getText("doclet.exceptions"));
+        List<String> exceptionTableHeader = Arrays.asList(configuration.getText("doclet.Exception"),
+                configuration.getText("doclet.Description"));
+        Set<TypeElement> iexceptions =
+            utils.isIncluded(packageElement)
+                ? utils.getTypeElementsAsSortedSet(utils.getExceptions(packageElement))
+                : configuration.typeElementCatalog.exceptions(packageElement);
+        SortedSet<TypeElement> exceptions = utils.filterOutPrivateClasses(iexceptions,
+                configuration.javafx);
+        if (!exceptions.isEmpty()) {
+            packageWriter.addClassesSummary(exceptions,
+                    configuration.getText("doclet.Exception_Summary"),
+                    exceptionTableSummary, exceptionTableHeader, summaryContentTree);
+        }
+    }
+
+    /**
+     * Build the summary for the errors in this package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summaryContentTree the summary tree to which the error summary will
+     *                           be added
+     */
+    public void buildErrorSummary(XMLNode node, Content summaryContentTree) {
+        String errorTableSummary =
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Error_Summary"),
+                configuration.getText("doclet.errors"));
+        List<String> errorTableHeader = Arrays.asList(configuration.getText("doclet.Error"),
+                configuration.getText("doclet.Description"));
+        Set<TypeElement> ierrors =
+            utils.isIncluded(packageElement)
+                ? utils.getTypeElementsAsSortedSet(utils.getErrors(packageElement))
+                : configuration.typeElementCatalog.errors(packageElement);
+        SortedSet<TypeElement> errors = utils.filterOutPrivateClasses(ierrors, configuration.javafx);
+        if (!errors.isEmpty()) {
+            packageWriter.addClassesSummary(errors,
+                    configuration.getText("doclet.Error_Summary"),
+                    errorTableSummary, errorTableHeader, summaryContentTree);
+        }
+    }
+
+    /**
+     * Build the summary for the annotation type in this package.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param summaryContentTree the summary tree to which the annotation type
+     *                           summary will be added
+     */
+    public void buildAnnotationTypeSummary(XMLNode node, Content summaryContentTree) {
+        String annotationtypeTableSummary =
+                configuration.getText("doclet.Member_Table_Summary",
+                configuration.getText("doclet.Annotation_Types_Summary"),
+                configuration.getText("doclet.annotationtypes"));
+        List<String> annotationtypeTableHeader = Arrays.asList(
+                configuration.getText("doclet.AnnotationType"),
+                configuration.getText("doclet.Description"));
+        SortedSet<TypeElement> iannotationTypes =
+            utils.isIncluded(packageElement)
+                ? utils.getTypeElementsAsSortedSet(utils.getAnnotationTypes(packageElement))
+                : configuration.typeElementCatalog.annotationTypes(packageElement);
+        SortedSet<TypeElement> annotationTypes = utils.filterOutPrivateClasses(iannotationTypes,
+                configuration.javafx);
+        if (!annotationTypes.isEmpty()) {
+            packageWriter.addClassesSummary(annotationTypes,
+                    configuration.getText("doclet.Annotation_Types_Summary"),
+                    annotationtypeTableSummary, annotationtypeTableHeader,
+                    summaryContentTree);
+        }
+    }
+
+    /**
+     * Build the description of the summary.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param packageContentTree the tree to which the package description will
+     *                           be added
+     */
+    public void buildPackageDescription(XMLNode node, Content packageContentTree) {
+        if (configuration.nocomment) {
+            return;
+        }
+        packageWriter.addPackageDescription(packageContentTree);
+    }
+
+    /**
+     * Build the tags of the summary.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param packageContentTree the tree to which the package tags will be added
+     */
+    public void buildPackageTags(XMLNode node, Content packageContentTree) {
+        if (configuration.nocomment) {
+            return;
+        }
+        packageWriter.addPackageTags(packageContentTree);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/PropertyBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,228 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.PropertyWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.VisibleMemberMap;
+
+
+/**
+ * Builds documentation for a property.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class PropertyBuilder extends AbstractMemberBuilder {
+
+    /**
+     * The class whose properties are being documented.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * The visible properties for the given class.
+     */
+    private final VisibleMemberMap visibleMemberMap;
+
+    /**
+     * The writer to output the property documentation.
+     */
+    private final PropertyWriter writer;
+
+    /**
+     * The list of properties being documented.
+     */
+    private final SortedSet<Element> properties;
+
+    /**
+     * The index of the current property that is being documented at this point
+     * in time.
+     */
+    private ExecutableElement currentProperty;
+
+    /**
+     * Construct a new PropertyBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    private PropertyBuilder(Context context,
+            TypeElement typeElement,
+            PropertyWriter writer) {
+        super(context);
+        this.typeElement = typeElement;
+        this.writer = writer;
+        visibleMemberMap =
+                new VisibleMemberMap(
+                typeElement,
+                VisibleMemberMap.Kind.PROPERTIES,
+                configuration);
+        properties = visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Construct a new PropertyBuilder.
+     *
+     * @param context  the build context.
+     * @param typeElement the class whoses members are being documented.
+     * @param writer the doclet specific writer.
+     */
+    public static PropertyBuilder getInstance(Context context,
+            TypeElement typeElement,
+            PropertyWriter writer) {
+        return new PropertyBuilder(context, typeElement, writer);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String getName() {
+        return "PropertyDetails";
+    }
+
+    /**
+     * Returns a list of properties that will be documented for the given class.
+     * This information can be used for doclet specific documentation
+     * generation.
+     *
+     * @param typeElement the {@link TypeElement} we want to check.
+     * @return a list of properties that will be documented.
+     */
+    public SortedSet<Element> members(TypeElement typeElement) {
+        return visibleMemberMap.getMembersFor(typeElement);
+    }
+
+    /**
+     * Returns the visible member map for the properties of this class.
+     *
+     * @return the visible member map for the properties of this class.
+     */
+    public VisibleMemberMap getVisibleMemberMap() {
+        return visibleMemberMap;
+    }
+
+    /**
+     * summaryOrder.size()
+     */
+    @Override
+    public boolean hasMembersToDocument() {
+        return !properties.isEmpty();
+    }
+
+    /**
+     * Build the property documentation.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param memberDetailsTree the content tree to which the documentation will be added
+     */
+    public void buildPropertyDoc(XMLNode node, Content memberDetailsTree) {
+        if (writer == null) {
+            return;
+        }
+        int size = properties.size();
+        if (size > 0) {
+            Content propertyDetailsTree = writer.getPropertyDetailsTreeHeader(typeElement,
+                    memberDetailsTree);
+            for (Element e : properties) {
+                currentProperty = (ExecutableElement) e;
+                Content propertyDocTree = writer.getPropertyDocTreeHeader(currentProperty,
+                        propertyDetailsTree);
+                buildChildren(node, propertyDocTree);
+                propertyDetailsTree.addContent(writer.getPropertyDoc(
+                        propertyDocTree, currentProperty == properties.last()));
+            }
+            memberDetailsTree.addContent(
+                    writer.getPropertyDetails(propertyDetailsTree));
+        }
+    }
+
+    /**
+     * Build the signature.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param propertyDocTree the content tree to which the documentation will be added
+     */
+    public void buildSignature(XMLNode node, Content propertyDocTree) {
+        propertyDocTree.addContent(writer.getSignature(currentProperty));
+    }
+
+    /**
+     * Build the deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param propertyDocTree the content tree to which the documentation will be added
+     */
+    public void buildDeprecationInfo(XMLNode node, Content propertyDocTree) {
+        writer.addDeprecated(currentProperty, propertyDocTree);
+    }
+
+    /**
+     * Build the comments for the property.  Do nothing if
+     * {@link Configuration#nocomment} is set to true.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param propertyDocTree the content tree to which the documentation will be added
+     */
+    public void buildPropertyComments(XMLNode node, Content propertyDocTree) {
+        if (!configuration.nocomment) {
+            writer.addComments(currentProperty, propertyDocTree);
+        }
+    }
+
+    /**
+     * Build the tag information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param propertyDocTree the content tree to which the documentation will be added
+     */
+    public void buildTagInfo(XMLNode node, Content propertyDocTree) {
+        writer.addTags(currentProperty, propertyDocTree);
+    }
+
+    /**
+     * Return the property writer for this builder.
+     *
+     * @return the property writer for this builder.
+     */
+    public PropertyWriter getWriter() {
+        return writer;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/SerializedFormBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,611 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.SerialFieldTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.SerializedFormWriter;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocletAbortException;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * Builds the serialized form.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
+ */
+public class SerializedFormBuilder extends AbstractBuilder {
+
+    /**
+     * The root element of the serialized form XML is {@value}.
+     */
+    public static final String NAME = "SerializedForm";
+
+    /**
+     * The writer for this builder.
+     */
+    private SerializedFormWriter writer;
+
+    /**
+     * The writer for serializable fields.
+     */
+    private SerializedFormWriter.SerialFieldWriter fieldWriter;
+
+    /**
+     * The writer for serializable method documentation.
+     */
+    private SerializedFormWriter.SerialMethodWriter methodWriter;
+
+    /**
+     * The header for the serial version UID.  Save the string
+     * here instead of the properties file because we do not want
+     * this string to be localized.
+     */
+    private static final String SERIAL_VERSION_UID = "serialVersionUID";
+    private static final String SERIAL_VERSION_UID_HEADER = SERIAL_VERSION_UID + ":";
+
+    /**
+     * The current package being documented.
+     */
+    private PackageElement currentPackage;
+
+    /**
+     * The current class being documented.
+     */
+    private TypeElement currentTypeElement;
+
+    /**
+     * The current member being documented.
+     */
+    protected Element currentMember;
+
+    /**
+     * The content that will be added to the serialized form documentation tree.
+     */
+    private Content contentTree;
+
+
+    /**
+     * Construct a new SerializedFormBuilder.
+     * @param context  the build context.
+     */
+    private SerializedFormBuilder(Context context) {
+        super(context);
+    }
+
+    /**
+     * Construct a new SerializedFormBuilder.
+     * @param context  the build context.
+     */
+    public static SerializedFormBuilder getInstance(Context context) {
+        return new SerializedFormBuilder(context);
+    }
+
+    /**
+     * Build the serialized form.
+     */
+    public void build() throws IOException {
+        SortedSet<TypeElement> rootclasses = new TreeSet<>(utils.makeGeneralPurposeComparator());
+        rootclasses.addAll(configuration.root.getIncludedClasses());
+        if (!serialClassFoundToDocument(rootclasses)) {
+            //Nothing to document.
+            return;
+        }
+        try {
+            writer = configuration.getWriterFactory().getSerializedFormWriter();
+            if (writer == null) {
+                //Doclet does not support this output.
+                return;
+            }
+        } catch (Exception e) {
+            throw new DocletAbortException(e);
+        }
+        build(layoutParser.parseXML(NAME), contentTree);
+        writer.close();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return NAME;
+    }
+
+    /**
+     * Build the serialized form.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param serializedTree content tree to which the documentation will be added
+     */
+    public void buildSerializedForm(XMLNode node, Content serializedTree) throws Exception {
+        serializedTree = writer.getHeader(configuration.getText(
+                "doclet.Serialized_Form"));
+        buildChildren(node, serializedTree);
+        writer.addFooter(serializedTree);
+        writer.printDocument(serializedTree);
+        writer.close();
+    }
+
+    /**
+     * Build the serialized form summaries.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param serializedTree content tree to which the documentation will be added
+     */
+    public void buildSerializedFormSummaries(XMLNode node, Content serializedTree) {
+        Content serializedSummariesTree = writer.getSerializedSummariesHeader();
+        for (PackageElement pkg : configuration.packages) {
+            currentPackage = pkg;
+            buildChildren(node, serializedSummariesTree);
+        }
+        serializedTree.addContent(writer.getSerializedContent(
+                serializedSummariesTree));
+    }
+
+    /**
+     * Build the package serialized form for the current package being processed.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param serializedSummariesTree content tree to which the documentation will be added
+     */
+    public void buildPackageSerializedForm(XMLNode node, Content serializedSummariesTree) {
+        Content packageSerializedTree = writer.getPackageSerializedHeader();
+        SortedSet<TypeElement> classes = utils.getAllClassesUnfiltered(currentPackage);
+        if (classes.isEmpty()) {
+            return;
+        }
+        if (!serialInclude(utils, currentPackage)) {
+            return;
+        }
+        if (!serialClassFoundToDocument(classes)) {
+            return;
+        }
+        buildChildren(node, packageSerializedTree);
+        writer.addPackageSerializedTree(serializedSummariesTree, packageSerializedTree);
+    }
+
+    /**
+     * Build the package header.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param packageSerializedTree content tree to which the documentation will be added
+     */
+    public void buildPackageHeader(XMLNode node, Content packageSerializedTree) {
+        packageSerializedTree.addContent(writer.getPackageHeader(
+                utils.getPackageName(currentPackage)));
+    }
+
+    /**
+     * Build the class serialized form.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param packageSerializedTree content tree to which the documentation will be added
+     */
+    public void buildClassSerializedForm(XMLNode node, Content packageSerializedTree) {
+        Content classSerializedTree = writer.getClassSerializedHeader();
+        SortedSet<TypeElement> typeElements = utils.getAllClassesUnfiltered(currentPackage);
+        for (TypeElement typeElement : typeElements) {
+            currentTypeElement = typeElement;
+            fieldWriter = writer.getSerialFieldWriter(currentTypeElement);
+            methodWriter = writer.getSerialMethodWriter(currentTypeElement);
+            if (utils.isClass(currentTypeElement) && utils.isSerializable(currentTypeElement)) {
+                if (!serialClassInclude(utils, currentTypeElement)) {
+                    continue;
+                }
+                Content classTree = writer.getClassHeader(currentTypeElement);
+                buildChildren(node, classTree);
+                classSerializedTree.addContent(classTree);
+            }
+        }
+        packageSerializedTree.addContent(classSerializedTree);
+    }
+
+    /**
+     * Build the serial UID information for the given class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classTree content tree to which the serial UID information will be added
+     */
+    public void buildSerialUIDInfo(XMLNode node, Content classTree) {
+        Content serialUidTree = writer.getSerialUIDInfoHeader();
+        for (Element e : utils.getFieldsUnfiltered(currentTypeElement)) {
+            VariableElement field = (VariableElement)e;
+            if (field.getSimpleName().toString().compareTo(SERIAL_VERSION_UID) == 0 &&
+                field.getConstantValue() != null) {
+                writer.addSerialUIDInfo(SERIAL_VERSION_UID_HEADER,
+                                        utils.constantValueExpresion(field), serialUidTree);
+                break;
+            }
+        }
+        classTree.addContent(serialUidTree);
+    }
+
+    /**
+     * Build the summaries for the methods and fields.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classTree content tree to which the documentation will be added
+     */
+    public void buildClassContent(XMLNode node, Content classTree) {
+        Content classContentTree = writer.getClassContentHeader();
+        buildChildren(node, classContentTree);
+        classTree.addContent(classContentTree);
+    }
+
+    /**
+     * Build the summaries for the methods that belong to the given
+     * class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classContentTree content tree to which the documentation will be added
+     */
+    public void buildSerializableMethods(XMLNode node, Content classContentTree) {
+        Content serializableMethodTree = methodWriter.getSerializableMethodsHeader();
+        SortedSet<ExecutableElement> members = utils.serializationMethods(currentTypeElement);
+        if (!members.isEmpty()) {
+            for (ExecutableElement member : members) {
+                currentMember = member;
+                Content methodsContentTree = methodWriter.getMethodsContentHeader(
+                        currentMember == members.last());
+                buildChildren(node, methodsContentTree);
+                serializableMethodTree.addContent(methodsContentTree);
+            }
+        }
+        if (!utils.serializationMethods(currentTypeElement).isEmpty()) {
+            classContentTree.addContent(methodWriter.getSerializableMethods(
+                    configuration.getText("doclet.Serialized_Form_methods"),
+                    serializableMethodTree));
+            if (utils.isSerializable(currentTypeElement) && !utils.isExternalizable(currentTypeElement)) {
+                if (utils.serializationMethods(currentTypeElement).isEmpty()) {
+                    Content noCustomizationMsg = methodWriter.getNoCustomizationMsg(
+                            configuration.getText("doclet.Serializable_no_customization"));
+                    classContentTree.addContent(methodWriter.getSerializableMethods(
+                    configuration.getText("doclet.Serialized_Form_methods"),
+                    noCustomizationMsg));
+                }
+            }
+        }
+    }
+
+    /**
+     * Build the method sub header.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodsContentTree content tree to which the documentation will be added
+     */
+    public void buildMethodSubHeader(XMLNode node, Content methodsContentTree)  {
+        methodWriter.addMemberHeader((ExecutableElement)currentMember, methodsContentTree);
+    }
+
+    /**
+     * Build the deprecated method description.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodsContentTree content tree to which the documentation will be added
+     */
+    public void buildDeprecatedMethodInfo(XMLNode node, Content methodsContentTree) {
+        methodWriter.addDeprecatedMemberInfo((ExecutableElement)currentMember, methodsContentTree);
+    }
+
+    /**
+     * Build the information for the method.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodsContentTree content tree to which the documentation will be added
+     */
+    public void buildMethodInfo(XMLNode node, Content methodsContentTree)  {
+        if(configuration.nocomment){
+            return;
+        }
+        buildChildren(node, methodsContentTree);
+    }
+
+    /**
+     * Build method description.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodsContentTree content tree to which the documentation will be added
+     */
+    public void buildMethodDescription(XMLNode node, Content methodsContentTree) {
+        methodWriter.addMemberDescription((ExecutableElement)currentMember, methodsContentTree);
+    }
+
+    /**
+     * Build the method tags.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param methodsContentTree content tree to which the documentation will be added
+     */
+    public void buildMethodTags(XMLNode node, Content methodsContentTree) {
+        methodWriter.addMemberTags((ExecutableElement)currentMember, methodsContentTree);
+        ExecutableElement method = (ExecutableElement)currentMember;
+        if (method.getSimpleName().toString().compareTo("writeExternal") == 0
+                && utils.getSerialDataTrees(method).isEmpty()) {
+            if (configuration.serialwarn) {
+                TypeElement encl  = (TypeElement) method.getEnclosingElement();
+                configuration.getDocletSpecificMsg().warning(currentMember,
+                        "doclet.MissingSerialDataTag", encl.getQualifiedName().toString(),
+                        method.getSimpleName().toString());
+            }
+        }
+    }
+
+    /**
+     * Build the field header.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classContentTree content tree to which the documentation will be added
+     */
+    public void buildFieldHeader(XMLNode node, Content classContentTree) {
+        if (!utils.serializableFields(currentTypeElement).isEmpty()) {
+            buildFieldSerializationOverview(currentTypeElement, classContentTree);
+        }
+    }
+
+    /**
+     * Build the serialization overview for the given class.
+     *
+     * @param typeElement the class to print the overview for.
+     * @param classContentTree content tree to which the documentation will be added
+     */
+    public void buildFieldSerializationOverview(TypeElement typeElement, Content classContentTree) {
+        if (utils.definesSerializableFields(typeElement)) {
+            VariableElement ve = utils.serializableFields(typeElement).first();
+            // Check to see if there are inline comments, tags or deprecation
+            // information to be printed.
+            if (fieldWriter.shouldPrintOverview(ve)) {
+                Content serializableFieldsTree = fieldWriter.getSerializableFieldsHeader();
+                Content fieldsOverviewContentTree = fieldWriter.getFieldsContentHeader(true);
+                fieldWriter.addMemberDeprecatedInfo(ve, fieldsOverviewContentTree);
+                if (!configuration.nocomment) {
+                    fieldWriter.addMemberDescription(ve, fieldsOverviewContentTree);
+                    fieldWriter.addMemberTags(ve, fieldsOverviewContentTree);
+                }
+                serializableFieldsTree.addContent(fieldsOverviewContentTree);
+                classContentTree.addContent(fieldWriter.getSerializableFields(
+                        configuration.getText("doclet.Serialized_Form_class"),
+                        serializableFieldsTree));
+            }
+        }
+    }
+
+    /**
+     * Build the summaries for the fields that belong to the given class.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param classContentTree content tree to which the documentation will be added
+     */
+    public void buildSerializableFields(XMLNode node, Content classContentTree) {
+        SortedSet<VariableElement> members = utils.serializableFields(currentTypeElement);
+        if (!members.isEmpty()) {
+            Content serializableFieldsTree = fieldWriter.getSerializableFieldsHeader();
+            for (VariableElement ve : members) {
+                currentMember = ve;
+                if (!utils.definesSerializableFields(currentTypeElement)) {
+                    Content fieldsContentTree = fieldWriter.getFieldsContentHeader(
+                            currentMember == members.last());
+                    buildChildren(node, fieldsContentTree);
+                    serializableFieldsTree.addContent(fieldsContentTree);
+                } else {
+                    buildSerialFieldTagsInfo(serializableFieldsTree);
+                }
+            }
+            classContentTree.addContent(fieldWriter.getSerializableFields(
+                    configuration.getText("doclet.Serialized_Form_fields"),
+                    serializableFieldsTree));
+        }
+    }
+
+    /**
+     * Build the field sub header.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldsContentTree content tree to which the documentation will be added
+     */
+    public void buildFieldSubHeader(XMLNode node, Content fieldsContentTree) {
+        if (!utils.definesSerializableFields(currentTypeElement)) {
+            VariableElement field = (VariableElement) currentMember;
+            fieldWriter.addMemberHeader(utils.asTypeElement(field.asType()),
+                    utils.getTypeName(field.asType(), false), utils.getDimension(field.asType()),
+                    utils.getSimpleName(field),
+                    fieldsContentTree);
+        }
+    }
+
+    /**
+     * Build the field deprecation information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldsContentTree content tree to which the documentation will be added
+     */
+    public void buildFieldDeprecationInfo(XMLNode node, Content fieldsContentTree) {
+        if (!utils.definesSerializableFields(currentTypeElement)) {
+            fieldWriter.addMemberDeprecatedInfo((VariableElement)currentMember,
+                    fieldsContentTree);
+        }
+    }
+
+    /**
+     * Build the serial field tags information.
+     *
+     * @param serializableFieldsTree content tree to which the documentation will be added
+     */
+    public void buildSerialFieldTagsInfo(Content serializableFieldsTree) {
+        if(configuration.nocomment){
+            return;
+        }
+        VariableElement field = (VariableElement)currentMember;
+        // Process Serializable Fields specified as array of
+        // ObjectStreamFields. Print a member for each serialField tag.
+        // (There should be one serialField tag per ObjectStreamField
+        // element.)
+        SortedSet<SerialFieldTree> tags = new TreeSet<>(utils.makeSerialFieldTreeComparator());
+        // sort the elements
+        for (DocTree dt : utils.getSerialFieldTrees(field)) {
+            SerialFieldTree st = (SerialFieldTree) dt;
+            tags.add(st);
+        }
+
+        CommentHelper ch = utils.getCommentHelper(field);
+        for (SerialFieldTree tag : tags) {
+            if (tag.getName() == null || tag.getType() == null)  // ignore malformed @serialField tags
+                continue;
+            Content fieldsContentTree = fieldWriter.getFieldsContentHeader(tag.equals(tags.last()));
+            TypeElement te = ch.getReferencedClass(configuration, tag);
+            String fieldType = ch.getReferencedMemberName(tag);
+            if (te != null && utils.isPrimitive(te.asType())) {
+                fieldType = utils.getTypeName(te.asType(), false);
+                te = null;
+            }
+            String refSignature = ch.getReferencedSignature(tag);
+            // TODO: Print the signature directly, if it is an array, the
+            // current DocTree APIs makes it very hard to distinguish
+            // an as these are returned back as "Array" a DeclaredType.
+            if (refSignature.endsWith("[]")) {
+                te = null;
+                fieldType = refSignature;
+            }
+            fieldWriter.addMemberHeader(te, fieldType, "",
+                    tag.getName().getName().toString(), fieldsContentTree);
+            fieldWriter.addMemberDescription(field, tag, fieldsContentTree);
+            serializableFieldsTree.addContent(fieldsContentTree);
+        }
+    }
+
+    /**
+     * Build the field information.
+     *
+     * @param node the XML element that specifies which components to document
+     * @param fieldsContentTree content tree to which the documentation will be added
+     */
+    public void buildFieldInfo(XMLNode node, Content fieldsContentTree) {
+        if(configuration.nocomment){
+            return;
+        }
+        VariableElement field = (VariableElement)currentMember;
+        TypeElement te = utils.getEnclosingTypeElement(currentMember);
+        // Process default Serializable field.
+        if ((utils.getSerialTrees(field).isEmpty()) /*&& ! field.isSynthetic()*/
+                && configuration.serialwarn) {
+            configuration.message.warning(field,
+                    "doclet.MissingSerialTag", utils.getFullyQualifiedName(te),
+                    utils.getSimpleName(field));
+        }
+        fieldWriter.addMemberDescription(field, fieldsContentTree);
+        fieldWriter.addMemberTags(field, fieldsContentTree);
+    }
+
+    /**
+     * Return true if the given Element should be included
+     * in the serialized form.
+     *
+     * @param element the Element object to check for serializability.
+     */
+    public static boolean serialInclude(Utils utils, Element element) {
+        if (element == null) {
+            return false;
+        }
+        return utils.isClass(element)
+                ? serialClassInclude(utils, (TypeElement)element)
+                : serialDocInclude(utils, element);
+    }
+
+    /**
+     * Return true if the given TypeElement should be included
+     * in the serialized form.
+     *
+     * @param te the TypeElement object to check for serializability.
+     */
+    private static boolean serialClassInclude(Utils utils, TypeElement te) {
+        if (utils.isEnum(te)) {
+            return false;
+        }
+        if (utils.isSerializable(te)) {
+            if (!utils.getSerialTrees(te).isEmpty()) {
+                return serialDocInclude(utils, te);
+            } else if (utils.isPublic(te) || utils.isProtected(te)) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Return true if the given Element should be included
+     * in the serialized form.
+     *
+     * @param element the Element to check for serializability.
+     */
+    private static boolean serialDocInclude(Utils utils, Element element) {
+        if (utils.isEnum(element)) {
+            return false;
+        }
+        List<? extends DocTree> serial = utils.getSerialTrees(element);
+        if (!serial.isEmpty()) {
+            CommentHelper ch = utils.getCommentHelper(element);
+            String serialtext = Utils.toLowerCase(ch.getText(serial.get(0)));
+            if (serialtext.contains("exclude")) {
+                return false;
+            } else if (serialtext.contains("include")) {
+                return true;
+            }
+        }
+        return true;
+    }
+
+    /**
+     * Return true if any of the given typeElements have a @serialinclude tag.
+     *
+     * @param classes the typeElements to check.
+     * @return true if any of the given typeElements have a @serialinclude tag.
+     */
+    private boolean serialClassFoundToDocument(SortedSet<TypeElement> classes) {
+        for (TypeElement aClass : classes) {
+            if (serialClassInclude(utils, aClass)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/XMLNode.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2010, 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 jdk.javadoc.internal.doclets.toolkit.builders;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Simple class to represent the attribute and elements of an XML node.
+ *
+ *  <p><b>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.</b>
+ */
+public class XMLNode {
+    XMLNode(XMLNode parent, String qname) {
+        this.parent = parent;
+        name = qname;
+        attrs = new HashMap<>();
+        children = new ArrayList<>();
+
+        if (parent != null)
+            parent.children.add(this);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("<");
+        sb.append(name);
+        for (Map.Entry<String,String> e: attrs.entrySet())
+            sb.append(" " + e.getKey() + "=\"" + e.getValue() + "\"");
+        if (children.size() == 0)
+            sb.append("/>");
+        else {
+            sb.append(">");
+            for (XMLNode c: children)
+                sb.append(c.toString());
+            sb.append("</" + name + ">");
+        }
+        return sb.toString();
+    }
+
+    final XMLNode parent;
+    final String name;
+    final Map<String,String> attrs;
+    final List<XMLNode> children;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/builders/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+/**
+    This doclet-independent package has a set of classes and
+    interfaces that are the building blocks for doclets. They
+    define the basic structure of doclets and make doclet
+    writing much easier because they provide the content generation
+    code to be shared among different doclets. Builders only provide
+    the structure and content of API documentation.
+    They will not provide any style markup.
+
+    <p><b>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.</b>
+*/
+package jdk.javadoc.internal.doclets.toolkit.builders;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2003, 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.
+ */
+
+/**
+    Contains the base classes that make up a doclet.  Doclets that reuse
+    the functionality provided by the toolkit should have the following
+    characteristics:
+
+    <p><b>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.</b>
+*/
+
+package jdk.javadoc.internal.doclets.toolkit;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclet.xml	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,190 @@
+<?xml version='1.0' encoding='utf-8'?>
+
+<!--
+ 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.
+-->
+
+
+<Doclet>
+
+    <PackageDoc>
+        <Content>
+            <Summary>
+                <InterfaceSummary/>
+                <ClassSummary/>
+                <EnumSummary/>
+                <ExceptionSummary/>
+                <ErrorSummary/>
+                <AnnotationTypeSummary/>
+            </Summary>
+            <PackageDescription/>
+            <PackageTags/>
+        </Content>
+    </PackageDoc>
+
+    <AnnotationTypeDoc>
+        <AnnotationTypeInfo>
+            <DeprecationInfo/>
+            <AnnotationTypeSignature/>
+            <AnnotationTypeDescription/>
+            <AnnotationTypeTagInfo/>
+        </AnnotationTypeInfo>
+        <MemberSummary>
+            <AnnotationTypeFieldsSummary/>
+            <AnnotationTypeRequiredMemberSummary/>
+            <AnnotationTypeOptionalMemberSummary/>
+        </MemberSummary>
+        <AnnotationTypeMemberDetails>
+            <AnnotationTypeFieldDetails>
+                <AnnotationTypeField>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <MemberComments/>
+                    <TagInfo/>
+                </AnnotationTypeField>
+            </AnnotationTypeFieldDetails>
+            <AnnotationTypeRequiredMemberDetails>
+                <AnnotationTypeRequiredMember>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <MemberComments/>
+                    <TagInfo/>
+                </AnnotationTypeRequiredMember>
+            </AnnotationTypeRequiredMemberDetails>
+            <AnnotationTypeOptionalMemberDetails>
+                <AnnotationTypeOptionalMember>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <MemberComments/>
+                    <TagInfo/>
+                    <DefaultValueInfo/>
+                </AnnotationTypeOptionalMember>
+            </AnnotationTypeOptionalMemberDetails>
+        </AnnotationTypeMemberDetails>
+    </AnnotationTypeDoc>
+
+    <ClassDoc>
+        <ClassTree/>
+        <ClassInfo>
+            <TypeParamInfo/>
+            <SuperInterfacesInfo/>
+            <ImplementedInterfacesInfo/>
+            <SubClassInfo/>
+            <SubInterfacesInfo/>
+            <InterfaceUsageInfo/>
+            <NestedClassInfo/>
+            <FunctionalInterfaceInfo/>
+            <DeprecationInfo/>
+            <ClassSignature/>
+            <ClassDescription/>
+            <ClassTagInfo/>
+        </ClassInfo>
+        <MemberSummary>
+            <PropertiesSummary/>
+            <NestedClassesSummary/>
+            <EnumConstantsSummary/>
+            <FieldsSummary/>
+            <ConstructorsSummary/>
+            <MethodsSummary/>
+        </MemberSummary>
+        <MemberDetails>
+            <EnumConstantsDetails>
+                <EnumConstant>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <EnumConstantComments/>
+                    <TagInfo/>
+                </EnumConstant>
+            </EnumConstantsDetails>
+            <PropertyDetails>
+                <PropertyDoc>
+                    <Signature/>
+                    <PropertyComments/>
+                    <TagInfo/>
+                </PropertyDoc>
+            </PropertyDetails>
+            <FieldDetails>
+                <FieldDoc>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <FieldComments/>
+                    <TagInfo/>
+                </FieldDoc>
+            </FieldDetails>
+            <ConstructorDetails>
+                <ConstructorDoc>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <ConstructorComments/>
+                    <TagInfo/>
+                </ConstructorDoc>
+            </ConstructorDetails>
+            <MethodDetails>
+                <MethodDoc>
+                    <Signature/>
+                    <DeprecationInfo/>
+                    <MethodComments/>
+                    <TagInfo/>
+                </MethodDoc>
+            </MethodDetails>
+        </MemberDetails>
+    </ClassDoc>
+
+    <ConstantSummary>
+        <Contents/>
+        <ConstantSummaries>
+            <PackageHeader/>
+            <ClassConstantSummary>
+                <ConstantMembers/>
+            </ClassConstantSummary>
+        </ConstantSummaries>
+    </ConstantSummary>
+
+    <SerializedForm>
+        <SerializedFormSummaries>
+            <PackageSerializedForm>
+                <PackageHeader/>
+                <ClassSerializedForm>
+                    <SerialUIDInfo/>
+                    <ClassContent>
+                        <SerializableMethods>
+                            <MethodSubHeader/>
+                            <DeprecatedMethodInfo/>
+                            <MethodInfo>
+                                <MethodDescription/>
+                                <MethodTags/>
+                            </MethodInfo>
+                        </SerializableMethods>
+                        <FieldHeader/>
+                        <SerializableFields>
+                            <FieldSubHeader/>
+                            <FieldDeprecationInfo/>
+                            <FieldInfo/>
+                        </SerializableFields>
+                    </ClassContent>
+                </ClassSerializedForm>
+            </PackageSerializedForm>
+        </SerializedFormSummaries>
+    </SerializedForm>
+</Doclet>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,218 @@
+doclet.Generating_0=Generating {0}...
+doclet.Toolkit_Usage_Violation=The Doclet Toolkit can only be used by {0}
+doclet.MissingSerialTag=in class {0}, missing @serial tag for default serializable field: {1}.
+doclet.MissingSerialDataTag=in class {0}, missing @serialData tag in method {1}.
+doclet.Serializable_no_customization=No readObject or writeObject method declared.
+doclet.Serialized_Form=Serialized Form
+doclet.Serialized_Form_methods=Serialization Methods
+doclet.Serialized_Form_fields=Serialized Fields
+doclet.Serialized_Form_class=Serialization Overview
+doclet.Class_0_implements_serializable=Class {0} implements Serializable
+doclet.Class_0_extends_implements_serializable=Class {0} extends {1} implements Serializable
+doclet.Option_conflict=Option {0} conflicts with {1}
+doclet.Option_reuse=Option reused: {0}
+doclet.Option_doclint_no_qualifiers=Access qualifiers not permitted for -Xdoclint arguments
+doclet.Option_doclint_invalid_arg=Invalid argument for -Xdoclint option
+doclet.Option_doclint_package_invalid_arg=Invalid argument for -Xdoclint/package option
+doclet.exception_encountered= {0} encountered \n\
+\twhile attempting to create file: {1}
+doclet.perform_copy_exception_encountered= {0} encountered while \n\
+performing copy.
+doclet.File_not_found=File not found: {0}
+doclet.Copy_Overwrite_warning=File {0} not copied to {1} due to existing file with same name...
+doclet.Copying_File_0_To_Dir_1=Copying file {0} to directory {1}...
+doclet.Copying_File_0_To_File_1=Copying file {0} to file {1}...
+doclet.No_Public_Classes_To_Document=No public or protected classes found to document.
+doclet.Unable_to_create_directory_0=Unable to create directory {0}
+doclet.destination_directory_not_directory_0=Destination directory is not a directory {0}
+doclet.destination_directory_not_writable_0=Destination directory not writable {0}
+doclet.Encoding_not_supported=Encoding not supported: {0}
+doclet.Building_Tree=Building tree for all the packages and classes...
+doclet.Building_Index=Building index for all the packages and classes...
+doclet.Building_Index_For_All_Classes=Building index for all classes...
+doclet.sourcetab_warning=The argument for -sourcetab must be an integer greater than 0.
+doclet.Packages=Packages
+doclet.Other_Packages=Other Packages
+doclet.Notice_taglet_registered=Registered Taglet {0} ...
+doclet.Notice_taglet_unseen=Note: Custom tags that were not seen: {0}
+doclet.Notice_taglet_overriden=Note: Custom tags that override standard tags: {0}
+doclet.Notice_taglet_conflict_warn=Note: Custom tags that could override future standard tags: {0}. To avoid potential overrides, use at least one period character (.) in custom tag names.
+doclet.Error_taglet_not_registered=Error - Exception {0} thrown while trying to register Taglet {1}...
+doclet.Error_invalid_custom_tag_argument=Error - {0} is an invalid argument to the -tag option...
+doclet.Author=Author:
+doclet.DefaultValue=Default value:
+doclet.PropertyDescription=Property description:
+doclet.PropertyGetter=Gets the value of the property
+doclet.PropertySetter=Sets the value of the property
+doclet.PropertyGetterWithName=Gets the value of the property {0}.
+doclet.PropertySetterWithName=Sets the value of the property {0}.
+doclet.Default=Default:
+doclet.Parameters=Parameters:
+doclet.TypeParameters=Type Parameters:
+doclet.Parameters_warn=@param argument "{0}" is not a parameter name.
+doclet.Parameters_dup_warn=Parameter "{0}" is documented more than once.
+doclet.Type_Parameters_warn=@param argument "{0}" is not a type parameter name.
+doclet.Type_Parameters_dup_warn=Type parameter "{0}" is documented more than once.
+doclet.Returns=Returns:
+doclet.Return_tag_on_void_method=@return tag cannot be used in method with void return type.
+doclet.See_Also=See Also:
+doclet.See=See:
+doclet.SerialData=Serial Data:
+doclet.Since=Since:
+doclet.Throws=Throws:
+doclet.Version=Version:
+doclet.Factory=Factory:
+doclet.UnknownTag={0} is an unknown tag.
+doclet.UnknownTagLowercase={0} is an unknown tag -- same as a known tag except for case.
+doclet.noInheritedDoc=@inheritDoc used but {0} does not override or implement any method.
+# doclet.malformed_html_link_tag=<a> tag is malformed:\n"{0}"
+doclet.tag_misuse=Tag {0} cannot be used in {1} documentation.  It can only be used in the following types of documentation: {2}.
+doclet.javafx_tag_misuse=Tags @propertyGetter, @propertySetter and @propertyDescription can only be used in JavaFX properties getters and setters.
+doclet.Package_Summary=Package Summary
+doclet.Interface_Summary=Interface Summary
+doclet.Annotation_Types_Summary=Annotation Types Summary
+doclet.Enum_Summary=Enum Summary
+doclet.Exception_Summary=Exception Summary
+doclet.Error_Summary=Error Summary
+doclet.Class_Summary=Class Summary
+doclet.Nested_Class_Summary=Nested Class Summary
+doclet.Annotation_Type_Optional_Member_Summary=Optional Element Summary
+doclet.Annotation_Type_Required_Member_Summary=Required Element Summary
+doclet.Field_Summary=Field Summary
+doclet.Property_Summary=Property Summary
+doclet.Enum_Constant_Summary=Enum Constant Summary
+doclet.Constructor_Summary=Constructor Summary
+doclet.Method_Summary=Method Summary
+doclet.Interfaces=Interfaces
+doclet.Enums=Enums
+doclet.AnnotationTypes=Annotation Types
+doclet.Exceptions=Exceptions
+doclet.Errors=Errors
+doclet.Classes=Classes
+doclet.Packages=Packages
+doclet.packages=packages
+doclet.All_Classes=All Classes
+doclet.All_Superinterfaces=All Superinterfaces:
+doclet.All_Implemented_Interfaces=All Implemented Interfaces:
+doclet.All_classes_and_interfaces=All classes and interfaces (except non-static nested types)
+doclet.Package_class_and_interface_descriptions=Package, class and interface descriptions
+doclet.Interface=Interface
+doclet.Class=Class
+doclet.AnnotationType=Annotation Type
+doclet.annotationtype=annotation type
+doclet.annotationtypes=annotation types
+doclet.Enum=Enum
+doclet.enum=enum
+doclet.enums=enums
+doclet.interface=interface
+doclet.interfaces=interfaces
+doclet.class=class
+doclet.classes=classes
+doclet.Error=Error
+doclet.error=error
+doclet.errors=errors
+doclet.Exception=Exception
+doclet.exception=exception
+doclet.exceptions=exceptions
+doclet.Package_private=(package private)
+doclet.Nested_Classes_Interfaces_Inherited_From_Class=Nested classes/interfaces inherited from class
+doclet.Nested_Classes_Interface_Inherited_From_Interface=Nested classes/interfaces inherited from interface
+doclet.Methods_Inherited_From_Class=Methods inherited from class
+doclet.Methods_Inherited_From_Interface=Methods inherited from interface
+doclet.Fields_Inherited_From_Class=Fields inherited from class
+doclet.Fields_Inherited_From_Interface=Fields inherited from interface
+doclet.Properties_Inherited_From_Class=Properties inherited from class
+doclet.Properties_Inherited_From_Interface=Properties inherited from interface
+doclet.Annotation_Type_Member_Detail=Element Detail
+doclet.Enum_Constant_Detail=Enum Constant Detail
+doclet.Constants_Summary=Constant Field Values
+doclet.Field_Detail=Field Detail
+doclet.Property_Detail=Property Detail
+doclet.Method_Detail=Method Detail
+doclet.Constructor_Detail=Constructor Detail
+doclet.Deprecated=Deprecated.
+doclet.Groupname_already_used=In -group option, groupname already used: {0}
+doclet.value_tag_invalid_reference={0} (referenced by @value tag) is an unknown reference.
+doclet.value_tag_invalid_constant=@value tag (which references {0}) can only be used in constants.
+doclet.value_tag_invalid_use=@value tag cannot be used here.
+doclet.dest_dir_create=Creating destination directory: "{0}"
+doclet.in={0} in {1}
+doclet.Use_Table_Summary=Use table, listing {0}, and an explanation
+doclet.Constants_Table_Summary={0} table, listing constant fields, and values
+doclet.Member_Table_Summary={0} table, listing {1}, and an explanation
+doclet.fields=fields
+doclet.Fields=Fields
+doclet.properties=properties
+doclet.Properties=Properties
+doclet.constructors=constructors
+doclet.Constructors=Constructors
+doclet.methods=methods
+doclet.Methods=Methods
+doclet.All_Methods=All Methods
+doclet.Static_Methods=Static Methods
+doclet.Instance_Methods=Instance Methods
+doclet.Abstract_Methods=Abstract Methods
+doclet.Concrete_Methods=Concrete Methods
+doclet.Default_Methods=Default Methods
+doclet.Deprecated_Methods=Deprecated Methods
+doclet.annotation_type_optional_members=optional elements
+doclet.Annotation_Type_Optional_Members=Optional Elements
+doclet.annotation_type_required_members=required elements
+doclet.Annotation_Type_Required_Members=Required Elements
+doclet.enum_constants=enum constants
+doclet.Enum_Constants=Enum Constants
+doclet.nested_classes=nested classes
+doclet.Nested_Classes=Nested Classes
+doclet.subclasses=subclasses
+doclet.subinterfaces=subinterfaces
+doclet.Modifier=Modifier
+doclet.Type=Type
+doclet.Types=Types
+doclet.Members=Members
+doclet.SearchTags=SearchTags
+doclet.search=SEARCH:
+doclet.Field=Field
+doclet.Property=Property
+doclet.Constructor=Constructor
+doclet.Method=Method
+doclet.Annotation_Type_Optional_Member=Optional Element
+doclet.Annotation_Type_Required_Member=Required Element
+doclet.Annotation_Type_Member=Annotation Type Element
+doclet.Enum_Constant=Enum Constant
+doclet.Class=Class
+doclet.Description=Description
+doclet.ConstantField=Constant Field
+doclet.Value=Value
+doclet.0_and_1={0} and {1}
+
+#Documentation for Enums
+doclet.enum_values_doc.firstsentence=\
+Returns an array containing the constants of this enum type, in\n\
+the order they are declared.
+doclet.enum_values_doc.body=\  This method may be used to iterate\n\
+ over the constants as follows:\n\
+ <pre>\n\
+ for ({0} c : {0}.values())\n\
+ &nbsp;   System.out.println(c);\n\
+ </pre>
+doclet.enum_values_doc.return=\
+an array containing the constants of this enum type, in the order they are declared
+
+doclet.enum_valueof_doc.firstsentence=\
+Returns the enum constant of this type with the specified name.
+doclet.enum_valueof_doc.body=\n\
+The string must match <i>exactly</i> an identifier used to declare an\n\
+ enum constant in this type.  (Extraneous whitespace characters are \n\
+ not permitted.)
+
+doclet.enum_valueof_doc.param_name=\
+ the name of the enum constant to be returned.
+
+doclet.enum_valueof_doc.return=\
+ the enum constant with the specified name
+
+doclet.enum_valueof_doc.throws_ila=\
+ if this enum type has no constant with the specified name
+
+doclet.enum_valueof_doc.throws_npe=\
+ if the argument is null
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,190 @@
+doclet.Generating_0={0}\u306E\u751F\u6210\u4E2D...
+doclet.Toolkit_Usage_Violation=\u30C9\u30C3\u30AF\u30EC\u30C3\u30C8\u30FB\u30C4\u30FC\u30EB\u30FB\u30AD\u30C3\u30C8\u306F{0}\u306B\u3088\u3063\u3066\u306E\u307F\u4F7F\u7528\u3055\u308C\u307E\u3059
+doclet.MissingSerialTag=\u30AF\u30E9\u30B9{0}\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u306E\u76F4\u5217\u5316\u53EF\u80FD\u30D5\u30A3\u30FC\u30EB\u30C9{1}\u306E\u305F\u3081\u306E@serial\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093\u3002
+doclet.MissingSerialDataTag=\u30AF\u30E9\u30B9{0}\u306E\u30E1\u30BD\u30C3\u30C9{1}\u306B@serialData\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093\u3002
+doclet.Serializable_no_customization=readObject\u307E\u305F\u306FwriteObject\u30E1\u30BD\u30C3\u30C9\u304C\u5BA3\u8A00\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002
+doclet.Serialized_Form=\u76F4\u5217\u5316\u3055\u308C\u305F\u5F62\u5F0F
+doclet.Serialized_Form_methods=\u76F4\u5217\u5316\u30E1\u30BD\u30C3\u30C9
+doclet.Serialized_Form_fields=\u76F4\u5217\u5316\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Serialized_Form_class=\u76F4\u5217\u5316\u306E\u6982\u8981
+doclet.Class_0_implements_serializable=Class {0} implements Serializable
+doclet.Class_0_extends_implements_serializable=Class {0} extends {1} implements Serializable
+doclet.Option_conflict=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u304C{1}\u3068\u77DB\u76FE\u3057\u307E\u3059
+doclet.Option_reuse=\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u518D\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.Option_doclint_no_qualifiers=\u30A2\u30AF\u30BB\u30B9\u4FEE\u98FE\u5B50\u306F-Xdoclint\u306E\u5F15\u6570\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
+doclet.Option_doclint_invalid_arg=-Xdoclint\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5F15\u6570\u304C\u7121\u52B9\u3067\u3059
+doclet.exception_encountered= {0}\u3092\u691C\u51FA\n\t\u30D5\u30A1\u30A4\u30EB\u306E\u4F5C\u6210\u4E2D: {1}
+doclet.perform_copy_exception_encountered= \u30B3\u30D4\u30FC\u5B9F\u884C\u4E2D\u306B{0}\u3092\n\u691C\u51FA\u3057\u307E\u3057\u305F\u3002
+doclet.File_not_found=\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
+doclet.Copy_Overwrite_warning=\u30D5\u30A1\u30A4\u30EB{0}\u306F\u540C\u3058\u540D\u524D\u306E\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308B\u306E\u3067{1}\u306B\u30B3\u30D4\u30FC\u3055\u308C\u307E\u305B\u3093\u3067\u3057\u305F...
+doclet.Copying_File_0_To_Dir_1=\u30D5\u30A1\u30A4\u30EB{0}\u3092\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{1}\u306B\u30B3\u30D4\u30FC\u4E2D...
+doclet.Copying_File_0_To_File_1=\u30D5\u30A1\u30A4\u30EB{0}\u3092\u30D5\u30A1\u30A4\u30EB{1}\u306B\u30B3\u30D4\u30FC\u4E2D...
+doclet.No_Public_Classes_To_Document=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3059\u308Bpublic\u307E\u305F\u306Fprotected\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
+doclet.Unable_to_create_directory_0=\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u3092\u4F5C\u6210\u3067\u304D\u307E\u305B\u3093
+doclet.destination_directory_not_directory_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3067\u306F\u3042\u308A\u307E\u305B\u3093
+doclet.destination_directory_not_writable_0=\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA{0}\u306F\u66F8\u8FBC\u307F\u53EF\u80FD\u3067\u306F\u3042\u308A\u307E\u305B\u3093
+doclet.Encoding_not_supported=\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0{0}\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093
+doclet.Building_Tree=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u968E\u5C64\u30C4\u30EA\u30FC\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
+doclet.Building_Index=\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u3068\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
+doclet.Building_Index_For_All_Classes=\u5168\u30AF\u30E9\u30B9\u306E\u30A4\u30F3\u30C7\u30C3\u30AF\u30B9\u3092\u4F5C\u6210\u3057\u3066\u3044\u307E\u3059...
+doclet.sourcetab_warning=-sourcetab\u306E\u5F15\u6570\u306F0\u3088\u308A\u5927\u304D\u3044\u6574\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
+doclet.Packages=\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Profiles=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
+doclet.Other_Packages=\u305D\u306E\u4ED6\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Notice_taglet_registered=\u767B\u9332\u3055\u308C\u305F\u30BF\u30B0\u30EC\u30C3\u30C8{0} ...
+doclet.Notice_taglet_unseen=\u6CE8\u610F: \u975E\u8868\u793A\u306E\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0: {0}
+doclet.Notice_taglet_overriden=\u6CE8\u610F: \u6A19\u6E96\u30BF\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0: {0}
+doclet.Notice_taglet_conflict_warn=\u6CE8\u610F: \u6A19\u6E96\u30BF\u30B0\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\u53EF\u80FD\u6027\u306E\u3042\u308B\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0: {0}\u3002\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3092\u907F\u3051\u308B\u305F\u3081\u306B\u3001\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u540D\u306E\u4E2D\u306B\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u30D4\u30EA\u30AA\u30C9(.)\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
+doclet.Error_taglet_not_registered=\u30A8\u30E9\u30FC - \u30BF\u30B0\u30EC\u30C3\u30C8{1}\u3092\u767B\u9332\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308B\u3068\u304D\u306B\u3001\u4F8B\u5916{0}\u304C\u30B9\u30ED\u30FC\u3055\u308C\u307E\u3057\u305F...
+doclet.Error_invalid_custom_tag_argument=\u30A8\u30E9\u30FC - {0}\u306F-tag\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u5BFE\u3057\u3066\u7121\u52B9\u306A\u5F15\u6570\u3067\u3059...
+doclet.Author=\u4F5C\u6210\u8005:
+doclet.DefaultValue=\u30C7\u30D5\u30A9\u30EB\u30C8\u5024:
+doclet.PropertyDescription=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u8AAC\u660E:
+doclet.PropertyGetter=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u3092\u53D6\u5F97\u3057\u307E\u3059
+doclet.PropertySetter=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u5024\u3092\u8A2D\u5B9A\u3057\u307E\u3059
+doclet.PropertyGetterWithName=\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u306E\u5024\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002
+doclet.PropertySetterWithName=\u30D7\u30ED\u30D1\u30C6\u30A3{0}\u306E\u5024\u3092\u8A2D\u5B9A\u3057\u307E\u3059\u3002
+doclet.Default=\u30C7\u30D5\u30A9\u30EB\u30C8:
+doclet.Parameters=\u30D1\u30E9\u30E1\u30FC\u30BF:
+doclet.TypeParameters=\u578B\u30D1\u30E9\u30E1\u30FC\u30BF:
+doclet.Parameters_warn=@param argument "{0}"\u306F\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+doclet.Parameters_dup_warn=\u30D1\u30E9\u30E1\u30FC\u30BF"{0}"\u304C2\u56DE\u4EE5\u4E0A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+doclet.Type_Parameters_warn=@param argument "{0}"\u306F\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u540D\u3067\u306F\u3042\u308A\u307E\u305B\u3093\u3002
+doclet.Type_Parameters_dup_warn=\u578B\u30D1\u30E9\u30E1\u30FC\u30BF"{0}"\u304C2\u56DE\u4EE5\u4E0A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5316\u3055\u308C\u3066\u3044\u307E\u3059\u3002
+doclet.Returns=\u623B\u308A\u5024:
+doclet.Return_tag_on_void_method=\u623B\u308A\u5024\u306E\u578B\u304Cvoid\u306E\u30E1\u30BD\u30C3\u30C9\u3067\u306F@return\u30BF\u30B0\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
+doclet.See_Also=\u95A2\u9023\u9805\u76EE:
+doclet.See=\u53C2\u7167\u5148:
+doclet.SerialData=\u30B7\u30EA\u30A2\u30EB\u30FB\u30C7\u30FC\u30BF:
+doclet.Since=\u5C0E\u5165\u3055\u308C\u305F\u30D0\u30FC\u30B8\u30E7\u30F3:
+doclet.Throws=\u4F8B\u5916:
+doclet.Version=\u30D0\u30FC\u30B8\u30E7\u30F3:
+doclet.Factory=\u30D5\u30A1\u30AF\u30C8\u30EA:
+doclet.UnknownTag={0}\u306F\u4E0D\u660E\u306A\u30BF\u30B0\u3067\u3059\u3002
+doclet.UnknownTagLowercase={0}\u306F\u4E0D\u660E\u306A\u30BF\u30B0\u3067\u3059\u3002\u5927\u6587\u5B57\u3068\u5C0F\u6587\u5B57\u306E\u533A\u5225\u3092\u9664\u3044\u3066\u306F\u65E2\u77E5\u306E\u30BF\u30B0\u3068\u540C\u3058\u3067\u3059\u3002
+doclet.noInheritedDoc=@inheritDoc\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u304C\u3001{0}\u306F\u3069\u306E\u30E1\u30BD\u30C3\u30C9\u3082\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u307E\u305F\u306F\u5B9F\u88C5\u3057\u3066\u3044\u307E\u305B\u3093\u3002
+doclet.malformed_html_link_tag=<a> \u30BF\u30B0\u306E\u5F62\u5F0F\u304C\u4E0D\u6B63:\n"{0}"
+doclet.tag_misuse={0}\u30BF\u30B0\u306F{1}\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u4F7F\u7528\u3067\u304D\u308B\u306E\u306F\u6B21\u306E\u30BF\u30A4\u30D7\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u5185\u306E\u307F\u3067\u3059: {2}\u3002
+doclet.javafx_tag_misuse=\u30BF\u30B0@propertyGetter\u3001@propertySetter\u304A\u3088\u3073@propertyDescription\u306F\u3001JavaFX\u306E\u30D7\u30ED\u30D1\u30C6\u30A3getter\u3068setter\u306E\u307F\u3067\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
+doclet.Package_Summary=\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981
+doclet.Profile_Summary=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u30FB\u30B5\u30DE\u30EA\u30FC
+doclet.Interface_Summary=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u6982\u8981
+doclet.Annotation_Types_Summary=\u6CE8\u91C8\u578B\u306E\u6982\u8981
+doclet.Enum_Summary=\u5217\u6319\u578B\u306E\u6982\u8981
+doclet.Exception_Summary=\u4F8B\u5916\u306E\u6982\u8981
+doclet.Error_Summary=\u30A8\u30E9\u30FC\u306E\u6982\u8981
+doclet.Class_Summary=\u30AF\u30E9\u30B9\u306E\u6982\u8981
+doclet.Nested_Class_Summary=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306E\u6982\u8981
+doclet.Annotation_Type_Optional_Member_Summary=\u4EFB\u610F\u8981\u7D20\u306E\u6982\u8981
+doclet.Annotation_Type_Required_Member_Summary=\u5FC5\u9808\u8981\u7D20\u306E\u6982\u8981
+doclet.Field_Summary=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u6982\u8981
+doclet.Property_Summary=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u6982\u8981
+doclet.Enum_Constant_Summary=\u5217\u6319\u578B\u5B9A\u6570\u306E\u6982\u8981
+doclet.Constructor_Summary=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u6982\u8981
+doclet.Method_Summary=\u30E1\u30BD\u30C3\u30C9\u306E\u6982\u8981
+doclet.Interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Enums=\u5217\u6319\u578B
+doclet.AnnotationTypes=\u6CE8\u91C8\u578B
+doclet.Exceptions=\u4F8B\u5916
+doclet.Errors=\u30A8\u30E9\u30FC
+doclet.Classes=\u30AF\u30E9\u30B9
+doclet.Packages=\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.packages=\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.profiles=\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB
+doclet.All_Classes=\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9
+doclet.All_Superinterfaces=\u3059\u3079\u3066\u306E\u30B9\u30FC\u30D1\u30FC\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9:
+doclet.All_Implemented_Interfaces=\u3059\u3079\u3066\u306E\u5B9F\u88C5\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9:
+doclet.All_classes_and_interfaces=\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F)
+doclet.Package_class_and_interface_descriptions=\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E
+doclet.Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Class=\u30AF\u30E9\u30B9
+doclet.AnnotationType=\u6CE8\u91C8\u578B
+doclet.annotationtype=\u6CE8\u91C8\u578B
+doclet.annotationtypes=\u6CE8\u91C8\u578B
+doclet.Enum=\u5217\u6319\u578B
+doclet.enum=\u5217\u6319\u578B
+doclet.enums=\u5217\u6319\u578B
+doclet.interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.interfaces=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.class=\u30AF\u30E9\u30B9
+doclet.classes=\u30AF\u30E9\u30B9
+doclet.Error=\u30A8\u30E9\u30FC
+doclet.error=\u30A8\u30E9\u30FC
+doclet.errors=\u30A8\u30E9\u30FC
+doclet.Exception=\u4F8B\u5916
+doclet.exception=\u4F8B\u5916
+doclet.exceptions=\u4F8B\u5916
+doclet.Package_private=(package private)
+doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Nested_Classes_Interface_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9/\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Methods_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
+doclet.Methods_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30E1\u30BD\u30C3\u30C9
+doclet.Fields_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Fields_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Properties_Inherited_From_Class=\u30AF\u30E9\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.Properties_Inherited_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u7D99\u627F\u3055\u308C\u305F\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.Annotation_Type_Member_Detail=\u8981\u7D20\u306E\u8A73\u7D30
+doclet.Enum_Constant_Detail=\u5217\u6319\u578B\u5B9A\u6570\u306E\u8A73\u7D30
+doclet.Constants_Summary=\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024
+doclet.Field_Detail=\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u8A73\u7D30
+doclet.Property_Detail=\u30D7\u30ED\u30D1\u30C6\u30A3\u306E\u8A73\u7D30
+doclet.Method_Detail=\u30E1\u30BD\u30C3\u30C9\u306E\u8A73\u7D30
+doclet.Constructor_Detail=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u8A73\u7D30
+doclet.Deprecated=\u975E\u63A8\u5968\u3067\u3059\u3002
+doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
+doclet.value_tag_invalid_reference={0}(@value\u30BF\u30B0\u306B\u3088\u308A\u53C2\u7167\u3055\u308C\u3066\u3044\u308B)\u306F\u4E0D\u660E\u306A\u53C2\u7167\u3067\u3059\u3002
+doclet.value_tag_invalid_constant=@value\u30BF\u30B0({0}\u3092\u53C2\u7167\u3057\u3066\u3044\u308B)\u306F\u5B9A\u6570\u5185\u3067\u306E\u307F\u4F7F\u7528\u3067\u304D\u307E\u3059\u3002
+doclet.value_tag_invalid_use=@value\u30BF\u30B0\u306F\u3053\u3053\u3067\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002
+doclet.dest_dir_create=\u5B9B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306E\u4F5C\u6210\u4E2D: "{0}"
+doclet.in={1}\u306E{0}
+doclet.Use_Table_Summary=\u8868\u3001{0}\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u8AAC\u660E\u306E\u4F7F\u7528
+doclet.Constants_Table_Summary={0}\u8868\u3001\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u5024
+doclet.Member_Table_Summary={0}\u8868\u3001{1}\u306E\u30EA\u30B9\u30C8\u304A\u3088\u3073\u8AAC\u660E
+doclet.fields=\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Fields=\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.properties=\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.Properties=\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.constructors=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.Constructors=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.methods=\u30E1\u30BD\u30C3\u30C9
+doclet.Methods=\u30E1\u30BD\u30C3\u30C9
+doclet.annotation_type_optional_members=\u4EFB\u610F\u8981\u7D20
+doclet.Annotation_Type_Optional_Members=\u4EFB\u610F\u8981\u7D20
+doclet.annotation_type_required_members=\u5FC5\u9808\u8981\u7D20
+doclet.Annotation_Type_Required_Members=\u5FC5\u9808\u8981\u7D20
+doclet.enum_constants=\u5217\u6319\u578B\u5B9A\u6570
+doclet.Enum_Constants=\u5217\u6319\u578B\u5B9A\u6570
+doclet.nested_classes=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9
+doclet.Nested_Classes=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9
+doclet.subclasses=\u30B5\u30D6\u30AF\u30E9\u30B9
+doclet.subinterfaces=\u30B5\u30D6\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
+doclet.Modifier=\u4FEE\u98FE\u5B50
+doclet.Type=\u30BF\u30A4\u30D7
+doclet.Field=\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Property=\u30D7\u30ED\u30D1\u30C6\u30A3
+doclet.Constructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.Method=\u30E1\u30BD\u30C3\u30C9
+doclet.Annotation_Type_Optional_Member=\u4EFB\u610F\u8981\u7D20
+doclet.Annotation_Type_Required_Member=\u5FC5\u9808\u8981\u7D20
+doclet.Annotation_Type_Member=\u6CE8\u91C8\u578B\u8981\u7D20
+doclet.Enum_Constant=\u5217\u6319\u578B\u5B9A\u6570
+doclet.Class=\u30AF\u30E9\u30B9
+doclet.Description=\u8AAC\u660E
+doclet.ConstantField=\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.Value=\u5024
+doclet.0_and_1={0}\u3068{1}
+
+#Documentation for Enums
+doclet.enum_values_doc.main=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n<pre>\nfor({0} c: {0}.values())\n&nbsp; System.out.println(c);\n</pre>\n
+
+doclet.enum_values_doc.return=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u306E\u914D\u5217
+
+doclet.enum_valueof_doc.main=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068<i>\u6B63\u78BA\u306B</i>\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n
+
+doclet.enum_valueof_doc.param_name=\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\u3002
+
+doclet.enum_valueof_doc.return=\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u5217\u6319\u578B\u5B9A\u6570
+
+doclet.enum_valueof_doc.throws_ila=\u3053\u306E\u5217\u6319\u578B\u306B\u3001\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u5B9A\u6570\u304C\u306A\u3044\u5834\u5408
+
+doclet.enum_valueof_doc.throws_npe=\u5F15\u6570\u304Cnull\u306E\u5834\u5408
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,190 @@
+doclet.Generating_0=\u6B63\u5728\u751F\u6210{0}...
+doclet.Toolkit_Usage_Violation=\u53EA\u6709{0}\u53EF\u4EE5\u4F7F\u7528 Doclet \u5DE5\u5177\u7BB1
+doclet.MissingSerialTag=\u5728\u7C7B{0}\u4E2D, \u9ED8\u8BA4\u7684\u53EF\u5E8F\u5217\u5316\u5B57\u6BB5{1}\u7F3A\u5C11 @serial \u6807\u8BB0\u3002
+doclet.MissingSerialDataTag=\u5728\u7C7B{0}\u4E2D, \u65B9\u6CD5{1}\u4E2D\u7F3A\u5C11 @serialData \u6807\u8BB0\u3002
+doclet.Serializable_no_customization=\u672A\u58F0\u660E readObject \u6216 writeObject \u65B9\u6CD5\u3002
+doclet.Serialized_Form=\u5E8F\u5217\u5316\u8868\u683C
+doclet.Serialized_Form_methods=\u5E8F\u5217\u5316\u65B9\u6CD5
+doclet.Serialized_Form_fields=\u5E8F\u5217\u5316\u5B57\u6BB5
+doclet.Serialized_Form_class=\u5E8F\u5217\u5316\u6982\u89C8
+doclet.Class_0_implements_serializable=\u7C7B{0}\u5B9E\u73B0\u53EF\u5E8F\u5217\u5316
+doclet.Class_0_extends_implements_serializable=\u7C7B{0}\u6269\u5C55{1}\u5B9E\u73B0\u53EF\u5E8F\u5217\u5316
+doclet.Option_conflict=\u9009\u9879{0}\u4E0E{1}\u51B2\u7A81
+doclet.Option_reuse=\u91CD\u590D\u4F7F\u7528\u7684\u9009\u9879: {0}
+doclet.Option_doclint_no_qualifiers=-Xdoclint \u53C2\u6570\u4E0D\u5141\u8BB8\u4F7F\u7528\u8BBF\u95EE\u9650\u5B9A\u7B26
+doclet.Option_doclint_invalid_arg=-Xdoclint \u9009\u9879\u7684\u53C2\u6570\u65E0\u6548
+doclet.exception_encountered= \u5C1D\u8BD5\u521B\u5EFA\u6587\u4EF6{1}\u65F6 \n\t\u9047\u5230{0}
+doclet.perform_copy_exception_encountered= \u6267\u884C\u590D\u5236\u65F6 \n\u9047\u5230{0}\u3002
+doclet.File_not_found=\u627E\u4E0D\u5230\u6587\u4EF6: {0}
+doclet.Copy_Overwrite_warning=\u672A\u5C06\u6587\u4EF6{0}\u590D\u5236\u5230 {1}, \u56E0\u4E3A\u73B0\u6709\u6587\u4EF6\u5177\u6709\u76F8\u540C\u540D\u79F0...
+doclet.Copying_File_0_To_Dir_1=\u6B63\u5728\u5C06\u6587\u4EF6{0}\u590D\u5236\u5230\u76EE\u5F55 {1}...
+doclet.Copying_File_0_To_File_1=\u6B63\u5728\u5C06\u6587\u4EF6{0}\u590D\u5236\u5230\u6587\u4EF6{1}...
+doclet.No_Public_Classes_To_Document=\u627E\u4E0D\u5230\u53EF\u4EE5\u6587\u6863\u5316\u7684\u516C\u5171\u6216\u53D7\u4FDD\u62A4\u7684\u7C7B\u3002
+doclet.Unable_to_create_directory_0=\u65E0\u6CD5\u521B\u5EFA\u76EE\u5F55 {0}
+doclet.destination_directory_not_directory_0=\u76EE\u6807\u76EE\u5F55\u4E0D\u662F\u76EE\u5F55 {0}
+doclet.destination_directory_not_writable_0=\u76EE\u6807\u76EE\u5F55\u4E0D\u53EF\u5199\u5165 {0}
+doclet.Encoding_not_supported=\u4E0D\u652F\u6301\u7F16\u7801: {0}
+doclet.Building_Tree=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u6811...
+doclet.Building_Index=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7A0B\u5E8F\u5305\u548C\u7C7B\u7684\u7D22\u5F15...
+doclet.Building_Index_For_All_Classes=\u6B63\u5728\u6784\u5EFA\u6240\u6709\u7C7B\u7684\u7D22\u5F15...
+doclet.sourcetab_warning=-sourcetab \u7684\u53C2\u6570\u5FC5\u987B\u662F\u5927\u4E8E 0 \u7684\u6574\u6570\u3002
+doclet.Packages=\u7A0B\u5E8F\u5305
+doclet.Profiles=\u914D\u7F6E\u6587\u4EF6
+doclet.Other_Packages=\u5176\u4ED6\u7A0B\u5E8F\u5305
+doclet.Notice_taglet_registered=\u6CE8\u518C\u7684 Taglet {0}...
+doclet.Notice_taglet_unseen=\u6CE8: \u627E\u4E0D\u5230\u7684\u5B9A\u5236\u6807\u8BB0: {0}
+doclet.Notice_taglet_overriden=\u6CE8: \u8986\u76D6\u6807\u51C6\u6807\u8BB0\u7684\u5B9A\u5236\u6807\u8BB0: {0}
+doclet.Notice_taglet_conflict_warn=\u6CE8: \u53EF\u80FD\u8986\u76D6\u5C06\u6765\u7684\u6807\u51C6\u6807\u8BB0\u7684\u5B9A\u5236\u6807\u8BB0: {0}\u3002\u4E3A\u4E86\u907F\u514D\u51FA\u73B0\u53EF\u80FD\u7684\u8986\u76D6, \u8BF7\u5728\u5B9A\u5236\u6807\u8BB0\u540D\u79F0\u4E2D\u81F3\u5C11\u4F7F\u7528\u4E00\u4E2A\u53E5\u70B9\u5B57\u7B26 (.)\u3002
+doclet.Error_taglet_not_registered=\u9519\u8BEF - \u5C1D\u8BD5\u6CE8\u518C Taglet {1}\u65F6\u629B\u51FA\u5F02\u5E38\u9519\u8BEF{0}...
+doclet.Error_invalid_custom_tag_argument=\u9519\u8BEF - \u5BF9\u4E8E -tag \u9009\u9879, {0}\u662F\u65E0\u6548\u53C2\u6570...
+doclet.Author=\u4F5C\u8005:
+doclet.DefaultValue=\u9ED8\u8BA4\u503C:
+doclet.PropertyDescription=\u5C5E\u6027\u8BF4\u660E:
+doclet.PropertyGetter=\u83B7\u53D6\u5C5E\u6027\u7684\u503C
+doclet.PropertySetter=\u8BBE\u7F6E\u5C5E\u6027\u7684\u503C
+doclet.PropertyGetterWithName=\u83B7\u53D6\u5C5E\u6027{0}\u7684\u503C\u3002
+doclet.PropertySetterWithName=\u8BBE\u7F6E\u5C5E\u6027{0}\u7684\u503C\u3002
+doclet.Default=\u9ED8\u8BA4\u503C:
+doclet.Parameters=\u53C2\u6570:
+doclet.TypeParameters=\u7C7B\u578B\u53C2\u6570:
+doclet.Parameters_warn=@param argument "{0}" \u4E0D\u662F\u53C2\u6570\u540D\u79F0\u3002
+doclet.Parameters_dup_warn=\u591A\u6B21\u5BF9\u53C2\u6570 "{0}" \u8FDB\u884C\u6587\u6863\u5316\u3002
+doclet.Type_Parameters_warn=@param argument "{0}" \u4E0D\u662F\u7C7B\u578B\u53C2\u6570\u540D\u79F0\u3002
+doclet.Type_Parameters_dup_warn=\u591A\u6B21\u5BF9\u7C7B\u578B\u53C2\u6570 "{0}" \u8FDB\u884C\u6587\u6863\u5316\u3002
+doclet.Returns=\u8FD4\u56DE:
+doclet.Return_tag_on_void_method=\u4E0D\u80FD\u5728\u8FD4\u56DE\u7C7B\u578B\u4E3A\u7A7A\u7684\u65B9\u6CD5\u4E2D\u4F7F\u7528 @return \u6807\u8BB0\u3002
+doclet.See_Also=\u53E6\u8BF7\u53C2\u9605:
+doclet.See=\u8BF7\u53C2\u9605:
+doclet.SerialData=\u5E8F\u5217\u6570\u636E:
+doclet.Since=\u4ECE\u4EE5\u4E0B\u7248\u672C\u5F00\u59CB:
+doclet.Throws=\u629B\u51FA:
+doclet.Version=\u7248\u672C:
+doclet.Factory=\u5DE5\u5382:
+doclet.UnknownTag={0}\u662F\u672A\u77E5\u6807\u8BB0\u3002
+doclet.UnknownTagLowercase={0}\u662F\u672A\u77E5\u6807\u8BB0 - \u9664\u4E86\u5927\u5C0F\u5199\u4E4B\u5916\u5176\u4ED6\u65B9\u9762\u4E0E\u5DF2\u77E5\u6807\u8BB0\u76F8\u540C\u3002
+doclet.noInheritedDoc=\u4F7F\u7528\u4E86 @inheritDoc, \u4F46{0}\u672A\u8986\u76D6\u6216\u5B9E\u73B0\u4EFB\u4F55\u65B9\u6CD5\u3002
+doclet.malformed_html_link_tag=<a> \u6807\u8BB0\u683C\u5F0F\u9519\u8BEF: \n"{0}"
+doclet.tag_misuse=\u4E0D\u80FD\u5728{1}\u6587\u6863\u4E2D\u4F7F\u7528\u6807\u8BB0{0}\u3002\u53EA\u80FD\u5728\u4EE5\u4E0B\u7C7B\u578B\u7684\u6587\u6863\u4E2D\u4F7F\u7528\u8BE5\u6807\u8BB0: {2}\u3002
+doclet.javafx_tag_misuse=\u6807\u8BB0 @propertyGetter, @propertySetter \u548C @propertyDescription \u53EA\u80FD\u5728 JavaFX \u5C5E\u6027 getter \u548C setter \u4E2D\u4F7F\u7528\u3002
+doclet.Package_Summary=\u7A0B\u5E8F\u5305\u6982\u8981
+doclet.Profile_Summary=\u6982\u8981\u4FE1\u606F\u6982\u8981
+doclet.Interface_Summary=\u63A5\u53E3\u6982\u8981
+doclet.Annotation_Types_Summary=\u6CE8\u91CA\u7C7B\u578B\u6982\u8981
+doclet.Enum_Summary=\u679A\u4E3E\u6982\u8981
+doclet.Exception_Summary=\u5F02\u5E38\u9519\u8BEF\u6982\u8981
+doclet.Error_Summary=\u9519\u8BEF\u6982\u8981
+doclet.Class_Summary=\u7C7B\u6982\u8981
+doclet.Nested_Class_Summary=\u5D4C\u5957\u7C7B\u6982\u8981
+doclet.Annotation_Type_Optional_Member_Summary=\u53EF\u9009\u5143\u7D20\u6982\u8981
+doclet.Annotation_Type_Required_Member_Summary=\u5FC5\u9700\u5143\u7D20\u6982\u8981
+doclet.Field_Summary=\u5B57\u6BB5\u6982\u8981
+doclet.Property_Summary=\u5C5E\u6027\u6982\u8981
+doclet.Enum_Constant_Summary=\u679A\u4E3E\u5E38\u91CF\u6982\u8981
+doclet.Constructor_Summary=\u6784\u9020\u5668\u6982\u8981
+doclet.Method_Summary=\u65B9\u6CD5\u6982\u8981
+doclet.Interfaces=\u63A5\u53E3
+doclet.Enums=\u679A\u4E3E
+doclet.AnnotationTypes=\u6CE8\u91CA\u7C7B\u578B
+doclet.Exceptions=\u5F02\u5E38\u9519\u8BEF
+doclet.Errors=\u9519\u8BEF
+doclet.Classes=\u7C7B
+doclet.Packages=\u7A0B\u5E8F\u5305
+doclet.packages=\u7A0B\u5E8F\u5305
+doclet.profiles=\u914D\u7F6E\u6587\u4EF6
+doclet.All_Classes=\u6240\u6709\u7C7B
+doclet.All_Superinterfaces=\u6240\u6709\u8D85\u7EA7\u63A5\u53E3:
+doclet.All_Implemented_Interfaces=\u6240\u6709\u5DF2\u5B9E\u73B0\u7684\u63A5\u53E3:
+doclet.All_classes_and_interfaces=\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)
+doclet.Package_class_and_interface_descriptions=\u7A0B\u5E8F\u5305, \u7C7B\u548C\u63A5\u53E3\u8BF4\u660E
+doclet.Interface=\u63A5\u53E3
+doclet.Class=\u7C7B
+doclet.AnnotationType=\u6CE8\u91CA\u7C7B\u578B
+doclet.annotationtype=\u6CE8\u91CA\u7C7B\u578B
+doclet.annotationtypes=\u6CE8\u91CA\u7C7B\u578B
+doclet.Enum=\u679A\u4E3E
+doclet.enum=\u679A\u4E3E
+doclet.enums=\u679A\u4E3E
+doclet.interface=\u63A5\u53E3
+doclet.interfaces=\u63A5\u53E3
+doclet.class=\u7C7B
+doclet.classes=\u7C7B
+doclet.Error=\u9519\u8BEF
+doclet.error=\u9519\u8BEF
+doclet.errors=\u9519\u8BEF
+doclet.Exception=\u5F02\u5E38\u9519\u8BEF
+doclet.exception=\u5F02\u5E38\u9519\u8BEF
+doclet.exceptions=\u5F02\u5E38\u9519\u8BEF
+doclet.Package_private=(\u4E13\u7528\u7A0B\u5E8F\u5305)
+doclet.Nested_Classes_Interfaces_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
+doclet.Nested_Classes_Interface_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5D4C\u5957\u7C7B/\u63A5\u53E3
+doclet.Methods_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u65B9\u6CD5
+doclet.Methods_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u65B9\u6CD5
+doclet.Fields_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5B57\u6BB5
+doclet.Fields_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5B57\u6BB5
+doclet.Properties_Inherited_From_Class=\u4ECE\u7C7B\u7EE7\u627F\u7684\u5C5E\u6027
+doclet.Properties_Inherited_From_Interface=\u4ECE\u63A5\u53E3\u7EE7\u627F\u7684\u5C5E\u6027
+doclet.Annotation_Type_Member_Detail=\u5143\u7D20\u8BE6\u7EC6\u8D44\u6599
+doclet.Enum_Constant_Detail=\u679A\u4E3E\u5E38\u91CF\u8BE6\u7EC6\u8D44\u6599
+doclet.Constants_Summary=\u5E38\u91CF\u5B57\u6BB5\u503C
+doclet.Field_Detail=\u5B57\u6BB5\u8BE6\u7EC6\u8D44\u6599
+doclet.Property_Detail=\u5C5E\u6027\u8BE6\u7EC6\u4FE1\u606F
+doclet.Method_Detail=\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599
+doclet.Constructor_Detail=\u6784\u9020\u5668\u8BE6\u7EC6\u8D44\u6599
+doclet.Deprecated=\u5DF2\u8FC7\u65F6\u3002
+doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0}
+doclet.value_tag_invalid_reference={0} (\u7531 @value \u6807\u8BB0\u5F15\u7528) \u4E3A\u672A\u77E5\u5F15\u7528\u3002
+doclet.value_tag_invalid_constant=@value \u6807\u8BB0 (\u5F15\u7528{0}) \u53EA\u80FD\u5728\u5E38\u91CF\u4E2D\u4F7F\u7528\u3002
+doclet.value_tag_invalid_use=\u6B64\u5904\u4E0D\u80FD\u4F7F\u7528 @value \u6807\u8BB0\u3002
+doclet.dest_dir_create=\u6B63\u5728\u521B\u5EFA\u76EE\u6807\u76EE\u5F55: "{0}"
+doclet.in={1}\u4E2D\u7684{0}
+doclet.Use_Table_Summary=\u4F7F\u7528\u8868, \u5217\u8868{0}\u548C\u89E3\u91CA
+doclet.Constants_Table_Summary={0}\u8868, \u5217\u8868\u5E38\u91CF\u5B57\u6BB5\u548C\u503C
+doclet.Member_Table_Summary={0}\u8868, \u5217\u8868{1}\u548C\u89E3\u91CA
+doclet.fields=\u5B57\u6BB5
+doclet.Fields=\u5B57\u6BB5
+doclet.properties=\u5C5E\u6027
+doclet.Properties=\u5C5E\u6027
+doclet.constructors=\u6784\u9020\u5668
+doclet.Constructors=\u6784\u9020\u5668
+doclet.methods=\u65B9\u6CD5
+doclet.Methods=\u65B9\u6CD5
+doclet.annotation_type_optional_members=\u53EF\u9009\u5143\u7D20
+doclet.Annotation_Type_Optional_Members=\u53EF\u9009\u5143\u7D20
+doclet.annotation_type_required_members=\u5FC5\u9700\u7684\u5143\u7D20
+doclet.Annotation_Type_Required_Members=\u6240\u9700\u5143\u7D20
+doclet.enum_constants=\u679A\u4E3E\u5E38\u91CF
+doclet.Enum_Constants=\u679A\u4E3E\u5E38\u91CF
+doclet.nested_classes=\u5D4C\u5957\u7C7B
+doclet.Nested_Classes=\u5D4C\u5957\u7C7B
+doclet.subclasses=\u5B50\u7C7B
+doclet.subinterfaces=\u5B50\u63A5\u53E3
+doclet.Modifier=\u9650\u5B9A\u7B26
+doclet.Type=\u7C7B\u578B
+doclet.Field=\u5B57\u6BB5
+doclet.Property=\u5C5E\u6027
+doclet.Constructor=\u6784\u9020\u5668
+doclet.Method=\u65B9\u6CD5
+doclet.Annotation_Type_Optional_Member=\u53EF\u9009\u5143\u7D20
+doclet.Annotation_Type_Required_Member=\u5FC5\u9700\u7684\u5143\u7D20
+doclet.Annotation_Type_Member=\u6CE8\u91CA\u7C7B\u578B\u5143\u7D20
+doclet.Enum_Constant=\u679A\u4E3E\u5E38\u91CF
+doclet.Class=\u7C7B
+doclet.Description=\u8BF4\u660E
+doclet.ConstantField=\u5E38\u91CF\u5B57\u6BB5
+doclet.Value=\u503C
+doclet.0_and_1={0}\u548C{1}
+
+#Documentation for Enums
+doclet.enum_values_doc.main=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n<pre>\nfor ({0} c : {0}.values())\n&nbsp;   System.out.println(c);\n</pre>
+
+doclet.enum_values_doc.return=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F\u8FD4\u56DE\u7684\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4
+
+doclet.enum_valueof_doc.main=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26<i>\u5B8C\u5168</i>\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)
+
+doclet.enum_valueof_doc.param_name=\u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002
+
+doclet.enum_valueof_doc.return=\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF
+
+doclet.enum_valueof_doc.throws_ila=\u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF
+
+doclet.enum_valueof_doc.throws_npe=\u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/script.js	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2013, 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.
+ */
+
+var packageSearchIndex;
+var typeSearchIndex;
+var memberSearchIndex;
+var tagSearchIndex;
+function loadScripts(doc, tag) {
+    createElem(doc, tag, 'jquery/jszip/dist/jszip.js');
+    createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils.js');
+    if (window.navigator.userAgent.indexOf('MSIE ') > 0 || window.navigator.userAgent.indexOf('Trident/') > 0 ||
+            window.navigator.userAgent.indexOf('Edge/') > 0) {
+        createElem(doc, tag, 'jquery/jszip-utils/dist/jszip-utils-ie.js');
+    }
+    createElem(doc, tag, 'search.js');
+    
+    $.get(pathtoroot + "package-search-index.zip")
+            .done(function() {
+                JSZipUtils.getBinaryContent(pathtoroot + "package-search-index.zip", function(e, data) {
+                    var zip = new JSZip(data);
+                    zip.load(data);
+                    packageSearchIndex = JSON.parse(zip.file("package-search-index.json").asText());
+                });
+            });
+    $.get(pathtoroot + "type-search-index.zip")
+            .done(function() {
+                JSZipUtils.getBinaryContent(pathtoroot + "type-search-index.zip", function(e, data) {
+                    var zip = new JSZip(data);
+                    zip.load(data);
+                    typeSearchIndex = JSON.parse(zip.file("type-search-index.json").asText());
+                });
+            });
+    $.get(pathtoroot + "member-search-index.zip")
+            .done(function() {
+                JSZipUtils.getBinaryContent(pathtoroot + "member-search-index.zip", function(e, data) {
+                    var zip = new JSZip(data);
+                    zip.load(data);
+                    memberSearchIndex = JSON.parse(zip.file("member-search-index.json").asText());
+                });
+            });
+    $.get(pathtoroot + "tag-search-index.zip")
+            .done(function() {
+                JSZipUtils.getBinaryContent(pathtoroot + "tag-search-index.zip", function(e, data) {
+                    var zip = new JSZip(data);
+                    zip.load(data);
+                    tagSearchIndex = JSON.parse(zip.file("tag-search-index.json").asText());
+                });
+            });
+}
+
+function createElem(doc, tag, path) {
+    var script = doc.createElement(tag);
+    var scriptElement = doc.getElementsByTagName(tag)[0];
+    script.src = pathtoroot + path;
+    scriptElement.parentNode.insertBefore(script, scriptElement);
+}
+
+function show(type)
+{
+    count = 0;
+    for (var key in methods) {
+        var row = document.getElementById(key);
+        if ((methods[key] &  type) != 0) {
+            row.style.display = '';
+            row.className = (count++ % 2) ? rowColor : altColor;
+        }
+        else
+            row.style.display = 'none';
+    }
+    updateTabs(type);
+}
+
+function updateTabs(type)
+{
+    for (var value in tabs) {
+        var sNode = document.getElementById(tabs[value][0]);
+        var spanNode = sNode.firstChild;
+        if (value == type) {
+            sNode.className = activeTableTab;
+            spanNode.innerHTML = tabs[value][1];
+        }
+        else {
+            sNode.className = tableTab;
+            spanNode.innerHTML = "<a href=\"javascript:show("+ value + ");\">" + tabs[value][1] + "</a>";
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/stylesheet.css	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,751 @@
+/* Javadoc style sheet */
+/*
+Overall document style
+*/
+
+@import url('resources/fonts/dejavu.css');
+
+body {
+    background-color:#ffffff;
+    color:#353833;
+    font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;
+    font-size:14px;
+    margin:0;
+    padding:0;
+    height:100%;
+    width:100%;
+}
+iframe {
+    margin:0;
+    padding:0;
+    height:100%;
+    width:100%;
+    overflow-y:scroll;
+    border:none;
+}
+a:link, a:visited {
+    text-decoration:none;
+    color:#4A6782;
+}
+a:hover, a:focus {
+    text-decoration:none;
+    color:#bb7a2a;
+}
+a:active {
+    text-decoration:none;
+    color:#4A6782;
+}
+a[name] {
+    color:#353833;
+}
+a[name]:hover {
+    text-decoration:none;
+    color:#353833;
+}
+a[name]:before, a[name]:target {
+    content:"";
+    display:block;
+    height:120px;
+    margin:-120px 0 0;
+}
+a[id]:before, a[id]:target {
+    padding-top:129px;
+    margin-top:-129px;
+    color:red;
+}
+pre {
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:14px;
+}
+h1 {
+    font-size:20px;
+}
+h2 {
+    font-size:18px;
+}
+h3 {
+    font-size:16px;
+    font-style:italic;
+}
+h4 {
+    font-size:13px;
+}
+h5 {
+    font-size:12px;
+}
+h6 {
+    font-size:11px;
+}
+ul {
+    list-style-type:disc;
+}
+code, tt {
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:14px;
+    padding-top:4px;
+    margin-top:8px;
+    line-height:1.4em;
+}
+dt code {
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:14px;
+    padding-top:4px;
+}
+table tr td dt code {
+    font-family:'DejaVu Sans Mono', monospace;
+    font-size:14px;
+    vertical-align:top;
+    padding-top:4px;
+}
+sup {
+    font-size:8px;
+}
+/*
+Document title and Copyright styles
+*/
+.clear {
+    clear:both;
+    height:0px;
+    overflow:hidden;
+}
+.aboutLanguage {
+    float:right;
+    padding:0px 21px;
+    font-size:11px;
+    z-index:200;
+    margin-top:-9px;
+}
+.legalCopy {
+    margin-left:.5em;
+}
+.bar a, .bar a:link, .bar a:visited, .bar a:active {
+    color:#FFFFFF;
+    text-decoration:none;
+}
+.bar a:hover, .bar a:focus {
+    color:#bb7a2a;
+}
+.tab {
+    background-color:#0066FF;
+    color:#ffffff;
+    padding:8px;
+    width:5em;
+    font-weight:bold;
+}
+/*
+Navigation bar styles
+*/
+.bar {
+    background-color:#4D7A97;
+    color:#FFFFFF;
+    padding:.8em .5em .4em .8em;
+    height:auto;/*height:1.8em;*/
+    font-size:11px;
+    margin:0;
+}
+.fixedNav {
+    position:fixed;
+    width:100%;
+    z-index:999;
+    background-color:#ffffff;
+}
+.topNav {
+    background-color:#4D7A97;
+    color:#FFFFFF;
+    float:left;
+    padding:0;
+    width:100%;
+    clear:right;
+    height:2.8em;
+    padding-top:10px;
+    overflow:hidden;
+    font-size:12px; 
+}
+.bottomNav {
+    margin-top:10px;
+    background-color:#4D7A97;
+    color:#FFFFFF;
+    float:left;
+    padding:0;
+    width:100%;
+    clear:right;
+    height:2.8em;
+    padding-top:10px;
+    overflow:hidden;
+    font-size:12px;
+}
+.subNav {
+    background-color:#dee3e9;
+    float:left;
+    width:100%;
+    overflow:hidden;
+    font-size:12px;
+}
+.subNav div {
+    clear:left;
+    float:left;
+    padding:0 0 5px 6px;
+    text-transform:uppercase;
+}
+ul.navList, ul.subNavList {
+    float:left;
+    margin:0 25px 0 0;
+    padding:0;
+}
+ul.navList li{
+    list-style:none;
+    float:left;
+    padding: 5px 6px;
+    text-transform:uppercase;
+}
+ul.navListSearch {
+    float:right;
+    margin:0 0 0 0;
+    padding:0;
+}
+ul.navListSearch li {
+    list-style:none;
+    float:right;
+    padding: 5px 6px;
+    text-transform:uppercase;
+}
+ul.navListSearch li span {
+    position:relative;
+    right:-16px;
+}
+ul.subNavList li {
+    list-style:none;
+    float:left;
+}
+.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited {
+    color:#FFFFFF;
+    text-decoration:none;
+    text-transform:uppercase;
+}
+.topNav a:hover, .bottomNav a:hover {
+    text-decoration:none;
+    color:#bb7a2a;
+    text-transform:uppercase;
+}
+.navBarCell1Rev {
+    background-color:#F8981D;
+    color:#253441;
+    margin: auto 5px;
+}
+.skipNav {
+    position:absolute;
+    top:auto;
+    left:-9999px;
+    overflow:hidden;
+}
+/*
+Page header and footer styles
+*/
+.header, .footer {
+    clear:both;
+    margin:0 20px;
+    padding:5px 0 0 0;
+}
+.indexNav {
+    margin:10px;
+    position:relative;
+}
+.indexNav ul {
+    padding:0;
+    margin:0;
+}
+.indexNav ul li {
+    display:inline;
+    list-style-type:none;
+    padding-right:10px;
+}
+.indexNav h1 {
+    font-size:13px;
+}
+.title {
+    color:#2c4557;
+    margin:10px 0;
+    padding-top:5.4em;
+}
+.subTitle {
+    margin:5px 0 0 0;
+}
+.header ul {
+    margin:0 0 15px 0;
+    padding:0;
+}
+.footer ul {
+    margin:20px 0 5px 0;
+}
+.header ul li, .footer ul li {
+    list-style:none;
+    font-size:13px;
+}
+/*
+Heading styles
+*/
+div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
+    background-color:#dee3e9;
+    border:1px solid #d0d9e0;
+    margin:0 0 6px -8px;
+    padding:7px 5px;
+}
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+    background-color:#dee3e9;
+    border:1px solid #d0d9e0;
+    margin:0 0 6px -8px;
+    padding:7px 5px;
+}
+ul.blockList ul.blockList li.blockList h3 {
+    padding:0;
+    margin:15px 0;
+}
+ul.blockList li.blockList h2 {
+    padding:0px 0 20px 0;
+}
+/*
+Page layout container styles
+*/
+.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer {
+    clear:both;
+    padding:10px 20px;
+    position:relative;
+}
+.indexContainer {
+    margin:10px;
+    position:relative;
+    font-size:12px;
+}
+.indexContainer h2 {
+    font-size:13px;
+    padding:0 0 3px 0;
+}
+.indexContainer ul {
+    margin:0;
+    padding:0;
+}
+.indexContainer ul li {
+    list-style:none;
+    padding-top:2px;
+}
+.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt {
+    font-size:12px;
+    font-weight:bold;
+    margin:10px 0 0 0;
+    color:#4E4E4E;
+}
+.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd {
+    margin:5px 0 10px 0px;
+    font-size:14px;
+    font-family:'DejaVu Sans Mono',monospace;
+}
+.serializedFormContainer dl.nameValue dt {
+    margin-left:1px;
+    font-size:1.1em;
+    display:inline;
+    font-weight:bold;
+}
+.serializedFormContainer dl.nameValue dd {
+    margin:0 0 0 1px;
+    font-size:1.1em;
+    display:inline;
+}
+/*
+List styles
+*/
+li.circle {
+    list-style:circle;
+}
+ul.horizontal li {
+    display:inline;
+    font-size:0.9em;
+}
+ul.inheritance {
+    margin:0;
+    padding:0;
+}
+ul.inheritance li {
+    display:inline;
+    list-style:none;
+}
+ul.inheritance li ul.inheritance {
+    margin-left:15px;
+    padding-left:15px;
+    padding-top:1px;
+}
+ul.blockList, ul.blockListLast {
+    margin:10px 0 10px 0;
+    padding:0;
+}
+ul.blockList li.blockList, ul.blockListLast li.blockList {
+    list-style:none;
+    margin-bottom:15px;
+    line-height:1.4;
+}
+ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList {
+    padding:0px 20px 5px 10px;
+    border:1px solid #ededed; 
+    background-color:#f8f8f8;
+}
+ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList {
+    padding:0 0 5px 8px;
+    background-color:#ffffff;
+    border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockList {
+    margin-left:0;
+    padding-left:0;
+    padding-bottom:15px;
+    border:none;
+}
+ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast {
+    list-style:none;
+    border-bottom:none;
+    padding-bottom:0;
+}
+table tr td dl, table tr td dl dt, table tr td dl dd {
+    margin-top:0;
+    margin-bottom:1px;
+}
+/*
+Table styles
+*/
+.overviewSummary, .memberSummary, .typeSummary, .useSummary, .constantsSummary, .deprecatedSummary {
+    width:100%;
+    border-spacing:0;
+    border-left:1px solid #EEE; 
+    border-right:1px solid #EEE; 
+    border-bottom:1px solid #EEE; 
+}
+.overviewSummary, .memberSummary  {
+    padding:0px;
+}
+.overviewSummary caption, .memberSummary caption, .typeSummary caption,
+.useSummary caption, .constantsSummary caption, .deprecatedSummary caption {
+    position:relative;
+    text-align:left;
+    background-repeat:no-repeat;
+    color:#253441;
+    font-weight:bold;
+    clear:none;
+    overflow:hidden;
+    padding:0px;
+    padding-top:10px;
+    padding-left:1px;
+    margin:0px;
+    white-space:pre;
+}
+.overviewSummary caption a:link, .memberSummary caption a:link, .typeSummary caption a:link,
+.useSummary caption a:link, .constantsSummary caption a:link, .deprecatedSummary caption a:link,
+.overviewSummary caption a:hover, .memberSummary caption a:hover, .typeSummary caption a:hover,
+.useSummary caption a:hover, .constantsSummary caption a:hover, .deprecatedSummary caption a:hover,
+.overviewSummary caption a:active, .memberSummary caption a:active, .typeSummary caption a:active,
+.useSummary caption a:active, .constantsSummary caption a:active, .deprecatedSummary caption a:active,
+.overviewSummary caption a:visited, .memberSummary caption a:visited, .typeSummary caption a:visited,
+.useSummary caption a:visited, .constantsSummary caption a:visited, .deprecatedSummary caption a:visited {
+    color:#FFFFFF;
+}
+.overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,
+.useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {
+    white-space:nowrap;
+    padding-top:5px;
+    padding-left:12px;
+    padding-right:12px;
+    padding-bottom:7px;
+    display:inline-block;
+    float:left;
+    background-color:#F8981D;
+    border: none;
+    height:16px;
+}
+.memberSummary caption span.activeTableTab span {
+    white-space:nowrap;
+    padding-top:5px;
+    padding-left:12px;
+    padding-right:12px;
+    margin-right:3px;
+    display:inline-block;
+    float:left;
+    background-color:#F8981D;
+    height:16px;
+}
+.memberSummary caption span.tableTab span {
+    white-space:nowrap;
+    padding-top:5px;
+    padding-left:12px;
+    padding-right:12px;
+    margin-right:3px;
+    display:inline-block;
+    float:left;
+    background-color:#4D7A97;
+    height:16px;
+}
+.memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {
+    padding-top:0px;
+    padding-left:0px;
+    padding-right:0px;
+    background-image:none;
+    float:none;
+    display:inline;
+}
+.overviewSummary .tabEnd, .memberSummary .tabEnd, .typeSummary .tabEnd,
+.useSummary .tabEnd, .constantsSummary .tabEnd, .deprecatedSummary .tabEnd {
+    display:none;
+    width:5px;
+    position:relative;
+    float:left;
+    background-color:#F8981D;
+}
+.memberSummary .activeTableTab .tabEnd {
+    display:none;
+    width:5px;
+    margin-right:3px;
+    position:relative; 
+    float:left;
+    background-color:#F8981D;
+}
+.memberSummary .tableTab .tabEnd {
+    display:none;
+    width:5px;
+    margin-right:3px;
+    position:relative;
+    background-color:#4D7A97;
+    float:left;
+
+}
+.overviewSummary td, .memberSummary td, .typeSummary td,
+.useSummary td, .constantsSummary td, .deprecatedSummary td {
+    text-align:left;
+    padding:0px 0px 12px 10px;
+}
+th.colOne, th.colFirst, th.colLast, .useSummary th, .constantsSummary th,
+td.colOne, td.colFirst, td.colLast, .useSummary td, .constantsSummary td{
+    vertical-align:top;
+    padding-right:0px;
+    padding-top:8px;
+    padding-bottom:3px;
+}
+th.colFirst, th.colLast, th.colOne, .constantsSummary th {
+    background:#dee3e9;
+    text-align:left;
+    padding:8px 3px 3px 7px;
+}
+td.colFirst, th.colFirst {
+    white-space:nowrap;
+    font-size:13px;
+}
+td.colLast, th.colLast {
+    font-size:13px;
+}
+td.colOne, th.colOne {
+    font-size:13px;
+}
+.overviewSummary td.colFirst, .overviewSummary th.colFirst,
+.useSummary td.colFirst, .useSummary th.colFirst,
+.overviewSummary td.colOne, .overviewSummary th.colOne,
+.memberSummary td.colFirst, .memberSummary th.colFirst,
+.memberSummary td.colOne, .memberSummary th.colOne,
+.typeSummary td.colFirst{
+    width:25%;
+    vertical-align:top;
+}
+td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover {
+    font-weight:bold;
+}
+.tableSubHeadingColor {
+    background-color:#EEEEFF;
+}
+.altColor {
+    background-color:#FFFFFF;
+}
+.rowColor {
+    background-color:#EEEEEF;
+}
+/*
+Content styles
+*/
+.description pre {
+    margin-top:0;
+}
+.deprecatedContent {
+    margin:0;
+    padding:10px 0;
+}
+.docSummary {
+    padding:0;
+}
+
+ul.blockList ul.blockList ul.blockList li.blockList h3 {
+    font-style:normal;
+}
+
+div.block {
+    font-size:14px;
+    font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif;
+}
+
+td.colLast div {
+    padding-top:0px;
+}
+
+
+td.colLast a {
+    padding-bottom:3px;
+}
+/*
+Formatting effect styles
+*/
+.sourceLineNo {
+    color:green;
+    padding:0 30px 0 0;
+}
+h1.hidden {
+    visibility:hidden;
+    overflow:hidden;
+    font-size:10px;
+}
+.block {
+    display:block;
+    margin:3px 10px 2px 0px;
+    color:#474747;
+}
+.deprecatedLabel, .descfrmTypeLabel, .memberNameLabel, .memberNameLink,
+.overrideSpecifyLabel, .packageHierarchyLabel, .paramLabel, .returnLabel,
+.seeLabel, .simpleTagLabel, .throwsLabel, .typeNameLabel, .typeNameLink, .searchTagLink {
+    font-weight:bold;
+}
+.deprecationComment, .emphasizedPhrase, .interfaceName {
+    font-style:italic;
+}
+
+div.block div.block span.deprecationComment, div.block div.block span.emphasizedPhrase,
+div.block div.block span.interfaceName {
+    font-style:normal;
+}
+
+div.contentContainer ul.blockList li.blockList h2 {
+    padding-bottom:0px;
+}
+/*
+IFRAME specific styles
+*/
+.mainContainer {
+    margin:0 auto; 
+    padding:0; 
+    height:100%; 
+    width:100%; 
+    position:fixed; 
+    top:0; 
+    left:0;
+}
+.leftContainer {
+    height:100%;
+    position:fixed;
+    width:320px;
+}
+.leftTop {
+    position:relative;
+    float:left;
+    width:315px;
+    top:0;
+    left:0;
+    height:30%;
+    border-right:6px solid #ccc;
+    border-bottom:6px solid #ccc;
+}
+.leftBottom {
+    position:relative;
+    float:left;
+    width:315px;
+    bottom:0;
+    left:0;
+    height:70%;
+    border-right:6px solid #ccc;
+    border-top:1px solid #000;
+}
+.rightContainer {
+    position:absolute;
+    left:320px;
+    top:0;
+    bottom:0;
+    height:100%;
+    right:0;
+    border-left:1px solid #000;
+}
+.rightIframe {
+    margin:0;
+    padding:0;
+    height:100%;
+    right:30px;
+    width:100%;
+    overflow:visible;
+    margin-bottom:30px;
+}
+/*
+HTML5 specific styles
+*/
+main, nav, header, footer, section {
+    display:block;
+}
+.ui-autocomplete-category {
+    font-weight:bold;
+    font-size:15px;
+    padding:7px 0 7px 3px;
+    background-color:#4D7A97;
+    color:#FFFFFF;
+}
+.resultItem {
+    font-size:13px;
+}
+.ui-autocomplete {
+    max-height:85%;
+    max-width:65%;
+    overflow-y:scroll;
+    overflow-x:scroll;
+    white-space:nowrap;
+    box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
+}
+ul.ui-autocomplete {
+    position:fixed;
+    z-index:999999;
+}
+ul.ui-autocomplete  li {
+    float:left;
+    clear:both;
+    width:100%;
+}
+.resultHighlight {
+    font-weight:bold;
+}
+#search {
+    background-image:url('resources/glass.png');
+    background-size:13px;
+    background-repeat:no-repeat;
+    background-position:2px 3px;
+    padding-left:20px;
+    position:relative;
+    right:-18px;
+}
+#reset {
+    background-color: rgb(255,255,255);
+    border:0 none;
+    width:16px;
+    height:17px;
+    position:relative;
+    left:-2px;
+    background-image:url('resources/x.png');
+    background-repeat:no-repeat;
+    background-size:12px;
+    background-position:center;
+}
+.watermark {
+    color:#888;
+}
+.searchTagDescResult {
+    font-style:italic;
+    font-size:11px;
+}
+.searchTagHolderResult {
+    font-style:italic;
+    font-size:12px;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseExecutableMemberTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+/**
+ * An abstract class for that implements the {@link Taglet} interface
+ * for tags in <code>ExecutableMembers</code>.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public abstract class BaseExecutableMemberTaglet extends BaseTaglet {
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in field documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in field documentation and false
+     * otherwise.
+     */
+    public boolean inField() {
+        return false;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in overview documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in overview documentation and false
+     * otherwise.
+     */
+    public boolean inOverview() {
+        return false;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in package documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in package documentation and false
+     * otherwise.
+     */
+    public boolean inPackage() {
+        return false;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in type documentation (classes or interfaces).
+     * @return true if this <code>Taglet</code>
+     * is used in type documentation and false
+     * otherwise.
+     */
+    public boolean inType() {
+        return false;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is an inline tag.
+     * @return true if this <code>Taglet</code>
+     * is an inline tag and false otherwise.
+     */
+    public boolean isInlineTag() {
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseInlineTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+/**
+ * An abstract inline taglet that outputs HTML.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public abstract class BaseInlineTaglet extends BaseTaglet {
+
+    /**
+     * Will return true since this is an inline tag.
+     * @return true since this is an inline tag.
+     */
+    public boolean isInlineTag() {
+        return true;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BasePropertyTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * An abstract class that implements the {@link Taglet} interface and
+ * serves as a base for JavaFX property getter and setter taglets.
+ *
+ *  <p><b>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.</b>
+ *
+ */
+public abstract class BasePropertyTaglet extends BaseTaglet {
+
+    public BasePropertyTaglet() {
+    }
+
+    /**
+     * This method returns the text to be put in the resulting javadoc before
+     * the property name.
+     *
+     * @param tagletWriter the taglet writer for output
+     * @return the string to be put in the resulting javadoc.
+     */
+    abstract String getText(TagletWriter tagletWriter);
+
+    /**
+     * Given the <code>Tag</code> representation of this custom
+     * tag, return its string representation, which is output
+     * to the generated page.
+     * @param element
+     * @param tag the <code>Tag</code> representation of this custom tag.
+     * @param tagletWriter the taglet writer for output.
+     * @return the TagletOutput representation of this <code>Tag</code>.
+     */
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter tagletWriter) {
+        return tagletWriter.propertyTagOutput(element, tag, getText(tagletWriter));
+    }
+
+    /**
+     * Will return false because this tag may
+     * only appear in Methods.
+     * @return false since this is not a method.
+     */
+    public boolean inConstructor() {
+        return false;
+    }
+
+    /**
+     * Will return false because this tag may
+     * only appear in Methods.
+     * @return false since this is not a method.
+     */
+    public boolean inOverview() {
+        return false;
+    }
+
+    /**
+     * Will return false because this tag may
+     * only appear in Methods.
+     * @return false since this is not a method.
+     */
+    public boolean inPackage() {
+        return false;
+    }
+
+    /**
+     * Will return false because this tag may
+     * only appear in Methods.
+     * @return false since this is not a method.
+     */
+    public boolean inType() {
+        return false;
+    }
+
+    /**
+     * Will return false because this tag is not inline.
+     * @return false since this is not an inline tag.
+     */
+    public boolean isInlineTag() {
+        return false;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/BaseTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * An abstract class for that implements the {@link Taglet} interface.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public abstract class BaseTaglet implements Taglet {
+
+    protected String name = "Default";
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in constructor documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in constructor documentation and false
+     * otherwise.
+     */
+    public boolean inConstructor() {
+        return true;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in field documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in field documentation and false
+     * otherwise.
+     */
+    public boolean inField() {
+        return true;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in method documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in method documentation and false
+     * otherwise.
+     */
+    public boolean inMethod() {
+        return true;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in overview documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in method documentation and false
+     * otherwise.
+     */
+    public boolean inOverview() {
+        return true;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in package documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in package documentation and false
+     * otherwise.
+     */
+    public boolean inPackage() {
+        return true;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in type documentation (classes or interfaces).
+     * @return true if this <code>Taglet</code>
+     * is used in type documentation and false
+     * otherwise.
+     */
+    public boolean inType() {
+        return true;
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is an inline tag.
+     * @return true if this <code>Taglet</code>
+     * is an inline tag and false otherwise.
+     */
+    public boolean isInlineTag() {
+        return false;
+    }
+
+    /**
+     * Return the name of this custom tag.
+     * @return the name of this custom tag.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * {@inheritDoc}
+     * @throws UnsupportedTagletOperationException thrown when the method is
+     *         not supported by the taglet.
+     */
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) {
+        throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + ".");
+    }
+
+    /**
+     * {@inheritDoc}
+     * @throws UnsupportedTagletOperationException thrown when the method is not
+     *         supported by the taglet.
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        throw new UnsupportedTagletOperationException("Method not supported in taglet " + getName() + ".");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/CodeTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.Map;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * An inline Taglet used to denote literal code fragments.
+ * The enclosed text is interpreted as not containing HTML markup or
+ * nested javadoc tags, and is rendered in a font suitable for code.
+ *
+ * <p> The tag {@code {@code ...}} is equivalent to
+ * {@code <code>{@literal ...}</code>}.
+ * For example, the text:
+ * <blockquote>  The type {@code {@code List<P>}}  </blockquote>
+ * displays as:
+ * <blockquote>  The type {@code List<P>}  </blockquote>
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Scott Seligman
+ */
+
+public class CodeTaglet extends BaseInlineTaglet {
+
+    private static final String NAME = CODE.tagName;
+
+    public String getName() {
+        return NAME;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) {
+        return writer.codeTagOutput(element, tag);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DeprecatedTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * A taglet that represents the @deprecated tag.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public class DeprecatedTaglet extends BaseTaglet{
+
+    public DeprecatedTaglet() {
+        name = DEPRECATED.tagName;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        return writer.deprecatedTagOutput(holder);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/DocRootTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,71 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * An inline Taglet representing {&#064;docRoot}.  This taglet is
+ * used to get the relative path to the document's root output
+ * directory.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ * @author Doug Kramer
+ */
+
+public class DocRootTaglet extends BaseInlineTaglet {
+
+
+    /**
+     * Construct a new DocRootTaglet.
+     */
+    public DocRootTaglet() {
+        name = DOC_ROOT.tagName;
+    }
+
+    /**
+     * Given a <code>Doc</code> object, check if it holds any tags of
+     * this type.  If it does, return the string representing the output.
+     * If it does not, return null.
+     * @param holder
+     * @param tag a tag representing the custom tag.
+     * @param writer a {@link TagletWriter} Taglet writer.
+     * @return the string representation of this <code>Tag</code>.
+     */
+    public Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) {
+        return writer.getDocRootOutput();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/IndexTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2015, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import com.sun.source.doctree.DocTree;
+import java.util.Map;
+import javax.lang.model.element.Element;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * An inline Taglet used to index word or a phrase.
+ * The enclosed text is interpreted as not containing HTML markup or
+ * nested javadoc tags.
+ *
+ * @author Bhavesh Patel
+ */
+
+public class IndexTaglet extends BaseInlineTaglet {
+
+    private static final String NAME = "index";
+
+    public String getName() {
+        return NAME;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) {
+        return writer.indexTagOutput(element, tag);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritDocTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * An inline Taglet representing the <b>inheritDoc</b> tag. This tag should only
+ * be used with a method.  It is used to inherit documentation from overriden
+ * and implemented methods.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public class InheritDocTaglet extends BaseInlineTaglet {
+
+    /**
+     * The inline tag that would appear in the documentation if
+     * the writer wanted documentation to be inherited.
+     */
+    public static final String INHERIT_DOC_INLINE_TAG = "{@inheritDoc}";
+
+    /**
+     * Construct a new InheritDocTaglet.
+     */
+    public InheritDocTaglet () {
+        name = INHERIT_DOC.tagName;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * not appear in Fields.
+     * @return false
+     */
+    public boolean inField() {
+        return false;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * not appear in Constructors.
+     * @return false
+     */
+    public boolean inConstructor() {
+        return false;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * not appear in Overview.
+     * @return false
+     */
+    public boolean inOverview() {
+        return false;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * not appear in Packages.
+     * @return false
+     */
+    public boolean inPackage() {
+        return false;
+    }
+
+    /**
+     * Will return true because this inline tag may
+     * appear in Type (Class).
+     * @return true
+     */
+    public boolean inType() {
+        return true;
+    }
+
+    /**
+     * Given a <code>MethodDoc</code> item, a <code>Tag</code> in the
+     * <code>MethodDoc</code> item and a String, replace all occurrences
+     * of @inheritDoc with documentation from it's superclass or superinterface.
+     *
+     * @param writer the writer that is writing the output.
+     * @param e the {@link Element} that we are documenting.
+     * @param holderTag the tag that holds the inheritDoc tag or null for type
+     * (class) docs.
+     * @param isFirstSentence true if we only want to inherit the first sentence.
+     */
+    private Content retrieveInheritedDocumentation(TagletWriter writer,
+            Element e, DocTree holderTag, boolean isFirstSentence) {
+        Content replacement = writer.getOutputInstance();
+        Configuration configuration = writer.configuration();
+        Utils utils = configuration.utils;
+        CommentHelper ch = utils.getCommentHelper(e);
+        Taglet inheritableTaglet = holderTag == null
+                ? null
+                : configuration.tagletManager.getTaglet(ch.getTagName(holderTag));
+        if (inheritableTaglet != null &&
+            !(inheritableTaglet instanceof InheritableTaglet)) {
+                String message = utils.getSimpleName(e) +
+                    ((utils.isExecutableElement(e))
+                        ? utils.flatSignature((ExecutableElement)e)
+                        : "");
+                //This tag does not support inheritence.
+                configuration.message.warning(e, "doclet.noInheritedDoc", message);
+        }
+        Input input = new DocFinder.Input(utils, e,
+                (InheritableTaglet) inheritableTaglet, new DocFinder.DocTreeInfo(holderTag, e),
+                isFirstSentence, true);
+        DocFinder.Output inheritedDoc = DocFinder.search(configuration, input);
+        if (inheritedDoc.isValidInheritDocTag) {
+            if (!inheritedDoc.inlineTags.isEmpty()) {
+                replacement = writer.commentTagsToOutput(inheritedDoc.holderTag,
+                    inheritedDoc.holder, inheritedDoc.inlineTags, isFirstSentence);
+                ch.setOverrideElement(inheritedDoc.holder);
+            }
+
+        } else {
+            String message = utils.getSimpleName(e) +
+                    ((utils.isExecutableElement(e))
+                        ? utils.flatSignature((ExecutableElement)e)
+                        : "");
+            configuration.message.warning(e, "doclet.noInheritedDoc", message);
+        }
+        return replacement;
+    }
+
+    /**
+     * Given the <code>Tag</code> representation of this custom
+     * tag, return its string representation, which is output
+     * to the generated page.
+     *
+     * @param e the element holding the tag
+     * @param tag the <code>Tag</code> representation of this custom tag.
+     * @param tagletWriter the taglet writer for output.
+     * @return the Content representation of this <code>Tag</code>.
+     */
+    public Content getTagletOutput(Element e, DocTree tag, TagletWriter tagletWriter) {
+        DocTree  inheritTag = tag.getKind() == INHERIT_DOC ? null : tag;
+        return retrieveInheritedDocumentation(tagletWriter, e,
+                inheritTag, tagletWriter.isFirstSentence);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/InheritableTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+
+/**
+ * A taglet should implement this interface if it supports the inheritDoc
+ * tag or is automatically inherited if it is missing.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public interface InheritableTaglet extends Taglet {
+
+    /**
+     * Given an {@link com.sun.tools.doclets.internal.toolkit.util.DocFinder.Output}
+     * object, set its values with the appropriate information to inherit
+     * documentation.
+     *
+     * @param input  the input for documentation search.
+     * @param output the output for documentation search.
+     */
+    void inherit(DocFinder.Input input, DocFinder.Output output);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/LiteralTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+/**
+ * An inline Taglet used to denote literal text.
+ * For example, the text:
+ * <blockquote>  {@code {@literal a<B>c}}  </blockquote>
+ * displays as:
+ * <blockquote>  {@literal a<B>c}  </blockquote>
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Scott Seligman
+ */
+
+public class LiteralTaglet extends BaseInlineTaglet {
+
+    private static final String NAME = LITERAL.tagName;
+
+    public String getName() {
+        return NAME;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element e, DocTree tag, TagletWriter writer) {
+        return writer.literalTagOutput(e, tag);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ParamTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,339 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.ParamTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * A taglet that represents the @param tag.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
+
+    /**
+     * Construct a ParamTaglet.
+     */
+    public ParamTaglet() {
+        name = PARAM.tagName;
+    }
+
+    /**
+     * Given an array of <code>Parameter</code>s, return
+     * a name/rank number map.  If the array is null, then
+     * null is returned.
+     * @param params The array of parameters (from type or executable member) to
+     *               check.
+     * @return a name-rank number map.
+     */
+    private static Map<String, String> getRankMap(Utils utils, List<? extends Element> params){
+        if (params == null) {
+            return null;
+        }
+        HashMap<String, String> result = new HashMap<>();
+        int rank = 0;
+        for (Element e : params) {
+            String name = utils.isTypeParameterElement(e)
+                    ? utils.getTypeName(e.asType(), false)
+                    : utils.getSimpleName(e);
+            result.put(name, String.valueOf(rank));
+            rank++;
+        }
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void inherit(DocFinder.Input input, DocFinder.Output output) {
+        Utils utils = input.utils;
+        if (input.tagId == null) {
+            input.isTypeVariableParamTag = ((ParamTree)input.docTreeInfo.docTree).isTypeParameter();
+            ExecutableElement ee = (ExecutableElement)input.docTreeInfo.element;
+            CommentHelper ch = utils.getCommentHelper(ee);
+            List<? extends Element> parameters = input.isTypeVariableParamTag
+                    ? ee.getTypeParameters()
+                    : ee.getParameters();
+            String target = ch.getParameterName(input.docTreeInfo.docTree);
+            for (int i = 0 ; i < parameters.size(); i++) {
+                Element e = parameters.get(i);
+                String pname = input.isTypeVariableParamTag
+                        ? utils.getTypeName(e.asType(), false)
+                        : utils.getSimpleName(e);
+                if (pname.equals(target)) {
+                    input.tagId = String.valueOf(i);
+                    break;
+                }
+            }
+        }
+        ExecutableElement md = (ExecutableElement)input.element;
+        CommentHelper ch = utils.getCommentHelper(md);
+        List<? extends DocTree> tags = input.isTypeVariableParamTag
+                ? utils.getTypeParamTrees(md)
+                : utils.getParamTrees(md);
+        List<? extends Element> parameters = input.isTypeVariableParamTag
+                ? md.getTypeParameters()
+                : md.getParameters();
+        Map<String, String> rankMap = getRankMap(utils, parameters);
+        for (DocTree tag : tags) {
+            String paramName = ch.getParameterName(tag);
+            if (rankMap.containsKey(paramName) && rankMap.get(paramName).equals((input.tagId))) {
+                output.holder = input.element;
+                output.holderTag = tag;
+                output.inlineTags = ch.getBody(utils.configuration, tag);
+                return;
+            }
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inField() {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inMethod() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inOverview() {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inPackage() {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inType() {
+        return true;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isInlineTag() {
+        return false;
+    }
+
+    /**
+     * Given an array of <code>ParamTag</code>s,return its string representation.
+     * @param holder the member that holds the param tags.
+     * @param writer the TagletWriter that will write this tag.
+     * @return the TagletOutput representation of these <code>ParamTag</code>s.
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        if (utils.isExecutableElement(holder)) {
+            ExecutableElement member = (ExecutableElement) holder;
+            Content output = getTagletOutput(false, member, writer,
+                member.getTypeParameters(), utils.getTypeParamTrees(member));
+            output.addContent(getTagletOutput(true, member, writer,
+                member.getParameters(), utils.getParamTrees(member)));
+            return output;
+        } else {
+            TypeElement typeElement = (TypeElement) holder;
+            return getTagletOutput(false, typeElement, writer,
+                typeElement.getTypeParameters(), utils.getTypeParamTrees(typeElement));
+        }
+    }
+
+    /**
+     * Given an array of <code>ParamTag</code>s,return its string representation.
+     * Try to inherit the param tags that are missing.
+     *
+     * @param holder            the element that holds the param tags.
+     * @param writer            the TagletWriter that will write this tag.
+     * @param formalParameters  The array of parmeters (from type or executable
+     *                          member) to check.
+     *
+     * @return the TagletOutput representation of these <code>ParamTag</code>s.
+     */
+    private Content getTagletOutput(boolean isParameters, Element holder,
+            TagletWriter writer, List<? extends Element> formalParameters, List<? extends DocTree> paramTags) {
+        Content result = writer.getOutputInstance();
+        Set<String> alreadyDocumented = new HashSet<>();
+        if (!paramTags.isEmpty()) {
+            result.addContent(
+                processParamTags(holder, isParameters, paramTags,
+                getRankMap(writer.configuration().utils, formalParameters), writer, alreadyDocumented)
+            );
+        }
+        if (alreadyDocumented.size() != formalParameters.size()) {
+            //Some parameters are missing corresponding @param tags.
+            //Try to inherit them.
+            result.addContent(getInheritedTagletOutput(isParameters, holder,
+                writer, formalParameters, alreadyDocumented));
+        }
+        return result;
+    }
+
+    /**
+     * Loop through each individual parameter, despite not having a
+     * corresponding param tag, try to inherit it.
+     */
+    private Content getInheritedTagletOutput(boolean isParameters, Element holder,
+            TagletWriter writer, List<? extends Element> formalParameters,
+            Set<String> alreadyDocumented) {
+        Utils utils = writer.configuration().utils;
+        Content result = writer.getOutputInstance();
+        if ((!alreadyDocumented.contains(null)) && utils.isExecutableElement(holder)) {
+            for (int i = 0; i < formalParameters.size(); i++) {
+                if (alreadyDocumented.contains(String.valueOf(i))) {
+                    continue;
+                }
+                // This parameter does not have any @param documentation.
+                // Try to inherit it.
+                Input input = new DocFinder.Input(writer.configuration().utils, holder, this,
+                        Integer.toString(i), !isParameters);
+                DocFinder.Output inheritedDoc = DocFinder.search(writer.configuration(), input);
+                if (inheritedDoc.inlineTags != null && !inheritedDoc.inlineTags.isEmpty()) {
+                    Element e = formalParameters.get(i);
+                    String lname = isParameters
+                            ? utils.getSimpleName(e)
+                            : utils.getTypeName(e.asType(), false);
+                    CommentHelper ch = utils.getCommentHelper(holder);
+                    ch.setOverrideElement(inheritedDoc.holder);
+                    Content content = processParamTag(holder, isParameters, writer,
+                            inheritedDoc.holderTag,
+                            lname,
+                            alreadyDocumented.isEmpty());
+                    result.addContent(content);
+                }
+                alreadyDocumented.add(String.valueOf(i));
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Given an array of <code>Tag</code>s representing this custom
+     * tag, return its string representation.  Print a warning for param
+     * tags that do not map to parameters.  Print a warning for param
+     * tags that are duplicated.
+     *
+     * @param paramTags the array of <code>ParamTag</code>s to convert.
+     * @param writer the TagletWriter that will write this tag.
+     * @param alreadyDocumented the set of exceptions that have already
+     *        been documented.
+     * @param rankMap a {@link java.util.Map} which holds ordering
+     *                    information about the parameters.
+     * @param rankMap a {@link java.util.Map} which holds a mapping
+                of a rank of a parameter to its name.  This is
+                used to ensure that the right name is used
+                when parameter documentation is inherited.
+     * @return the Content representation of this <code>Tag</code>.
+     */
+    private Content processParamTags(Element e, boolean isParams,
+            List<? extends DocTree> paramTags, Map<String, String> rankMap, TagletWriter writer,
+            Set<String> alreadyDocumented) {
+        Content result = writer.getOutputInstance();
+        if (!paramTags.isEmpty()) {
+            CommentHelper ch = writer.configuration().utils.getCommentHelper(e);
+            for (DocTree dt : paramTags) {
+                String paramName = isParams
+                        ? ch.getParameterName(dt)
+                        : "<" + ch.getParameterName(dt) + ">";
+                if (!rankMap.containsKey(ch.getParameterName(dt))) {
+                    writer.getMsgRetriever().warning(ch.getDocTreePath(dt),
+                                                     isParams ?
+                                                     "doclet.Parameters_warn" :
+                                                     "doclet.Type_Parameters_warn",
+                                                     paramName);
+                }
+                String rank = rankMap.get(ch.getParameterName(dt));
+                if (rank != null && alreadyDocumented.contains(rank)) {
+                    writer.getMsgRetriever().warning(ch.getDocTreePath(dt),
+                                                     isParams ?
+                                                     "doclet.Parameters_dup_warn" :
+                                                     "doclet.Type_Parameters_dup_warn",
+                                                     paramName);
+                }
+                result.addContent(processParamTag(e, isParams, writer, dt,
+                                                  ch.getParameterName(dt), alreadyDocumented.isEmpty()));
+                alreadyDocumented.add(rank);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Convert the individual ParamTag into Content.
+     *
+     * @param isNonTypeParams true if this is just a regular param tag.  False
+     *                        if this is a type param tag.
+     * @param writer          the taglet writer for output writing.
+     * @param paramTag        the tag whose inline tags will be printed.
+     * @param name            the name of the parameter.  We can't rely on
+     *                        the name in the param tag because we might be
+     *                        inheriting documentation.
+     * @param isFirstParam    true if this is the first param tag being printed.
+     *
+     */
+    private Content processParamTag(Element e, boolean isParams,
+            TagletWriter writer, DocTree paramTag, String name,
+            boolean isFirstParam) {
+        Content result = writer.getOutputInstance();
+        String header = writer.configuration().getText(
+            isParams ? "doclet.Parameters" : "doclet.TypeParameters");
+        if (isFirstParam) {
+            result.addContent(writer.getParamHeader(header));
+        }
+        result.addContent(writer.paramTagOutput(e, paramTag, name));
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/PropertyGetterTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.List;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * A taglet that adds the initial line of documentation to the JavaFX
+ * property getters.
+ *
+ *  <p><b>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.</b>
+ */
+public class PropertyGetterTaglet extends BasePropertyTaglet {
+
+    /**
+     * Construct a new PropertyGetterTaglet.
+     */
+    public PropertyGetterTaglet () {
+        name = "propertyGetter";
+    }
+
+    @Override
+    String getText(TagletWriter tagletWriter) {
+        return tagletWriter.configuration().getText("doclet.PropertyGetter");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/PropertySetterTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,50 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+/**
+ * A taglet that adds the initial line of documentation to the JavaFX
+ * property setters.
+ *
+ *  <p><b>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.</b>
+ */
+public class PropertySetterTaglet extends BasePropertyTaglet {
+
+    /**
+     * Construct a new PropertyGetterTaglet.
+     */
+    public PropertySetterTaglet () {
+        name = "propertySetter";
+    }
+
+    @Override
+    String getText(TagletWriter tagletWriter) {
+        return tagletWriter.configuration().getText("doclet.PropertySetter");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ReturnTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * A taglet that represents the @return tag.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class ReturnTaglet extends BaseExecutableMemberTaglet implements InheritableTaglet {
+
+    public ReturnTaglet() {
+        name = RETURN.tagName;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void inherit(DocFinder.Input input, DocFinder.Output output) {
+        List<? extends DocTree> tags = input.utils.getBlockTags(input.element, DocTree.Kind.RETURN);
+        CommentHelper ch = input.utils.getCommentHelper(input.element);
+        if (!tags.isEmpty()) {
+            output.holder = input.element;
+            output.holderTag = tags.get(0);
+            output.inlineTags = input.isFirstSentence
+                    ? ch.getFirstSentenceTrees(input.utils.configuration, output.holderTag)
+                    : ch.getDescription(input.utils.configuration, output.holderTag);
+        }
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in constructor documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in constructor documentation and false
+     * otherwise.
+     */
+    public boolean inConstructor() {
+        return false;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        TypeMirror returnType = utils.getReturnType((ExecutableElement)holder);
+        List<? extends DocTree> tags = utils.getBlockTags(holder, name);
+
+        //Make sure we are not using @return tag on method with void return type.
+        if (returnType != null && utils.isVoid(returnType)) {
+            if (!tags.isEmpty()) {
+                writer.getMsgRetriever().warning(holder, "doclet.Return_tag_on_void_method");
+            }
+            return null;
+        }
+        if (!tags.isEmpty())
+            return writer.returnTagOutput(holder, tags.get(0));
+        //Inherit @return tag if necessary.
+        List<DocTree> ntags = new ArrayList<>();
+        Input input = new DocFinder.Input(utils, holder, this);
+        DocFinder.Output inheritedDoc = DocFinder.search(writer.configuration(), input);
+        if (inheritedDoc.holderTag != null) {
+            CommentHelper ch = utils.getCommentHelper(input.element);
+            ch.setOverrideElement(inheritedDoc.holder);
+            ntags.add(inheritedDoc.holderTag);
+        }
+        return !ntags.isEmpty() ? writer.returnTagOutput(holder, ntags.get(0)) : null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SeeTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.List;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * A taglet that represents the @see tag.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class SeeTaglet extends BaseTaglet implements InheritableTaglet {
+
+    public SeeTaglet() {
+        name = SEE.tagName;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public void inherit(DocFinder.Input input, DocFinder.Output output) {
+        List<? extends DocTree> tags = input.utils.getSeeTrees(input.element);
+        if (!tags.isEmpty()) {
+            CommentHelper ch =  input.utils.getCommentHelper(input.element);
+            output.holder = input.element;
+            output.holderTag = tags.get(0);
+            output.inlineTags = input.isFirstSentence
+                    ? ch.getFirstSentenceTrees(input.utils.configuration, output.holderTag)
+                    : ch.getReference(output.holderTag);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        List<? extends DocTree> tags = utils.getSeeTrees(holder);
+        Element e = holder;
+        if (tags.isEmpty() && utils.isExecutableElement(holder)) {
+            Input input = new DocFinder.Input(utils, holder, this);
+            DocFinder.Output inheritedDoc = DocFinder.search(writer.configuration(), input);
+            if (inheritedDoc.holder != null) {
+                tags = utils.getSeeTrees(inheritedDoc.holder);
+                e = inheritedDoc.holder;
+            }
+        }
+        return writer.seeTagOutput(e, tags);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/SimpleTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,243 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.List;
+import java.util.Locale;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * A simple single argument custom tag.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public class SimpleTaglet extends BaseTaglet implements InheritableTaglet {
+
+    /**
+     * The marker in the location string for excluded tags.
+     */
+    public static final String EXCLUDED = "x";
+
+    /**
+     * The marker in the location string for packages.
+     */
+    public static final String PACKAGE = "p";
+
+    /**
+     * The marker in the location string for types.
+     */
+    public static final String TYPE = "t";
+
+    /**
+     * The marker in the location string for constructors.
+     */
+    public static final String CONSTRUCTOR = "c";
+
+    /**
+     * The marker in the location string for fields.
+     */
+    public static final String FIELD = "f";
+
+    /**
+     * The marker in the location string for methods.
+     */
+    public static final String METHOD = "m";
+
+    /**
+     * The marker in the location string for overview.
+     */
+    public static final String OVERVIEW = "o";
+
+    /**
+     * Use in location string when the tag is to
+     * appear in all locations.
+     */
+    public static final String ALL = "a";
+
+    /**
+     * The name of this tag.
+     */
+    protected String tagName;
+
+    /**
+     * The header to output.
+     */
+    protected String header;
+
+    /**
+     * The possible locations that this tag can appear in.
+     */
+    protected String locations;
+
+    /**
+     * Construct a <code>SimpleTaglet</code>.
+     * @param tagName the name of this tag
+     * @param header the header to output.
+     * @param locations the possible locations that this tag
+     * can appear in.  The <code>String</code> can contain 'p'
+     * for package, 't' for type, 'm' for method, 'c' for constructor
+     * and 'f' for field.
+     */
+    public SimpleTaglet(String tagName, String header, String locations) {
+        this.tagName = tagName;
+        this.header = header;
+        locations = Utils.toLowerCase(locations);
+        if (locations.contains(ALL) && !locations.contains(EXCLUDED)) {
+            this.locations = PACKAGE + TYPE + FIELD + METHOD + CONSTRUCTOR + OVERVIEW;
+        } else {
+            this.locations = locations;
+        }
+    }
+
+    /**
+     * Return the name of this <code>Taglet</code>.
+     */
+    public String getName() {
+        return tagName;
+    }
+
+    /**
+     * Return true if this <code>SimpleTaglet</code>
+     * is used in constructor documentation.
+     * @return true if this <code>SimpleTaglet</code>
+     * is used in constructor documentation and false
+     * otherwise.
+     */
+    public boolean inConstructor() {
+        return locations.contains(CONSTRUCTOR) && !locations.contains(EXCLUDED);
+    }
+
+    /**
+     * Return true if this <code>SimpleTaglet</code>
+     * is used in field documentation.
+     * @return true if this <code>SimpleTaglet</code>
+     * is used in field documentation and false
+     * otherwise.
+     */
+    public boolean inField() {
+        return locations.contains(FIELD) && !locations.contains(EXCLUDED);
+    }
+
+    /**
+     * Return true if this <code>SimpleTaglet</code>
+     * is used in method documentation.
+     * @return true if this <code>SimpleTaglet</code>
+     * is used in method documentation and false
+     * otherwise.
+     */
+    public boolean inMethod() {
+        return locations.contains(METHOD) && !locations.contains(EXCLUDED);
+    }
+
+    /**
+     * Return true if this <code>SimpleTaglet</code>
+     * is used in overview documentation.
+     * @return true if this <code>SimpleTaglet</code>
+     * is used in overview documentation and false
+     * otherwise.
+     */
+    public boolean inOverview() {
+        return locations.contains(OVERVIEW) && !locations.contains(EXCLUDED);
+    }
+
+    /**
+     * Return true if this <code>SimpleTaglet</code>
+     * is used in package documentation.
+     * @return true if this <code>SimpleTaglet</code>
+     * is used in package documentation and false
+     * otherwise.
+     */
+    public boolean inPackage() {
+        return locations.contains(PACKAGE) && !locations.contains(EXCLUDED);
+    }
+
+    /**
+     * Return true if this <code>SimpleTaglet</code>
+     * is used in type documentation (classes or interfaces).
+     * @return true if this <code>SimpleTaglet</code>
+     * is used in type documentation and false
+     * otherwise.
+     */
+    public boolean inType() {
+        return locations.contains(TYPE) && !locations.contains(EXCLUDED);
+    }
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is an inline tag.
+     * @return true if this <code>Taglet</code>
+     * is an inline tag and false otherwise.
+     */
+    public boolean isInlineTag() {
+        return false;
+    }
+
+    @Override
+    public void inherit(DocFinder.Input input, DocFinder.Output output) {
+        List<? extends DocTree> tags = input.utils.getBlockTags(input.element, tagName);
+        if (!tags.isEmpty()) {
+            output.holder = input.element;
+            output.holderTag = tags.get(0);
+            CommentHelper ch = input.utils.getCommentHelper(output.holder);
+            output.inlineTags = input.isFirstSentence
+                    ? ch.getFirstSentenceTrees(input.utils.configuration, output.holderTag)
+                    : ch.getTags(input.utils.configuration, output.holderTag);
+        }
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer) {
+        return header == null || tag == null ? null : writer.simpleTagOutput(element, tag, header);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        List<? extends DocTree> tags = utils.getBlockTags(holder, getName());
+        if (header == null || tags.isEmpty()) {
+            return null;
+        }
+        return writer.simpleTagOutput(holder, tags, header);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/Taglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * This is the Taglet interface used internally within the doclet.
+ *
+ * @author Jamie Ho
+ */
+
+public interface Taglet {
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in field documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in field documentation and false
+     * otherwise.
+     */
+    public abstract boolean inField();
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in constructor documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in constructor documentation and false
+     * otherwise.
+     */
+    public abstract boolean inConstructor();
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in method documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in method documentation and false
+     * otherwise.
+     */
+    public abstract boolean inMethod();
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in overview documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in method documentation and false
+     * otherwise.
+     */
+    public abstract boolean inOverview();
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in package documentation.
+     * @return true if this <code>Taglet</code>
+     * is used in package documentation and false
+     * otherwise.
+     */
+    public abstract boolean inPackage();
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is used in type documentation (classes or
+     * interfaces).
+     * @return true if this <code>Taglet</code>
+     * is used in type documentation and false
+     * otherwise.
+     */
+    public abstract boolean inType();
+
+    /**
+     * Return true if this <code>Taglet</code>
+     * is an inline tag. Return false otherwise.
+     * @return true if this <code>Taglet</code>
+     * 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 <code>Tag</code> representation of this custom
+     * tag, return its Content representation, which is output
+     * to the generated page.
+     * @param holder the element holding the tag
+     * @param tag the <code>Tag</code> representation of this custom tag.
+     * @param writer a {@link TagletWriter} Taglet writer.
+     * @throws UnsupportedOperationException thrown when the method is not supported by the taglet.
+     * @return the Content representation of this <code>Tag</code>.
+     */
+    public abstract Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) throws
+            UnsupportedOperationException;
+
+    /**
+     * Given a <code>Doc</code> object, check if it holds any tags of
+     * this type.  If it does, return the string representing the output.
+     * If it does not, return null.
+     * @param holder a {@link Doc} object holding the custom tag.
+     * @param writer a {@link TagletWriter} Taglet writer.
+     * @throws UnsupportedTagletOperationException thrown when the method is not
+     *         supported by the taglet.
+     * @return the TagletOutput representation of this <code>Tag</code>.
+     */
+    public abstract Content getTagletOutput(Element holder, TagletWriter writer) throws
+            UnsupportedTagletOperationException;
+
+    @Override
+    public abstract String toString();
+
+    static class UnsupportedTagletOperationException extends UnsupportedOperationException {
+        private static final long serialVersionUID = -3530273193380250271L;
+        public UnsupportedTagletOperationException(String message) {
+            super(message);
+        }
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletManager.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,774 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.SimpleElementVisitor9;
+import javax.tools.JavaFileManager;
+import javax.tools.StandardJavaFileManager;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.MessageRetriever;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static javax.tools.DocumentationTool.Location.*;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * Manages the {@code Taglet}s used by doclets.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public class TagletManager {
+
+    /**
+     * The default separator for the simple tag option.
+     */
+    public static final char SIMPLE_TAGLET_OPT_SEPARATOR = ':';
+
+    /**
+     * The alternate separator for simple tag options.  Use this
+     * when you want the default separator to be in the name of the
+     * custom tag.
+     */
+    public static final String ALT_SIMPLE_TAGLET_OPT_SEPARATOR = "-";
+
+    /**
+     * The map of custom tags.
+     */
+    private final LinkedHashMap<String,Taglet> customTags;
+
+    /**
+     * The array of custom tags that can appear in packages.
+     */
+    private List<Taglet> packageTags;
+
+    /**
+     * The array of custom tags that can appear in classes or interfaces.
+     */
+    private List<Taglet> typeTags;
+
+    /**
+     * The array of custom tags that can appear in fields.
+     */
+    private List<Taglet> fieldTags;
+
+    /**
+     * The array of custom tags that can appear in constructors.
+     */
+    private List<Taglet> constructorTags;
+
+    /**
+     * The array of custom tags that can appear in methods.
+     */
+    private List<Taglet> methodTags;
+
+    /**
+     * The array of custom tags that can appear in the overview.
+     */
+    private List<Taglet> overviewTags;
+
+    /**
+     * The array of custom tags that can appear in comments.
+     */
+    private List<Taglet> inlineTags;
+
+    /**
+     * The array of custom tags that can appear in the serialized form.
+     */
+    private List<Taglet> serializedFormTags;
+
+    /**
+     * The message retriever that will be used to print error messages.
+     */
+    private final MessageRetriever message;
+
+    /**
+     * Keep track of standard tags.
+     */
+    private final Set<String> standardTags;
+
+    /**
+     * Keep track of standard tags in lowercase to compare for better
+     * error messages when a tag like @docRoot is mistakenly spelled
+     * lowercase @docroot.
+     */
+    private final Set<String> standardTagsLowercase;
+
+    /**
+     * Keep track of overriden standard tags.
+     */
+    private final Set<String> overridenStandardTags;
+
+    /**
+     * Keep track of the tags that may conflict
+     * with standard tags in the future (any custom tag without
+     * a period in its name).
+     */
+    private final Set<String> potentiallyConflictingTags;
+
+    /**
+     * The set of unseen custom tags.
+     */
+    private final Set<String> unseenCustomTags;
+
+    /**
+     * True if we do not want to use @since tags.
+     */
+    private final boolean nosince;
+
+    /**
+     * True if we want to use @version tags.
+     */
+    private final boolean showversion;
+
+    /**
+     * True if we want to use @author tags.
+     */
+    private final boolean showauthor;
+
+    /**
+     * True if we want to use JavaFX-related tags (@propertyGetter,
+     * @propertySetter, @propertyDescription, @defaultValue, @treatAsPrivate).
+     */
+    private final boolean javafx;
+
+    /**
+     * Construct a new <code>TagletManager</code>.
+     * @param nosince true if we do not want to use @since tags.
+     * @param showversion true if we want to use @version tags.
+     * @param showauthor true if we want to use @author tags.
+     * @param javafx indicates whether javafx is active.
+     * @param message the message retriever to print warnings.
+     */
+    public TagletManager(boolean nosince, boolean showversion,
+                         boolean showauthor, boolean javafx,
+                         MessageRetriever message) {
+        overridenStandardTags = new HashSet<>();
+        potentiallyConflictingTags = new HashSet<>();
+        standardTags = new HashSet<>();
+        standardTagsLowercase = new HashSet<>();
+        unseenCustomTags = new HashSet<>();
+        customTags = new LinkedHashMap<>();
+        this.nosince = nosince;
+        this.showversion = showversion;
+        this.showauthor = showauthor;
+        this.javafx = javafx;
+        this.message = message;
+        initStandardTaglets();
+        initStandardTagsLowercase();
+    }
+
+    /**
+     * Add a new <code>CustomTag</code>.  This is used to add a Taglet from within
+     * a Doclet.  No message is printed to indicate that the Taglet is properly
+     * registered because these Taglets are typically added for every execution of the
+     * Doclet.  We don't want to see this type of error message every time.
+     * @param customTag the new <code>CustomTag</code> to add.
+     */
+    public void addCustomTag(Taglet customTag) {
+        if (customTag != null) {
+            String name = customTag.getName();
+            if (customTags.containsKey(name)) {
+                customTags.remove(name);
+            }
+            customTags.put(name, customTag);
+            checkTagName(name);
+        }
+    }
+
+    public Set<String> getCustomTagNames() {
+        return customTags.keySet();
+    }
+
+    /**
+     * Add a new <code>Taglet</code>.  Print a message to indicate whether or not
+     * the Taglet was registered properly.
+     * @param classname  the name of the class representing the custom tag.
+     * @param fileManager the filemanager to load classes and resources.
+     * @param tagletPath  the path to the class representing the custom tag.
+     */
+    public void addCustomTag(String classname, JavaFileManager fileManager, String tagletPath) {
+        try {
+            ClassLoader tagClassLoader;
+            if (!fileManager.hasLocation(TAGLET_PATH)) {
+                List<File> paths = new ArrayList<>();
+                if (tagletPath != null) {
+                    for (String pathname : tagletPath.split(File.pathSeparator)) {
+                        paths.add(new File(pathname));
+                    }
+                }
+                if (fileManager instanceof StandardJavaFileManager) {
+                    ((StandardJavaFileManager) fileManager).setLocation(TAGLET_PATH, paths);
+                }
+            }
+            tagClassLoader = fileManager.getClassLoader(TAGLET_PATH);
+            Class<?> customTagClass = tagClassLoader.loadClass(classname);
+            Object instance = customTagClass.newInstance();
+            Taglet newLegacy = new UserTaglet((jdk.javadoc.doclet.taglet.Taglet)instance);
+            String tname = newLegacy.getName();
+            Taglet t = customTags.get(tname);
+            if (t != null) {
+                customTags.remove(tname);
+            }
+            customTags.put(tname, newLegacy);
+            message.notice("doclet.Notice_taglet_registered", classname);
+        } catch (Exception exc) {
+            message.error("doclet.Error_taglet_not_registered", exc.getClass().getName(), classname);
+        }
+    }
+
+    /**
+     * Add a new <code>SimpleTaglet</code>.  If this tag already exists
+     * and the header passed as an argument is null, move tag to the back of the
+     * list. If this tag already exists and the header passed as an argument is
+     * not null, overwrite previous tag with new one.  Otherwise, add new
+     * SimpleTaglet to list.
+     * @param tagName the name of this tag
+     * @param header the header to output.
+     * @param locations the possible locations that this tag
+     * can appear in.
+     */
+    public void addNewSimpleCustomTag(String tagName, String header, String locations) {
+        if (tagName == null || locations == null) {
+            return;
+        }
+        Taglet tag = customTags.get(tagName);
+        locations = Utils.toLowerCase(locations);
+        if (tag == null || header != null) {
+            customTags.remove(tagName);
+            customTags.put(tagName, new SimpleTaglet(tagName, header, locations));
+            if (locations != null && locations.indexOf('x') == -1) {
+                checkTagName(tagName);
+            }
+        } else {
+            //Move to back
+            customTags.remove(tagName);
+            customTags.put(tagName, tag);
+        }
+    }
+
+    /**
+     * Given a tag name, add it to the set of tags it belongs to.
+     */
+    private void checkTagName(String name) {
+        if (standardTags.contains(name)) {
+            overridenStandardTags.add(name);
+        } else {
+            if (name.indexOf('.') == -1) {
+                potentiallyConflictingTags.add(name);
+            }
+            unseenCustomTags.add(name);
+        }
+    }
+
+    /**
+     * Check the taglet to see if it is a legacy taglet.  Also
+     * check its name for errors.
+     */
+    private void checkTaglet(Object taglet) {
+        if (taglet instanceof Taglet) {
+            checkTagName(((Taglet) taglet).getName());
+        } else if (taglet instanceof jdk.javadoc.doclet.taglet.Taglet) {
+            jdk.javadoc.doclet.taglet.Taglet legacyTaglet = (jdk.javadoc.doclet.taglet.Taglet) taglet;
+            customTags.remove(legacyTaglet.getName());
+            customTags.put(legacyTaglet.getName(), new UserTaglet(legacyTaglet));
+            checkTagName(legacyTaglet.getName());
+        } else {
+            throw new IllegalArgumentException("Given object is not a taglet.");
+        }
+    }
+
+    /**
+     * Given a name of a seen custom tag, remove it from the set of unseen
+     * custom tags.
+     * @param name the name of the seen custom tag.
+     */
+    public void seenCustomTag(String name) {
+        unseenCustomTags.remove(name);
+    }
+
+    /**
+     * Given an array of <code>Tag</code>s, check for spelling mistakes.
+     * @param utils the utility class to use
+     * @param element the tags holder
+     * @param trees the trees containing the comments
+     * @param areInlineTags true if the array of tags are inline and false otherwise.
+     */
+    public void checkTags(final Utils utils, Element element,
+                          Iterable<? extends DocTree> trees, boolean areInlineTags) {
+        if (trees == null) {
+            return;
+        }
+        CommentHelper ch = utils.getCommentHelper(element);
+        for (DocTree tag : trees) {
+            String name = tag.getKind().tagName;
+            if (name == null) {
+                continue;
+            }
+            if (name.length() > 0 && name.charAt(0) == '@') {
+                name = name.substring(1, name.length());
+            }
+            if (! (standardTags.contains(name) || customTags.containsKey(name))) {
+                if (standardTagsLowercase.contains(Utils.toLowerCase(name))) {
+                    message.warning(ch.getDocTreePath(tag), "doclet.UnknownTagLowercase", ch.getTagName(tag));
+                    continue;
+                } else {
+                    message.warning(ch.getDocTreePath(tag), "doclet.UnknownTag", ch.getTagName(tag));
+                    continue;
+                }
+            }
+            final Taglet taglet = customTags.get(name);
+            // Check and verify tag usage
+            if (taglet != null) {
+                if (areInlineTags && !taglet.isInlineTag()) {
+                    printTagMisuseWarn(ch, taglet, tag, "inline");
+                }
+                // nothing more to do
+                if (element == null) {
+                    return;
+                }
+                new SimpleElementVisitor9<Void, Void>() {
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitPackage(PackageElement e, Void p) {
+                        if (!taglet.inPackage()) {
+                            printTagMisuseWarn(utils.getCommentHelper(e), taglet, tag, "package");
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitType(TypeElement e, Void p) {
+                        if (!taglet.inType()) {
+                            printTagMisuseWarn(utils.getCommentHelper(e), taglet, tag, "class");
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitExecutable(ExecutableElement e, Void p) {
+                        if (utils.isConstructor(e) && !taglet.inConstructor()) {
+                            printTagMisuseWarn(utils.getCommentHelper(e), taglet, tag, "constructor");
+                        } else if (!taglet.inMethod()) {
+                            printTagMisuseWarn(utils.getCommentHelper(e), taglet, tag, "method");
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitVariable(VariableElement e, Void p) {
+                        if (utils.isField(e) && !taglet.inField()) {
+                            printTagMisuseWarn(utils.getCommentHelper(e), taglet, tag, "field");
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitUnknown(Element e, Void p) {
+                        if (utils.isOverviewElement(e) && !taglet.inOverview()) {
+                            printTagMisuseWarn(utils.getCommentHelper(e), taglet, tag, "overview");
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    protected Void defaultAction(Element e, Void p) {
+                        return null;
+                    }
+                }.visit(element);
+            }
+        }
+    }
+
+    /**
+     * Given the taglet, the tag and the type of documentation that the tag
+     * was found in, print a tag misuse warning.
+     * @param taglet the taglet representing the misused tag.
+     * @param tag the misused tag.
+     * @param holderType the type of documentation that the misused tag was found in.
+     */
+    private void printTagMisuseWarn(CommentHelper ch, Taglet taglet, DocTree tag, String holderType) {
+        Set<String> locationsSet = new LinkedHashSet<>();
+        if (taglet.inOverview()) {
+            locationsSet.add("overview");
+        }
+        if (taglet.inPackage()) {
+            locationsSet.add("package");
+        }
+        if (taglet.inType()) {
+            locationsSet.add("class/interface");
+        }
+        if (taglet.inConstructor())  {
+            locationsSet.add("constructor");
+        }
+        if (taglet.inField()) {
+            locationsSet.add("field");
+        }
+        if (taglet.inMethod()) {
+            locationsSet.add("method");
+        }
+        if (taglet.isInlineTag()) {
+            locationsSet.add("inline text");
+        }
+        String[] locations = locationsSet.toArray(new String[]{});
+        if (locations == null || locations.length == 0) {
+            //This known tag is excluded.
+            return;
+        }
+        StringBuilder combined_locations = new StringBuilder();
+        for (int i = 0; i < locations.length; i++) {
+            if (i > 0) {
+                combined_locations.append(", ");
+            }
+            combined_locations.append(locations[i]);
+        }
+        message.warning(ch.getDocTreePath(tag), "doclet.tag_misuse",
+            "@" + taglet.getName(), holderType, combined_locations.toString());
+    }
+
+    /**
+     * Return the array of <code>Taglet</code>s that can
+     * appear in packages.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in packages.
+     */
+    public List<Taglet> getPackageCustomTaglets() {
+        if (packageTags == null) {
+            initCustomTaglets();
+        }
+        return packageTags;
+    }
+
+    /**
+     * Return the array of <code>Taglet</code>s that can
+     * appear in classes or interfaces.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in classes or interfaces.
+     */
+    public List<Taglet> getTypeCustomTaglets() {
+        if (typeTags == null) {
+            initCustomTaglets();
+        }
+        return typeTags;
+    }
+
+    /**
+     * Return the array of inline <code>Taglet</code>s that can
+     * appear in comments.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in comments.
+     */
+    public List<Taglet> getInlineCustomTaglets() {
+        if (inlineTags == null) {
+            initCustomTaglets();
+        }
+        return inlineTags;
+    }
+
+    /**
+     * Return the array of <code>Taglet</code>s that can
+     * appear in fields.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in field.
+     */
+    public List<Taglet> getFieldCustomTaglets() {
+        if (fieldTags == null) {
+            initCustomTaglets();
+        }
+        return fieldTags;
+    }
+
+    /**
+     * Return the array of <code>Taglet</code>s that can
+     * appear in the serialized form.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in the serialized form.
+     */
+    public List<Taglet> getSerializedFormTaglets() {
+        if (serializedFormTags == null) {
+            initCustomTaglets();
+        }
+        return serializedFormTags;
+    }
+
+    /**
+     * Returns the custom tags for a given element.
+     *
+     * @param e the element to get custom tags for
+     * @return the array of <code>Taglet</code>s that can
+     * appear in the given element.
+     */
+    public List<Taglet> getCustomTaglets(Element e) {
+        switch (e.getKind()) {
+            case CONSTRUCTOR:
+                return getConstructorCustomTaglets();
+            case METHOD:
+                return getMethodCustomTaglets();
+            case ENUM_CONSTANT:
+            case FIELD:
+                return getFieldCustomTaglets();
+            case ANNOTATION_TYPE:
+            case INTERFACE:
+            case CLASS:
+            case ENUM:
+                return getTypeCustomTaglets();
+            case PACKAGE:
+                return getPackageCustomTaglets();
+            case OTHER:
+                return getOverviewCustomTaglets();
+            default:
+                throw new AssertionError("unknown element: " + e + " ,kind: " + e.getKind());
+        }
+    }
+
+    /**
+     * Return a List of <code>Taglet</code>s that can
+     * appear in constructors.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in constructors.
+     */
+    public List<Taglet> getConstructorCustomTaglets() {
+        if (constructorTags == null) {
+            initCustomTaglets();
+        }
+        return constructorTags;
+    }
+
+    /**
+     * Return a List of <code>Taglet</code>s that can
+     * appear in methods.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in methods.
+     */
+    public List<Taglet> getMethodCustomTaglets() {
+        if (methodTags == null) {
+            initCustomTaglets();
+        }
+        return methodTags;
+    }
+
+    /**
+     * Return a List of <code>Taglet</code>s that can
+     * appear in an overview.
+     * @return the array of <code>Taglet</code>s that can
+     * appear in overview.
+     */
+    public List<Taglet> getOverviewCustomTaglets() {
+        if (overviewTags == null) {
+            initCustomTaglets();
+        }
+        return overviewTags;
+    }
+
+    /**
+     * Initialize the custom tag Lists.
+     */
+    private void initCustomTaglets() {
+
+        packageTags = new ArrayList<>();
+        typeTags = new ArrayList<>();
+        fieldTags = new ArrayList<>();
+        constructorTags = new ArrayList<>();
+        methodTags = new ArrayList<>();
+        inlineTags = new ArrayList<>();
+        overviewTags = new ArrayList<>();
+
+        for (Taglet current : customTags.values()) {
+            if (current.inPackage() && !current.isInlineTag()) {
+                packageTags.add(current);
+            }
+            if (current.inType() && !current.isInlineTag()) {
+                typeTags.add(current);
+            }
+            if (current.inField() && !current.isInlineTag()) {
+                fieldTags.add(current);
+            }
+            if (current.inConstructor() && !current.isInlineTag()) {
+                constructorTags.add(current);
+            }
+            if (current.inMethod() && !current.isInlineTag()) {
+                methodTags.add(current);
+            }
+            if (current.isInlineTag()) {
+                inlineTags.add(current);
+            }
+            if (current.inOverview() && !current.isInlineTag()) {
+                overviewTags.add(current);
+            }
+        }
+
+        //Init the serialized form tags
+        serializedFormTags = new ArrayList<>();
+        serializedFormTags.add(customTags.get(SERIAL_DATA.tagName));
+        serializedFormTags.add(customTags.get(THROWS.tagName));
+        if (!nosince)
+            serializedFormTags.add(customTags.get(SINCE.tagName));
+        serializedFormTags.add(customTags.get(SEE.tagName));
+    }
+
+    /**
+     * Initialize standard Javadoc tags for ordering purposes.
+     */
+    private void initStandardTaglets() {
+        if (javafx) {
+            initJavaFXTaglets();
+        }
+
+        Taglet temp;
+        addStandardTaglet(new ParamTaglet());
+        addStandardTaglet(new ReturnTaglet());
+        addStandardTaglet(new ThrowsTaglet());
+        addStandardTaglet(new SimpleTaglet(EXCEPTION.tagName, null,
+                SimpleTaglet.METHOD + SimpleTaglet.CONSTRUCTOR));
+        addStandardTaglet(!nosince, new SimpleTaglet(SINCE.tagName, message.getText("doclet.Since"),
+               SimpleTaglet.ALL));
+        addStandardTaglet(showversion, new SimpleTaglet(VERSION.tagName, message.getText("doclet.Version"),
+                SimpleTaglet.PACKAGE + SimpleTaglet.TYPE + SimpleTaglet.OVERVIEW));
+        addStandardTaglet(showauthor, new SimpleTaglet(AUTHOR.tagName, message.getText("doclet.Author"),
+                SimpleTaglet.PACKAGE + SimpleTaglet.TYPE + SimpleTaglet.OVERVIEW));
+        addStandardTaglet(new SimpleTaglet(SERIAL_DATA.tagName, message.getText("doclet.SerialData"),
+            SimpleTaglet.EXCLUDED));
+        customTags.put((temp = new SimpleTaglet("factory", message.getText("doclet.Factory"),
+            SimpleTaglet.METHOD)).getName(), temp);
+        addStandardTaglet(new SeeTaglet());
+        //Standard inline tags
+        addStandardTaglet(new DocRootTaglet());
+        addStandardTaglet(new InheritDocTaglet());
+        addStandardTaglet(new ValueTaglet());
+        addStandardTaglet(new LiteralTaglet());
+        addStandardTaglet(new CodeTaglet());
+        addStandardTaglet(new IndexTaglet());
+
+        // Keep track of the names of standard tags for error
+        // checking purposes. The following are not handled above.
+        standardTags.add(DEPRECATED.tagName);
+        standardTags.add(LINK.tagName);
+        standardTags.add(LINK_PLAIN.tagName);
+        standardTags.add(SERIAL.tagName);
+        standardTags.add(SERIAL_FIELD.tagName);
+    }
+
+    /**
+     * Initialize JavaFX-related tags.
+     */
+    private void initJavaFXTaglets() {
+        addStandardTaglet(new PropertyGetterTaglet());
+        addStandardTaglet(new PropertySetterTaglet());
+        addStandardTaglet(new SimpleTaglet("propertyDescription",
+                message.getText("doclet.PropertyDescription"),
+                SimpleTaglet.FIELD + SimpleTaglet.METHOD));
+        addStandardTaglet(new SimpleTaglet("defaultValue", message.getText("doclet.DefaultValue"),
+            SimpleTaglet.FIELD + SimpleTaglet.METHOD));
+        addStandardTaglet(new SimpleTaglet("treatAsPrivate", null,
+                SimpleTaglet.FIELD + SimpleTaglet.METHOD + SimpleTaglet.TYPE));
+    }
+
+    void addStandardTaglet(Taglet taglet) {
+        String name = taglet.getName();
+        customTags.put(name, taglet);
+        standardTags.add(name);
+    }
+
+    void addStandardTaglet(boolean enable, Taglet taglet) {
+        String name = taglet.getName();
+        if (enable)
+            customTags.put(name, taglet);
+        standardTags.add(name);
+    }
+
+    /**
+     * Initialize lowercase version of standard Javadoc tags.
+     */
+    private void initStandardTagsLowercase() {
+        for (String standardTag : standardTags) {
+            standardTagsLowercase.add(Utils.toLowerCase(standardTag));
+        }
+    }
+
+    public boolean isKnownCustomTag(String tagName) {
+        return customTags.containsKey(tagName);
+    }
+
+    /**
+     * Print a list of {@link Taglet}s that might conflict with
+     * standard tags in the future and a list of standard tags
+     * that have been overriden.
+     */
+    public void printReport() {
+        printReportHelper("doclet.Notice_taglet_conflict_warn", potentiallyConflictingTags);
+        printReportHelper("doclet.Notice_taglet_overriden", overridenStandardTags);
+        printReportHelper("doclet.Notice_taglet_unseen", unseenCustomTags);
+    }
+
+    private void printReportHelper(String noticeKey, Set<String> names) {
+        if (names.size() > 0) {
+            String[] namesArray = names.toArray(new String[] {});
+            String result = " ";
+            for (int i = 0; i < namesArray.length; i++) {
+                result += "@" + namesArray[i];
+                if (i + 1 < namesArray.length) {
+                    result += ", ";
+                }
+            }
+            message.notice(noticeKey, result);
+        }
+    }
+
+    /**
+     * Given the name of a tag, return the corresponding taglet.
+     * Return null if the tag is unknown.
+     *
+     * @param name the name of the taglet to retrieve.
+     * @return return the corresponding taglet. Return null if the tag is
+     *         unknown.
+     */
+    public Taglet getTaglet(String name) {
+        if (name.indexOf("@") == 0) {
+            return customTags.get(name.substring(1));
+        } else {
+            return customTags.get(name);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,338 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.taglets.Taglet.UnsupportedTagletOperationException;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.MessageRetriever;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+/**
+ * The interface for the taglet writer.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public abstract class TagletWriter {
+
+    /**
+     * True if we only want to write the first sentence.
+     */
+    protected final boolean isFirstSentence;
+
+    protected TagletWriter(boolean isFirstSentence) {
+        this.isFirstSentence = isFirstSentence;
+    }
+
+    /**
+     * @return an instance of an output object.
+     */
+    public abstract Content getOutputInstance();
+
+    /**
+     * Return the output for a {@code {@code ...}} tag.
+     *
+     * @param element
+     * @param tag the tag.
+     * @return the output of the taglet.
+     */
+    protected abstract Content codeTagOutput(Element element, DocTree tag);
+
+    /**
+     * Return the output for a {@index...} tag.
+     *
+     * @param tag the tag.
+     * @return the output of the taglet.
+     */
+    protected abstract Content indexTagOutput(Element element, DocTree tag);
+
+    /**
+     * Returns the output for the DocRoot inline tag.
+     * @return the output for the DocRoot inline tag.
+     */
+    protected abstract Content getDocRootOutput();
+
+    /**
+     * Return the deprecated tag output.
+     *
+     * @param element the element to write deprecated documentation for.
+     * @return the output of the deprecated tag.
+     */
+    protected abstract Content deprecatedTagOutput(Element element);
+
+    /**
+     * Return the output for a {@code {@literal ...}} tag.
+     *
+     * @param element
+     * @param tag the tag.
+     * @return the output of the taglet.
+     */
+    protected abstract Content literalTagOutput(Element element, DocTree tag);
+
+    /**
+     * Returns {@link MessageRetriever} for output purposes.
+     *
+     * @return {@link MessageRetriever} for output purposes.
+     */
+    protected abstract MessageRetriever getMsgRetriever();
+
+    /**
+     * Return the header for the param tags.
+     *
+     * @param header the header to display.
+     * @return the header for the param tags.
+     */
+    protected abstract Content getParamHeader(String header);
+
+    /**
+     * Return the output for param tags.
+     *
+     * @param element
+     * @param paramTag the parameter to document.
+     * @param paramName the name of the parameter.
+     * @return the output of the param tag.
+     */
+    protected abstract Content paramTagOutput(Element element, DocTree paramTag, String paramName);
+
+    /**
+     * Return the output for property tags.
+     *
+     * @param element
+     * @param propertyTag the parameter to document.
+     * @param prefix the text with which to prefix the property name.
+     * @return the output of the param tag.
+     */
+    protected abstract Content propertyTagOutput(Element element, DocTree propertyTag, String prefix);
+
+    /**
+     * Return the return tag output.
+     *
+     * @param element
+     * @param returnTag the return tag to output.
+     * @return the output of the return tag.
+     */
+    protected abstract Content returnTagOutput(Element element, DocTree returnTag);
+
+    /**
+     * Return the see tag output.
+     *
+     * @param holder
+     * @param seeTags the array of See tags.
+     * @return the output of the see tags.
+     */
+    protected abstract Content seeTagOutput(Element holder, List<? extends DocTree> seeTags);
+
+    /**
+     * Return the output for a simple tag.
+     *
+     * @param element
+     * @param simpleTags the array of simple tags.
+     * @param header
+     * @return the output of the simple tags.
+     */
+    protected abstract Content simpleTagOutput(Element element, List<? extends DocTree> simpleTags, String header);
+
+    /**
+     * Return the output for a simple tag.
+     *
+     * @param element
+     * @param simpleTag the simple tag.
+     * @param header
+     * @return the output of the simple tag.
+     */
+    protected abstract Content simpleTagOutput(Element element, DocTree simpleTag, String header);
+
+    /**
+     * Return the header for the throws tag.
+     *
+     * @return the header for the throws tag.
+     */
+    protected abstract Content getThrowsHeader();
+
+    /**
+     * Return the header for the throws tag.
+     *
+     * @param element
+     * @param throwsTag the throws tag.
+     * @return the output of the throws tag.
+     */
+    protected abstract Content throwsTagOutput(Element element, DocTree throwsTag);
+
+    /**
+     * Return the output for the throws tag.
+     *
+     * @param throwsType the throws type.
+     * @return the output of the throws type.
+     */
+    protected abstract Content throwsTagOutput(TypeMirror throwsType);
+
+    /**
+     * Return the output for the value tag.
+     *
+     * @param field       the constant field that holds the value tag.
+     * @param constantVal the constant value to document.
+     * @param includeLink true if we should link the constant text to the
+     *                    constant field itself.
+     * @return the output of the value tag.
+     */
+    protected abstract Content valueTagOutput(VariableElement field,
+        String constantVal, boolean includeLink);
+
+    /**
+     * Given an output object, append to it the tag documentation for
+     * the given member.
+     *
+     * @param tagletManager the manager that manages the taglets.
+     * @param element the Doc that we are print tags for.
+     * @param taglets the taglets to print.
+     * @param writer the writer that will generate the output strings.
+     * @param output the output buffer to store the output in.
+     */
+    public static void genTagOutput(TagletManager tagletManager, Element element,
+            List<Taglet> taglets, TagletWriter writer, Content output) {
+        Utils utils = writer.configuration().utils;
+        tagletManager.checkTags(utils, element, utils.getBlockTags(element), false);
+        tagletManager.checkTags(utils, element, utils.getBody(element), true);
+        for (Taglet taglet : taglets) {
+            if (utils.isTypeElement(element) && taglet instanceof ParamTaglet) {
+                //The type parameters are documented in a special section away
+                //from the tag info, so skip here.
+                continue;
+            }
+            if (taglet instanceof DeprecatedTaglet) {
+                //Deprecated information is documented "inline", not in tag info
+                //section.
+                continue;
+            }
+            Content currentOutput = null;
+            try {
+                currentOutput = taglet.getTagletOutput(element, writer);
+            } catch (UnsupportedTagletOperationException utoe) {
+                //The taglet does not take a member as an argument.  Let's try
+                //a single tag.
+                List<? extends DocTree> tags = utils.getBlockTags(element, taglet.getName());
+                if (!tags.isEmpty()) {
+                    currentOutput = taglet.getTagletOutput(element, tags.get(0), writer);
+                }
+            }
+            if (currentOutput != null) {
+                tagletManager.seenCustomTag(taglet.getName());
+                output.addContent(currentOutput);
+            }
+        }
+    }
+    /**
+     * Given an inline tag, return its output.
+     * @param holder
+     * @param tagletManager The taglet manager for the current doclet.
+     * @param holderTag The tag this holds this inline tag.  Null if there
+     * is no tag that holds it.
+     * @param inlineTag The inline tag to be documented.
+     * @param tagletWriter The taglet writer to write the output.
+     * @return The output of the inline tag.
+     */
+    public static Content getInlineTagOutput(Element holder, TagletManager tagletManager,
+            DocTree holderTag, DocTree inlineTag, TagletWriter tagletWriter) {
+        List<Taglet> definedTags = tagletManager.getInlineCustomTaglets();
+        CommentHelper ch = tagletWriter.configuration().utils.getCommentHelper(holder);
+        final String inlineTagName = ch.getTagName(inlineTag);
+        //This is a custom inline tag.
+        for (Taglet definedTag : definedTags) {
+            if ((definedTag.getName()).equals(inlineTagName)) {
+                // Given a name of a seen custom tag, remove it from the
+                // set of unseen custom tags.
+                tagletManager.seenCustomTag(definedTag.getName());
+                Content output = definedTag.getTagletOutput(holder,
+                        holderTag != null &&
+                        definedTag.getName().equals("inheritDoc") ?
+                        holderTag : inlineTag, tagletWriter);
+                return output;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Converts inline tags and text to TagOutput, expanding the
+     * inline tags along the way.  Called wherever text can contain
+     * an inline tag, such as in comments or in free-form text arguments
+     * to non-inline tags.
+     *
+     * @param holderTag the tag that holds the documentation.
+     * @param tags   array of text tags and inline tags (often alternating)
+     *               present in the text of interest for this doc.
+     * @return the {@link Content} representing the comments.
+     */
+    public abstract Content commentTagsToOutput(DocTree holderTag, List<? extends DocTree> tags);
+
+    /**
+     * Converts inline tags and text to TagOutput, expanding the
+     * inline tags along the way.  Called wherever text can contain
+     * an inline tag, such as in comments or in free-form text arguments
+     * to non-inline tags.
+     *
+     * @param holder the element where comment resides.
+     * @param tags   array of text tags and inline tags (often alternating)
+     *               present in the text of interest for this doc.
+     * @return the {@link Content} representing the comments.
+     */
+    public abstract Content commentTagsToOutput(Element holder, List<? extends DocTree> tags);
+
+    /**
+     * Converts inline tags and text to TagOutput, expanding the
+     * inline tags along the way.  Called wherever text can contain
+     * an inline tag, such as in comments or in free-form text arguments
+     * to non-inline tags.
+     *
+     * @param holderTag the tag that holds the documentation.
+     * @param holder the element where comment resides.
+     * @param tags   array of text tags and inline tags (often alternating)
+     *               present in the text of interest for this doc.
+     * @param isFirstSentence true if this is the first sentence.
+     * @return the {@link Content} representing the comments.
+     */
+    public abstract Content commentTagsToOutput(DocTree holderTag,
+        Element holder, List<? extends DocTree> tags, boolean isFirstSentence);
+
+    /**
+     * @return an instance of the configuration used for this doclet.
+     */
+    public abstract Configuration configuration();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.*;
+import java.util.Map.Entry;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder;
+import jdk.javadoc.internal.doclets.toolkit.util.DocFinder.Input;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * A taglet that represents the @throws tag.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class ThrowsTaglet extends BaseExecutableMemberTaglet
+    implements InheritableTaglet {
+
+    public ThrowsTaglet() {
+        name = THROWS.tagName;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public void inherit(DocFinder.Input input, DocFinder.Output output) {
+        Utils utils = input.utils;
+        Element exception;
+        CommentHelper ch = utils.getCommentHelper(input.element);
+        if (input.tagId == null) {
+            exception = ch.getException(utils.configuration, input.docTreeInfo.docTree);
+            input.tagId = exception == null
+                    ? ch.getExceptionName(input.docTreeInfo.docTree).getSignature()
+                    : utils.getFullyQualifiedName(exception);
+        } else {
+            TypeElement element = input.utils.findClass(input.element, input.tagId);
+            exception = (element == null) ? null : element;
+        }
+
+        for (DocTree dt : input.utils.getThrowsTrees(input.element)) {
+            Element texception = ch.getException(utils.configuration, dt);
+            if (texception != null && (input.tagId.equals(utils.getSimpleName(texception)) ||
+                 (input.tagId.equals(utils.getFullyQualifiedName(texception))))) {
+                output.holder = input.element;
+                output.holderTag = dt;
+                output.inlineTags = ch.getBody(input.utils.configuration, output.holderTag);
+                output.tagList.add(dt);
+            } else if (exception != null && texception != null &&
+                    utils.isTypeElement(texception) && utils.isTypeElement(exception) &&
+                    utils.isSubclassOf((TypeElement)texception, (TypeElement)exception)) {
+                output.tagList.add(dt);
+            }
+        }
+    }
+
+    /**
+     * Add links for exceptions that are declared but not documented.
+     */
+    private Content linkToUndocumentedDeclaredExceptions(List<? extends TypeMirror> declaredExceptionTypes,
+            Set<String> alreadyDocumented, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        Content result = writer.getOutputInstance();
+        //Add links to the exceptions declared but not documented.
+        for (TypeMirror declaredExceptionType : declaredExceptionTypes) {
+            TypeElement klass = utils.asTypeElement(declaredExceptionType);
+            if (klass != null &&
+                !alreadyDocumented.contains(utils.getSimpleName(klass)) &&
+                !alreadyDocumented.contains(utils.getFullyQualifiedName(klass))) {
+                if (alreadyDocumented.isEmpty()) {
+                    result.addContent(writer.getThrowsHeader());
+                }
+                result.addContent(writer.throwsTagOutput(declaredExceptionType));
+                alreadyDocumented.add(utils.getSimpleName(klass));
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Inherit throws documentation for exceptions that were declared but not
+     * documented.
+     */
+    private Content inheritThrowsDocumentation(Element holder,
+            List<? extends TypeMirror> declaredExceptionTypes, Set<String> alreadyDocumented,
+            TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        Content result = writer.getOutputInstance();
+        if (utils.isExecutableElement(holder)) {
+            Map<List<? extends DocTree>, ExecutableElement> declaredExceptionTags = new LinkedHashMap<>();
+            for (TypeMirror declaredExceptionType : declaredExceptionTypes) {
+                Input input = new DocFinder.Input(utils, holder, this,
+                        utils.getTypeName(declaredExceptionType, false));
+                DocFinder.Output inheritedDoc = DocFinder.search(writer.configuration(), input);
+                if (inheritedDoc.tagList.isEmpty()) {
+                    String typeName = utils.getTypeName(declaredExceptionType, true);
+                    input = new DocFinder.Input(utils, holder, this, typeName);
+                    inheritedDoc = DocFinder.search(writer.configuration(), input);
+                }
+                if (!inheritedDoc.tagList.isEmpty()) {
+                    if (inheritedDoc.holder == null) {
+                        inheritedDoc.holder = holder;
+                    }
+                    declaredExceptionTags.put(inheritedDoc.tagList, (ExecutableElement)inheritedDoc.holder);
+                }
+            }
+            result.addContent(throwsTagsOutput(declaredExceptionTags, writer, alreadyDocumented, false));
+        }
+        return result;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        ExecutableElement execHolder = (ExecutableElement) holder;
+        Map<List<? extends DocTree>, ExecutableElement> tagsMap = new LinkedHashMap<>();
+        tagsMap.put(utils.getThrowsTrees(execHolder), execHolder);
+        Content result = writer.getOutputInstance();
+        HashSet<String> alreadyDocumented = new HashSet<>();
+        if (!tagsMap.isEmpty()) {
+            result.addContent(throwsTagsOutput(tagsMap, writer, alreadyDocumented, true));
+        }
+        result.addContent(inheritThrowsDocumentation(holder,
+            execHolder.getThrownTypes(), alreadyDocumented, writer));
+        result.addContent(linkToUndocumentedDeclaredExceptions(
+            execHolder.getThrownTypes(), alreadyDocumented, writer));
+        return result;
+    }
+
+    /**
+     * Given an array of <code>Tag</code>s representing this custom
+     * tag, return its string representation.
+     * @param throwTags the array of <code>ThrowsTag</code>s to convert.
+     * @param writer the TagletWriter that will write this tag.
+     * @param alreadyDocumented the set of exceptions that have already
+     *        been documented.
+     * @param allowDups True if we allow duplicate throws tags to be documented.
+     * @return the Content representation of this <code>Tag</code>.
+     */
+    protected Content throwsTagsOutput(Map<List<? extends DocTree>, ExecutableElement> throwTags,
+        TagletWriter writer, Set<String> alreadyDocumented, boolean allowDups) {
+        Utils utils = writer.configuration().utils;
+        Content result = writer.getOutputInstance();
+        if (!throwTags.isEmpty()) {
+            for (Entry<List<? extends DocTree>, ExecutableElement> entry : throwTags.entrySet()) {
+                CommentHelper ch = utils.getCommentHelper(entry.getValue());
+                Element e = entry.getValue();
+                for (DocTree dt : entry.getKey()) {
+                    Element te = ch.getException(utils.configuration, dt);
+                    String excName = ch.getExceptionName(dt).toString();
+                    if ((!allowDups) &&
+                        (alreadyDocumented.contains(excName) ||
+                        (te != null && alreadyDocumented.contains(utils.getFullyQualifiedName(te))))) {
+                        continue;
+                    }
+                    if (alreadyDocumented.isEmpty()) {
+                        result.addContent(writer.getThrowsHeader());
+                    }
+                    result.addContent(writer.throwsTagOutput(e, dt));
+                    alreadyDocumented.add(te != null
+                            ? utils.getFullyQualifiedName(te)
+                            : excName);
+                }
+            }
+        }
+        return result;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/UserTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,145 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+import java.util.List;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.formats.html.markup.RawHtml;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static jdk.javadoc.doclet.taglet.Taglet.Location.*;
+
+/**
+ * A taglet wrapper, allows the public taglet {@link jdk.javadoc.doclet.taglet.Taglet}
+ * wrapped into an internal Taglet representation.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class UserTaglet implements Taglet {
+
+    final private jdk.javadoc.doclet.taglet.Taglet userTaglet;
+
+    public UserTaglet(jdk.javadoc.doclet.taglet.Taglet t) {
+        userTaglet = t;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inField() {
+        return userTaglet.isInlineTag()
+                || userTaglet.getAllowedLocations().contains(FIELD);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inConstructor() {
+        return userTaglet.isInlineTag()
+                || userTaglet.getAllowedLocations().contains(CONSTRUCTOR);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inMethod() {
+        return userTaglet.isInlineTag()
+                || userTaglet.getAllowedLocations().contains(METHOD);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inOverview() {
+        return userTaglet.isInlineTag()
+                || userTaglet.getAllowedLocations().contains(OVERVIEW);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inPackage() {
+        return userTaglet.isInlineTag()
+                || userTaglet.getAllowedLocations().contains(PACKAGE);
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean inType() {
+        return userTaglet.isInlineTag()
+                || userTaglet.getAllowedLocations().contains(TYPE);
+    }
+
+    /**
+     * Return true if this <code>Taglet</code> is an inline tag.
+     *
+     * @return true if this <code>Taglet</code> is an inline tag and false otherwise.
+     */
+    public boolean isInlineTag() {
+        return userTaglet.isInlineTag();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName() {
+        return userTaglet.getName();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element element, DocTree tag, TagletWriter writer){
+        Content output = writer.getOutputInstance();
+        output.addContent(new RawHtml(userTaglet.toString(tag)));
+        return output;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, TagletWriter writer) {
+        Content output = writer.getOutputInstance();
+        Utils utils = writer.configuration().utils;
+        List<? extends DocTree> tags = utils.getBlockTags(holder, getName());
+        if (!tags.isEmpty()) {
+            String tagString = userTaglet.toString(tags);
+            if (tagString != null) {
+                output.addContent(new RawHtml(tagString));
+            }
+        }
+        return output;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ValueTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,201 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.taglets;
+
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.Elements;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.CommentHelper;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ * An inline Taglet representing the value tag. This tag should only be used with
+ * constant fields that have a value.  It is used to access the value of constant
+ * fields.  This inline tag has an optional field name parameter.  If the name is
+ * specified, the constant value is retrieved from the specified field.  A link
+ * is also created to the specified field.  If a name is not specified, the value
+ * is retrieved for the field that the inline tag appears on.  The name is specifed
+ * in the following format:  [fully qualified class name]#[constant field name].
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+
+public class ValueTaglet extends BaseInlineTaglet {
+
+    /**
+     * Construct a new ValueTaglet.
+     */
+    public ValueTaglet() {
+        name = VALUE.tagName;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * only appear in Fields.
+     * @return false since this is not a method.
+     */
+    public boolean inMethod() {
+        return true;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * only appear in Fields.
+     * @return false since this is not a method.
+     */
+    public boolean inConstructor() {
+        return true;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * only appear in Fields.
+     * @return false since this is not a method.
+     */
+    public boolean inOverview() {
+        return true;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * only appear in Fields.
+     * @return false since this is not a method.
+     */
+    public boolean inPackage() {
+        return true;
+    }
+
+    /**
+     * Will return false because this inline tag may
+     * only appear in Fields.
+     * @return false since this is not a method.
+     */
+    public boolean inType() {
+        return true;
+    }
+
+    /**
+     * Given the name of the field, return the corresponding VariableElement. Return null
+     * due to invalid use of value tag if the name is null or empty string and if
+     * the value tag is not used on a field.
+     *
+     * @param holder the element holding the tag
+     * @param config the current configuration of the doclet.
+     * @param tag the value tag.
+     *
+     * @return the corresponding VariableElement. If the name is null or empty string,
+     * return field that the value tag was used in. Return null if the name is null
+     * or empty string and if the value tag is not used on a field.
+     */
+    private VariableElement getVariableElement(Element holder, Configuration config, DocTree tag) {
+        Utils utils = config.utils;
+        CommentHelper ch = utils.getCommentHelper(holder);
+        String signature = ch.getReferencedSignature(tag);
+
+        if (signature == null) { // no reference
+            //Base case: no label.
+            if (utils.isVariableElement(holder)) {
+                return (VariableElement)(holder);
+            } else {
+                // If the value tag does not specify a parameter which is a valid field and
+                // it is not used within the comments of a valid field, return null.
+                 return null;
+            }
+        }
+
+        String[] sigValues = signature.split("#");
+        String memberName = null;
+        TypeElement te = null;
+        if (sigValues.length == 1) {
+            //Case 2:  @value in same class.
+            if (utils.isExecutableElement(holder) || utils.isVariableElement(holder)) {
+                te = utils.getEnclosingTypeElement(holder);
+            } else if (utils.isTypeElement(holder)) {
+                te = utils.getTopMostContainingTypeElement(holder);
+            }
+            memberName = sigValues[0];
+        } else {
+            //Case 3: @value in different class.
+            Elements elements = config.root.getElementUtils();
+            te = elements.getTypeElement(sigValues[0]);
+            memberName = sigValues[1];
+        }
+        if (te == null) {
+            return null;
+        }
+        for (Element field : utils.getFields(te)) {
+            if (utils.getSimpleName(field).equals(memberName)) {
+                return (VariableElement)field;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public Content getTagletOutput(Element holder, DocTree tag, TagletWriter writer) {
+        Utils utils = writer.configuration().utils;
+        VariableElement field = getVariableElement(holder, writer.configuration(), tag);
+        if (field == null) {
+            if (tag.toString().isEmpty()) {
+                //Invalid use of @value
+                writer.getMsgRetriever().warning(holder,
+                        "doclet.value_tag_invalid_use");
+            } else {
+                //Reference is unknown.
+                writer.getMsgRetriever().warning(holder,
+                        "doclet.value_tag_invalid_reference", tag.toString());
+            }
+        } else if (field.getConstantValue() != null) {
+            return writer.valueTagOutput(field,
+                utils.constantValueExpresion(field),
+                // TODO: investigate and cleanup
+                // in the j.l.m world, equals will not be accurate
+                // !field.equals(tag.holder())
+                !utils.elementsEqual(field, holder)
+            );
+        } else {
+            //Referenced field is not a constant.
+            writer.getMsgRetriever().warning(holder,
+                "doclet.value_tag_invalid_constant", utils.getSimpleName(field));
+        }
+        return writer.getOutputInstance();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+/**
+    This package has classes used to generate Javadoc tag documentation.
+    Doclets no longer have to implement its own version of standard tags
+    such as &#64;param and &#64;throws.  This is the single, doclet
+    implementation of each standard tag that is shared by all
+    doclets.  Each doclet must have a taglet writer that takes a taglet
+    as input and writes doclet-dependent output. The taglet itself will
+    do the tag processing. For example, suppose we are outputing
+    &#64;throws tags. The taglet would:
+    <ul>
+        <li> Retrieve the list of throws tags to be documented.
+        <li> Replace {&#64;inheritDoc} with the appropriate documentation.
+        <li> Add throws documentation for exceptions that are declared in
+             the signature of the method but
+             not documented with the throws tags.
+    </ul>
+    After doing the steps above, the taglet would pass the information to
+    the taglet writer for writing. The taglets are essentially builders for
+    tags.
+
+    <p><b>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.</b>
+*/
+
+package jdk.javadoc.internal.doclets.toolkit.taglets;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassTree.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,407 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+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 javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Build Class Hierarchy for all the Classes. This class builds the Class
+ * Tree and the Interface Tree separately.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see java.util.HashMap
+ * @see java.util.List
+ * @author Atul M Dambalkar
+ */
+public class ClassTree {
+
+    /**
+     * List of base classes. Used to get the mapped listing of sub-classes.
+     */
+    private final SortedSet<TypeElement> baseClasses;
+
+    /**
+     * Mapping for each Class with their sub classes
+     */
+    private final Map<TypeElement, SortedSet<TypeElement>> subClasses = new HashMap<>();
+
+    /**
+     * List of base-interfaces. Contains set of all the interfaces who do not
+     * have super-interfaces. Can be used to get the mapped listing of
+     * sub-interfaces.
+     */
+    private final SortedSet<TypeElement> baseInterfaces;
+
+   /**
+    * Mapping for each Interface with their SubInterfaces
+    */
+    private final Map<TypeElement, SortedSet<TypeElement>> subInterfaces = new HashMap<>();
+
+    private final SortedSet<TypeElement> baseEnums;
+    private final Map<TypeElement, SortedSet<TypeElement>> subEnums = new HashMap<>();
+
+    private final SortedSet<TypeElement> baseAnnotationTypes;
+    private final Map<TypeElement, SortedSet<TypeElement>> subAnnotationTypes = new HashMap<>();
+
+   /**
+    * Mapping for each Interface with classes who implement it.
+    */
+    private final Map<TypeElement, SortedSet<TypeElement>> implementingClasses = new HashMap<>();
+
+    private final Configuration configuration;
+    private final Utils utils;
+    private final Comparator<Element> comparator;
+
+    /**
+     * Constructor. Build the Tree using the Root of this Javadoc run.
+     *
+     * @param configuration the configuration of the doclet.
+     * @param noDeprecated Don't add deprecated classes in the class tree, if
+     * true.
+     */
+    public ClassTree(Configuration configuration, boolean noDeprecated) {
+        configuration.message.notice("doclet.Building_Tree");
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        comparator = utils.makeClassUseComparator();
+        baseAnnotationTypes = new TreeSet<>(comparator);
+        baseEnums = new TreeSet<>(comparator);
+        baseClasses = new TreeSet<>(comparator);
+        baseInterfaces = new TreeSet<>(comparator);
+        buildTree(configuration.root.getIncludedClasses());
+    }
+
+    /**
+     * Constructor. Build the Tree using the Root of this Javadoc run.
+     *
+     * @param root Root of the Document.
+     * @param configuration The current configuration of the doclet.
+     */
+    public ClassTree(DocletEnvironment root, Configuration configuration) {
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        comparator = utils.makeClassUseComparator();
+        baseAnnotationTypes = new TreeSet<>(comparator);
+        baseEnums = new TreeSet<>(comparator);
+        baseClasses = new TreeSet<>(comparator);
+        baseInterfaces = new TreeSet<>(comparator);
+        buildTree(configuration.root.getIncludedClasses());
+    }
+
+    /**
+     * Constructor. Build the tree for the given array of classes.
+     *
+     * @param classesSet a set of classes
+     * @param configuration The current configuration of the doclet.
+     */
+    public ClassTree(SortedSet<TypeElement>classesSet, Configuration configuration) {
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        comparator = utils.makeClassUseComparator();
+        baseAnnotationTypes = new TreeSet<>(comparator);
+        baseEnums = new TreeSet<>(comparator);
+        baseClasses = new TreeSet<>(comparator);
+        baseInterfaces = new TreeSet<>(comparator);
+        buildTree(classesSet);
+    }
+
+    /**
+     * Generate mapping for the sub-classes for every class in this run.
+     * Return the sub-class set for java.lang.Object which will be having
+     * sub-class listing for itself and also for each sub-class itself will
+     * have their own sub-class lists.
+     *
+     * @param classes all the classes in this run.
+     * @param configuration the current configuration of the doclet.
+     */
+    private void buildTree(Iterable<TypeElement> classes) {
+        for (TypeElement aClass : classes) {
+            // In the tree page (e.g overview-tree.html) do not include
+            // information of classes which are deprecated or are a part of a
+            // deprecated package.
+            if (configuration.nodeprecated &&
+                    (utils.isDeprecated(aClass) ||
+                    utils.isDeprecated(utils.containingPackage(aClass)))) {
+                continue;
+            }
+
+            if (configuration.javafx
+                    && !utils.getBlockTags(aClass, "treatAsPrivate").isEmpty()) {
+                continue;
+            }
+
+            if (utils.isEnum(aClass)) {
+                processType(aClass, configuration, baseEnums, subEnums);
+            } else if (utils.isClass(aClass)) {
+                processType(aClass, configuration, baseClasses, subClasses);
+            } else if (utils.isInterface(aClass)) {
+                processInterface(aClass);
+            } else if (utils.isAnnotationType(aClass)) {
+                processType(aClass, configuration, baseAnnotationTypes,
+                    subAnnotationTypes);
+            }
+        }
+    }
+
+    /**
+     * For the class passed map it to its own sub-class listing.
+     * For the Class passed, get the super class,
+     * if superclass is non null, (it is not "java.lang.Object")
+     * get the "value" from the hashmap for this key Class
+     * if entry not found create one and get that.
+     * add this Class as a sub class in the set
+     * Recurse till hits java.lang.Object Null SuperClass.
+     *
+     * @param typeElement for which sub class mapping is to be generated.
+     * @param configuration the current configuration of the doclet.
+     */
+    private void processType(TypeElement typeElement, Configuration configuration,
+            Collection<TypeElement> bases, Map<TypeElement, SortedSet<TypeElement>> subs) {
+        TypeElement superclass = utils.getFirstVisibleSuperClassAsTypeElement(typeElement);
+        if (superclass != null) {
+            if (!add(subs, superclass, typeElement)) {
+                return;
+            } else {
+                processType(superclass, configuration, bases, subs);
+            }
+        } else {     // typeElement is java.lang.Object, add it once to the set
+            if (!bases.contains(typeElement)) {
+                bases.add(typeElement);
+            }
+        }
+        Set<TypeMirror> intfacs = utils.getAllInterfaces(typeElement);
+        for (TypeMirror intfac : intfacs) {
+            add(implementingClasses, utils.asTypeElement(intfac), typeElement);
+        }
+    }
+
+    /**
+     * For the interface passed get the interfaces which it extends, and then
+     * put this interface in the sub-interface set of those interfaces. Do it
+     * recursively. If a interface doesn't have super-interface just attach
+     * that interface in the set of all the baseInterfaces.
+     *
+     * @param typeElement Interface under consideration.
+     */
+    private void processInterface(TypeElement typeElement) {
+        List<? extends TypeMirror> intfacs = typeElement.getInterfaces();
+        if (!intfacs.isEmpty()) {
+            for (TypeMirror intfac : intfacs) {
+                if (!add(subInterfaces, utils.asTypeElement(intfac), typeElement)) {
+                    return;
+                } else {
+                    processInterface(utils.asTypeElement(intfac));   // Recurse
+                }
+            }
+        } else {
+            // we need to add all the interfaces who do not have
+            // super-interfaces to baseInterfaces set to traverse them
+            if (!baseInterfaces.contains(typeElement)) {
+                baseInterfaces.add(typeElement);
+            }
+        }
+    }
+
+    /**
+     * Adjust the Class Tree. Add the class interface  in to it's super classes
+     * or super interface's sub-interface set.
+     *
+     * @param map the entire map.
+     * @param superclass java.lang.Object or the super-interface.
+     * @param typeElement sub-interface to be mapped.
+     * @returns boolean true if class added, false if class already processed.
+     */
+    private boolean add(Map<TypeElement, SortedSet<TypeElement>> map, TypeElement superclass, TypeElement typeElement) {
+        SortedSet<TypeElement> sset = map.computeIfAbsent(superclass, s ->  new TreeSet<>(comparator));
+        if (sset.contains(typeElement)) {
+            return false;
+        } else {
+            sset.add(typeElement);
+        }
+        return true;
+    }
+
+    /**
+     * From the map return the set of sub-classes or sub-interfaces. If set
+     * is null create a new one and return it.
+     *
+     * @param map The entire map.
+     * @param typeElement class for which the sub-class set is requested.
+     * @returns a list of sub classes.
+     */
+    private SortedSet<TypeElement> get(Map<TypeElement, SortedSet<TypeElement>> map, TypeElement typeElement) {
+        return map.computeIfAbsent(typeElement, t ->  new TreeSet<>(comparator));
+    }
+
+    /**
+     *  Return the sub-class set for the class passed.
+     *
+     * @param typeElement class whose sub-class set is required.
+     */
+    public SortedSet<TypeElement> subClasses(TypeElement typeElement) {
+        return get(subClasses, typeElement);
+    }
+
+    /**
+     *  Return the sub-interface set for the interface passed.
+     *
+     * @param typeElement interface whose sub-interface set is required.
+     */
+    public SortedSet<TypeElement> subInterfaces(TypeElement typeElement) {
+        return get(subInterfaces, typeElement);
+    }
+
+    /**
+     *  Return the set of classes which implement the interface passed.
+     *
+     * @param typeElement interface whose implementing-classes set is required.
+     */
+    public SortedSet<TypeElement> implementingClasses(TypeElement typeElement) {
+        SortedSet<TypeElement> result = get(implementingClasses, typeElement);
+        SortedSet<TypeElement> intfcs = allSubClasses(typeElement, false);
+
+        // If class x implements a subinterface of typeElement, then it follows
+        // that class x implements typeElement.
+        Iterator<TypeElement> subInterfacesIter = intfcs.iterator();
+        while (subInterfacesIter.hasNext()) {
+            Iterator<TypeElement> implementingClassesIter
+                    = implementingClasses(subInterfacesIter.next()).iterator();
+            while (implementingClassesIter.hasNext()) {
+                TypeElement c = implementingClassesIter.next();
+                if (!result.contains(c)) {
+                    result.add(c);
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     *  Return the sub-class/interface set for the class/interface passed.
+     *
+     * @param typeElement class/interface whose sub-class/interface set is required.
+     * @param isEnum true if the subClasses should be forced to come from the
+     * enum tree.
+     */
+    public SortedSet<TypeElement> directSubClasses(TypeElement typeElement, boolean isEnum) {
+        return directSubClasses0(typeElement, isEnum);
+    }
+
+    private SortedSet<TypeElement> directSubClasses0(TypeElement typeElement, boolean isEnum) {
+        if (isEnum) {
+            return get(subEnums, typeElement);
+        } else if (utils.isAnnotationType(typeElement)) {
+            return get(subAnnotationTypes, typeElement);
+        } else if (utils.isInterface(typeElement)) {
+            return get(subInterfaces, typeElement);
+        } else if (utils.isClass(typeElement)) {
+            return get(subClasses, typeElement);
+        } else {
+            return Collections.emptySortedSet();
+        }
+    }
+
+    /**
+     * Return a set of all direct or indirect, sub-classes and subInterfaces
+     * of the TypeElement argument.
+     *
+     * @param typeElement TypeElement whose sub-classes or sub-interfaces are requested.
+     * @param isEnum true if the subClasses should be forced to come from the
+     * enum tree.
+     */
+    public SortedSet<TypeElement> allSubClasses(TypeElement typeElement, boolean isEnum) {
+        // new entries added to the set are searched as well, this is
+        // really a work queue.
+        List<TypeElement> list = new ArrayList<>(directSubClasses(typeElement, isEnum));
+        for (int i = 0; i < list.size(); i++) {
+            TypeElement te = list.get(i);
+            SortedSet<TypeElement> tset = directSubClasses0(te, isEnum);
+            for (TypeElement tte : tset) {
+                if (!list.contains(tte)) {
+                    list.add(tte);
+                }
+            }
+        }
+        SortedSet<TypeElement> out = new TreeSet<>(comparator);
+        out.addAll(list);
+        return out;
+    }
+
+    /**
+     *  Return a set of base classes. This will have only one element namely
+     *  the TypeElement for java.lang.Object, since this is the base class for all
+     *  classes.
+     */
+    public SortedSet<TypeElement> baseClasses() {
+        return baseClasses;
+    }
+
+    /**
+     *  Return the set of base interfaces. This is the set of interfaces
+     * which do not have super-interface.
+     */
+    public SortedSet<TypeElement> baseInterfaces() {
+        return baseInterfaces;
+    }
+
+    /**
+     *  Return the set of base enums. This is the set of enums
+     *  which do not have super-enums.
+     */
+    public SortedSet<TypeElement> baseEnums() {
+        return baseEnums;
+    }
+
+    /**
+     * Return the set of base annotation types. This is the set
+     * of annotation types which do not have super-annotation types.
+     */
+    public SortedSet<TypeElement> baseAnnotationTypes() {
+        return baseAnnotationTypes;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ClassUseMapper.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,603 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.TypeParameterElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.ErrorType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.TypeVariable;
+import javax.lang.model.type.WildcardType;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.SimpleElementVisitor9;
+import javax.lang.model.util.SimpleTypeVisitor9;
+import javax.lang.model.util.Types;
+
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.formats.html.ConfigurationImpl;
+
+/**
+ * Map all class uses for a given class.
+ *
+ * <p>
+ * <b>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.</b>
+ *
+ * @author Robert G. Field
+ */
+public class ClassUseMapper {
+
+    private final ClassTree classtree;
+
+    /**
+     * Mapping of TypeElements to set of PackageElements used by that class.
+     */
+    public final Map<TypeElement, Set<PackageElement>> classToPackage;
+
+    /**
+     * Mapping of TypeElements representing annotations to a set of PackageElements that use the annotation.
+     */
+    public final Map<TypeElement, List<PackageElement>> classToPackageAnnotations = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to a set of TypeElements used by that class.
+     */
+    public final Map<TypeElement, Set<TypeElement>> classToClass = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to a list of TypeElements which are direct or indirect subClasses of
+     * that class.
+     */
+    public final Map<TypeElement, List<TypeElement>> classToSubclass = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of TypeElements which are direct or indirect subInterfaces of
+     * that interface.
+     */
+    public final Map<TypeElement, List<TypeElement>> classToSubinterface = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of TypeElements which implement this interface.
+     */
+    public Map<TypeElement, List<TypeElement>> classToImplementingClass = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of VariableElements declared as that class.
+     */
+    public final Map<TypeElement, List<VariableElement>> classToField = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of ExecutableElements returning that class.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodReturn = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of ExecutableElements having that class as an arg.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodArgs = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of ExecutableElements which throws that class.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodThrows = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of ExecutableElements (constructors) having that
+     * class as an arg.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToConstructorArgs = new HashMap<>();
+
+    /**
+     * Mapping of TypeElements to list of constructors which throws that class.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToConstructorThrows = new HashMap<>();
+
+    /**
+     * The mapping of TypeElements representing annotations to constructors that use them.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToConstructorAnnotations = new HashMap<>();
+
+    /**
+     * The mapping of TypeElement representing annotations to constructor parameters that use them.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToConstructorParamAnnotation = new HashMap<>();
+
+    /**
+     * The mapping of TypeElements to constructor arguments that use them as type parameters.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToConstructorArgTypeParam = new HashMap<>();
+
+    /**
+     * The mapping of TypeElement to TypeElement that use them as type parameters.
+     */
+    public final Map<TypeElement, List<TypeElement>> classToClassTypeParam = new HashMap<>();
+
+    /**
+     * The mapping of TypeElement representing annotation to TypeElements that use them.
+     */
+    public final Map<TypeElement, List<TypeElement>> classToClassAnnotations = new HashMap<>();
+
+    /**
+     * The mapping of TypeElement to methods that use them as type parameters.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodTypeParam = new HashMap<>();
+
+    /**
+     * The mapping of TypeElement to method arguments that use them as type parameters.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodArgTypeParam = new HashMap<>();
+
+    /**
+     * The mapping of TypeElement representing annotation to methods that use them.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodAnnotations = new HashMap<>();
+
+    /**
+     * The mapping of TypeElements to methods that have return type with type parameters
+     * of that class.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodReturnTypeParam = new HashMap<>();
+
+    /**
+     * The mapping of TypeElements representing annotations to method parameters that use them.
+     */
+    public final Map<TypeElement, List<ExecutableElement>> classToMethodParamAnnotation = new HashMap<>();
+
+    /**
+     * The mapping of TypeElements to fields that use them as type parameters.
+     */
+    public final Map<TypeElement, List<VariableElement>> classToFieldTypeParam = new HashMap<>();
+
+    /**
+     * The mapping of TypeElements representing annotation to fields that use them.
+     */
+    public final Map<TypeElement, List<VariableElement>> annotationToField = new HashMap<>();
+
+    private final DocletEnvironment root;
+    private final Elements elementUtils;
+    private final Types typeUtils;
+    private final Utils utils;
+
+    public ClassUseMapper(ConfigurationImpl configuration, ClassTree classtree) {
+        root = configuration.root;
+        elementUtils = root.getElementUtils();
+        typeUtils = root.getTypeUtils();
+        utils = configuration.utils;
+        this.classtree = classtree;
+        classToPackage = new TreeMap<>(utils.makeClassUseComparator());
+        // Map subclassing, subinterfacing implementing, ...
+        for (TypeElement te : classtree.baseClasses()) {
+            subclasses(te);
+        }
+        for (TypeElement intfc : classtree.baseInterfaces()) {
+            // does subinterfacing as side-effect
+            implementingClasses(intfc);
+        }
+        // Map methods, fields, constructors using a class.
+        Set<TypeElement> classes = root.getIncludedClasses();
+        for (TypeElement aClass : classes) {
+            PackageElement pkg = elementUtils.getPackageOf(aClass);
+            mapAnnotations(classToPackageAnnotations, pkg, pkg);
+            mapTypeParameters(classToClassTypeParam, aClass, aClass);
+            mapAnnotations(classToClassAnnotations, aClass, aClass);
+            List<VariableElement> fields = utils.getFields(aClass);
+            for (VariableElement fd : fields) {
+                mapTypeParameters(classToFieldTypeParam, fd, fd);
+                mapAnnotations(annotationToField, fd, fd);
+                SimpleTypeVisitor9<Void, VariableElement> stv = new SimpleTypeVisitor9<Void, VariableElement>() {
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitArray(ArrayType t, VariableElement p) {
+                        return visit(t.getComponentType(), p);
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitDeclared(DeclaredType t, VariableElement p) {
+                        add(classToField, (TypeElement) t.asElement(), p);
+                        return null;
+                    }
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitTypeVariable(TypeVariable t, VariableElement p) {
+                        return visit(typeUtils.erasure(t), p);
+                    }
+                };
+                stv.visit(fd.asType(), fd);
+            }
+
+            List<ExecutableElement> ctors = utils.getConstructors(aClass);
+            for (ExecutableElement ctor : ctors) {
+                mapAnnotations(classToConstructorAnnotations, ctor, ctor);
+                mapExecutable(ctor);
+            }
+
+            List<ExecutableElement> methods = utils.getMethods(aClass);
+            for (ExecutableElement method : methods) {
+                mapExecutable(method);
+                mapTypeParameters(classToMethodTypeParam, method, method);
+                mapAnnotations(classToMethodAnnotations, method, method);
+                SimpleTypeVisitor9<Void, ExecutableElement> stv = new SimpleTypeVisitor9<Void, ExecutableElement>() {
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitArray(ArrayType t, ExecutableElement p) {
+                        TypeMirror componentType = t.getComponentType();
+                        return visit(utils.isTypeVariable(componentType)
+                                ? typeUtils.erasure(componentType)
+                                : componentType, p);
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitDeclared(DeclaredType t, ExecutableElement p) {
+                        mapTypeParameters(classToMethodReturnTypeParam, t, p);
+                        add(classToMethodReturn, (TypeElement) t.asElement(), p);
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    protected Void defaultAction(TypeMirror e, ExecutableElement p) {
+                        return null;
+                    }
+                };
+                stv.visit(method.getReturnType(), method);
+            }
+        }
+    }
+
+    /**
+     * Return all subClasses of a class AND fill-in classToSubclass map.
+     */
+    private Collection<TypeElement> subclasses(TypeElement te) {
+        Collection<TypeElement> ret = classToSubclass.get(te);
+        if (ret == null) {
+            ret = new TreeSet<>(utils.makeClassUseComparator());
+            Set<TypeElement> subs = classtree.subClasses(te);
+            if (subs != null) {
+                ret.addAll(subs);
+                for (TypeElement sub : subs) {
+                    ret.addAll(subclasses(sub));
+                }
+            }
+            addAll(classToSubclass, te, ret);
+        }
+        return ret;
+    }
+
+    /**
+     * Return all subInterfaces of an interface AND fill-in classToSubinterface map.
+     */
+    private Collection<TypeElement> subinterfaces(TypeElement te) {
+        Collection<TypeElement> ret = classToSubinterface.get(te);
+        if (ret == null) {
+            ret = new TreeSet<>(utils.makeClassUseComparator());
+            Set<TypeElement> subs = classtree.subInterfaces(te);
+            if (subs != null) {
+                ret.addAll(subs);
+                for (TypeElement sub : subs) {
+                    ret.addAll(subinterfaces(sub));
+                }
+            }
+            addAll(classToSubinterface, te, ret);
+        }
+        return ret;
+    }
+
+    /**
+     * Return all implementing classes of an interface (including all subClasses of implementing
+     * classes and all classes implementing subInterfaces) AND fill-in both classToImplementingClass
+     * and classToSubinterface maps.
+     */
+    private Collection<TypeElement> implementingClasses(TypeElement te) {
+        Collection<TypeElement> ret = classToImplementingClass.get(te);
+        if (ret == null) {
+            ret = new TreeSet<>(utils.makeClassUseComparator());
+            Set<TypeElement> impl = classtree.implementingClasses(te);
+            if (impl != null) {
+                ret.addAll(impl);
+                for (TypeElement anImpl : impl) {
+                    ret.addAll(subclasses(anImpl));
+                }
+            }
+            for (TypeElement intfc : subinterfaces(te)) {
+                ret.addAll(implementingClasses(intfc));
+            }
+            addAll(classToImplementingClass, te, ret);
+        }
+        return ret;
+    }
+
+    /**
+     * Determine classes used by a method or constructor, so they can be inverse mapped.
+     */
+    private void mapExecutable(ExecutableElement ee) {
+        final boolean isConstructor = utils.isConstructor(ee);
+        Set<TypeMirror> classArgs = new TreeSet<>(utils.makeTypeMirrorClassUseComparator());
+        for (VariableElement param : ee.getParameters()) {
+            TypeMirror pType = param.asType();
+            // primitives don't get mapped and type variables are mapped elsewhere
+            if (!pType.getKind().isPrimitive() && !utils.isTypeVariable(pType)) {
+                // no duplicates please
+                if (classArgs.add(pType)) {
+                    new SimpleTypeVisitor9<Void, ExecutableElement>() {
+                        @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                        public Void visitArray(ArrayType t, ExecutableElement p) {
+                            return visit(t.getComponentType(), p);
+                        }
+
+                        @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                        public Void visitDeclared(DeclaredType t, ExecutableElement p) {
+                            add(isConstructor
+                                    ? classToConstructorArgs
+                                    : classToMethodArgs,
+                                    (TypeElement) t.asElement(), p);
+                            return null;
+                        }
+                        @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                        public Void visitTypeVariable(TypeVariable t, ExecutableElement p) {
+                            visit(typeUtils.erasure(t), p);
+                            return null;
+                        }
+                    }.visit(pType, ee);
+                    mapTypeParameters(isConstructor
+                            ? classToConstructorArgTypeParam
+                            : classToMethodArgTypeParam,
+                            pType, ee);
+                }
+            }
+            mapAnnotations(isConstructor
+                    ? classToConstructorParamAnnotation
+                    : classToMethodParamAnnotation,
+                    param, ee);
+
+        }
+        for (TypeMirror anException : ee.getThrownTypes()) {
+            SimpleTypeVisitor9<Void, ExecutableElement> stv = new SimpleTypeVisitor9<Void, ExecutableElement>() {
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Void visitArray(ArrayType t, ExecutableElement p) {
+                    super.visit(t.getComponentType(), p);
+                    return null;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Void visitDeclared(DeclaredType t, ExecutableElement p) {
+                    add(isConstructor ? classToConstructorThrows : classToMethodThrows,
+                            (TypeElement) t.asElement(), p);
+                    return null;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Void visitError(ErrorType t, ExecutableElement p) {
+                    add(isConstructor ? classToConstructorThrows : classToMethodThrows,
+                            (TypeElement) t.asElement(), p);
+                    return null;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected Void defaultAction(TypeMirror e, ExecutableElement p) {
+                    throw new AssertionError("this should not happen");
+                }
+            };
+
+            stv.visit(typeUtils.erasure(anException), ee);
+        }
+    }
+
+    private <T> List<T> refList(Map<TypeElement, List<T>> map, Element element) {
+        List<T> list = map.get(element);
+        if (list == null) {
+            list = new ArrayList<>();
+            map.put((TypeElement) element, list);
+        }
+        return list;
+    }
+
+    private Set<PackageElement> packageSet(TypeElement te) {
+        Set<PackageElement> pkgSet = classToPackage.get(te);
+        if (pkgSet == null) {
+            pkgSet = new TreeSet<>(utils.makeClassUseComparator());
+            classToPackage.put(te, pkgSet);
+        }
+        return pkgSet;
+    }
+
+    private Set<TypeElement> classSet(TypeElement te) {
+        Set<TypeElement> clsSet = classToClass.get(te);
+        if (clsSet == null) {
+            clsSet = new TreeSet<>(utils.makeClassUseComparator());
+            classToClass.put(te, clsSet);
+        }
+        return clsSet;
+    }
+
+    private <T extends Element> void add(Map<TypeElement, List<T>> map, TypeElement te, T ref) {
+        // add to specified map
+        refList(map, te).add(ref);
+        // add ref's package to package map and class map
+        packageSet(te).add(elementUtils.getPackageOf(ref));
+        TypeElement entry = (utils.isField((Element) ref)
+                || utils.isConstructor((Element) ref)
+                || utils.isMethod((Element) ref))
+                ? (TypeElement) ref.getEnclosingElement()
+                : (TypeElement) ref;
+        classSet(te).add(entry);
+    }
+
+    private void addAll(Map<TypeElement, List<TypeElement>> map, TypeElement te, Collection<TypeElement> refs) {
+        if (refs == null) {
+            return;
+        }
+        // add to specified map
+        refList(map, te).addAll(refs);
+
+        Set<PackageElement> pkgSet = packageSet(te);
+        Set<TypeElement> clsSet = classSet(te);
+        // add ref's package to package map and class map
+        for (TypeElement cls : refs) {
+            pkgSet.add(utils.containingPackage(cls));
+            clsSet.add(cls);
+        }
+    }
+
+    /**
+     * Map the TypeElements to the members that use them as type parameters.
+     *
+     * @param map the map the insert the information into.
+     * @param element the te whose type parameters are being checked.
+     * @param holder the holder that owns the type parameters.
+     */
+    private <T extends Element> void mapTypeParameters(final Map<TypeElement, List<T>> map,
+            Element element, final T holder) {
+
+        SimpleElementVisitor9<Void, Void> elementVisitor
+                = new SimpleElementVisitor9<Void, Void>() {
+
+                    private void addParameters(TypeParameterElement e) {
+                        for (TypeMirror type : utils.getBounds(e)) {
+                            addTypeParameterToMap(map, type, holder);
+                        }
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitType(TypeElement e, Void p) {
+                        for (TypeParameterElement param : e.getTypeParameters()) {
+                            addParameters(param);
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitExecutable(ExecutableElement e, Void p) {
+                        for (TypeParameterElement param : e.getTypeParameters()) {
+                            addParameters(param);
+                        }
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    protected Void defaultAction(Element e, Void p) {
+                        mapTypeParameters(map, e.asType(), holder);
+                        return null;
+                    }
+
+                    @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                    public Void visitTypeParameter(TypeParameterElement e, Void p) {
+                        addParameters(e);
+                        return null;
+                    }
+                };
+        elementVisitor.visit(element);
+    }
+
+    private <T extends Element> void mapTypeParameters(final Map<TypeElement, List<T>> map,
+            TypeMirror aType, final T holder) {
+
+        SimpleTypeVisitor9<Void, Void> tv = new SimpleTypeVisitor9<Void, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Void visitWildcard(WildcardType t, Void p) {
+                TypeMirror bound = t.getExtendsBound();
+                if (bound != null) {
+                    addTypeParameterToMap(map, bound, holder);
+                }
+                bound = t.getSuperBound();
+                if (bound != null) {
+                    addTypeParameterToMap(map, bound, holder);
+                }
+                return null;
+            }
+
+            // ParameterizedType
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Void visitDeclared(DeclaredType t, Void p) {
+                for (TypeMirror targ : t.getTypeArguments()) {
+                    addTypeParameterToMap(map, targ, holder);
+                }
+                return null;
+            }
+        };
+        tv.visit(aType);
+    }
+
+    /**
+     * Map the AnnotationType to the members that use them as type parameters.
+     *
+     * @param map the map the insert the information into.
+     * @param element whose type parameters are being checked.
+     * @param holder the holder that owns the type parameters.
+     */
+    private <T extends Element> void mapAnnotations(final Map<TypeElement, List<T>> map,
+            Element e, final T holder) {
+        new SimpleElementVisitor9<Void, Void>() {
+
+            void addAnnotations(Element e) {
+                for (AnnotationMirror a : e.getAnnotationMirrors()) {
+                    add(map, (TypeElement) a.getAnnotationType().asElement(), holder);
+                }
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Void visitPackage(PackageElement e, Void p) {
+                for (AnnotationMirror a : e.getAnnotationMirrors()) {
+                    refList(map, a.getAnnotationType().asElement()).add(holder);
+                }
+                return null;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected Void defaultAction(Element e, Void p) {
+                addAnnotations(e);
+                return null;
+            }
+        }.visit(e);
+    }
+
+    private <T extends Element> void addTypeParameterToMap(final Map<TypeElement, List<T>> map,
+            TypeMirror type, final T holder) {
+        new SimpleTypeVisitor9<Void, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected Void defaultAction(TypeMirror e, Void p) {
+                return super.defaultAction(e, p);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Void visitDeclared(DeclaredType t, Void p) {
+                add(map, (TypeElement) t.asElement(), holder);
+                return null;
+            }
+
+        }.visit(type);
+        mapTypeParameters(map, type, holder);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/CommentHelper.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,665 @@
+/*
+ * Copyright (c) 2015, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.AttributeTree;
+import com.sun.source.doctree.AttributeTree.ValueKind;
+import com.sun.source.doctree.AuthorTree;
+import com.sun.source.doctree.BlockTagTree;
+import com.sun.source.doctree.CommentTree;
+import com.sun.source.doctree.DeprecatedTree;
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.EndElementTree;
+import com.sun.source.doctree.EntityTree;
+import com.sun.source.doctree.IdentifierTree;
+import com.sun.source.doctree.InlineTagTree;
+import com.sun.source.doctree.LinkTree;
+import com.sun.source.doctree.LiteralTree;
+import com.sun.source.doctree.ParamTree;
+import com.sun.source.doctree.ReferenceTree;
+import com.sun.source.doctree.ReturnTree;
+import com.sun.source.doctree.SeeTree;
+import com.sun.source.doctree.SerialDataTree;
+import com.sun.source.doctree.SerialFieldTree;
+import com.sun.source.doctree.SerialTree;
+import com.sun.source.doctree.SinceTree;
+import com.sun.source.doctree.StartElementTree;
+import com.sun.source.doctree.TextTree;
+import com.sun.source.doctree.ThrowsTree;
+import com.sun.source.doctree.UnknownBlockTagTree;
+import com.sun.source.doctree.ValueTree;
+import com.sun.source.doctree.VersionTree;
+import com.sun.source.util.DocTreePath;
+import com.sun.source.util.DocTrees;
+import com.sun.source.util.SimpleDocTreeVisitor;
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+
+/**
+ *  A utility class.
+ *
+ *  <p><b>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.</b>
+ */
+public class CommentHelper {
+    public final TreePath path;
+    public final DocCommentTree dctree;
+    public final Element element;
+    private Element overriddenElement;
+
+    public static final String SPACER = " ";
+
+    public CommentHelper(Configuration configuration, Element element, TreePath path, DocCommentTree dctree) {
+        //this.configuration = configuration;
+        this.element = element;
+        this.path = path;
+        this.dctree = dctree;
+    }
+
+    public void setOverrideElement(Element ove) {
+        if (this.element == ove) {
+            throw new AssertionError("cannot set given element as overriden element");
+        }
+        overriddenElement = ove;
+    }
+
+    @SuppressWarnings("fallthrough")
+    public String getTagName(DocTree dtree) {
+        switch (dtree.getKind()) {
+            case AUTHOR:
+            case DEPRECATED:
+            case PARAM:
+            case RETURN:
+            case SEE:
+            case SERIAL_DATA:
+            case SERIAL_FIELD:
+            case THROWS:
+            case UNKNOWN_BLOCK_TAG:
+            case VERSION:
+                return ((BlockTagTree)dtree).getTagName();
+            case UNKNOWN_INLINE_TAG:
+                return ((InlineTagTree)dtree).getTagName();
+            case ERRONEOUS:
+                return "erroneous";
+            default:
+                return dtree.getKind().tagName;
+        }
+    }
+
+    public boolean isTypeParameter(DocTree dtree) {
+        if (dtree.getKind() == PARAM) {
+            return ((ParamTree)dtree).isTypeParameter();
+        }
+        return false;
+    }
+
+    public String getParameterName(DocTree dtree) {
+        if (dtree.getKind() == PARAM) {
+            return ((ParamTree) dtree).getName().toString();
+        } else {
+            return null;
+        }
+    }
+
+    Element getElement(Configuration c, ReferenceTree rtree) {
+        // likely a synthesized tree
+        if (path == null) {
+            TypeMirror symbol = c.utils.getSymbol(rtree.getSignature());
+            if (symbol == null) {
+                return null;
+            }
+            return  c.root.getTypeUtils().asElement(symbol);
+        }
+        // case A: the element contains no comments associated and
+        // the comments need to be copied from ancestor
+        // case B: the element has @inheritDoc, then the ancestral comment
+        // as appropriate has to be copied over.
+
+        // Case A.
+        if (dctree == null && overriddenElement != null) {
+            CommentHelper ovch = c.utils.getCommentHelper(overriddenElement);
+            return ovch.getElement(c, rtree);
+        }
+        if (dctree == null) {
+            return null;
+        }
+        DocTreePath docTreePath = DocTreePath.getPath(path, dctree, rtree);
+        if (docTreePath == null) {
+            // Case B.
+            if (overriddenElement != null) {
+                CommentHelper ovch = c.utils.getCommentHelper(overriddenElement);
+                return ovch.getElement(c, rtree);
+            }
+            return null;
+        }
+        DocTrees doctrees = c.root.getDocTrees();
+        return doctrees.getElement(docTreePath);
+    }
+
+    public Element getException(Configuration c, DocTree dtree) {
+        if (dtree.getKind() == THROWS || dtree.getKind() == EXCEPTION) {
+            ThrowsTree tt = (ThrowsTree)dtree;
+            ReferenceTree exceptionName = tt.getExceptionName();
+            return getElement(c, exceptionName);
+        }
+        return null;
+    }
+
+    public List<? extends DocTree> getDescription(Configuration c, DocTree dtree) {
+        return getTags(c, dtree);
+    }
+
+    public String getText(List<? extends DocTree> list) {
+        StringBuilder sb = new StringBuilder();
+        for (DocTree dt : list) {
+            sb.append(getText0(dt));
+        }
+        return sb.toString();
+    }
+
+    public String getText(DocTree dt) {
+        return getText0(dt).toString();
+    }
+
+    private StringBuilder getText0(DocTree dt) {
+        final StringBuilder sb = new StringBuilder();
+        new SimpleDocTreeVisitor<Void, Void>() {
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitAttribute(AttributeTree node, Void p) {
+                sb.append(SPACER).append(node.getName());
+                if (node.getValueKind() == ValueKind.EMPTY) {
+                    return null;
+                }
+
+                sb.append("=");
+                String quote;
+                switch (node.getValueKind()) {
+                    case DOUBLE:
+                        quote = "\"";
+                        break;
+                    case SINGLE:
+                        quote = "\'";
+                        break;
+                    default:
+                        quote = "";
+                        break;
+                }
+                sb.append(quote);
+                node.getValue().stream().forEach((dt) -> {
+                    dt.accept(this, null);
+                });
+                sb.append(quote);
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitEndElement(EndElementTree node, Void p) {
+                sb.append("</")
+                        .append(node.getName())
+                        .append(">");
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitEntity(EntityTree node, Void p) {
+                sb.append(node.toString());
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitLink(LinkTree node, Void p) {
+                if (node.getReference() == null) {
+                    return null;
+                }
+
+                node.getReference().accept(this, null);
+                node.getLabel().stream().forEach((dt) -> {
+                    dt.accept(this, null);
+                });
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitLiteral(LiteralTree node, Void p) {
+                if (node.getKind() == CODE) {
+                    sb.append("<").append(node.getKind().tagName).append(">");
+                }
+                sb.append(node.getBody().toString());
+                if (node.getKind() == CODE) {
+                    sb.append("</").append(node.getKind().tagName).append(">");
+                }
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitReference(ReferenceTree node, Void p) {
+                sb.append(node.getSignature());
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitSee(SeeTree node, Void p) {
+                node.getReference().stream().forEach((dt) -> {
+                    dt.accept(this, null);
+                });
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitSerial(SerialTree node, Void p) {
+                node.getDescription().stream().forEach((dt) -> {
+                    dt.accept(this, null);
+                });
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitStartElement(StartElementTree node, Void p) {
+                sb.append("<");
+                sb.append(node.getName());
+                node.getAttributes().stream().forEach((dt) -> {
+                    dt.accept(this, null);
+                });
+                sb.append((node.isSelfClosing() ? "/>" : ">"));
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitText(TextTree node, Void p) {
+                sb.append(node.getBody());
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitUnknownBlockTag(UnknownBlockTagTree node, Void p) {
+                node.getContent().stream().forEach((dt) -> {
+                    dt.accept(this, null);
+                });
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Void visitValue(ValueTree node, Void p) {
+                return node.getReference().accept(this, null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            protected Void defaultAction(DocTree node, Void p) {
+                sb.append(node.toString());
+                return null;
+            }
+        }.visit(dt, null);
+        return sb;
+    }
+
+    public String getLabel(Configuration c, DocTree dtree) {
+        return new SimpleDocTreeVisitor<String, Void>() {
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitLink(LinkTree node, Void p) {
+                StringBuilder sb = new StringBuilder();
+                node.getLabel().stream().forEach((dt) -> {
+                    sb.append(getText(dt));
+                });
+                return sb.toString();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitSee(SeeTree node, Void p) {
+                StringBuilder sb = new StringBuilder();
+                node.getReference().stream().filter((dt) -> (c.utils.isText(dt))).forEach((dt) -> {
+                    sb.append(((TextTree)dt).getBody());
+                });
+                return sb.toString();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            protected String defaultAction(DocTree node, Void p) {
+                return "";
+            }
+        }.visit(dtree, null);
+    }
+
+    public TypeElement getReferencedClass(Configuration c, DocTree dtree) {
+        Element e = getReferencedElement(c, dtree);
+        if (e == null) {
+            return null;
+        } else if (c.utils.isTypeElement(e)) {
+            return (TypeElement) e;
+        } else if (!c.utils.isPackage(e)) {
+            return c.utils.getEnclosingTypeElement(e);
+        }
+        return null;
+    }
+
+    public String getReferencedClassName(Configuration c, DocTree dtree) {
+        Element e = getReferencedClass(c, dtree);
+        if (e != null) {
+            return c.utils.isTypeElement(e) ? c.utils.getSimpleName(e) : null;
+        }
+        String s = getReferencedSignature(dtree);
+        if (s == null) {
+            return null;
+        }
+        int n = s.indexOf("#");
+        return (n == -1) ? s : s.substring(0, n);
+    }
+
+    public Element getReferencedMember(Configuration c, DocTree dtree) {
+        Element e = getReferencedElement(c, dtree);
+        if (e == null) {
+            return null;
+        }
+        return (c.utils.isExecutableElement(e) || c.utils.isVariableElement(e)) ? e : null;
+    }
+
+    public String getReferencedMemberName(DocTree dtree) {
+        String s = getReferencedSignature(dtree);
+        if (s == null) {
+            return null;
+        }
+        int n = s.indexOf("#");
+        return (n == -1) ? null : s.substring(n + 1);
+    }
+
+    public String getReferencedMemberName(Configuration c, Element e) {
+        if (e == null) {
+            return null;
+        }
+        return c.utils.isExecutableElement(e)
+                ? c.utils.getSimpleName(e) + c.utils.makeSignature((ExecutableElement) e, true, true)
+                : c.utils.getSimpleName(e);
+    }
+
+    public PackageElement getReferencedPackage(Configuration c, DocTree dtree) {
+        Element e = getReferencedElement(c, dtree);
+        if (e != null) {
+            return c.utils.containingPackage(e);
+        }
+        return null;
+    }
+
+    public List<? extends DocTree> getFirstSentenceTrees(Configuration c, List<? extends DocTree> body) {
+        List<DocTree> firstSentence = c.root.getDocTrees().getFirstSentence(body);
+        return firstSentence;
+    }
+
+    public List<? extends DocTree> getFirstSentenceTrees(Configuration c, DocTree dtree) {
+        return getFirstSentenceTrees(c, getBody(c, dtree));
+    }
+
+    private Element getReferencedElement(Configuration c, DocTree dtree) {
+        return new SimpleDocTreeVisitor<Element, Void>() {
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Element visitSee(SeeTree node, Void p) {
+                for (DocTree dt : node.getReference()) {
+                    return visit(dt, null);
+                }
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Element visitLink(LinkTree node, Void p) {
+                return visit(node.getReference(), null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Element visitValue(ValueTree node, Void p) {
+                return visit(node.getReference(), null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Element visitReference(ReferenceTree node, Void p) {
+                return getElement(c, node);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public Element visitSerialField(SerialFieldTree node, Void p) {
+                return visit(node.getType(), null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            protected Element defaultAction(DocTree node, Void p) {
+               return null;
+            }
+        }.visit(dtree, null);
+    }
+
+    public  String getReferencedSignature(DocTree dtree) {
+        return new SimpleDocTreeVisitor<String, Void>() {
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitSee(SeeTree node, Void p) {
+                for (DocTree dt : node.getReference()) {
+                    return visit(dt, null);
+                }
+                return null;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitLink(LinkTree node, Void p) {
+                return visit(node.getReference(), null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitValue(ValueTree node, Void p) {
+                return visit(node.getReference(), null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitReference(ReferenceTree node, Void p) {
+                return node.getSignature();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public String visitSerialField(SerialFieldTree node, Void p) {
+                return visit(node.getType(), null);
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            protected String defaultAction(DocTree node, Void p) {
+               return null;
+            }
+        }.visit(dtree, null);
+    }
+
+    public List<? extends DocTree> getReference(DocTree dtree) {
+        return dtree.getKind() == SEE ? ((SeeTree)dtree).getReference() : null;
+    }
+
+    public ReferenceTree getExceptionName(DocTree dtree) {
+        return (dtree.getKind() == THROWS || dtree.getKind() == EXCEPTION)
+                ? ((ThrowsTree)dtree).getExceptionName()
+                : null;
+    }
+
+    public IdentifierTree getName(DocTree dtree) {
+        switch (dtree.getKind()) {
+            case PARAM:
+                return ((ParamTree)dtree).getName();
+            case SERIAL_FIELD:
+                return ((SerialFieldTree)dtree).getName();
+            default:
+                return null;
+            }
+    }
+
+    public List<? extends DocTree> getTags(Configuration c, DocTree dtree) {
+        return new SimpleDocTreeVisitor<List<? extends DocTree>, Void>() {
+            List<? extends DocTree> asList(String content) {
+                List<DocTree> out = new ArrayList<>();
+                out.add((TextTree)c.cmtUtils.makeTextTree(content));
+                return out;
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitAuthor(AuthorTree node, Void p) {
+                return node.getName();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitComment(CommentTree node, Void p) {
+                return asList(node.getBody());
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitDeprecated(DeprecatedTree node, Void p) {
+                return node.getBody();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitDocComment(DocCommentTree node, Void p) {
+                return node.getBody();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitLiteral(LiteralTree node, Void p) {
+                return asList(node.getBody().getBody());
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitSince(SinceTree node, Void p) {
+                return node.getBody();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitText(TextTree node, Void p) {
+                return asList(node.getBody());
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitVersion(VersionTree node, Void p) {
+                return node.getBody();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitParam(ParamTree node, Void p) {
+               return node.getDescription();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitReturn(ReturnTree node, Void p) {
+                return node.getDescription();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitSee(SeeTree node, Void p) {
+                return node.getReference();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitSerial(SerialTree node, Void p) {
+                return node.getDescription();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitSerialData(SerialDataTree node, Void p) {
+                return node.getDescription();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitSerialField(SerialFieldTree node, Void p) {
+                return node.getDescription();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitThrows(ThrowsTree node, Void p) {
+                 return node.getDescription();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            public List<? extends DocTree> visitUnknownBlockTag(UnknownBlockTagTree node, Void p) {
+                return node.getContent();
+            }
+
+            @Override @DefinedBy(Api.COMPILER_TREE)
+            protected List<? extends DocTree> defaultAction(DocTree node, Void p) {
+               return Collections.emptyList();
+            }
+        }.visit(dtree, null);
+    }
+
+    public List<? extends DocTree> getBody(Configuration c, DocTree dtree) {
+        return getTags(c, dtree);
+    }
+
+    public ReferenceTree getType(DocTree dtree) {
+        if (dtree.getKind() == SERIAL_FIELD) {
+            return ((SerialFieldTree)dtree).getType();
+        } else {
+            return null;
+        }
+    }
+
+    public DocTreePath getDocTreePath(DocTree dtree) {
+        if (path == null || dctree == null || dtree == null)
+            return null;
+        return DocTreePath.getPath(path, dctree, dtree);
+    }
+
+    public Element getOverriddenElement() {
+        return overriddenElement;
+    }
+
+
+    /**
+     * For debugging purposes only. Do not rely on this for other things.
+     * @return a string representation.
+     */
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder("CommentHelper{" + "path=" + path + ", dctree=" + dctree);
+        sb.append(", element=");
+        sb.append(element.getEnclosingElement());
+        sb.append("::");
+        sb.append(element);
+        sb.append(", overriddenElement=");
+        if (overriddenElement != null) {
+            sb.append(overriddenElement.getEnclosingElement());
+            sb.append("::");
+            sb.append(overriddenElement);
+        } else {
+            sb.append("<none>");
+        }
+        sb.append('}');
+        return sb.toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DeprecatedAPIListBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Build list of all the deprecated packages, classes, constructors, fields and methods.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+public class DeprecatedAPIListBuilder {
+    /**
+     * List of deprecated type Lists.
+     */
+    private final Map<DeprElementKind, SortedSet<Element>> deprecatedMap;
+    private final Configuration configuration;
+    private final Utils utils;
+    public static enum DeprElementKind {
+        PACKAGE,
+        INTERFACE,
+        CLASS,
+        ENUM,
+        EXCEPTION,              // no ElementKind mapping
+        ERROR,                  // no ElementKind mapping
+        ANNOTATION_TYPE,
+        FIELD,
+        METHOD,
+        CONSTRUCTOR,
+        ENUM_CONSTANT,
+        ANNOTATION_TYPE_MEMBER // no ElementKind mapping
+    };
+    /**
+     * Constructor.
+     *
+     * @param configuration the current configuration of the doclet
+     */
+    public DeprecatedAPIListBuilder(Configuration configuration) {
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        deprecatedMap = new EnumMap<>(DeprElementKind.class);
+        for (DeprElementKind kind : DeprElementKind.values()) {
+            deprecatedMap.put(kind,
+                    new TreeSet<>(utils.makeGeneralPurposeComparator()));
+        }
+        buildDeprecatedAPIInfo();
+    }
+
+    /**
+     * Build the sorted list of all the deprecated APIs in this run.
+     * Build separate lists for deprecated packages, classes, constructors,
+     * methods and fields.
+     *
+     * @param configuration the current configuration of the doclet.
+     */
+    private void buildDeprecatedAPIInfo() {
+        SortedSet<PackageElement> packages = configuration.packages;
+        SortedSet<Element> pset = deprecatedMap.get(DeprElementKind.PACKAGE);
+        for (Element pe : packages) {
+            if (utils.isDeprecated(pe)) {
+                pset.add(pe);
+            }
+        }
+        deprecatedMap.put(DeprElementKind.PACKAGE, pset);
+        for (Element e : configuration.root.getIncludedClasses()) {
+            TypeElement te = (TypeElement)e;
+            SortedSet<Element> eset;
+            if (utils.isDeprecated(e)) {
+                switch (e.getKind()) {
+                    case ANNOTATION_TYPE:
+                        eset = deprecatedMap.get(DeprElementKind.ANNOTATION_TYPE);
+                        eset.add(e);
+                        break;
+                    case CLASS:
+                        if (utils.isError(te)) {
+                            eset = deprecatedMap.get(DeprElementKind.ERROR);
+                        } else if (utils.isException(te)) {
+                            eset = deprecatedMap.get(DeprElementKind.EXCEPTION);
+                        } else {
+                            eset = deprecatedMap.get(DeprElementKind.CLASS);
+                        }
+                        eset.add(e);
+                        break;
+                    case INTERFACE:
+                        eset = deprecatedMap.get(DeprElementKind.INTERFACE);
+                        eset.add(e);
+                        break;
+                    case ENUM:
+                        eset = deprecatedMap.get(DeprElementKind.ENUM);
+                        eset.add(e);
+                        break;
+                }
+            }
+            composeDeprecatedList(deprecatedMap.get(DeprElementKind.FIELD),
+                    utils.getFields(te));
+            composeDeprecatedList(deprecatedMap.get(DeprElementKind.METHOD),
+                    utils.getMethods(te));
+            composeDeprecatedList(deprecatedMap.get(DeprElementKind.CONSTRUCTOR),
+                    utils.getConstructors(te));
+            if (utils.isEnum(e)) {
+                composeDeprecatedList(deprecatedMap.get(DeprElementKind.ENUM_CONSTANT),
+                        utils.getEnumConstants(te));
+            }
+            if (utils.isAnnotationType(e)) {
+                composeDeprecatedList(deprecatedMap.get(DeprElementKind.ANNOTATION_TYPE_MEMBER),
+                        utils.getAnnotationMembers(te));
+
+            }
+        }
+    }
+
+    /**
+     * Add the members into a single list of deprecated members.
+     *
+     * @param list List of all the particular deprecated members, e.g. methods.
+     * @param members members to be added in the list.
+     */
+    private void composeDeprecatedList(SortedSet<Element> sset, List<? extends Element> members) {
+        for (Element member : members) {
+            if (utils.isDeprecated(member)) {
+                sset.add(member);
+            }
+        }
+    }
+
+    /**
+     * Return the list of deprecated elements of a given type.
+     *
+     * @param kind the DeprElementKind
+     * @return
+     */
+    public SortedSet<Element> getSet(DeprElementKind kind) {
+        return deprecatedMap.get(kind);
+    }
+
+    /**
+     * Return true if the list of a given type has size greater than 0.
+     *
+     * @param type the type of list being checked.
+     */
+    public boolean hasDocumentation(DeprElementKind kind) {
+        return !deprecatedMap.get(kind).isEmpty();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocFile.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,245 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+
+import javax.tools.JavaFileManager.Location;
+import javax.tools.StandardLocation;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Abstraction for handling files, which may be specified directly
+ * (e.g. via a path on the command line) or relative to a Location.
+ *
+ *  <p><b>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.</b>
+ *
+ */
+public abstract class DocFile {
+
+    /** Create a DocFile for a directory. */
+    public static DocFile createFileForDirectory(Configuration configuration, String file) {
+        return DocFileFactory.getFactory(configuration).createFileForDirectory(file);
+    }
+
+    /** Create a DocFile for a file that will be opened for reading. */
+    public static DocFile createFileForInput(Configuration configuration, String file) {
+        return DocFileFactory.getFactory(configuration).createFileForInput(file);
+    }
+
+    /** Create a DocFile for a file that will be opened for writing. */
+    public static DocFile createFileForOutput(Configuration configuration, DocPath path) {
+        return DocFileFactory.getFactory(configuration).createFileForOutput(path);
+    }
+
+    private final Configuration configuration;
+
+    /**
+     * The location for this file. Maybe null if the file was created without
+     * a location or path.
+     */
+    protected final Location location;
+
+    /**
+     * The path relative to the (output) location. Maybe null if the file was
+     * created without a location or path.
+     */
+    protected final DocPath path;
+
+    /**
+     * List the directories and files found in subdirectories along the
+     * elements of the given location.
+     * @param configuration the doclet configuration
+     * @param location currently, only {@link StandardLocation#SOURCE_PATH} is supported.
+     * @param path the subdirectory of the directories of the location for which to
+     *  list files
+     */
+    public static Iterable<DocFile> list(Configuration configuration, Location location, DocPath path) {
+        return DocFileFactory.getFactory(configuration).list(location, path);
+    }
+
+    /** Create a DocFile without a location or path */
+    protected DocFile(Configuration configuration) {
+        this.configuration = configuration;
+        this.location = null;
+        this.path = null;
+    }
+
+    /** Create a DocFile for a given location and relative path. */
+    protected DocFile(Configuration configuration, Location location, DocPath path) {
+        this.configuration = configuration;
+        this.location = location;
+        this.path = path;
+    }
+
+    /** Open an input stream for the file. */
+    public abstract InputStream openInputStream() throws IOException;
+
+    /**
+     * Open an output stream for the file.
+     * The file must have been created with a location of
+     * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT}
+     * and a corresponding relative path.
+     */
+    public abstract OutputStream openOutputStream() throws IOException, UnsupportedEncodingException;
+
+    /**
+     * Open an writer for the file, using the encoding (if any) given in the
+     * doclet configuration.
+     * The file must have been created with a location of
+     * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
+     */
+    public abstract Writer openWriter() throws IOException, UnsupportedEncodingException;
+
+    /**
+     * Copy the contents of another file directly to this file.
+     */
+    public void copyFile(DocFile fromFile) throws IOException {
+        try (OutputStream output = openOutputStream();
+             InputStream input = fromFile.openInputStream()) {
+            byte[] bytearr = new byte[1024];
+            int len;
+            while ((len = input.read(bytearr)) != -1) {
+                output.write(bytearr, 0, len);
+            }
+        }
+        catch (FileNotFoundException | SecurityException exc) {
+        }
+    }
+
+    /**
+     * Copy the contents of a resource file to this file.
+     * @param resource the path of the resource, relative to the package of this class
+     * @param overwrite whether or not to overwrite the file if it already exists
+     * @param replaceNewLine if false, the file is copied as a binary file;
+     *     if true, the file is written line by line, using the platform line
+     *     separator
+     */
+    public void copyResource(DocPath resource, boolean overwrite, boolean replaceNewLine) {
+        if (exists() && !overwrite)
+            return;
+
+        try {
+            InputStream in = Configuration.class.getResourceAsStream(resource.getPath());
+            if (in == null)
+                return;
+
+            try (OutputStream out = openOutputStream()) {
+                if (!replaceNewLine) {
+                    byte[] buf = new byte[2048];
+                    int n;
+                    while ((n = in.read(buf)) > 0)
+                        out.write(buf, 0, n);
+                } else {
+                    try (BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+                         BufferedWriter writer = new BufferedWriter(configuration.docencoding == null
+                                                                    ? new OutputStreamWriter(out)
+                                                                    : new OutputStreamWriter(out, configuration.docencoding))) {
+                        String line;
+                        while ((line = reader.readLine()) != null) {
+                            writer.write(line);
+                            writer.write(DocletConstants.NL);
+                        }
+                    }
+                }
+            } finally {
+                in.close();
+            }
+        } catch (IOException e) {
+            e.printStackTrace(System.err);
+            throw new DocletAbortException(e);
+        }
+    }
+
+    /** Return true if the file can be read. */
+    public abstract boolean canRead();
+
+    /** Return true if the file can be written. */
+    public abstract boolean canWrite();
+
+    /** Return true if the file exists. */
+    public abstract boolean exists();
+
+    /** Return the base name (last component) of the file name. */
+    public abstract String getName();
+
+    /** Return the file system path for this file. */
+    public abstract String getPath();
+
+    /** Return true if file has an absolute path name. */
+    public abstract boolean isAbsolute();
+
+    /** Return true if file identifies a directory. */
+    public abstract boolean isDirectory();
+
+    /** Return true if file identifies a file. */
+    public abstract boolean isFile();
+
+    /** Return true if this file is the same as another. */
+    public abstract boolean isSameFile(DocFile other);
+
+    /** If the file is a directory, list its contents. */
+    public abstract Iterable<DocFile> list() throws IOException;
+
+    /** Create the file as a directory, including any parent directories. */
+    public abstract boolean mkdirs();
+
+    /**
+     * Derive a new file by resolving a relative path against this file.
+     * The new file will inherit the configuration and location of this file
+     * If this file has a path set, the new file will have a corresponding
+     * new path.
+     */
+    public abstract DocFile resolve(DocPath p);
+
+    /**
+     * Derive a new file by resolving a relative path against this file.
+     * The new file will inherit the configuration and location of this file
+     * If this file has a path set, the new file will have a corresponding
+     * new path.
+     */
+    public abstract DocFile resolve(String p);
+
+    /**
+     * Resolve a relative file against the given output location.
+     * @param locn Currently, only
+     * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} is supported.
+     */
+    public abstract DocFile resolveAgainst(Location locn);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocFileFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Factory for DocFile objects.
+ *
+ *  <p><b>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.</b>
+ *
+ */
+public abstract class DocFileFactory {
+    /**
+     * Get the appropriate factory, based on the file manager given in the
+     * configuration.
+     */
+    static synchronized DocFileFactory getFactory(Configuration configuration) {
+        DocFileFactory f = configuration.docFileFactory;
+        if (f == null) {
+            JavaFileManager fm = configuration.getFileManager();
+            if (fm instanceof StandardJavaFileManager) {
+                f = new StandardDocFileFactory(configuration);
+            } else {
+                throw new IllegalStateException();
+            }
+            configuration.docFileFactory = f;
+        }
+        return f;
+    }
+
+    protected Configuration configuration;
+
+    protected DocFileFactory(Configuration configuration) {
+        this.configuration = configuration;
+    }
+
+    /** Create a DocFile for a directory. */
+    abstract DocFile createFileForDirectory(String file);
+
+    /** Create a DocFile for a file that will be opened for reading. */
+    abstract DocFile createFileForInput(String file);
+
+    /** Create a DocFile for a file that will be opened for writing. */
+    abstract DocFile createFileForOutput(DocPath path);
+
+    /**
+     * List the directories and files found in subdirectories along the
+     * elements of the given location.
+     * @param location currently, only {@link StandardLocation#SOURCE_PATH} is supported.
+     * @param path the subdirectory of the directories of the location for which to
+     *  list files
+     */
+    abstract Iterable<DocFile> list(Location location, DocPath path);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocFinder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,304 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.taglets.InheritableTaglet;
+
+/**
+ * Search for the requested documentation.  Inherit documentation if necessary.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class DocFinder {
+
+    public static final class DocTreeInfo {
+        public final DocTree docTree;
+        public final Element element;
+
+        public DocTreeInfo() {
+            this.docTree = null;
+            this.element = null;
+        }
+
+        public DocTreeInfo(DocTree docTree, Element baseElement) {
+            this.docTree = docTree;
+            this.element = baseElement;
+        }
+
+        @Override
+        public String toString() {
+            return "DocTreeInfo{" + "docTree=" + docTree + ", element=" + element + '}';
+        }
+    }
+
+    /**
+     * The class that encapsulates the input.
+     */
+    public static class Input {
+        /**
+         * The element to search documentation from.
+         */
+        public Element element;
+        /**
+         * The taglet to search for documentation on behalf of. Null if we want
+         * to search for overall documentation.
+         */
+        public InheritableTaglet taglet = null;
+
+        /**
+         * The id of the tag to retrieve documentation for.
+         */
+        public String tagId = null;
+
+        /**
+         * The tag to retrieve documentation for.  This is only used for the
+         * inheritDoc tag.
+         */
+        public final DocTreeInfo docTreeInfo;
+
+        /**
+         * True if we only want to search for the first sentence.
+         */
+        public boolean isFirstSentence = false;
+
+        /**
+         * True if we are looking for documentation to replace the inheritDocTag.
+         */
+        public boolean isInheritDocTag = false;
+
+        /**
+         * Used to distinguish between type variable param tags and regular
+         * param tags.
+         */
+        public boolean isTypeVariableParamTag = false;
+
+        public final Utils utils;
+
+        public Input(Utils utils, Element element, InheritableTaglet taglet, DocTreeInfo dtInfo,
+                boolean isFirstSentence, boolean isInheritDocTag) {
+            this.utils = utils;
+            this.element = element;
+            this.taglet = taglet;
+            this.isFirstSentence = isFirstSentence;
+            this.isInheritDocTag = isInheritDocTag;
+            this.docTreeInfo = dtInfo;
+        }
+
+        public Input(Utils utils, Element element, InheritableTaglet taglet, String tagId) {
+            this(utils, element);
+            this.taglet = taglet;
+            this.tagId = tagId;
+        }
+
+        public Input(Utils utils, Element element, InheritableTaglet taglet, String tagId,
+            boolean isTypeVariableParamTag) {
+            this(utils, element);
+            this.taglet = taglet;
+            this.tagId = tagId;
+            this.isTypeVariableParamTag = isTypeVariableParamTag;
+        }
+
+        public Input(Utils utils, Element element, InheritableTaglet taglet) {
+            this(utils, element);
+            this.taglet = taglet;
+        }
+
+        public Input(Utils utils, Element element) {
+            if (element == null)
+                throw new NullPointerException();
+            this.element = element;
+            this.utils = utils;
+            this.docTreeInfo = new DocTreeInfo();
+        }
+
+        public Input(Utils utils, Element element, boolean isFirstSentence) {
+            this(utils, element);
+            this.isFirstSentence = isFirstSentence;
+        }
+
+        public Input copy(Utils utils) {
+            if (this.element == null) {
+                throw new NullPointerException();
+            }
+            Input clone = new Input(utils, this.element, this.taglet, this.docTreeInfo,
+                    this.isFirstSentence, this.isInheritDocTag);
+            clone.tagId = this.tagId;
+            clone.isTypeVariableParamTag = this.isTypeVariableParamTag;
+            return clone;
+        }
+
+        /**
+         * For debugging purposes
+         * @return string representation
+         */
+        @Override
+        public String toString() {
+            String encl = element == null ? "" : element.getEnclosingElement().toString() + "::";
+            return "Input{" + "element=" + encl + element
+                    + ", taglet=" + taglet
+                    + ", tagId=" + tagId + ", tag=" + docTreeInfo
+                    + ", isFirstSentence=" + isFirstSentence
+                    + ", isInheritDocTag=" + isInheritDocTag
+                    + ", isTypeVariableParamTag=" + isTypeVariableParamTag
+                    + ", utils=" + utils + '}';
+        }
+    }
+
+    /**
+     * The class that encapsulates the output.
+     */
+    public static class Output {
+        /**
+         * The tag that holds the documentation.  Null if documentation
+         * is not held by a tag.
+         */
+        public DocTree holderTag;
+
+        /**
+         * The Doc object that holds the documentation.
+         */
+        public Element holder;
+
+        /**
+         * The inherited documentation.
+         */
+        public List<? extends DocTree> inlineTags = Collections.emptyList();
+
+        /**
+         * False if documentation could not be inherited.
+         */
+        public boolean isValidInheritDocTag = true;
+
+        /**
+         * When automatically inheriting throws tags, you sometime must inherit
+         * more than one tag.  For example if the element declares that it throws
+         * IOException and the overridden element has throws tags for IOException and
+         * ZipException, both tags would be inherited because ZipException is a
+         * subclass of IOException.  This subclass of DocFinder.Output allows
+         * multiple tag inheritence.
+         */
+        public List<DocTree> tagList  = new ArrayList<>();
+
+        /**
+         * Returns a string representation for debugging purposes
+         * @return string
+         */
+        @Override
+        public String toString() {
+            String encl = holder == null ? "" : holder.getEnclosingElement().toString() + "::";
+            return "Output{" + "holderTag=" + holderTag
+                    + ", holder=" + encl + holder
+                    + ", inlineTags=" + inlineTags
+                    + ", isValidInheritDocTag=" + isValidInheritDocTag
+                    + ", tagList=" + tagList + '}';
+        }
+    }
+
+    /**
+     * Search for the requested comments in the given element.  If it does not
+     * have comments, return documentation from the overridden element if possible.
+     * If the overridden element does not exist or does not have documentation to
+     * inherit, search for documentation to inherit from implemented methods.
+     *
+     * @param input the input object used to perform the search.
+     *
+     * @return an Output object representing the documentation that was found.
+     */
+    public static Output search(Configuration configuration, Input input) {
+        Output output = new Output();
+        Utils utils = configuration.utils;
+        if (input.isInheritDocTag) {
+            //Do nothing because "element" does not have any documentation.
+            //All it has is {@inheritDoc}.
+        } else if (input.taglet == null) {
+            //We want overall documentation.
+            output.inlineTags = input.isFirstSentence
+                    ? utils.getFirstSentenceTrees(input.element)
+                    : utils.getBody(input.element);
+            output.holder = input.element;
+        } else {
+            input.taglet.inherit(input, output);
+        }
+
+        if (output.inlineTags != null && !output.inlineTags.isEmpty()) {
+            return output;
+        }
+        output.isValidInheritDocTag = false;
+        Input inheritedSearchInput = input.copy(configuration.utils);
+        inheritedSearchInput.isInheritDocTag = false;
+        if (utils.isMethod(input.element)) {
+            ExecutableElement overriddenMethod = utils.overriddenMethod((ExecutableElement) input.element);
+            if (overriddenMethod != null) {
+                inheritedSearchInput.element = overriddenMethod;
+                output = search(configuration, inheritedSearchInput);
+                output.isValidInheritDocTag = true;
+                if (!output.inlineTags.isEmpty()) {
+                    return output;
+                }
+            }
+            //NOTE:  When we fix the bug where ClassDoc.interfaceTypes() does
+            //       not pass all implemented interfaces, we will use the
+            //       appropriate element here.
+            ImplementedMethods implMethods
+                    = new ImplementedMethods((ExecutableElement) input.element, configuration);
+            List<ExecutableElement> implementedMethods = implMethods.build();
+            for (ExecutableElement implementedMethod : implementedMethods) {
+                inheritedSearchInput.element = implementedMethod;
+                output = search(configuration, inheritedSearchInput);
+                output.isValidInheritDocTag = true;
+                if (!output.inlineTags.isEmpty()) {
+                    return output;
+                }
+            }
+        } else if (utils.isTypeElement(input.element)) {
+            TypeMirror t = ((TypeElement) input.element).getSuperclass();
+            Element superclass = utils.asTypeElement(t);
+            if (superclass != null) {
+                inheritedSearchInput.element = superclass;
+                output = search(configuration, inheritedSearchInput);
+                output.isValidInheritDocTag = true;
+                if (!output.inlineTags.isEmpty()) {
+                    return output;
+                }
+            }
+        }
+        return output;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocLink.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2012, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+/**
+ * Abstraction for simple relative URIs, consisting of a path,
+ * an optional query, and an optional fragment. DocLink objects can
+ * be created by the constructors below or from a DocPath using the
+ * convenience methods, {@link DocPath#fragment fragment} and
+ * {@link DocPath#query query}.
+ *
+ *  <p><b>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.</b>
+ *
+ */
+public class DocLink {
+    final String path;
+    final String query;
+    final String fragment;
+
+    /** Create a DocLink representing the URI {@code #fragment}. */
+    public static DocLink fragment(String fragment) {
+        return new DocLink((String) null, (String) null, fragment);
+    }
+
+    /** Create a DocLink representing the URI {@code path}. */
+    public DocLink(DocPath path) {
+        this(path.getPath(), null, null);
+    }
+
+    /**
+     * Create a DocLink representing the URI {@code path?query#fragment}.
+     * query and fragment may be null.
+     */
+    public DocLink(DocPath path, String query, String fragment) {
+        this(path.getPath(), query, fragment);
+    }
+
+    /**
+     * Create a DocLink representing the URI {@code path?query#fragment}.
+     * Any of the component parts may be null.
+     */
+    public DocLink(String path, String query, String fragment) {
+        this.path = path;
+        this.query = query;
+        this.fragment = fragment;
+    }
+
+    /**
+     * Return the link in the form "path?query#fragment", omitting any empty
+     * components.
+     */
+    @Override
+    public String toString() {
+        // common fast path
+        if (path != null && isEmpty(query) && isEmpty(fragment))
+            return path;
+
+        StringBuilder sb = new StringBuilder();
+        if (path != null)
+            sb.append(path);
+        if (!isEmpty(query))
+            sb.append("?").append(query);
+        if (!isEmpty(fragment))
+            sb.append("#").append(fragment);
+        return sb.toString();
+    }
+
+    private static boolean isEmpty(String s) {
+        return (s == null) || s.isEmpty();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPath.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+/**
+ * Abstraction for immutable relative paths.
+ * Paths always use '/' as a separator, and never begin or end with '/'.
+ *
+ *  <p><b>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.</b>
+ */
+public class DocPath {
+    private final String path;
+
+    /** The empty path. */
+    public static final DocPath empty = new DocPath("");
+
+    /** The empty path. */
+    public static final DocPath parent = new DocPath("..");
+
+    /**
+     * Create a path from a string.
+     */
+    public static DocPath create(String p) {
+        return (p == null) || p.isEmpty() ? empty : new DocPath(p);
+    }
+
+    /**
+     * Return the path for a class.
+     * For example, if the class is java.lang.Object,
+     * the path is java/lang/Object.html.
+     */
+    public static DocPath forClass(Utils utils, TypeElement typeElement) {
+        return (typeElement == null)
+                ? empty
+                : forPackage(utils.containingPackage(typeElement)).resolve(forName(utils, typeElement));
+    }
+
+    /**
+     * Return the path for the simple name of the class.
+     * For example, if the class is java.lang.Object,
+     * the path is Object.html.
+     */
+    public static DocPath forName(Utils utils, TypeElement typeElement) {
+        return (typeElement == null) ? empty : new DocPath(utils.getSimpleName(typeElement) + ".html");
+    }
+
+    /**
+     * Return the path for the package of a class.
+     * For example, if the class is java.lang.Object,
+     * the path is java/lang.
+     */
+    public static DocPath forPackage(Utils utils, TypeElement typeElement) {
+        return (typeElement == null) ? empty : forPackage(utils.containingPackage(typeElement));
+    }
+
+    /**
+     * Return the path for a package.
+     * For example, if the package is java.lang,
+     * the path is java/lang.
+     */
+    public static DocPath forPackage(PackageElement pkgElement) {
+        return pkgElement == null || pkgElement.isUnnamed()
+                ? empty
+                : DocPath.create(pkgElement.getQualifiedName().toString().replace('.', '/'));
+    }
+
+    /**
+     * Return the inverse path for a package.
+     * For example, if the package is java.lang,
+     * the inverse path is ../...
+     */
+    public static DocPath forRoot(PackageElement pkgElement) {
+        String name = (pkgElement == null || pkgElement.isUnnamed())
+                ? ""
+                : pkgElement.getQualifiedName().toString();
+        return new DocPath(name.replace('.', '/').replaceAll("[^/]+", ".."));
+    }
+
+    /**
+     * Return the relative path from one package to another.
+     */
+    public static DocPath relativePath(PackageElement from, PackageElement to) {
+        return forRoot(from).resolve(forPackage(to));
+    }
+
+    protected DocPath(String p) {
+        path = (p.endsWith("/") ? p.substring(0, p.length() - 1) : p);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public boolean equals(Object other) {
+        return (other instanceof DocPath) && path.equals(((DocPath)other).path);
+    }
+
+    /** {@inheritDoc} */
+    @Override
+    public int hashCode() {
+        return path.hashCode();
+    }
+
+    public DocPath basename() {
+        int sep = path.lastIndexOf("/");
+        return (sep == -1) ? this : new DocPath(path.substring(sep + 1));
+    }
+
+    public DocPath parent() {
+        int sep = path.lastIndexOf("/");
+        return (sep == -1) ? empty : new DocPath(path.substring(0, sep));
+    }
+
+    /**
+     * Return the path formed by appending the specified string to the current path.
+     */
+    public DocPath resolve(String p) {
+        if (p == null || p.isEmpty())
+            return this;
+        if (path.isEmpty())
+            return new DocPath(p);
+        return new DocPath(path + "/" + p);
+    }
+
+    /**
+     * Return the path by appending the specified path to the current path.
+     */
+    public DocPath resolve(DocPath p) {
+        if (p == null || p.isEmpty())
+            return this;
+        if (path.isEmpty())
+            return p;
+        return new DocPath(path + "/" + p.getPath());
+    }
+
+    /**
+     * Return the inverse path for this path.
+     * For example, if the path is a/b/c, the inverse path is ../../..
+     */
+    public DocPath invert() {
+        return new DocPath(path.replaceAll("[^/]+", ".."));
+    }
+
+    /**
+     * Return true if this path is empty.
+     */
+    public boolean isEmpty() {
+        return path.isEmpty();
+    }
+
+    public DocLink fragment(String fragment) {
+        return new DocLink(path, null, fragment);
+    }
+
+    public DocLink query(String query) {
+        return new DocLink(path, query, null);
+    }
+
+    /**
+     * Return this path as a string.
+     */
+    // This is provided instead of using toString() to help catch
+    // unintended use of toString() in string concatenation sequences.
+    public String getPath() {
+        return path;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocPaths.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,178 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+/**
+ * Standard DocPath objects.
+ *
+ *  <p><b>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.</b>
+ *
+ */
+public class DocPaths {
+
+    /** The name of the file for all classes, using frames. */
+    public static final DocPath ALLCLASSES_FRAME = DocPath.create("allclasses-frame.html");
+
+    /** The name of the file for all classes, without using frames. */
+    public static final DocPath ALLCLASSES_NOFRAME = DocPath.create("allclasses-noframe.html");
+
+    /** The name of the sub-directory for storing class usage info. */
+    public static final DocPath CLASS_USE = DocPath.create("class-use");
+
+    /** The name of the file for constant values. */
+    public static final DocPath CONSTANT_VALUES = DocPath.create("constant-values.html");
+
+    /** The name of the fie for deprecated elements. */
+    public static final DocPath DEPRECATED_LIST = DocPath.create("deprecated-list.html");
+
+    /** The name of the subdirectory for user-provided additional documentation files. */
+    public static final DocPath DOC_FILES = DocPath.create("doc-files");
+
+    /** The name of the image file showing a magnifying glass on the search box. */
+    public static final DocPath GLASS_IMG = DocPath.create("glass.png");
+
+    /** The name of the file for help info. */
+    public static final DocPath HELP_DOC = DocPath.create("help-doc.html");
+
+    /** The name of the main index file. */
+    public static final DocPath INDEX = DocPath.create("index.html");
+
+    /** The name of the single index file for all classes. */
+    public static final DocPath INDEX_ALL = DocPath.create("index-all.html");
+
+    /** The name of the directory for the split index files. */
+    public static final DocPath INDEX_FILES = DocPath.create("index-files");
+
+    /** Generate the name of one of the files in the split index. */
+    public static DocPath indexN(int n) {
+        return DocPath.create("index-" + n + ".html");
+    }
+
+    /** The name of the default javascript file. */
+    public static final DocPath JAVASCRIPT = DocPath.create("script.js");
+
+    /** The name of the directory for the jQuery. */
+    public static final DocPath JQUERY_FILES = DocPath.create("jquery");
+
+    /** The name of the default jQuery stylesheet file. */
+    public static final DocPath JQUERY_STYLESHEET_FILE = DocPath.create("jquery-ui.css");
+
+    /** The name of the default jQuery javascript file. */
+    public static final DocPath JQUERY_JS_1_10 = DocPath.create("jquery-1.10.2.js");
+
+    /** The name of the default jQuery javascript file. */
+    public static final DocPath JQUERY_JS = DocPath.create("jquery-ui.js");
+
+    /** The name of the default jszip javascript file. */
+    public static final DocPath JSZIP = DocPath.create("jszip/dist/jszip.js");
+
+    /** The name of the default jszip javascript file. */
+    public static final DocPath JSZIP_MIN = DocPath.create("jszip/dist/jszip.min.js");
+
+    /** The name of the default jszip-utils javascript file. */
+    public static final DocPath JSZIPUTILS = DocPath.create("jszip-utils/dist/jszip-utils.js");
+
+    /** The name of the default jszip-utils javascript file. */
+    public static final DocPath JSZIPUTILS_MIN = DocPath.create("jszip-utils/dist/jszip-utils.min.js");
+
+    /** The name of the default jszip-utils javascript file. */
+    public static final DocPath JSZIPUTILS_IE = DocPath.create("jszip-utils/dist/jszip-utils-ie.js");
+
+    /** The name of the default jszip-utils javascript file. */
+    public static final DocPath JSZIPUTILS_IE_MIN = DocPath.create("jszip-utils/dist/jszip-utils-ie.min.js");
+
+    /** The name of the member search index file. */
+    public static final DocPath MEMBER_SEARCH_INDEX_JSON = DocPath.create("member-search-index.json");
+
+    /** The name of the member search index zip file. */
+    public static final DocPath MEMBER_SEARCH_INDEX_ZIP = DocPath.create("member-search-index.zip");
+
+    /** The name of the file for the overview frame. */
+    public static final DocPath OVERVIEW_FRAME = DocPath.create("overview-frame.html");
+
+    /** The name of the file for the overview summary. */
+    public static final DocPath OVERVIEW_SUMMARY = DocPath.create("overview-summary.html");
+
+    /** The name of the file for the overview tree. */
+    public static final DocPath OVERVIEW_TREE = DocPath.create("overview-tree.html");
+
+    /** The name of the file for the package frame. */
+    public static final DocPath PACKAGE_FRAME = DocPath.create("package-frame.html");
+
+    /** The name of the file for the package list. */
+    public static final DocPath PACKAGE_LIST = DocPath.create("package-list");
+
+    /** The name of the package search index file. */
+    public static final DocPath PACKAGE_SEARCH_INDEX_JSON = DocPath.create("package-search-index.json");
+
+    /** The name of the package search index zipfile. */
+    public static final DocPath PACKAGE_SEARCH_INDEX_ZIP = DocPath.create("package-search-index.zip");
+
+    /** The name of the file for the package summary. */
+    public static final DocPath PACKAGE_SUMMARY = DocPath.create("package-summary.html");
+
+    /** The name of the file for the package tree. */
+    public static final DocPath PACKAGE_TREE = DocPath.create("package-tree.html");
+
+    /** The name of the file for the package usage info. */
+    public static final DocPath PACKAGE_USE = DocPath.create("package-use.html");
+
+    /** The name of the sub-package from which resources are read. */
+    public static final DocPath RESOURCES = DocPath.create("resources");
+
+    /** The name of the search javascript file. */
+    public static final DocPath SEARCH_JS = DocPath.create("search.js");
+
+    /** The name of the file for the serialized form info. */
+    public static final DocPath SERIALIZED_FORM = DocPath.create("serialized-form.html");
+
+    /** The name of the directory in which HTML versions of the source code
+     *  are generated.
+     */
+    public static final DocPath SOURCE_OUTPUT = DocPath.create("src-html");
+
+    /** The name of the default stylesheet. */
+    public static final DocPath STYLESHEET = DocPath.create("stylesheet.css");
+
+    /** The name of the tag search index file. */
+    public static final DocPath TAG_SEARCH_INDEX_JSON = DocPath.create("tag-search-index.json");
+
+    /** The name of the tag search index zip file. */
+    public static final DocPath TAG_SEARCH_INDEX_ZIP = DocPath.create("tag-search-index.zip");
+
+    /** The name of the type search index file. */
+    public static final DocPath TYPE_SEARCH_INDEX_JSON = DocPath.create("type-search-index.json");
+
+    /** The name of the type search index zip file. */
+    public static final DocPath TYPE_SEARCH_INDEX_ZIP = DocPath.create("type-search-index.zip");
+
+    /** The name of the image file for undo button on the search box. */
+    public static final DocPath X_IMG = DocPath.create("x.png");
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocletAbortException.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,44 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+/**
+ *  <p><b>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.</b>
+ */
+public class DocletAbortException extends RuntimeException {
+    private static final long serialVersionUID = -9131058909576418984L;
+
+    public DocletAbortException(String message) {
+        super(message);
+    }
+
+    public DocletAbortException(Throwable cause) {
+        super(cause);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/DocletConstants.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+/**
+ * Stores all constants for a Doclet.  Extend this class if you have doclet
+ * specific constants to add.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class DocletConstants {
+
+    /**
+     * The default amount of space between tab stops.
+     */
+    public static final int DEFAULT_TAB_STOP_LENGTH = 8;
+
+    /**
+     * The line separator for the current operating system.
+     */
+    public static final String NL = System.getProperty("line.separator");
+
+    /**
+     * The default package name.
+     */
+    public static final String DEFAULT_PACKAGE_NAME = "<Unnamed>";
+
+    /**
+     * The default package file name.
+     */
+    public static final String DEFAULT_PACKAGE_FILE_NAME = "default";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Extern.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,318 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.io.*;
+import java.net.*;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.tools.Diagnostic;
+import javax.tools.DocumentationTool;
+
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Process and manage "-link" and "-linkoffline" to external packages. The
+ * options "-link" and "-linkoffline" both depend on the fact that Javadoc now
+ * generates "package-list"(lists all the packages which are getting
+ * documented) file in the current or the destination directory, while
+ * generating the documentation.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Robert Field
+ */
+public class Extern {
+
+    /**
+     * Map package names onto Extern Item objects.
+     * Lazily initialized.
+     */
+    private Map<String, Item> packageToItemMap;
+
+    /**
+     * The global configuration information for this run.
+     */
+    private final Configuration configuration;
+
+    /**
+     * True if we are using -linkoffline and false if -link is used instead.
+     */
+    private boolean linkoffline = false;
+
+    /**
+     * Stores the info for one external doc set
+     */
+    private class Item {
+
+        /**
+         * Package name, found in the "package-list" file in the {@link path}.
+         */
+        final String packageName;
+
+        /**
+         * The URL or the directory path at which the package documentation will be
+         * avaliable.
+         */
+        final String path;
+
+        /**
+         * If given path is directory path then true else if it is a URL then false.
+         */
+        final boolean relative;
+
+        /**
+         * Constructor to build a Extern Item object and map it with the package name.
+         * If the same package name is found in the map, then the first mapped
+         * Item object or offline location will be retained.
+         *
+         * @param packageName Package name found in the "package-list" file.
+         * @param path        URL or Directory path from where the "package-list"
+         * file is picked.
+         * @param relative    True if path is URL, false if directory path.
+         */
+        Item(String packageName, String path, boolean relative) {
+            this.packageName = packageName;
+            this.path = path;
+            this.relative = relative;
+            if (packageToItemMap == null) {
+                packageToItemMap = new HashMap<>();
+            }
+            if (!packageToItemMap.containsKey(packageName)) { // save the previous
+                packageToItemMap.put(packageName, this);        // mapped location
+            }
+        }
+
+        /**
+         * String representation of "this" with packagename and the path.
+         */
+        public String toString() {
+            return packageName + (relative? " -> " : " => ") + path;
+        }
+    }
+
+    public Extern(Configuration configuration) {
+        this.configuration = configuration;
+    }
+
+    /**
+     * Determine if a element item is externally documented.
+     *
+     * @param element an Element.
+     */
+    public boolean isExternal(Element element) {
+        if (packageToItemMap == null) {
+            return false;
+        }
+        PackageElement pe = configuration.utils.containingPackage(element);
+        if (pe.isUnnamed()) {
+            return false;
+        }
+        return packageToItemMap.get(configuration.utils.getPackageName(pe)) != null;
+    }
+
+    /**
+     * Convert a link to be an external link if appropriate.
+     *
+     * @param pkgName The package name.
+     * @param relativepath    The relative path.
+     * @param filename    The link to convert.
+     * @return if external return converted link else return null
+     */
+    public DocLink getExternalLink(String pkgName, DocPath relativepath, String filename) {
+        return getExternalLink(pkgName, relativepath, filename, null);
+    }
+
+    public DocLink getExternalLink(String pkgName, DocPath relativepath, String filename,
+            String memberName) {
+        Item fnd = findPackageItem(pkgName);
+        if (fnd == null)
+            return null;
+
+        DocPath p = fnd.relative ?
+                relativepath.resolve(fnd.path).resolve(filename) :
+                DocPath.create(fnd.path).resolve(filename);
+
+        return new DocLink(p, "is-external=true", memberName);
+    }
+
+    /**
+     * Build the extern package list from given URL or the directory path.
+     * Flag error if the "-link" or "-linkoffline" option is already used.
+     *
+     * @param url        URL or Directory path.
+     * @param pkglisturl This can be another URL for "package-list" or ordinary
+     *                   file.
+     * @param reporter   The <code>DocErrorReporter</code> used to report errors.
+     * @param linkoffline True if -linkoffline is used and false if -link is used.
+     */
+    public boolean link(String url, String pkglisturl, Reporter reporter, boolean linkoffline) {
+        this.linkoffline = linkoffline;
+        try {
+            url = adjustEndFileSeparator(url);
+            if (isUrl(pkglisturl)) {
+                readPackageListFromURL(url, toURL(adjustEndFileSeparator(pkglisturl)));
+            } else {
+                readPackageListFromFile(url, DocFile.createFileForInput(configuration, pkglisturl));
+            }
+            return true;
+        } catch (Fault f) {
+            reporter.print(Diagnostic.Kind.WARNING, f.getMessage());
+            return false;
+        }
+    }
+
+    private URL toURL(String url) throws Fault {
+        try {
+            return new URL(url);
+        } catch (MalformedURLException e) {
+            throw new Fault(configuration.getText("doclet.MalformedURL", url), e);
+        }
+    }
+
+    private class Fault extends Exception {
+        private static final long serialVersionUID = 0;
+
+        Fault(String msg, Exception cause) {
+            super(msg, cause);
+        }
+    }
+
+    /**
+     * Get the Extern Item object associated with this package name.
+     *
+     * @param pkgName Package name.
+     */
+    private Item findPackageItem(String pkgName) {
+        if (packageToItemMap == null) {
+            return null;
+        }
+        return packageToItemMap.get(pkgName);
+    }
+
+    /**
+     * If the URL or Directory path is missing end file separator, add that.
+     */
+    private String adjustEndFileSeparator(String url) {
+        return url.endsWith("/") ? url : url + '/';
+    }
+
+    /**
+     * Fetch the URL and read the "package-list" file.
+     *
+     * @param urlpath        Path to the packages.
+     * @param pkglisturlpath URL or the path to the "package-list" file.
+     */
+    private void readPackageListFromURL(String urlpath, URL pkglisturlpath) throws Fault {
+        try {
+            URL link = pkglisturlpath.toURI().resolve(DocPaths.PACKAGE_LIST.getPath()).toURL();
+            readPackageList(link.openStream(), urlpath, false);
+        } catch (URISyntaxException | MalformedURLException exc) {
+            throw new Fault(configuration.getText("doclet.MalformedURL", pkglisturlpath.toString()), exc);
+        }
+        catch (IOException exc) {
+            throw new Fault(configuration.getText("doclet.URL_error", pkglisturlpath.toString()), exc);
+        }
+    }
+
+    /**
+     * Read the "package-list" file which is available locally.
+     *
+     * @param path URL or directory path to the packages.
+     * @param pkgListPath Path to the local "package-list" file.
+     */
+    private void readPackageListFromFile(String path, DocFile pkgListPath)
+            throws Fault {
+        DocFile file = pkgListPath.resolve(DocPaths.PACKAGE_LIST);
+        if (! (file.isAbsolute() || linkoffline)){
+            file = file.resolveAgainst(DocumentationTool.Location.DOCUMENTATION_OUTPUT);
+        }
+        try {
+            if (file.exists() && file.canRead()) {
+                boolean pathIsRelative =
+                        !DocFile.createFileForInput(configuration, path).isAbsolute()
+                        && !isUrl(path);
+                readPackageList(file.openInputStream(), path, pathIsRelative);
+            } else {
+                throw new Fault(configuration.getText("doclet.File_error", file.getPath()), null);
+            }
+        } catch (IOException exc) {
+           throw new Fault(configuration.getText("doclet.File_error", file.getPath()), exc);
+        }
+    }
+
+    /**
+     * Read the file "package-list" and for each package name found, create
+     * Extern object and associate it with the package name in the map.
+     *
+     * @param input    InputStream from the "package-list" file.
+     * @param path     URL or the directory path to the packages.
+     * @param relative Is path relative?
+     */
+    private void readPackageList(InputStream input, String path, boolean relative)
+                         throws IOException {
+        BufferedReader in = new BufferedReader(new InputStreamReader(input));
+        StringBuilder strbuf = new StringBuilder();
+        try {
+            int c;
+            while ((c = in.read()) >= 0) {
+                char ch = (char)c;
+                if (ch == '\n' || ch == '\r') {
+                    if (strbuf.length() > 0) {
+                        String packname = strbuf.toString();
+                        String packpath = path +
+                                      packname.replace('.', '/') + '/';
+                        new Item(packname, packpath, relative);
+                        strbuf.setLength(0);
+                    }
+                } else {
+                    strbuf.append(ch);
+                }
+            }
+        } finally {
+            input.close();
+        }
+    }
+
+    public boolean isUrl (String urlCandidate) {
+        try {
+            new URL(urlCandidate);
+            //No exception was thrown, so this must really be a URL.
+            return true;
+        } catch (MalformedURLException e) {
+            //Since exception is thrown, this must be a directory path.
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Group.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,243 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+
+/**
+ * Process and manage grouping of packages, as specified by "-group" option on
+ * the command line.
+ * <p>
+ * For example, if user has used -group option as
+ * -group "Core Packages" "java.*" -group "CORBA Packages" "org.omg.*", then
+ * the packages specified on the command line will be grouped according to their
+ * names starting with either "java." or "org.omg.". All the other packages
+ * which do not fall in the user given groups, are grouped in default group,
+ * named as either "Other Packages" or "Packages" depending upon if "-group"
+ * option used or not at all used respectively.
+ * </p>
+ * <p>
+ * Also the packages are grouped according to the longest possible match of
+ * their names with the grouping information provided. For example, if there
+ * are two groups, like -group "Lang" "java.lang" and -group "Core" "java.*",
+ * will put the package java.lang in the group "Lang" and not in group "Core".
+ * </p>
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+public class Group {
+
+    /**
+     * Map of regular expressions with the corresponding group name.
+     */
+    private Map<String,String> regExpGroupMap = new HashMap<>();
+
+    /**
+     * List of regular expressions sorted according to the length. Regular
+     * expression with longest length will be first in the sorted order.
+     */
+    private List<String> sortedRegExpList = new ArrayList<>();
+
+    /**
+     * List of group names in the same order as given on the command line.
+     */
+    private List<String> groupList = new ArrayList<>();
+
+    /**
+     * Map of non-regular expressions(possible package names) with the
+     * corresponding group name.
+     */
+    private Map<String,String> pkgNameGroupMap = new HashMap<>();
+
+    /**
+     * The global configuration information for this run.
+     */
+    private final Configuration configuration;
+
+    /**
+     * Since we need to sort the keys in the reverse order(longest key first),
+     * the compare method in the implementing class is doing the reverse
+     * comparison.
+     */
+    private static class MapKeyComparator implements Comparator<String> {
+        public int compare(String key1, String key2) {
+            return key2.length() - key1.length();
+        }
+    }
+
+    public Group(Configuration configuration) {
+        this.configuration = configuration;
+    }
+
+    /**
+     * Depending upon the format of the package name provided in the "-group"
+     * option, generate two separate maps. There will be a map for mapping
+     * regular expression(only meta character allowed is '*' and that is at the
+     * end of the regular expression) on to the group name. And another map
+     * for mapping (possible) package names(if the name format doesen't contain
+     * meta character '*', then it is assumed to be a package name) on to the
+     * group name. This will also sort all the regular expressions found in the
+     * reverse order of their lengths, i.e. longest regular expression will be
+     * first in the sorted list.
+     *
+     * @param groupname       The name of the group from -group option.
+     * @param pkgNameFormList List of the package name formats.
+     */
+    public boolean checkPackageGroups(String groupname, String pkgNameFormList) {
+        StringTokenizer strtok = new StringTokenizer(pkgNameFormList, ":");
+        if (groupList.contains(groupname)) {
+            configuration.message.warning("doclet.Groupname_already_used", groupname);
+            return false;
+        }
+        groupList.add(groupname);
+        while (strtok.hasMoreTokens()) {
+            String id = strtok.nextToken();
+            if (id.length() == 0) {
+                configuration.message.warning("doclet.Error_in_packagelist", groupname, pkgNameFormList);
+                return false;
+            }
+            if (id.endsWith("*")) {
+                id = id.substring(0, id.length() - 1);
+                if (foundGroupFormat(regExpGroupMap, id)) {
+                    return false;
+                }
+                regExpGroupMap.put(id, groupname);
+                sortedRegExpList.add(id);
+            } else {
+                if (foundGroupFormat(pkgNameGroupMap, id)) {
+                    return false;
+                }
+                pkgNameGroupMap.put(id, groupname);
+            }
+        }
+        Collections.sort(sortedRegExpList, new MapKeyComparator());
+        return true;
+    }
+
+    /**
+     * Search if the given map has given the package format.
+     *
+     * @param map Map to be searched.
+     * @param pkgFormat The pacakge format to search.
+     *
+     * @return true if package name format found in the map, else false.
+     */
+    boolean foundGroupFormat(Map<String,?> map, String pkgFormat) {
+        if (map.containsKey(pkgFormat)) {
+            configuration.message.error("doclet.Same_package_name_used", pkgFormat);
+            return true;
+        }
+        return false;
+    }
+
+    /**
+     * Group the packages according the grouping information provided on the
+     * command line. Given a list of packages, search each package name in
+     * regular expression map as well as package name map to get the
+     * corresponding group name. Create another map with mapping of group name
+     * to the package list, which will fall under the specified group. If any
+     * package doesen't belong to any specified group on the comamnd line, then
+     * a new group named "Other Packages" will be created for it. If there are
+     * no groups found, in other words if "-group" option is not at all used,
+     * then all the packages will be grouped under group "Packages".
+     *
+     * @param packages Packages specified on the command line.
+     */
+    public Map<String, SortedSet<PackageElement>> groupPackages(Set<PackageElement> packages) {
+        Map<String, SortedSet<PackageElement>> groupPackageMap = new HashMap<>();
+        String defaultGroupName =
+            (pkgNameGroupMap.isEmpty() && regExpGroupMap.isEmpty())?
+                configuration.message.getText("doclet.Packages") :
+                configuration.message.getText("doclet.Other_Packages");
+        // if the user has not used the default group name, add it
+        if (!groupList.contains(defaultGroupName)) {
+            groupList.add(defaultGroupName);
+        }
+        for (PackageElement pkg : packages) {
+            String pkgName = pkg.isUnnamed() ? null : configuration.utils.getPackageName(pkg);
+            String groupName = pkg.isUnnamed() ? null : pkgNameGroupMap.get(pkgName);
+            // if this package is not explicitly assigned to a group,
+            // try matching it to group specified by regular expression
+            if (groupName == null) {
+                groupName = regExpGroupName(pkgName);
+            }
+            // if it is in neither group map, put it in the default
+            // group
+            if (groupName == null) {
+                groupName = defaultGroupName;
+            }
+            getPkgList(groupPackageMap, groupName).add(pkg);
+        }
+        return groupPackageMap;
+    }
+
+    /**
+     * Search for package name in the sorted regular expression
+     * list, if found return the group name.  If not, return null.
+     *
+     * @param pkgName Name of package to be found in the regular
+     * expression list.
+     */
+    String regExpGroupName(String pkgName) {
+        for (String regexp : sortedRegExpList) {
+            if (pkgName.startsWith(regexp)) {
+                return regExpGroupMap.get(regexp);
+            }
+        }
+        return null;
+    }
+
+    /**
+     * For the given group name, return the package list, on which it is mapped.
+     * Create a new list, if not found.
+     *
+     * @param map Map to be searched for gorup name.
+     * @param groupname Group name to search.
+     */
+    SortedSet<PackageElement> getPkgList(Map<String, SortedSet<PackageElement>> map,
+            String groupname) {
+        return map.computeIfAbsent(groupname, g -> new TreeSet<>(configuration.utils.makePackageComparator()));
+    }
+
+    /**
+     * Return the list of groups, in the same order as specified
+     * on the command line.
+     */
+    public List<String> getGroupList() {
+        return groupList;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/ImplementedMethods.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,148 @@
+/*
+ * Copyright (c) 1999, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * For a given class method, build an array of interface methods which it
+ * implements.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+public class ImplementedMethods {
+
+    private final Map<ExecutableElement, TypeMirror> interfaces = new HashMap<>();
+    private final List<ExecutableElement> methlist = new ArrayList<>();
+    private final Utils utils;
+    private final TypeElement typeElement;
+    private final ExecutableElement method;
+
+    public ImplementedMethods(ExecutableElement method, Configuration configuration) {
+        this.method = method;
+        this.utils = configuration.utils;
+        typeElement = utils.getEnclosingTypeElement(method);
+    }
+
+    /**
+     * Return the array of interface methods which the method passed in the
+     * constructor is implementing. The search/build order is as follows:
+     * <pre>
+     * 1. Search in all the immediate interfaces which this method's class is
+     *    implementing. Do it recursively for the superinterfaces as well.
+     * 2. Traverse all the superclasses and search recursively in the
+     *    interfaces which those superclasses implement.
+     *</pre>
+     *
+     * @return SortedSet<ExecutableElement> of implemented methods.
+     */
+    public List<ExecutableElement> build() {
+        buildImplementedMethodList();
+        return methlist;
+    }
+
+    public TypeMirror getMethodHolder(ExecutableElement ee) {
+        return interfaces.get(ee);
+    }
+
+    /**
+     * Search for the method in the array of interfaces. If found check if it is
+     * overridden by any other subinterface method which this class
+     * implements. If it is not overidden, add it in the method list.
+     * Do this recursively for all the extended interfaces for each interface
+     * from the array passed.
+     */
+    private void buildImplementedMethodList() {
+        Set<TypeMirror> intfacs = utils.getAllInterfaces(typeElement);
+        for (TypeMirror interfaceType : intfacs) {
+            ExecutableElement found = utils.findMethod(utils.asTypeElement(interfaceType), method);
+            if (found != null) {
+                removeOverriddenMethod(found);
+                if (!overridingMethodFound(found)) {
+                    methlist.add(found);
+                    interfaces.put(found, interfaceType);
+                }
+            }
+        }
+    }
+
+    /**
+     * Search in the method list and check if it contains a method which
+     * is overridden by the method as parameter.  If found, remove the
+     * overridden method from the method list.
+     *
+     * @param method Is this method overriding a method in the method list.
+     */
+    private void removeOverriddenMethod(ExecutableElement method) {
+        TypeElement overriddenClass = utils.overriddenClass(method);
+        if (overriddenClass != null) {
+            for (int i = 0; i < methlist.size(); i++) {
+                TypeElement te = utils.getEnclosingTypeElement(methlist.get(i));
+                if (te == overriddenClass || utils.isSubclassOf(overriddenClass, te)) {
+                    methlist.remove(i);  // remove overridden method
+                    return;
+                }
+            }
+        }
+    }
+
+    /**
+     * Search in the already found methods' list and check if it contains
+     * a method which is overriding the method parameter or is the method
+     * parameter itself.
+     *
+     * @param method MethodDoc Method to be searched in the Method List for
+     * an overriding method.
+     */
+    private boolean overridingMethodFound(ExecutableElement method) {
+        TypeElement containingClass = utils.getEnclosingTypeElement(method);
+        for (ExecutableElement listmethod : methlist) {
+            if (containingClass == utils.getEnclosingTypeElement(listmethod)) {
+                // it's the same method.
+                return true;
+            }
+            TypeElement te = utils.overriddenClass(listmethod);
+            if (te == null) {
+                continue;
+            }
+            if (te == containingClass || utils.isSubclassOf(te, containingClass)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/IndexBuilder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Build the mapping of each Unicode character with it's member lists
+ * containing members names starting with it. Also build a list for all the
+ * Unicode characters which start a member name. Member name is
+ * classkind or field or method or constructor name.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see java.lang.Character
+ * @author Atul M Dambalkar
+ */
+public class IndexBuilder {
+
+    /**
+     * Mapping of each Unicode Character with the member list containing
+     * members with names starting with it.
+     */
+    private final Map<Character, SortedSet<Element>> indexmap;
+
+    /**
+     * Don't generate deprecated information if true.
+     */
+    private boolean noDeprecated;
+
+    /**
+     * Build this Index only for classes?
+     */
+    private boolean classesOnly;
+
+    /**
+     * Indicates javafx mode.
+     */
+    private boolean javafx;
+
+    private final Configuration configuration;
+    private final Utils utils;
+
+    /**
+     * Constructor. Build the index map.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @param noDeprecated  true if -nodeprecated option is used,
+     *                      false otherwise.
+     */
+    public IndexBuilder(Configuration configuration, boolean noDeprecated) {
+        this(configuration, noDeprecated, false);
+    }
+
+    /**
+     * Constructor. Build the index map.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @param noDeprecated  true if -nodeprecated option is used,
+     *                      false otherwise.
+     * @param classesOnly   Include only classes in index.
+     */
+    public IndexBuilder(Configuration configuration, boolean noDeprecated,
+                        boolean classesOnly) {
+        this.configuration  = configuration;
+        this.utils = configuration.utils;
+        if (classesOnly) {
+            configuration.message.notice("doclet.Building_Index_For_All_Classes");
+        } else {
+            configuration.message.notice("doclet.Building_Index");
+        }
+        this.noDeprecated = noDeprecated;
+        this.classesOnly = classesOnly;
+        this.javafx = configuration.javafx;
+        this.indexmap = new TreeMap<>();
+        buildIndexMap(configuration.root);
+    }
+
+    /**
+     * Get all the members in all the Packages and all the Classes
+     * given on the command line. Form separate list of those members depending
+     * upon their names.
+     *
+     * @param root Root of the documemt.
+     */
+    protected void buildIndexMap(DocletEnvironment root)  {
+        Set<PackageElement> packages = utils.getSpecifiedPackages();
+        Set<TypeElement> classes = root.getIncludedClasses();
+        if (!classesOnly) {
+            if (packages.isEmpty()) {
+                Set<PackageElement> set = new HashSet<>();
+                for (TypeElement aClass : classes) {
+                    PackageElement pkg = utils.containingPackage(aClass);
+                    if (pkg != null && !pkg.isUnnamed()) {
+                        set.add(pkg);
+                    }
+                }
+                adjustIndexMap(set);
+            } else {
+                adjustIndexMap(packages);
+            }
+        }
+        adjustIndexMap(classes);
+        if (!classesOnly) {
+            for (TypeElement aClass : classes) {
+                if (shouldAddToIndexMap(aClass)) {
+                    putMembersInIndexMap(aClass);
+                }
+            }
+        }
+    }
+
+    /**
+     * Put all the members(fields, methods and constructors) in the te
+     * to the indexmap.
+     *
+     * @param te TypeElement whose members will be added to the indexmap.
+     */
+    protected void putMembersInIndexMap(TypeElement te) {
+        adjustIndexMap(utils.getAnnotationFields(te));
+        adjustIndexMap(utils.getFields(te));
+        adjustIndexMap(utils.getMethods(te));
+        adjustIndexMap(utils.getConstructors(te));
+    }
+
+
+    /**
+     * Adjust list of members according to their names. Check the first
+     * character in a member name, and then add the member to a list of members
+     * for that particular unicode character.
+     *
+     * @param elements Array of members.
+     */
+    protected void adjustIndexMap(Iterable<? extends Element> elements) {
+        for (Element element : elements) {
+            if (shouldAddToIndexMap(element)) {
+                String name = utils.isPackage(element)
+                        ? utils.getPackageName((PackageElement)element)
+                        : utils.getSimpleName(element);
+                char ch = (name.length() == 0) ?
+                          '*' :
+                          Character.toUpperCase(name.charAt(0));
+                Character unicode = ch;
+                SortedSet<Element> list = indexmap.computeIfAbsent(unicode,
+                        c -> new TreeSet<>(utils.makeIndexUseComparator()));
+                list.add(element);
+            }
+        }
+    }
+
+    /**
+     * Should this element be added to the index map?
+     */
+    protected boolean shouldAddToIndexMap(Element element) {
+        if (javafx) {
+            if (!utils.getBlockTags(element, "treatAsPrivate").isEmpty()) {
+                return false;
+            }
+        }
+
+        if (utils.isPackage(element))
+            // Do not add to index map if -nodeprecated option is set and the
+            // package is marked as deprecated.
+            return !(noDeprecated && configuration.utils.isDeprecated(element));
+        else
+            // Do not add to index map if -nodeprecated option is set and if the
+            // element is marked as deprecated or the containing package is marked as
+            // deprecated.
+            return !(noDeprecated &&
+                    (configuration.utils.isDeprecated(element) ||
+                    configuration.utils.isDeprecated(utils.containingPackage(element))));
+    }
+
+    /**
+     * Return a map of all the individual member lists with Unicode character.
+     *
+     * @return Map index map.
+     */
+    public Map<Character, SortedSet<Element>> getIndexMap() {
+        return indexmap;
+    }
+
+    /**
+     * Return the sorted list of members, for passed Unicode Character.
+     *
+     * @param index index Unicode character.
+     * @return List member list for specific Unicode character.
+     */
+    public List<? extends Element> getMemberList(Character index) {
+        SortedSet<Element> set = indexmap.get(index);
+        if (set == null)
+            return null;
+        List<Element> out = new ArrayList<>();
+        out.addAll(set);
+        return out;
+    }
+
+    /**
+     * Array of IndexMap keys, Unicode characters.
+     */
+    public List<Character> index() {
+        return new ArrayList<>(indexmap.keySet());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/MessageRetriever.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.text.MessageFormat;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+
+import com.sun.source.util.DocTreePath;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+import static javax.tools.Diagnostic.Kind.*;
+
+
+/**
+ * Retrieve and format messages stored in a resource.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Robert Field
+ */
+public class MessageRetriever {
+    /**
+     * The global configuration information for this run.
+     */
+    private final Configuration configuration;
+
+    /**
+     * The location from which to lazily fetch the resource..
+     */
+    private final String resourcelocation;
+
+    /**
+     * The lazily fetched resource..
+     */
+    private ResourceBundle messageRB;
+
+    /**
+     * Initialize the ResourceBundle with the given resource.
+     *
+     * @param rb the resource bundle to read.
+     */
+    public MessageRetriever(ResourceBundle rb) {
+        this.configuration = null;
+        this.messageRB = rb;
+        this.resourcelocation = null;
+    }
+
+    /**
+     * Initialize the ResourceBundle with the given resource.
+     *
+     * @param configuration the configuration
+     * @param resourcelocation Resource.
+     */
+    public MessageRetriever(Configuration configuration,
+                            String resourcelocation) {
+        this.configuration = configuration;
+        this.resourcelocation = resourcelocation;
+    }
+
+    private void initRB() {
+        if (messageRB == null) {
+            try {
+                messageRB = ResourceBundle.getBundle(resourcelocation, configuration.getLocale());
+            } catch (MissingResourceException e) {
+                throw new Error("Fatal: Resource (" + resourcelocation
+                        + ") for javadoc doclets is missing.");
+            }
+        }
+    }
+
+    /**
+     * Get and format message string from resource
+     *
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     * @return the composed text
+     * @throws MissingResourceException when the key does not
+     * exist in the properties file.
+     */
+    public String getText(String key, Object... args) throws MissingResourceException {
+        initRB();
+        String message = messageRB.getString(key);
+        return MessageFormat.format(message, args);
+    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param pos the position of the source
+     * @param msg message to print
+     */
+    private void printError(DocTreePath path, String msg) {
+        configuration.reporter.print(ERROR, path, msg);
+    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param msg message to print
+     */
+    private void printError(String msg) {
+        configuration.reporter.print(ERROR, msg);
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param pos the position of the source
+     * @param msg message to print
+     */
+    private void printWarning(DocTreePath path, String msg) {
+        configuration.reporter.print(WARNING, path, msg);
+    }
+
+    private void printWarning(Element e, String msg) {
+        configuration.reporter.print(WARNING, e, msg);
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param msg message to print
+     */
+    private void printWarning(String msg) {
+        configuration.reporter.print(WARNING, msg);
+    }
+
+//    Note: the following do not appear to be needed any more, delete me.
+//    /**
+//     * Print a message.
+//     *
+//     * @param pos the position of the source
+//     * @param msg message to print
+//     */
+//    private void printNotice(DocTreePath path, String msg) {
+//        DocEnv env = ((RootDocImpl)configuration.root).env;
+//        if (env.isQuiet() || env.isSilent()) {
+//            return;
+//        }
+//        configuration.reporter.print(NOTE, path, msg);
+//    }
+
+//    Note: does not appear to be needed any more.
+//    /**
+//     * Print a message.
+//     *
+//     * @param pos the position of the source
+//     * @param key selects message from resource
+//     * @param args arguments to be replaced in the message.
+//     */
+//    public void notice(DocTreePath path, String key, Object... args) {
+//        printNotice(path, getText(key, args));
+//    }
+
+    // ERRORS
+    /**
+     * Print error message, increment error count.
+     *
+     * @param path the path to the source
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     */
+    public void error(DocTreePath path, String key, Object... args) {
+        printError(path, getText(key, args));
+    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     */
+    public void error(String key, Object... args) {
+        printError(getText(key, args));
+    }
+
+    // WARNINGS
+    /**
+     * Print warning message, increment warning count.
+
+     * @param path the path to the source
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     */
+    public void warning(DocTreePath path, String key, Object... args) {
+        if (configuration.showMessage(path, key))
+            printWarning(path, getText(key, args));
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param e element target of the message
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     */
+    public void warning(Element e, String key, Object... args) {
+        if (configuration.showMessage(e, key))
+            printWarning(e, getText(key, args));
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     */
+    public void warning(String key, Object... args) {
+        printWarning(getText(key, args));
+    }
+
+    // NOTICES
+    /**
+     * Print a message.
+     *
+     * @param msg message to print
+     */
+    private void printNotice(String msg) {
+        if (configuration.quiet) {
+            return;
+        }
+        configuration.reporter.print(NOTE, msg);
+    }
+
+    /**
+     * Print a message.
+     *
+     * @param key selects message from resource
+     * @param args arguments to be replaced in the message.
+     */
+    public void notice(String key, Object... args) {
+        printNotice(getText(key, args));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/MetaKeywords.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,149 @@
+/*
+ * Copyright (config) 2002, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Provides methods for creating an array of class, method and
+ * field names to be included as meta keywords in the HTML header
+ * of class pages.  These keywords improve search results
+ * on browsers that look for keywords.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Doug Kramer
+ */
+public class MetaKeywords {
+
+    /**
+     * The global configuration information for this run.
+     */
+    private final Configuration config;
+
+    /**
+     * Constructor
+     */
+    public MetaKeywords(Configuration configuration) {
+        config = configuration;
+    }
+
+    /**
+     * Returns an array of strings where each element
+     * is a class, method or field name.  This array is
+     * used to create one meta keyword tag for each element.
+     * Method parameter lists are converted to "()" and
+     * overloads are combined.
+     *
+     * Constructors are not included because they have the same
+     * name as the class, which is already included.
+     * Nested class members are not included because their
+     * definitions are on separate pages.
+     */
+    public List<String> getMetaKeywords(TypeElement typeElement) {
+        ArrayList<String> results = new ArrayList<>();
+
+        // Add field and method keywords only if -keywords option is used
+        if (config.keywords) {
+            results.addAll(getClassKeyword(typeElement));
+            results.addAll(getMemberKeywords(config.utils.getFields(typeElement)));
+            results.addAll(getMemberKeywords(config.utils.getMethods(typeElement)));
+        }
+        ((ArrayList)results).trimToSize();
+        return results;
+    }
+
+    /**
+     * Get the current class for a meta tag keyword, as the first
+     * and only element of an array list.
+     */
+    protected List<String> getClassKeyword(TypeElement typeElement) {
+        ArrayList<String> metakeywords = new ArrayList<>(1);
+        String cltypelower = config.utils.isInterface(typeElement) ? "interface" : "class";
+        metakeywords.add(config.utils.getFullyQualifiedName(typeElement) + " " + cltypelower);
+        return metakeywords;
+    }
+
+    /**
+     * Get the package keywords.
+     */
+    public List<String> getMetaKeywords(PackageElement packageElement) {
+        List<String> result = new ArrayList<>(1);
+        if (config.keywords) {
+            String pkgName = config.utils.getPackageName(packageElement);
+            result.add(pkgName + " " + "package");
+        }
+        return result;
+    }
+
+    /**
+     * Get the overview keywords.
+     */
+    public List<String> getOverviewMetaKeywords(String title, String docTitle) {
+         List<String> result = new ArrayList<>(1);
+        if (config.keywords) {
+            String windowOverview = config.getText(title);
+            if (docTitle.length() > 0) {
+                result.add(windowOverview + ", " + docTitle);
+            } else {
+                result.add(windowOverview);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Get members for meta tag keywords as an array,
+     * where each member name is a string element of the array.
+     * The parameter lists are not included in the keywords;
+     * therefore all overloaded methods are combined.<br>
+     * Example: getValue(Object) is returned in array as getValue()
+     *
+     * @param members  array of members to be added to keywords
+     */
+    protected List<String> getMemberKeywords(List<? extends Element> members) {
+        ArrayList<String> results = new ArrayList<>();
+        for (Element member : members) {
+            String membername = config.utils.isMethod(member)
+                    ? config.utils.getSimpleName(member) + "()"
+                    : config.utils.getSimpleName(member);
+            if (!results.contains(membername)) {
+                results.add(membername);
+            }
+        }
+        ((ArrayList)results).trimToSize();
+        return results;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/MethodTypes.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2012, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+/**
+ * Enum representing method types.
+ *
+ * @author Bhavesh Patel
+ */
+public enum MethodTypes {
+    ALL(0xffff, "doclet.All_Methods", "t0", true),
+    STATIC(0x1, "doclet.Static_Methods", "t1", false),
+    INSTANCE(0x2, "doclet.Instance_Methods", "t2", false),
+    ABSTRACT(0x4, "doclet.Abstract_Methods", "t3", false),
+    CONCRETE(0x8, "doclet.Concrete_Methods", "t4", false),
+    DEFAULT(0x10, "doclet.Default_Methods", "t5", false),
+    DEPRECATED(0x20, "doclet.Deprecated_Methods", "t6", false);
+
+    private final int value;
+    private final String resourceKey;
+    private final String tabId;
+    private final boolean isDefaultTab;
+
+    MethodTypes(int v, String k, String id, boolean dt) {
+        this.value = v;
+        this.resourceKey = k;
+        this.tabId = id;
+        this.isDefaultTab = dt;
+    }
+
+    public int value() {
+        return value;
+    }
+
+    public String resourceKey() {
+        return resourceKey;
+    }
+
+    public String tabId() {
+        return tabId;
+    }
+
+    public boolean isDefaultTab() {
+        return isDefaultTab;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/PackageListWriter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,94 @@
+/*
+ * 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.element.PackageElement;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+
+/**
+ * Write out the package index.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ */
+public class PackageListWriter extends PrintWriter {
+
+    private final Configuration configuration;
+    private final Utils utils;
+
+    /**
+     * Constructor.
+     *
+     * @param configuration the current configuration of the doclet.
+     */
+    public PackageListWriter(Configuration configuration) throws IOException {
+        super(DocFile.createFileForOutput(configuration, DocPaths.PACKAGE_LIST).openWriter());
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+    }
+
+    /**
+     * Generate the package index.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @throws DocletAbortException
+     */
+    public static void generate(Configuration configuration) {
+        PackageListWriter packgen;
+        try {
+            packgen = new PackageListWriter(configuration);
+            packgen.generatePackageListFile(configuration.root);
+            packgen.close();
+        } catch (IOException exc) {
+            configuration.message.error("doclet.exception_encountered",
+                exc.toString(), DocPaths.PACKAGE_LIST);
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    protected void generatePackageListFile(DocletEnvironment root) {
+        ArrayList<PackageElement> names = new ArrayList<>();
+        for (PackageElement pkg : configuration.packages) {
+            // if the -nodeprecated option is set and the package is marked as
+            // deprecated, do not include it in the packages list.
+            if (!(configuration.nodeprecated && utils.isDeprecated(pkg)))
+                names.add(pkg);
+        }
+        names.stream().forEach((name) -> {
+            println(name);
+        });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/SimpleDocFileFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.tools.DocumentationTool;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.StandardLocation;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Implementation of DocFileFactory that just uses java.io.File API,
+ * and does not use a JavaFileManager..
+ *
+ *  <p><b>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.</b>
+ *
+ */
+class SimpleDocFileFactory extends DocFileFactory {
+
+    public SimpleDocFileFactory(Configuration configuration) {
+        super(configuration);
+    }
+
+    public DocFile createFileForDirectory(String file) {
+        return new SimpleDocFile(new File(file));
+    }
+
+    public DocFile createFileForInput(String file) {
+        return new SimpleDocFile(new File(file));
+    }
+
+    public DocFile createFileForOutput(DocPath path) {
+        return new SimpleDocFile(DocumentationTool.Location.DOCUMENTATION_OUTPUT, path);
+    }
+
+    @Override
+    Iterable<DocFile> list(Location location, DocPath path) {
+        if (location != StandardLocation.SOURCE_PATH)
+            throw new IllegalArgumentException();
+
+        Set<DocFile> files = new LinkedHashSet<>();
+        for (String s : configuration.sourcepath.split(File.pathSeparator)) {
+            if (s.isEmpty())
+                continue;
+            File f = new File(s);
+            if (f.isDirectory()) {
+                f = new File(f, path.getPath());
+                if (f.exists())
+                    files.add(new SimpleDocFile(f));
+            }
+        }
+        return files;
+    }
+
+    class SimpleDocFile extends DocFile {
+        private File file;
+
+        /** Create a DocFile for a given file. */
+        private SimpleDocFile(File file) {
+            super(configuration);
+            this.file = file;
+        }
+
+        /** Create a DocFile for a given location and relative path. */
+        private SimpleDocFile(Location location, DocPath path) {
+            super(configuration, location, path);
+            String destDirName = configuration.destDirName;
+            this.file = destDirName.isEmpty() ? new File(path.getPath())
+                    : new File(destDirName, path.getPath());
+        }
+
+        /** Open an input stream for the file. */
+        public InputStream openInputStream() throws FileNotFoundException {
+            return new BufferedInputStream(new FileInputStream(file));
+        }
+
+        /**
+         * Open an output stream for the file.
+         * The file must have been created with a location of
+         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
+         */
+        public OutputStream openOutputStream() throws IOException, UnsupportedEncodingException {
+            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+                throw new IllegalStateException();
+
+            createDirectoryForFile(file);
+            return new BufferedOutputStream(new FileOutputStream(file));
+        }
+
+        /**
+         * Open an writer for the file, using the encoding (if any) given in the
+         * doclet configuration.
+         * The file must have been created with a location of
+         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
+         */
+        public Writer openWriter() throws IOException, UnsupportedEncodingException {
+            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+                throw new IllegalStateException();
+
+            createDirectoryForFile(file);
+            FileOutputStream fos = new FileOutputStream(file);
+            if (configuration.docencoding == null) {
+                return new BufferedWriter(new OutputStreamWriter(fos));
+            } else {
+                return new BufferedWriter(new OutputStreamWriter(fos, configuration.docencoding));
+            }
+        }
+
+        /** Return true if the file can be read. */
+        public boolean canRead() {
+            return file.canRead();
+        }
+
+        /** Return true if the file can be written. */
+        public boolean canWrite() {
+            return file.canRead();
+        }
+
+        /** Return true if the file exists. */
+        public boolean exists() {
+            return file.exists();
+        }
+
+        /** Return the base name (last component) of the file name. */
+        public String getName() {
+            return file.getName();
+        }
+
+        /** Return the file system path for this file. */
+        public String getPath() {
+            return file.getPath();
+        }
+
+        /** Return true is file has an absolute path name. */
+        public boolean isAbsolute() {
+            return file.isAbsolute();
+        }
+
+        /** Return true is file identifies a directory. */
+        public boolean isDirectory() {
+            return file.isDirectory();
+        }
+
+        /** Return true is file identifies a file. */
+        public boolean isFile() {
+            return file.isFile();
+        }
+
+        /** Return true if this file is the same as another. */
+        public boolean isSameFile(DocFile other) {
+            if (!(other instanceof SimpleDocFile))
+                return false;
+
+            try {
+                return file.exists()
+                        && file.getCanonicalFile().equals(((SimpleDocFile)other).file.getCanonicalFile());
+            } catch (IOException e) {
+                return false;
+            }
+        }
+
+        /** If the file is a directory, list its contents. */
+        public Iterable<DocFile> list() {
+            List<DocFile> files = new ArrayList<>();
+            for (File f: file.listFiles()) {
+                files.add(new SimpleDocFile(f));
+            }
+            return files;
+        }
+
+        /** Create the file as a directory, including any parent directories. */
+        public boolean mkdirs() {
+            return file.mkdirs();
+        }
+
+        /**
+         * Derive a new file by resolving a relative path against this file.
+         * The new file will inherit the configuration and location of this file
+         * If this file has a path set, the new file will have a corresponding
+         * new path.
+         */
+        public DocFile resolve(DocPath p) {
+            return resolve(p.getPath());
+        }
+
+        /**
+         * Derive a new file by resolving a relative path against this file.
+         * The new file will inherit the configuration and location of this file
+         * If this file has a path set, the new file will have a corresponding
+         * new path.
+         */
+        public DocFile resolve(String p) {
+            if (location == null && path == null) {
+                return new SimpleDocFile(new File(file, p));
+            } else {
+                return new SimpleDocFile(location, path.resolve(p));
+            }
+        }
+
+        /**
+         * Resolve a relative file against the given output location.
+         * @param locn Currently, only
+         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} is supported.
+         */
+        public DocFile resolveAgainst(Location locn) {
+            if (locn != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+                throw new IllegalArgumentException();
+            return new SimpleDocFile(
+                    new File(configuration.destDirName, file.getPath()));
+        }
+
+        /**
+         * Given a path string create all the directories in the path. For example,
+         * if the path string is "java/applet", the method will create directory
+         * "java" and then "java/applet" if they don't exist. The file separator
+         * string "/" is platform dependent system property.
+         *
+         * @param path Directory path string.
+         */
+        private void createDirectoryForFile(File file) {
+            File dir = file.getParentFile();
+            if (dir == null || dir.exists() || dir.mkdirs())
+                return;
+
+            configuration.message.error(
+                   "doclet.Unable_to_create_directory_0", dir.getPath());
+            throw new DocletAbortException("can't create directory");
+        }
+
+        /** Return a string to identify the contents of this object,
+         * for debugging purposes.
+         */
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+            sb.append("DocFile[");
+            if (location != null)
+                sb.append("locn:").append(location).append(",");
+            if (path != null)
+                sb.append("path:").append(path.getPath()).append(",");
+            sb.append("file:").append(file);
+            sb.append("]");
+            return sb.toString();
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/StandardDocFileFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,322 @@
+/*
+ * Copyright (c) 1998, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.OutputStreamWriter;
+import java.io.UnsupportedEncodingException;
+import java.io.Writer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.tools.DocumentationTool;
+import javax.tools.FileObject;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * Implementation of DocFileFactory using a {@link StandardJavaFileManager}.
+ *
+ *  <p><b>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.</b>
+ *
+ */
+class StandardDocFileFactory extends DocFileFactory {
+    private final StandardJavaFileManager fileManager;
+    private File destDir;
+
+    public StandardDocFileFactory(Configuration configuration) {
+        super(configuration);
+        fileManager = (StandardJavaFileManager) configuration.getFileManager();
+    }
+
+    private File getDestDir() {
+        if (destDir == null) {
+            if (!configuration.destDirName.isEmpty()
+                    || !fileManager.hasLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT)) {
+                try {
+                    String dirName = configuration.destDirName.isEmpty() ? "." : configuration.destDirName;
+                    File dir = new File(dirName);
+                    fileManager.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(dir));
+                } catch (IOException e) {
+                    throw new DocletAbortException(e);
+                }
+            }
+
+            destDir = fileManager.getLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT).iterator().next();
+        }
+        return destDir;
+    }
+
+    public DocFile createFileForDirectory(String file) {
+        return new StandardDocFile(new File(file));
+    }
+
+    public DocFile createFileForInput(String file) {
+        return new StandardDocFile(new File(file));
+    }
+
+    public DocFile createFileForOutput(DocPath path) {
+        return new StandardDocFile(DocumentationTool.Location.DOCUMENTATION_OUTPUT, path);
+    }
+
+    @Override
+    Iterable<DocFile> list(Location location, DocPath path) {
+        if (location != StandardLocation.SOURCE_PATH)
+            throw new IllegalArgumentException();
+
+        Set<DocFile> files = new LinkedHashSet<>();
+        Location l = fileManager.hasLocation(StandardLocation.SOURCE_PATH)
+                ? StandardLocation.SOURCE_PATH : StandardLocation.CLASS_PATH;
+        for (File f: fileManager.getLocation(l)) {
+            if (f.isDirectory()) {
+                f = new File(f, path.getPath());
+                if (f.exists())
+                    files.add(new StandardDocFile(f));
+            }
+        }
+        return files;
+    }
+
+    private static File newFile(File dir, String path) {
+        return (dir == null) ? new File(path) : new File(dir, path);
+    }
+
+    class StandardDocFile extends DocFile {
+        private File file;
+
+
+        /** Create a StandardDocFile for a given file. */
+        private StandardDocFile(File file) {
+            super(configuration);
+            this.file = file;
+        }
+
+        /** Create a StandardDocFile for a given location and relative path. */
+        private StandardDocFile(Location location, DocPath path) {
+            super(configuration, location, path);
+            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT) {
+                throw new AssertionError("invalid location output");
+            }
+            this.file = newFile(getDestDir(), path.getPath());
+        }
+
+        /** Open an input stream for the file. */
+        public InputStream openInputStream() throws IOException {
+            JavaFileObject fo = getJavaFileObjectForInput(file);
+            return new BufferedInputStream(fo.openInputStream());
+        }
+
+        /**
+         * Open an output stream for the file.
+         * The file must have been created with a location of
+         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
+         */
+        public OutputStream openOutputStream() throws IOException, UnsupportedEncodingException {
+            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+                throw new IllegalStateException();
+
+            OutputStream out = getFileObjectForOutput(path).openOutputStream();
+            return new BufferedOutputStream(out);
+        }
+
+        /**
+         * Open an writer for the file, using the encoding (if any) given in the
+         * doclet configuration.
+         * The file must have been created with a location of
+         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} and a corresponding relative path.
+         */
+        public Writer openWriter() throws IOException, UnsupportedEncodingException {
+            if (location != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+                throw new IllegalStateException();
+
+            OutputStream out = getFileObjectForOutput(path).openOutputStream();
+            if (configuration.docencoding == null) {
+                return new BufferedWriter(new OutputStreamWriter(out));
+            } else {
+                return new BufferedWriter(new OutputStreamWriter(out, configuration.docencoding));
+            }
+        }
+
+        /** Return true if the file can be read. */
+        public boolean canRead() {
+            return file.canRead();
+        }
+
+        /** Return true if the file can be written. */
+        public boolean canWrite() {
+            return file.canWrite();
+        }
+
+        /** Return true if the file exists. */
+        public boolean exists() {
+            return file.exists();
+        }
+
+        /** Return the base name (last component) of the file name. */
+        public String getName() {
+            return file.getName();
+        }
+
+        /** Return the file system path for this file. */
+        public String getPath() {
+            return file.getPath();
+        }
+
+        /** Return true is file has an absolute path name. */
+        public boolean isAbsolute() {
+            return file.isAbsolute();
+        }
+
+        /** Return true is file identifies a directory. */
+        public boolean isDirectory() {
+            return file.isDirectory();
+        }
+
+        /** Return true is file identifies a file. */
+        public boolean isFile() {
+            return file.isFile();
+        }
+
+        /** Return true if this file is the same as another. */
+        public boolean isSameFile(DocFile other) {
+            if (!(other instanceof StandardDocFile))
+                return false;
+
+            try {
+                return file.exists()
+                        && file.getCanonicalFile().equals(((StandardDocFile) other).file.getCanonicalFile());
+            } catch (IOException e) {
+                return false;
+            }
+        }
+
+        /** If the file is a directory, list its contents. */
+        public Iterable<DocFile> list() {
+            List<DocFile> files = new ArrayList<>();
+            for (File f: file.listFiles()) {
+                files.add(new StandardDocFile(f));
+            }
+            return files;
+        }
+
+        /** Create the file as a directory, including any parent directories. */
+        public boolean mkdirs() {
+            return file.mkdirs();
+        }
+
+        /**
+         * Derive a new file by resolving a relative path against this file.
+         * The new file will inherit the configuration and location of this file
+         * If this file has a path set, the new file will have a corresponding
+         * new path.
+         */
+        public DocFile resolve(DocPath p) {
+            return resolve(p.getPath());
+        }
+
+        /**
+         * Derive a new file by resolving a relative path against this file.
+         * The new file will inherit the configuration and location of this file
+         * If this file has a path set, the new file will have a corresponding
+         * new path.
+         */
+        public DocFile resolve(String p) {
+            if (location == null && path == null) {
+                return new StandardDocFile(new File(file, p));
+            } else {
+                return new StandardDocFile(location, path.resolve(p));
+            }
+        }
+
+        /**
+         * Resolve a relative file against the given output location.
+         * @param locn Currently, only
+         * {@link DocumentationTool.Location#DOCUMENTATION_OUTPUT} is supported.
+         */
+        public DocFile resolveAgainst(Location locn) {
+            if (locn != DocumentationTool.Location.DOCUMENTATION_OUTPUT)
+                throw new IllegalArgumentException();
+            return new StandardDocFile(newFile(getDestDir(), file.getPath()));
+        }
+
+        /** Return a string to identify the contents of this object,
+         * for debugging purposes.
+         */
+        @Override
+        public String toString() {
+            StringBuilder sb = new StringBuilder();
+            sb.append("StandardDocFile[");
+            if (location != null)
+                sb.append("locn:").append(location).append(",");
+            if (path != null)
+                sb.append("path:").append(path.getPath()).append(",");
+            sb.append("file:").append(file);
+            sb.append("]");
+            return sb.toString();
+        }
+
+        private JavaFileObject getJavaFileObjectForInput(File file) {
+            return fileManager.getJavaFileObjects(file).iterator().next();
+        }
+
+        private FileObject getFileObjectForOutput(DocPath path) throws IOException {
+            // break the path into a package-part and the rest, by finding
+            // the position of the last '/' before an invalid character for a
+            // package name, such as the "." before an extension or the "-"
+            // in filenames like package-summary.html, doc-files or src-html.
+            String p = path.getPath();
+            int lastSep = -1;
+            for (int i = 0; i < p.length(); i++) {
+                char ch = p.charAt(i);
+                if (ch == '/') {
+                    lastSep = i;
+                } else if (i == lastSep + 1 && !Character.isJavaIdentifierStart(ch)
+                        || !Character.isJavaIdentifierPart(ch)) {
+                    break;
+                }
+            }
+            String pkg = (lastSep == -1) ? "" : p.substring(0, lastSep);
+            String rest = p.substring(lastSep + 1);
+            return fileManager.getFileForOutput(location, pkg, rest, null);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/TypeElementCatalog.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,270 @@
+/*
+ * Copyright (c) 2001, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * This class acts as an artificial container for classes specified on the command line when
+ * running Javadoc. For example, if you specify several classes from package java.lang, this class
+ * will catalog those classes so that we can retrieve all of the classes from a particular package
+ * later.
+ *
+ * <p>
+ * <b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public class TypeElementCatalog {
+
+    /**
+     * Stores the set of packages that the classes specified on the command line belong to. Note
+     * that the default package is "".
+     */
+    private final SortedSet<PackageElement> packageSet;
+
+    /**
+     * Stores all classes for each package
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> allClasses;
+
+    /**
+     * Stores ordinary classes (excluding Exceptions and Errors) for each package
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> ordinaryClasses;
+
+    /**
+     * Stores exceptions for each package
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> exceptions;
+
+    /**
+     * Stores enums for each package.
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> enums;
+
+    /**
+     * Stores annotation types for each package.
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> annotationTypes;
+
+    /**
+     * Stores errors for each package
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> errors;
+
+    /**
+     * Stores interfaces for each package
+     */
+    private final Map<PackageElement, SortedSet<TypeElement>> interfaces;
+
+    private final Configuration configuration;
+    private final Utils utils;
+    private final Comparator<Element> comparator;
+
+    /**
+     * Construct a new TypeElementCatalog.
+     *
+     * @param typeElements the array of TypeElements to catalog
+     */
+    public TypeElementCatalog(Iterable<TypeElement> typeElements, Configuration config) {
+        this(config);
+        for (TypeElement typeElement : typeElements) {
+            addClassDoc(typeElement);
+        }
+    }
+
+    /**
+     * Construct a new TypeElementCatalog.
+     *
+     */
+    public TypeElementCatalog(Configuration config) {
+        this.configuration = config;
+        this.utils = config.utils;
+        comparator = utils.makeGeneralPurposeComparator();
+        allClasses = new HashMap<>();
+        ordinaryClasses = new HashMap<>();
+        exceptions = new HashMap<>();
+        enums = new HashMap<>();
+        annotationTypes = new HashMap<>();
+        errors = new HashMap<>();
+        interfaces = new HashMap<>();
+        packageSet = new TreeSet<>(comparator);
+    }
+
+    /**
+     * Add the given class to the catalog.
+     *
+     * @param typeElement the TypeElement to add to the catalog.
+     */
+    public final void addClassDoc(TypeElement typeElement) {
+        if (typeElement == null) {
+            return;
+        }
+        addClass(typeElement, allClasses);
+        if (utils.isOrdinaryClass(typeElement)) {
+            addClass(typeElement, ordinaryClasses);
+        } else if (utils.isException(typeElement)) {
+            addClass(typeElement, exceptions);
+        } else if (utils.isEnum(typeElement)) {
+            addClass(typeElement, enums);
+        } else if (utils.isAnnotationType(typeElement)) {
+            addClass(typeElement, annotationTypes);
+        } else if (utils.isError(typeElement)) {
+            addClass(typeElement, errors);
+        } else if (utils.isInterface(typeElement)) {
+            addClass(typeElement, interfaces);
+        }
+    }
+
+    /**
+     * Add the given class to the given map.
+     *
+     * @param typeElement the ClassDoc to add to the catalog.
+     * @param map the Map to add the TypeElement to.
+     */
+    private void addClass(TypeElement typeElement, Map<PackageElement, SortedSet<TypeElement>> map) {
+
+        PackageElement pkg = utils.containingPackage(typeElement);
+        if (utils.isIncluded(pkg) || (configuration.nodeprecated && utils.isDeprecated(pkg))) {
+            // No need to catalog this class if it's package is
+            // included on the command line or if -nodeprecated option is set
+            // and the containing package is marked as deprecated.
+            return;
+        }
+
+        SortedSet<TypeElement> s = map.get(pkg);
+        if (s == null) {
+            packageSet.add(pkg);
+            s = new TreeSet<>(comparator);
+        }
+        s.add(typeElement);
+        map.put(pkg, s);
+
+    }
+
+    private SortedSet<TypeElement> getSet(Map<PackageElement, SortedSet<TypeElement>> m, PackageElement key) {
+        SortedSet<TypeElement> s = m.get(key);
+        if (s != null) {
+            return s;
+        }
+        return new TreeSet<>(comparator);
+    }
+    /**
+     * Return all of the classes specified on the command-line that belong to the given package.
+     *
+     * @param packageElement the package to return the classes for.
+     */
+    public SortedSet<TypeElement> allClasses(PackageElement packageElement) {
+        return utils.isIncluded(packageElement)
+                ? utils.getTypeElementsAsSortedSet(utils.getEnclosedTypeElements(packageElement))
+                : getSet(allClasses, packageElement);
+    }
+
+    /**
+     * Return all of the classes specified on the command-line that belong to the given package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> allUnnamedClasses() {
+        for (PackageElement pkg : allClasses.keySet()) {
+            if (pkg.isUnnamed()) {
+                return allClasses.get(pkg);
+            }
+        }
+        return new TreeSet<>(comparator);
+    }
+
+    /**
+     * Return a SortedSet of packages that this catalog stores.
+     */
+    public SortedSet<PackageElement> packages() {
+         return packageSet;
+    }
+
+    /**
+     * Return all of the errors specified on the command-line that belong to the given package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> errors(PackageElement pkg) {
+        return getSet(errors, pkg);
+    }
+
+    /**
+     * Return all of the exceptions specified on the command-line that belong to the given package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> exceptions(PackageElement pkg) {
+        return getSet(exceptions, pkg);
+    }
+
+    /**
+     * Return all of the enums specified on the command-line that belong to the given package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> enums(PackageElement pkg) {
+        return getSet(enums, pkg);
+    }
+
+    /**
+     * Return all of the annotation types specified on the command-line that belong to the given
+     * package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> annotationTypes(PackageElement pkg) {
+        return getSet(annotationTypes, pkg);
+    }
+
+    /**
+     * Return all of the interfaces specified on the command-line that belong to the given package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> interfaces(PackageElement pkg) {
+        return getSet(interfaces, pkg);
+    }
+
+    /**
+     * Return all of the ordinary classes specified on the command-line that belong to the given
+     * package.
+     *
+     * @param packageName the name of the package specified on the command-line.
+     */
+    public SortedSet<TypeElement> ordinaryClasses(PackageElement pkg) {
+        return getSet(ordinaryClasses, pkg);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2967 @@
+/*
+ * Copyright (c) 1999, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.io.*;
+import java.lang.annotation.Documented;
+import java.lang.ref.SoftReference;
+import java.text.CollationKey;
+import java.text.Collator;
+import java.util.*;
+import java.util.AbstractMap.SimpleEntry;
+import java.util.Map.Entry;
+import java.util.stream.Collectors;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Modifier;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.TypeParameterElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.ErrorType;
+import javax.lang.model.type.ExecutableType;
+import javax.lang.model.type.NoType;
+import javax.lang.model.type.PrimitiveType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.util.ElementFilter;
+import javax.lang.model.util.ElementKindVisitor9;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.SimpleElementVisitor9;
+import javax.lang.model.util.SimpleTypeVisitor9;
+import javax.lang.model.util.TypeKindVisitor9;
+import javax.lang.model.util.Types;
+import javax.tools.FileObject;
+import javax.tools.StandardLocation;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.DocTree.Kind;
+import com.sun.source.doctree.ParamTree;
+import com.sun.source.doctree.SerialFieldTree;
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.LineMap;
+import com.sun.source.util.DocSourcePositions;
+import com.sun.source.util.DocTrees;
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import jdk.javadoc.internal.doclets.toolkit.CommentUtils.DocCommentDuo;
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.WorkArounds;
+
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.element.Modifier.*;
+import static javax.lang.model.type.TypeKind.*;
+
+import static com.sun.source.doctree.DocTree.Kind.*;
+import static jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.MAX_CONSTANT_VALUE_INDEX_LENGTH;
+
+
+/**
+ * Utilities Class for Doclets.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Jamie Ho
+ */
+public class Utils {
+    public final Configuration configuration;
+    public final DocTrees docTrees;
+    public final Elements elementUtils;
+    public final Types typeUtils;
+
+    public Utils(Configuration c) {
+        configuration = c;
+        elementUtils = c.root.getElementUtils();
+        typeUtils = c.root.getTypeUtils();
+        docTrees = c.root.getDocTrees();
+    }
+
+    // our own little symbol table
+    private HashMap<String, TypeMirror> symtab = new HashMap<>();
+
+    public TypeMirror getSymbol(String signature) {
+        TypeMirror type = symtab.get(signature);
+        if (type == null) {
+            TypeElement typeElement = elementUtils.getTypeElement(signature);
+            if (typeElement == null)
+                return null;
+            type = typeElement.asType();
+            if (type == null)
+                return null;
+            symtab.put(signature, type);
+        }
+        return type;
+    }
+
+    public TypeMirror getObjectType() {
+        return getSymbol("java.lang.Object");
+    }
+
+    public TypeMirror getExceptionType() {
+        return getSymbol("java.lang.Exception");
+    }
+
+    public TypeMirror getErrorType() {
+        return getSymbol("java.lang.Error");
+    }
+
+    public TypeMirror getSerializableType() {
+        return getSymbol("java.io.Serializable");
+    }
+
+    public TypeMirror getExternalizableType() {
+        return getSymbol("java.io.Externalizable");
+    }
+
+    public TypeMirror getIllegalArgumentExceptionType() {
+        return getSymbol("java.lang.IllegalArgumentException");
+    }
+
+    public TypeMirror getNullPointerExceptionType() {
+        return getSymbol("java.lang.NullPointerException");
+    }
+
+    public TypeMirror getDeprecatedType() {
+        return getSymbol("java.lang.Deprecated");
+    }
+
+    public TypeMirror getFunctionalInterface() {
+        return getSymbol("java.lang.FunctionalInterface");
+    }
+
+    /**
+     * Return array of class members whose documentation is to be generated.
+     * If the member is deprecated do not include such a member in the
+     * returned array.
+     *
+     * @param  members    Array of members to choose from.
+     * @return List       List of eligible members for whom
+     *                    documentation is getting generated.
+     */
+    public List<Element> excludeDeprecatedMembers(List<? extends Element> members) {
+        List<Element> excludeList = members.stream()
+                .filter((member) -> (!isDeprecated(member)))
+                .sorted(makeGeneralPurposeComparator())
+                .collect(Collectors.toCollection(ArrayList::new));
+        return excludeList;
+    }
+
+    /**
+     * Search for the given method in the given class.
+     *
+     * @param  te        Class to search into.
+     * @param  method    Method to be searched.
+     * @return ExecutableElement Method found, null otherwise.
+     */
+    public ExecutableElement findMethod(TypeElement te, ExecutableElement method) {
+        for (Element m : getMethods(te)) {
+            if (executableMembersEqual(method, (ExecutableElement)m)) {
+                return (ExecutableElement)m;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * Test whether a class is a subclass of another class.
+     *
+     * @param t1 the candidate superclass.
+     * @param t2 the target
+     * @return true if t1 is a superclass of t2.
+     */
+    public boolean isSubclassOf(TypeElement t1, TypeElement t2) {
+        return typeUtils.isSubtype(t1.asType(), t2.asType());
+    }
+
+    /**
+     * @param e1 the first method to compare.
+     * @param e2 the second method to compare.
+     * @return true if member1 overrides/hides or is overriden/hidden by member2.
+     */
+
+    public boolean executableMembersEqual(ExecutableElement e1, ExecutableElement e2) {
+        // TODO: investigate if Elements.hides(..) will work here.
+        if (isStatic(e1) && isStatic(e2)) {
+            List<? extends VariableElement> parameters1 = e1.getParameters();
+            List<? extends VariableElement> parameters2 = e2.getParameters();
+            if (e1.getSimpleName().equals(e2.getSimpleName()) &&
+                    parameters1.size() == parameters2.size()) {
+                int j;
+                for (j = 0 ; j < parameters1.size(); j++) {
+                    VariableElement v1 = parameters1.get(j);
+                    VariableElement v2 = parameters2.get(j);
+                    String t1 = getTypeName(v1.asType(), true);
+                    String t2 = getTypeName(v2.asType(), true);
+                    if (!(t1.equals(t2) ||
+                            isTypeVariable(v1.asType()) || isTypeVariable(v2.asType()))) {
+                        break;
+                    }
+                }
+                if (j == parameters1.size()) {
+                return true;
+                }
+            }
+            return false;
+        } else {
+            return elementUtils.overrides(e1, e2, getEnclosingTypeElement(e1)) ||
+                    elementUtils.overrides(e2, e1, getEnclosingTypeElement(e2)) ||
+                    e1.equals(e2);
+        }
+    }
+
+    /**
+     * According to
+     * <cite>The Java&trade; Language Specification</cite>,
+     * all the outer classes and static inner classes are core classes.
+     */
+    public boolean isCoreClass(TypeElement e) {
+        return getEnclosingTypeElement(e) == null || isStatic(e);
+    }
+
+    public boolean matches(Element e1, Element e2) {
+        if (isExecutableElement(e1) && isExecutableElement(e1)) {
+            return executableMembersEqual((ExecutableElement)e1, (ExecutableElement)e2);
+        } else {
+            return e1.getSimpleName().equals(e2.getSimpleName());
+        }
+    }
+
+    /**
+     * Copy the given directory contents from the source package directory
+     * to the generated documentation directory. For example for a package
+     * java.lang this method find out the source location of the package using
+     * {@link SourcePath} and if given directory is found in the source
+     * directory structure, copy the entire directory, to the generated
+     * documentation hierarchy.
+     * @param pe
+     */
+    public void copyDocFiles(PackageElement pe) {
+        copyDocFiles(DocPath.forPackage(pe).resolve(DocPaths.DOC_FILES));
+    }
+
+    public void copyDocFiles(DocPath dir) {
+        try {
+            boolean first = true;
+            for (DocFile f : DocFile.list(configuration, StandardLocation.SOURCE_PATH, dir)) {
+                if (!f.isDirectory()) {
+                    continue;
+                }
+                DocFile srcdir = f;
+                DocFile destdir = DocFile.createFileForOutput(configuration, dir);
+                if (srcdir.isSameFile(destdir)) {
+                    continue;
+                }
+
+                for (DocFile srcfile: srcdir.list()) {
+                    DocFile destfile = destdir.resolve(srcfile.getName());
+                    if (srcfile.isFile()) {
+                        if (destfile.exists() && !first) {
+                            configuration.message.warning("doclet.Copy_Overwrite_warning",
+                                    srcfile.getPath(), destdir.getPath());
+                        } else {
+                            configuration.message.notice(
+                                    "doclet.Copying_File_0_To_Dir_1",
+                                    srcfile.getPath(), destdir.getPath());
+                            destfile.copyFile(srcfile);
+                        }
+                    } else if (srcfile.isDirectory()) {
+                        if (configuration.copydocfilesubdirs
+                                && !configuration.shouldExcludeDocFileDir(srcfile.getName())) {
+                            copyDocFiles(dir.resolve(srcfile.getName()));
+                        }
+                    }
+                }
+
+                first = false;
+            }
+        } catch (SecurityException | IOException exc) {
+            throw new DocletAbortException(exc);
+        }
+    }
+
+    public boolean isAnnotated(TypeMirror e) {
+        return !e.getAnnotationMirrors().isEmpty();
+    }
+
+    public boolean isAnnotated(Element e) {
+        return !e.getAnnotationMirrors().isEmpty();
+    }
+
+    public boolean isAnnotationType(Element e) {
+        return new SimpleElementVisitor9<Boolean, Void>() {
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitExecutable(ExecutableElement e, Void p) {
+                return visit(e.getEnclosingElement());
+            }
+
+            @Override  @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitUnknown(Element e, Void p) {
+                return false;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected Boolean defaultAction(Element e, Void p) {
+                return e.getKind() == ANNOTATION_TYPE;
+            }
+        }.visit(e);
+    }
+
+    /**
+     * An Enum implementation is almost identical, thus this method returns if
+     * this element represents a CLASS or an ENUM
+     * @param e element
+     * @return true if class or enum
+     */
+    public boolean isClass(Element e) {
+        return e.getKind().isClass();
+    }
+
+    public boolean isConstructor(Element e) {
+         return e.getKind() == CONSTRUCTOR;
+    }
+
+    public boolean isEnum(Element e) {
+        return e.getKind() == ENUM;
+    }
+
+    boolean isEnumConstant(Element e) {
+        return e.getKind() == ENUM_CONSTANT;
+    }
+
+    public boolean isField(Element e) {
+        return e.getKind() == FIELD;
+    }
+
+    public boolean isInterface(Element e) {
+        return e.getKind() == INTERFACE;
+    }
+
+    public boolean isMethod(Element e) {
+        return e.getKind() == METHOD;
+    }
+
+    public boolean isPackage(Element e) {
+        return e.getKind() == ElementKind.PACKAGE;
+    }
+
+    public boolean isAbstract(Element e) {
+        return e.getModifiers().contains(Modifier.ABSTRACT);
+    }
+
+    public boolean isDefault(Element e) {
+        return e.getModifiers().contains(Modifier.DEFAULT);
+    }
+
+    public boolean isPackagePrivate(Element e) {
+        return !(isPublic(e) || isPrivate(e) || isProtected(e));
+    }
+
+    public boolean isPrivate(Element e) {
+        return e.getModifiers().contains(Modifier.PRIVATE);
+    }
+
+    public boolean isProtected(Element e) {
+        return e.getModifiers().contains(Modifier.PROTECTED);
+    }
+
+    public boolean isPublic(Element e) {
+        return e.getModifiers().contains(Modifier.PUBLIC);
+    }
+
+    public boolean isProperty(String name) {
+        return configuration.javafx && name.endsWith("Property");
+    }
+
+    public String getPropertyName(String name) {
+        return isProperty(name)
+                ? name.substring(0, name.length() - "Property".length())
+                : name;
+    }
+
+    public String getPropertyLabel(String name) {
+        return name.substring(0, name.lastIndexOf("Property"));
+    }
+
+    public boolean isOverviewElement(Element e) {
+        return e.getKind() == ElementKind.OTHER;
+    }
+
+    public boolean isStatic(Element e) {
+        return e.getModifiers().contains(Modifier.STATIC);
+    }
+
+    public boolean isSerializable(TypeElement e) {
+        return typeUtils.isSubtype(e.asType(), getSerializableType());
+    }
+
+    public boolean isExternalizable(TypeElement e) {
+        return typeUtils.isSubtype(e.asType(), getExternalizableType());
+    }
+
+    public SortedSet<VariableElement> serializableFields(TypeElement aclass) {
+        return configuration.workArounds.getSerializableFields(this, aclass);
+    }
+
+    public SortedSet<ExecutableElement> serializationMethods(TypeElement aclass) {
+        return configuration.workArounds.getSerializationMethods(this, aclass);
+    }
+
+    public boolean definesSerializableFields(TypeElement aclass) {
+        return configuration.workArounds.definesSerializableFields(this, aclass);
+    }
+
+    public String modifiersToString(Element e, boolean trailingSpace) {
+        SortedSet<Modifier> set = new TreeSet<>(e.getModifiers());
+        set.remove(Modifier.NATIVE);
+        set.remove(Modifier.STRICTFP);
+        set.remove(Modifier.SYNCHRONIZED);
+
+        return new ElementKindVisitor9<String, SortedSet<Modifier>>() {
+            final StringBuilder sb = new StringBuilder();
+
+            void addVisibilityModifier(Set<Modifier> modifiers) {
+                if (modifiers.contains(PUBLIC)) {
+                    sb.append("public").append(" ");
+                } else if (modifiers.contains(PROTECTED)) {
+                    sb.append("protected").append(" ");
+                } else if (modifiers.contains(PRIVATE)) {
+                    sb.append("private").append(" ");
+                }
+            }
+
+            void addStatic(Set<Modifier> modifiers) {
+                if (modifiers.contains(STATIC)) {
+                    sb.append("static").append(" ");
+                }
+            }
+
+            void addModifers(Set<Modifier> modifiers) {
+                String s = set.stream().map(m -> m.toString()).collect(Collectors.joining(" "));
+                sb.append(s);
+                if (!s.isEmpty())
+                    sb.append(" ");
+            }
+
+            String finalString(String s) {
+                sb.append(s);
+                if (trailingSpace) {
+                    if (sb.lastIndexOf(" ") == sb.length() - 1) {
+                        return sb.toString();
+                    } else {
+                        return sb.append(" ").toString();
+                    }
+                } else {
+                    return sb.toString().trim();
+                }
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitTypeAsInterface(TypeElement e, SortedSet<Modifier> p) {
+                addVisibilityModifier(p);
+                addStatic(p);
+                return finalString("interface");
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitTypeAsEnum(TypeElement e, SortedSet<Modifier> p) {
+                addVisibilityModifier(p);
+                addStatic(p);
+                return finalString("enum");
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitTypeAsAnnotationType(TypeElement e, SortedSet<Modifier> p) {
+                addVisibilityModifier(p);
+                addStatic(p);
+                return finalString("@interface");
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitTypeAsClass(TypeElement e, SortedSet<Modifier> p) {
+                addModifers(p);
+                return finalString("class");
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected String defaultAction(Element e, SortedSet<Modifier> p) {
+                addModifers(p);
+                return sb.toString().trim();
+            }
+
+        }.visit(e, set);
+    }
+
+    public boolean isFunctionalInterface(AnnotationMirror amirror) {
+        return amirror.getAnnotationType().equals(getFunctionalInterface()) &&
+                configuration.root.getSourceVersion()
+                        .compareTo(SourceVersion.RELEASE_8) >= 0;
+    }
+
+    public boolean isNoType(TypeMirror t) {
+        return t.getKind() == NONE;
+    }
+
+    public boolean isOrdinaryClass(TypeElement te) {
+        if (isEnum(te) || isInterface(te) || isAnnotationType(te)) {
+            return false;
+        }
+        if (isError(te) || isException(te)) {
+            return false;
+        }
+        return true;
+    }
+
+    public boolean isError(TypeElement te) {
+        if (isEnum(te) || isInterface(te) || isAnnotationType(te)) {
+            return false;
+        }
+        return typeUtils.isSubtype(te.asType(), getErrorType());
+    }
+
+    public boolean isException(TypeElement te) {
+        if (isEnum(te) || isInterface(te) || isAnnotationType(te)) {
+            return false;
+        }
+        return typeUtils.isSubtype(te.asType(), getExceptionType());
+    }
+
+    public boolean isPrimitive(TypeMirror t) {
+        return new SimpleTypeVisitor9<Boolean, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitNoType(NoType t, Void p) {
+                return t.getKind() == VOID;
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitPrimitive(PrimitiveType t, Void p) {
+                return true;
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitArray(ArrayType t, Void p) {
+                return visit(t.getComponentType());
+            }
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected Boolean defaultAction(TypeMirror e, Void p) {
+                return false;
+            }
+        }.visit(t);
+    }
+
+    public boolean isExecutableElement(Element e) {
+        ElementKind kind = e.getKind();
+        switch (kind) {
+            case CONSTRUCTOR: case METHOD: case INSTANCE_INIT:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+    public boolean isVariableElement(Element e) {
+        ElementKind kind = e.getKind();
+        switch(kind) {
+              case ENUM_CONSTANT: case EXCEPTION_PARAMETER: case FIELD:
+              case LOCAL_VARIABLE: case PARAMETER:
+              case RESOURCE_VARIABLE:
+                  return true;
+              default:
+                  return false;
+        }
+    }
+
+    public boolean isTypeElement(Element e) {
+        switch (e.getKind()) {
+            case CLASS: case ENUM: case INTERFACE: case ANNOTATION_TYPE:
+                return true;
+            default:
+                return false;
+        }
+    }
+
+   /**
+     * Get the signature. It is the parameter list, type is qualified.
+     * For instance, for a method {@code mymethod(String x, int y)},
+     * it will return {@code(java.lang.String,int)}.
+     * @param e
+     * @return String
+     */
+    public String signature(ExecutableElement e) {
+        return makeSignature(e, true);
+    }
+
+    /**
+     * Get flat signature.  All types are not qualified.
+     * Return a String, which is the flat signature of this member.
+     * It is the parameter list, type is not qualified.
+     * For instance, for a method {@code mymethod(String x, int y)},
+     * it will return {@code (String, int)}.
+     */
+    public String flatSignature(ExecutableElement e) {
+        return makeSignature(e, false);
+    }
+
+    public String makeSignature(ExecutableElement e, boolean full) {
+        return makeSignature(e, full, false);
+    }
+
+    public String makeSignature(ExecutableElement e, boolean full, boolean ignoreTypeParameters) {
+        StringBuilder result = new StringBuilder();
+        result.append("(");
+        Iterator<? extends VariableElement> iterator = e.getParameters().iterator();
+        while (iterator.hasNext()) {
+            VariableElement next = iterator.next();
+            TypeMirror type = next.asType();
+            result.append(getTypeSignature(type, full, ignoreTypeParameters));
+            if (iterator.hasNext()) {
+                result.append(", ");
+            }
+        }
+        if (e.isVarArgs()) {
+            int len = result.length();
+            result.replace(len - 2, len, "...");
+        }
+        result.append(")");
+        return result.toString();
+    }
+
+    private String getTypeSignature(TypeMirror t, boolean qualifiedName, boolean noTypeParameters) {
+        return new SimpleTypeVisitor9<StringBuilder, Void>() {
+            final StringBuilder sb = new StringBuilder();
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public StringBuilder visitArray(ArrayType t, Void p) {
+                TypeMirror componentType = t.getComponentType();
+                visit(componentType);
+                sb.append("[]");
+                return sb;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public StringBuilder visitDeclared(DeclaredType t, Void p) {
+                Element e = t.asElement();
+                sb.append(qualifiedName ? getFullyQualifiedName(e) : getSimpleName(e));
+                List<? extends TypeMirror> typeArguments = t.getTypeArguments();
+                if (typeArguments.isEmpty() || noTypeParameters) {
+                    return sb;
+                }
+                sb.append("<");
+                Iterator<? extends TypeMirror> iterator = typeArguments.iterator();
+                while (iterator.hasNext()) {
+                    TypeMirror ta = iterator.next();
+                    visit(ta);
+                    if (iterator.hasNext()) {
+                        sb.append(", ");
+                    }
+                }
+                sb.append(">");
+                return sb;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public StringBuilder visitTypeVariable(javax.lang.model.type.TypeVariable t, Void p) {
+                Element e = t.asElement();
+                sb.append(qualifiedName ? getFullyQualifiedName(e, false) : getSimpleName(e));
+                return sb;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public StringBuilder visitWildcard(javax.lang.model.type.WildcardType t, Void p) {
+                sb.append("?");
+                TypeMirror upperBound = t.getExtendsBound();
+                if (upperBound != null) {
+                    sb.append(" extends ");
+                    visit(upperBound);
+                }
+                TypeMirror superBound = t.getSuperBound();
+                if (superBound != null) {
+                    sb.append(" super ");
+                    visit(superBound);
+                }
+                return sb;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected StringBuilder defaultAction(TypeMirror e, Void p) {
+                return sb.append(e);
+            }
+        }.visit(t).toString();
+    }
+
+    public boolean isArrayType(TypeMirror t) {
+        return t.getKind() == ARRAY;
+    }
+
+    public boolean isDeclaredType(TypeMirror t) {
+        return t.getKind() == DECLARED;
+    }
+
+    public boolean isErrorType(TypeMirror t) {
+        return t.getKind() == ERROR;
+    }
+
+    public boolean isIntersectionType(TypeMirror t) {
+        return t.getKind() == INTERSECTION;
+    }
+
+    public boolean isTypeParameterElement(Element e) {
+        return e.getKind() == TYPE_PARAMETER;
+    }
+
+    public boolean isTypeVariable(TypeMirror t) {
+        return t.getKind() == TYPEVAR;
+    }
+
+    public boolean isVoid(TypeMirror t) {
+        return t.getKind() == VOID;
+    }
+
+    public boolean isWildCard(TypeMirror t) {
+        return t.getKind() == WILDCARD;
+    }
+
+    public boolean ignoreBounds(TypeMirror bound) {
+        return bound.equals(getObjectType()) && !isAnnotated(bound);
+    }
+
+    /*
+     * a direct port of TypeVariable.getBounds
+     */
+    public List<? extends TypeMirror> getBounds(TypeParameterElement tpe) {
+        List<? extends TypeMirror> bounds = tpe.getBounds();
+        if (!bounds.isEmpty()) {
+            TypeMirror upperBound = bounds.get(bounds.size() - 1);
+            if (ignoreBounds(upperBound)) {
+                return Collections.emptyList();
+            }
+        }
+        return bounds;
+    }
+
+    /**
+     * Returns the TypeMirror of the ExecutableElement for all methods,
+     * a null if constructor.
+     * @param ee the ExecutableElement
+     * @return
+     */
+    public TypeMirror getReturnType(ExecutableElement ee) {
+        return ee.getKind() == CONSTRUCTOR ? null : ee.getReturnType();
+    }
+
+    /**
+     * Return the type containing the method that this method overrides.
+     * It may be a {@code TypeElement} or a {@code TypeParameterElement}.
+     */
+    public TypeMirror overriddenType(ExecutableElement method) {
+        return configuration.workArounds.overriddenType(method);
+    }
+
+    private  TypeMirror getType(TypeMirror t) {
+        return (isNoType(t)) ? getObjectType() : t;
+    }
+
+    public TypeMirror getSuperType(TypeElement te) {
+        TypeMirror t = te.getSuperclass();
+        return getType(t);
+    }
+
+    /**
+     * Return the class that originally defined the method that
+     * is overridden by the current definition, or null if no
+     * such class exists.
+     *
+     * @return a TypeElement representing the superclass that
+     * originally defined this method, null if this method does
+     * not override a definition in a superclass.
+     */
+    public TypeElement overriddenClass(ExecutableElement ee) {
+        TypeMirror type = overriddenType(ee);
+        return (type != null) ? asTypeElement(type) : null;
+    }
+
+    public ExecutableElement overriddenMethod(ExecutableElement method) {
+        if (isStatic(method)) {
+            return null;
+        }
+        final TypeElement origin = getEnclosingTypeElement(method);
+        for (TypeMirror t = getSuperType(origin);
+                t.getKind() == DECLARED;
+                t = getSuperType(asTypeElement(t))) {
+            TypeElement te = asTypeElement(t);
+            if (te == null) {
+                return null;
+            }
+            List<? extends Element> methods = te.getEnclosedElements();
+            for (ExecutableElement ee : ElementFilter.methodsIn(methods)) {
+                if (elementUtils.overrides(method, ee, origin)) {
+                    return ee;
+                }
+            }
+            if (t.equals(getObjectType()))
+                return null;
+        }
+        return null;
+    }
+
+    public SortedSet<TypeElement> getTypeElementsAsSortedSet(Iterable<TypeElement> typeElements) {
+        SortedSet<TypeElement> set = new TreeSet<>(makeGeneralPurposeComparator());
+        for (TypeElement te : typeElements) {
+            set.add(te);
+        }
+        return set;
+    }
+
+    public List<? extends DocTree> getSerialDataTrees(ExecutableElement member) {
+        return getBlockTags(member, SERIAL_DATA);
+    }
+
+    public FileObject getFileObject(TypeElement te) {
+        return docTrees.getPath(te).getCompilationUnit().getSourceFile();
+    }
+
+    public TypeMirror getDeclaredType(TypeElement enclosing, TypeMirror target) {
+        return getDeclaredType(Collections.emptyList(), enclosing, target);
+    }
+
+    /**
+     * Finds the declaration of the enclosing's type parameter.
+     *
+     * @param values
+     * @param enclosing a TypeElement whose type arguments  we desire
+     * @param target the TypeMirror of the type as described by the enclosing
+     * @return
+     */
+    public TypeMirror getDeclaredType(Collection<TypeMirror> values,
+            TypeElement enclosing, TypeMirror target) {
+        TypeElement targetElement = asTypeElement(target);
+        List<? extends TypeParameterElement> targetTypeArgs = targetElement.getTypeParameters();
+        if (targetTypeArgs.isEmpty()) {
+            return target;
+        }
+
+        List<? extends TypeParameterElement> enclosingTypeArgs = enclosing.getTypeParameters();
+        List<TypeMirror> targetTypeArgTypes = new ArrayList<>(targetTypeArgs.size());
+
+        if (enclosingTypeArgs.isEmpty()) {
+            for (TypeMirror te : values) {
+                List<? extends TypeMirror> typeArguments = ((DeclaredType)te).getTypeArguments();
+                if (typeArguments.size() >= targetTypeArgs.size()) {
+                    for (int i = 0 ; i < targetTypeArgs.size(); i++) {
+                        targetTypeArgTypes.add(typeArguments.get(i));
+                    }
+                    break;
+                }
+            }
+            // we found no matches in the hierarchy
+            if (targetTypeArgTypes.isEmpty()) {
+                return target;
+            }
+        } else {
+            if (targetTypeArgs.size() > enclosingTypeArgs.size()) {
+                return target;
+            }
+            for (int i = 0; i < targetTypeArgs.size(); i++) {
+                TypeParameterElement tpe = enclosingTypeArgs.get(i);
+                targetTypeArgTypes.add(tpe.asType());
+            }
+        }
+        TypeMirror dt = typeUtils.getDeclaredType(targetElement,
+                targetTypeArgTypes.toArray(new TypeMirror[targetTypeArgTypes.size()]));
+        return dt;
+    }
+
+    /**
+     * For the class return all implemented interfaces including the
+     * superinterfaces of the implementing interfaces, also iterate over for
+     * all the superclasses. For interface return all the extended interfaces
+     * as well as superinterfaces for those extended interfaces.
+     *
+     * @param  te the class to get the interfaces for
+     * @return List of all the required interfaces.
+     */
+    public Set<TypeMirror> getAllInterfaces(TypeElement te) {
+        Set<TypeMirror> results = new LinkedHashSet<>();
+
+        List<? extends TypeMirror> interfaceTypes = te.getInterfaces();
+
+        for (TypeMirror interfaceType : interfaceTypes) {
+            TypeElement intfc = asTypeElement(interfaceType);
+
+            if (isPublic(intfc) || isLinkable(intfc)) {
+                results.add(interfaceType);
+                TypeElement klass = asTypeElement(interfaceType);
+                for (TypeMirror t : getAllInterfaces(klass)) {
+                    t = getDeclaredType(results, te, t);
+                    results.add(t);
+                }
+            }
+        }
+        // TypeMirror contains the modified TypeParameterElement's types represented
+        // in the local Class'es elements types. ex: Foo<E> implements Bar<V> and the
+        // class being considered is Foo then TypeParameters will be represented as <E>
+        // note that any conversion might revert back to the old signature. For this
+        // very reason we get the superType, and find its interfaces.
+        TypeMirror superType = getSuperType(te);
+        if (superType == getObjectType())
+            return results;
+        // Try walking the tree
+        addAllInterfaceTypes(results, te, superType,
+                configuration.workArounds.interfaceTypesOf(superType));
+        return results;
+    }
+
+    private void findAllInterfaceTypes(Set<TypeMirror> results, final TypeElement baseClass,
+            TypeMirror p) {
+        TypeMirror superType = getSuperType(asTypeElement(p));
+        if (superType == p) {
+            return;
+        }
+        addAllInterfaceTypes(results, baseClass, superType,
+                configuration.workArounds.interfaceTypesOf(superType));
+    }
+
+    private void addAllInterfaceTypes(Set<TypeMirror> results,
+            final TypeElement baseClass, TypeMirror type,
+            List<TypeMirror> interfaceTypes) {
+        for (TypeMirror interfaceType : interfaceTypes) {
+            TypeElement iElement = asTypeElement(interfaceType);
+            if (isPublic(iElement) && isLinkable(iElement)) {
+                interfaceType = getDeclaredType(results, baseClass, interfaceType);
+                results.add(interfaceType);
+                Set<TypeMirror> superInterfaces = getAllInterfaces(iElement);
+                for (TypeMirror superInterface : superInterfaces) {
+                    superInterface = getDeclaredType(results, baseClass, superInterface);
+                    results.add(superInterface);
+                }
+            }
+        }
+        findAllInterfaceTypes(results, baseClass, type);
+    }
+
+    /**
+     * Lookup for a class within this package.
+     *
+     * @return TypeElement of found class, or null if not found.
+     */
+    public TypeElement findClassInPackageElement(PackageElement pkg, String className) {
+        for (TypeElement c : getAllClasses(pkg)) {
+            if (getSimpleName(c).equals(className)) {
+                return c;
+            }
+        }
+        return null;
+    }
+
+    /**
+     * TODO: FIXME: port to javax.lang.model
+     * Find a class within the context of this class. Search order: qualified name, in this class
+     * (inner), in this package, in the class imports, in the package imports. Return the
+     * TypeElement if found, null if not found.
+     */
+    //### The specified search order is not the normal rule the
+    //### compiler would use.  Leave as specified or change it?
+    public TypeElement findClass(Element element, String className) {
+        TypeElement encl = getEnclosingTypeElement(element);
+        TypeElement searchResult = configuration.workArounds.searchClass(encl, className);
+        if (searchResult == null) {
+            encl = getEnclosingTypeElement(encl);
+            //Expand search space to include enclosing class.
+            while (encl != null && getEnclosingTypeElement(encl) != null) {
+                encl = getEnclosingTypeElement(encl);
+            }
+            searchResult = encl == null
+                    ? null
+                    : configuration.workArounds.searchClass(encl, className);
+        }
+        return searchResult;
+    }
+
+    /**
+     * Enclose in quotes, used for paths and filenames that contains spaces
+     */
+    public String quote(String filepath) {
+        return ("\"" + filepath + "\"");
+    }
+
+    /**
+     * Parse the package name.  We only want to display package name up to
+     * 2 levels.
+     */
+    public String parsePackageName(PackageElement p) {
+        String pkgname = p.isUnnamed() ? "" : getPackageName(p);
+        int index = -1;
+        for (int j = 0; j < MAX_CONSTANT_VALUE_INDEX_LENGTH; j++) {
+            index = pkgname.indexOf(".", index + 1);
+        }
+        if (index != -1) {
+            pkgname = pkgname.substring(0, index);
+        }
+        return pkgname;
+    }
+
+    /**
+     * Given a string, replace all occurrences of 'newStr' with 'oldStr'.
+     * @param originalStr the string to modify.
+     * @param oldStr the string to replace.
+     * @param newStr the string to insert in place of the old string.
+     */
+    public String replaceText(String originalStr, String oldStr,
+            String newStr) {
+        if (oldStr == null || newStr == null || oldStr.equals(newStr)) {
+            return originalStr;
+        }
+        return originalStr.replace(oldStr, newStr);
+    }
+
+    /**
+     * Given an annotation, return true if it should be documented and false
+     * otherwise.
+     *
+     * @param annotation the annotation to check.
+     *
+     * @return true return true if it should be documented and false otherwise.
+     */
+    public boolean isDocumentedAnnotation(TypeElement annotation) {
+        for (AnnotationMirror anno : annotation.getAnnotationMirrors()) {
+            if (getFullyQualifiedName(anno.getAnnotationType().asElement()).equals(
+                    Documented.class.getName())) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    /**
+     * Return true if this class is linkable and false if we can't link to the
+     * desired class.
+     * <br>
+     * <b>NOTE:</b>  You can only link to external classes if they are public or
+     * protected.
+     *
+     * @return true if this class is linkable and false if we can't link to the
+     * desired class.
+     */
+    public boolean isLinkable(TypeElement typeElem) {
+        return
+            (typeElem != null &&
+                (isIncluded(typeElem) && configuration.isGeneratedDoc(typeElem))) ||
+            (configuration.extern.isExternal(typeElem) &&
+                (isPublic(typeElem) || isProtected(typeElem)));
+    }
+
+    List<TypeMirror> asErasureTypes(Collection<TypeElement> inList) {
+        List<TypeMirror> out = new ArrayList<>(inList.size());
+        inList.stream().forEach((te) -> {
+            out.add(typeUtils.erasure(te.asType()));
+        });
+        return out;
+    }
+
+    List<TypeMirror> asTypes(Collection<TypeElement> inList) {
+        List<TypeMirror> out = new ArrayList<>(inList.size());
+        inList.stream().forEach((te) -> {
+            out.add(te.asType());
+        });
+        return out;
+    }
+
+    /**
+     * Return this type as a {@code TypeElement} if it represents a class
+     * interface or annotation.  Array dimensions are ignored.
+     * If this type {@code ParameterizedType} or {@code WildcardType}, return
+     * the {@code TypeElement} of the type's erasure.  If this is an
+     * annotation, return this as a {@code TypeElement}.
+     * If this is a primitive type, return null.
+     *
+     * @return the {@code TypeElement} of this type,
+     *         or null if it is a primitive type.
+     */
+    public TypeElement asTypeElement(TypeMirror t) {
+        return new SimpleTypeVisitor9<TypeElement, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public TypeElement visitDeclared(DeclaredType t, Void p) {
+                return (TypeElement) t.asElement();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public TypeElement visitArray(ArrayType t, Void p) {
+                return visit(t.getComponentType());
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public TypeElement visitTypeVariable(javax.lang.model.type.TypeVariable t, Void p) {
+               /*
+                * TODO: Check with JJG.
+                * if we have an annotated type @A $B T, then erasure returns a
+                * none, in this case we use asElement instead.
+                */
+                if (isAnnotated(t)) {
+                    return visit(typeUtils.asElement(t).asType());
+                }
+                return visit(typeUtils.erasure(t));
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public TypeElement visitWildcard(javax.lang.model.type.WildcardType t, Void p) {
+                return visit(typeUtils.erasure(t));
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public TypeElement visitError(ErrorType t, Void p) {
+                return (TypeElement)t.asElement();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected TypeElement defaultAction(TypeMirror e, Void p) {
+                return super.defaultAction(e, p);
+            }
+        }.visit(t);
+    }
+
+    public TypeMirror getComponentType(TypeMirror t) {
+        while (isArrayType(t)) {
+            t = ((ArrayType) t).getComponentType();
+        }
+        return t;
+    }
+
+    /**
+     * Return the type's dimension information, as a string.
+     * <p>
+     * For example, a two dimensional array of String returns "{@code [][]}".
+     *
+     * @return the type's dimension information as a string.
+     */
+    public String getDimension(TypeMirror t) {
+        return new SimpleTypeVisitor9<String, Void>() {
+            StringBuilder dimension = new StringBuilder("");
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitArray(ArrayType t, Void p) {
+                dimension.append("[]");
+                return visit(t.getComponentType());
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected String defaultAction(TypeMirror e, Void p) {
+                return dimension.toString();
+            }
+
+        }.visit(t);
+    }
+
+    public TypeElement getSuperClass(TypeElement te) {
+        if (isInterface(te) || isAnnotationType(te) ||
+                te.asType().equals(getObjectType())) {
+            return null;
+        }
+        TypeMirror superclass = te.getSuperclass();
+        if (isNoType(superclass) && isClass(te)) {
+            superclass = getObjectType();
+        }
+        return asTypeElement(superclass);
+    }
+
+    public TypeElement getFirstVisibleSuperClassAsTypeElement(TypeElement te) {
+        if (isAnnotationType(te) || isInterface(te) ||
+                te.asType().equals(getObjectType())) {
+            return null;
+        }
+        TypeMirror firstVisibleSuperClass = getFirstVisibleSuperClass(te);
+        return firstVisibleSuperClass == null ? null : asTypeElement(firstVisibleSuperClass);
+    }
+
+    /**
+     * Given a class, return the closest visible super class.
+     * @param type the TypeMirror to be interrogated
+     * @return  the closest visible super class.  Return null if it cannot
+     *          be found.
+     */
+
+    public TypeMirror getFirstVisibleSuperClass(TypeMirror type) {
+        return getFirstVisibleSuperClass(asTypeElement(type));
+    }
+
+
+    /**
+     * Given a class, return the closest visible super class.
+     *
+     * @param te the TypeElement to be interrogated
+     * @return the closest visible super class.  Return null if it cannot
+     *         be found..
+     */
+    public TypeMirror getFirstVisibleSuperClass(TypeElement te) {
+        TypeMirror superType = te.getSuperclass();
+        if (isNoType(superType)) {
+            superType = getObjectType();
+        }
+        TypeElement superClass = asTypeElement(superType);
+
+        while (superClass != null && !isPublic(superClass) && !isLinkable(superClass)) {
+            TypeMirror supersuperType = superClass.getSuperclass();
+            TypeElement supersuperClass = asTypeElement(supersuperType);
+            if (supersuperClass == null
+                    || supersuperClass.getQualifiedName().equals(superClass.getQualifiedName())) {
+                break;
+            }
+            superType = supersuperType;
+            superClass = supersuperClass;
+        }
+        if (te.asType().equals(superType)) {
+            return null;
+        }
+        return superType;
+    }
+
+    /**
+     * Given a TypeElement, return the name of its type (Class, Interface, etc.).
+     *
+     * @param te the TypeElement to check.
+     * @param lowerCaseOnly true if you want the name returned in lower case.
+     *                      If false, the first letter of the name is capitalized.
+     * @return
+     */
+
+    public String getTypeElementName(TypeElement te, boolean lowerCaseOnly) {
+        String typeName = "";
+        if (isInterface(te)) {
+            typeName = "doclet.Interface";
+        } else if (isException(te)) {
+            typeName = "doclet.Exception";
+        } else if (isError(te)) {
+            typeName = "doclet.Error";
+        } else if (isAnnotationType(te)) {
+            typeName = "doclet.AnnotationType";
+        } else if (isEnum(te)) {
+            typeName = "doclet.Enum";
+        } else if (isOrdinaryClass(te)) {
+            typeName = "doclet.Class";
+        }
+        typeName = lowerCaseOnly ? toLowerCase(typeName) : typeName;
+        return typeNameMap.computeIfAbsent(typeName, configuration :: getText);
+    }
+
+    private final Map<String, String> typeNameMap = new HashMap<>();
+
+    public String getTypeName(TypeMirror t, boolean fullyQualified) {
+        return new SimpleTypeVisitor9<String, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitArray(ArrayType t, Void p) {
+                return visit(t.getComponentType());
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitDeclared(DeclaredType t, Void p) {
+                TypeElement te = asTypeElement(t);
+                return fullyQualified
+                        ? te.getQualifiedName().toString()
+                        : getSimpleName(te);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitExecutable(ExecutableType t, Void p) {
+                return t.toString();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitPrimitive(PrimitiveType t, Void p) {
+                return t.toString();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitTypeVariable(javax.lang.model.type.TypeVariable t, Void p) {
+                return getSimpleName(t.asElement());
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitWildcard(javax.lang.model.type.WildcardType t, Void p) {
+                return t.toString();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected String defaultAction(TypeMirror e, Void p) {
+                return e.toString();
+            }
+        }.visit(t);
+    }
+
+    /**
+     * Replace all tabs in a string with the appropriate number of spaces.
+     * The string may be a multi-line string.
+     * @param text the text for which the tabs should be expanded
+     * @return the text with all tabs expanded
+     */
+    public String replaceTabs(String text) {
+        if (!text.contains("\t"))
+            return text;
+
+        final int tabLength = configuration.sourcetab;
+        final String whitespace = configuration.tabSpaces;
+        final int textLength = text.length();
+        StringBuilder result = new StringBuilder(textLength);
+        int pos = 0;
+        int lineLength = 0;
+        for (int i = 0; i < textLength; i++) {
+            char ch = text.charAt(i);
+            switch (ch) {
+                case '\n': case '\r':
+                    lineLength = 0;
+                    break;
+                case '\t':
+                    result.append(text, pos, i);
+                    int spaceCount = tabLength - lineLength % tabLength;
+                    result.append(whitespace, 0, spaceCount);
+                    lineLength += spaceCount;
+                    pos = i + 1;
+                    break;
+                default:
+                    lineLength++;
+            }
+        }
+        result.append(text, pos, textLength);
+        return result.toString();
+    }
+
+    public String normalizeNewlines(String text) {
+        StringBuilder sb = new StringBuilder();
+        final int textLength = text.length();
+        final String NL = DocletConstants.NL;
+        int pos = 0;
+        for (int i = 0; i < textLength; i++) {
+            char ch = text.charAt(i);
+            switch (ch) {
+                case '\n':
+                    sb.append(text, pos, i);
+                    sb.append(NL);
+                    pos = i + 1;
+                    break;
+                case '\r':
+                    sb.append(text, pos, i);
+                    sb.append(NL);
+                    if (i + 1 < textLength && text.charAt(i + 1) == '\n')
+                        i++;
+                    pos = i + 1;
+                    break;
+            }
+        }
+        sb.append(text, pos, textLength);
+        return sb.toString();
+    }
+
+    /**
+     * The documentation for values() and valueOf() in Enums are set by the
+     * doclet only iff the user or overridden methods are missing.
+     * @param elem
+     */
+    public void setEnumDocumentation(TypeElement elem) {
+        for (Element e : getMethods(elem)) {
+            ExecutableElement ee = (ExecutableElement)e;
+            if (!getBody(e).isEmpty()) // if already set skip it please
+                continue;
+            if (ee.getSimpleName().contentEquals("values") && ee.getParameters().isEmpty()) {
+                configuration.cmtUtils.setEnumValuesTree(configuration, e);
+            }
+            if (ee.getSimpleName().contentEquals("valueOf") && ee.getParameters().size() == 1) {
+                configuration.cmtUtils.setEnumValueOfTree(configuration, e);
+            }
+        }
+    }
+
+    /**
+     * Returns a locale independent lower cased String. That is, it
+     * always uses US locale, this is a clone of the one in StringUtils.
+     * @param s to convert
+     * @return converted String
+     */
+    public static String toLowerCase(String s) {
+        return s.toLowerCase(Locale.US);
+    }
+
+    /**
+     * Return true if the given Element is deprecated.
+     *
+     * @param e the Element to check.
+     * @return true if the given Element is deprecated.
+     */
+    public boolean isDeprecated(Element e) {
+        if (isPackage(e)) {
+            return configuration.workArounds.isDeprecated0(e);
+        }
+        return elementUtils.isDeprecated(e);
+    }
+
+    /**
+     * A convenience method to get property name from the name of the
+     * getter or setter method.
+     * @param e the input method.
+     * @return the name of the property of the given setter of getter.
+     */
+    public String propertyName(ExecutableElement e) {
+        String name = getSimpleName(e);
+        String propertyName = null;
+        if (name.startsWith("get") || name.startsWith("set")) {
+            propertyName = name.substring(3);
+        } else if (name.startsWith("is")) {
+            propertyName = name.substring(2);
+        }
+        if ((propertyName == null) || propertyName.isEmpty()){
+            return "";
+        }
+        return propertyName.substring(0, 1).toLowerCase(configuration.getLocale())
+                + propertyName.substring(1);
+    }
+
+    /**
+     * In case of JavaFX mode on, filters out classes that are private,
+     * package private or having the @treatAsPrivate annotation. Those are not
+     * documented in JavaFX mode.
+     *
+     * @param classlist a collection of TypeElements
+     * @param javafx set to true if in JavaFX mode.
+     * @return list of filtered classes.
+     */
+    public SortedSet<TypeElement> filterOutPrivateClasses(Iterable<TypeElement> classlist,
+            boolean javafx) {
+        SortedSet<TypeElement> filteredOutClasses =
+                new TreeSet<>(makeGeneralPurposeComparator());
+        if (!javafx) {
+            for (Element te : classlist) {
+                filteredOutClasses.add((TypeElement)te);
+            }
+            return filteredOutClasses;
+        }
+        for (Element e : classlist) {
+            if (isPrivate(e) || isPackagePrivate(e)) {
+                continue;
+            }
+            List<? extends DocTree> aspTags = getBlockTags(e, "treatAsPrivate");
+            if (aspTags != null && !aspTags.isEmpty()) {
+                continue;
+            }
+            filteredOutClasses.add((TypeElement)e);
+        }
+        return filteredOutClasses;
+    }
+
+    /**
+     * Compares two elements.
+     * @param e1 first Element
+     * @param e2 second Element
+     * @return a true if they are the same, false otherwise.
+     */
+    public boolean elementsEqual(Element e1, Element e2) {
+        if (e1.getKind() != e2.getKind()) {
+            return false;
+        }
+        String s1 = getSimpleName(e1);
+        String s2 = getSimpleName(e2);
+        if (compareStrings(s1, s2) == 0) {
+            String f1 = getFullyQualifiedName(e1, true);
+            String f2 = getFullyQualifiedName(e2, true);
+            return compareStrings(f1, f2) == 0;
+        }
+        return false;
+    }
+
+    /**
+     * A general purpose case insensitive String comparator, which compares
+     * two Strings using a Collator strength of "TERTIARY".
+     *
+     * @param s1 first String to compare.
+     * @param s2 second String to compare.
+     * @return a negative integer, zero, or a positive integer as the first
+     *         argument is less than, equal to, or greater than the second.
+     */
+    public int compareStrings(String s1, String s2) {
+        return compareStrings(true, s1, s2);
+    }
+
+    /**
+     * A general purpose case sensitive String comparator, which
+     * compares two Strings using a Collator strength of "SECONDARY".
+     *
+     * @param s1 first String to compare.
+     * @param s2 second String to compare.
+     * @return a negative integer, zero, or a positive integer as the first
+     *         argument is less than, equal to, or greater than the second.
+     */
+    public int compareCaseCompare(String s1, String s2) {
+        return compareStrings(false, s1, s2);
+    }
+
+    private DocCollator tertiaryCollator = null;
+    private DocCollator secondaryCollator = null;
+
+    private int compareStrings(boolean caseSensitive, String s1, String s2) {
+        if (caseSensitive) {
+            if (tertiaryCollator == null) {
+                tertiaryCollator = new DocCollator(configuration.locale, Collator.TERTIARY);
+            }
+            return tertiaryCollator.compare(s1, s2);
+        }
+        if (secondaryCollator == null) {
+            secondaryCollator = new DocCollator(configuration.locale, Collator.SECONDARY);
+        }
+        return secondaryCollator.compare(s1, s2);
+    }
+
+
+    private static class DocCollator {
+        private final Map<String, CollationKey> keys;
+        private final Collator instance;
+        private final int MAX_SIZE = 1000;
+        private DocCollator(Locale locale, int strength) {
+            instance = Collator.getInstance(locale);
+            instance.setStrength(strength);
+
+            keys = new LinkedHashMap<String, CollationKey>(MAX_SIZE + 1, 0.75f, true) {
+                private static final long serialVersionUID = 1L;
+                @Override
+                protected boolean removeEldestEntry(Entry<String, CollationKey> eldest) {
+                    return size() > MAX_SIZE;
+                }
+            };
+        }
+
+        CollationKey getKey(String s) {
+            return keys.computeIfAbsent(s, instance :: getCollationKey);
+        }
+
+        public int compare(String s1, String s2) {
+            return getKey(s1).compareTo(getKey(s2));
+        }
+    }
+
+    /**
+     * Comparator for PackageElements, simply compares the fully qualified names
+     */
+    public Comparator<Element> makePackageComparator() {
+        return new Utils.ElementComparator<Element>() {
+            @Override
+            public int compare(Element pkg1, Element pkg2) {
+                return compareFullyQualifiedNames(pkg1, pkg2);
+            }
+        };
+    }
+
+    public Comparator<SerialFieldTree> makeSerialFieldTreeComparator() {
+        return (SerialFieldTree o1, SerialFieldTree o2) -> {
+            String s1 = o1.getName().toString();
+            String s2 = o2.getName().toString();
+            return s1.compareTo(s2);
+        };
+    }
+
+    /**
+     * Comparator for General Purpose
+     * @return a ElementComparatorForClassUse
+     */
+    public Comparator<Element> makeGeneralPurposeComparator() {
+        return makeClassUseComparator();
+    }
+
+    /**
+     * A Comparator for Overrides and Implements use used on ExecutableElements
+     * compares the name first, then compares the SimpleName of the enclosing
+     * class and the FullyQualifiedName of the enclosing class.
+     * @return
+     */
+    public Comparator<Element> makeOverrideUseComparator() {
+        return new Utils.ElementComparator<Element>() {
+            @Override
+            public int compare(Element o1, Element o2) {
+                int result = compareStrings(getSimpleName(o1), getSimpleName(o2));
+                if (result != 0) {
+                    return result;
+                }
+                if (!isTypeElement(o1) && !isTypeElement(o2) && !isPackage(o1) && !isPackage(o2)) {
+                    TypeElement t1 = getEnclosingTypeElement(o1);
+                    TypeElement t2 = getEnclosingTypeElement(o2);
+                    result = compareStrings(getSimpleName(t1), getSimpleName(t2));
+                    if (result != 0)
+                        return result;
+                }
+                result = compareStrings(getFullyQualifiedName(o1), getFullyQualifiedName(o2));
+                if (result != 0)
+                    return result;
+                return compareElementTypeKinds(o1, o2);
+            }
+        };
+    }
+
+    /**
+     * A comparator for index file presentations, and are sorted as follows:
+     *  1. sort on simple names of entities
+     *  2. if equal, then compare the ElementKind ex: Package, Interface etc.
+     *  3a. if equal and if the type is of ExecutableElement(Constructor, Methods),
+     *      a case insensitive comparison of parameter the type signatures
+     *  3b. if equal, case sensitive comparison of the type signatures
+     *  4. finally, if equal, compare the FQNs of the entities
+     * @return a comparator for index file use
+     */
+    public Comparator<Element> makeIndexUseComparator() {
+        return new Utils.ElementComparator<Element>() {
+            /**
+             * Compare two given elements, first sort on names, then on the kinds,
+             * then on the parameters only if the type is an instance of ExecutableElement,
+             * the parameters are compared and finally the fully qualified names.
+             *
+             * @param e1 - an element.
+             * @param e2 - an element.
+             * @return a negative integer, zero, or a positive integer as the first
+             *         argument is less than, equal to, or greater than the second.
+             */
+            @Override
+            public int compare(Element e1, Element e2) {
+                int result = compareElementTypeKinds(e1, e2);
+                if (result != 0) {
+                    return result;
+                }
+                if (isPackage(e1) && isPackage(e2)) {
+                    return compareFullyQualifiedNames(e1, e2);
+                }
+                result = compareNames(e1, e2);
+                if (result != 0) {
+                    return result;
+                }
+                if (hasParameters(e1)) {
+                    List<? extends VariableElement> parameters1 = ((ExecutableElement)e1).getParameters();
+                    List<? extends VariableElement> parameters2 = ((ExecutableElement)e2).getParameters();
+                    result = compareParameters(false, parameters1, parameters2);
+                    if (result != 0) {
+                        return result;
+                    }
+                    result = compareParameters(true, parameters1, parameters2);
+                    if (result != 0) {
+                        return result;
+                    }
+                }
+                return compareFullyQualifiedNames(e1, e2);
+            }
+        };
+    }
+
+    /**
+     * Compares the FullyQualifiedNames of two TypeMirrors
+     * @return
+     */
+    public Comparator<TypeMirror> makeTypeMirrorClassUseComparator() {
+        return (TypeMirror type1, TypeMirror type2) -> {
+            String s1 = getQualifiedTypeName(type1);
+            String s2 = getQualifiedTypeName(type2);
+            return compareStrings(s1, s2);
+        };
+    }
+
+    /**
+     * Compares the SimpleNames of TypeMirrors if equal then the
+     * FullyQualifiedNames of TypeMirrors.
+     *
+     * @return
+     */
+    public Comparator<TypeMirror> makeTypeMirrorIndexUseComparator() {
+        return (TypeMirror t1, TypeMirror t2) -> {
+            int result = compareStrings(getTypeName(t1, false), getTypeName(t2, false));
+            if (result != 0)
+                return result;
+            return compareStrings(getQualifiedTypeName(t1), getQualifiedTypeName(t2));
+        };
+    }
+
+    /**
+     * Get the qualified type name of a TypeMiror compatible with the Element's
+     * getQualified name, returns  the qualified name of the Reference type
+     * otherwise the primitive name.
+     * @param t the type whose name is to be obtained.
+     * @return the fully qualified name of Reference type or the primitive name
+     */
+    public String getQualifiedTypeName(TypeMirror t) {
+        return new SimpleTypeVisitor9<String, Void>() {
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitDeclared(DeclaredType t, Void p) {
+                return getFullyQualifiedName(t.asElement());
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitArray(ArrayType t, Void p) {
+               return visit(t.getComponentType());
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitPrimitive(PrimitiveType t, Void p) {
+                return t.toString();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitTypeVariable(javax.lang.model.type.TypeVariable t, Void p) {
+                // The knee jerk reaction is to do this but don't!, as we would like
+                // it to be compatible with the old world, now if we decide to do so
+                // care must be taken to avoid collisions.
+                // return getFullyQualifiedName(t.asElement());
+                return t.toString();
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected String defaultAction(TypeMirror e, Void p) {
+                throw new UnsupportedOperationException("should not happen");
+            }
+        }.visit(t);
+    }
+
+    /**
+     * A generic utility which returns the fully qualified names of an entity,
+     * if the entity is not qualifiable then its enclosing entity, it is upto
+     * the caller to add the elements name as required.
+     */
+    public String getFullyQualifiedName(Element e) {
+        return getFullyQualifiedName(e, true);
+    }
+
+    public String getFullyQualifiedName(Element e, final boolean outer) {
+        return new SimpleElementVisitor9<String, Void>() {
+            @Override
+            @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitPackage(PackageElement e, Void p) {
+                return e.getQualifiedName().toString();
+            }
+
+            @Override
+            @DefinedBy(Api.LANGUAGE_MODEL)
+            public String visitType(TypeElement e, Void p) {
+                return e.getQualifiedName().toString();
+            }
+
+            @Override
+            @DefinedBy(Api.LANGUAGE_MODEL)
+            protected String defaultAction(Element e, Void p) {
+                return outer ? visit(e.getEnclosingElement()) : e.getSimpleName().toString();
+            }
+        }.visit(e);
+    }
+
+    /**
+     * Comparator for ClassUse presentations, and sorts as follows:
+     * 1. member names
+     * 2. then fully qualified member names
+     * 3. then parameter types if applicable
+     * 4. finally the element kinds ie. package, class, interface etc.
+     * @return a comparator to sort classes and members for class use
+     */
+    public Comparator<Element> makeClassUseComparator() {
+        return new Utils.ElementComparator<Element>() {
+            /**
+             * Compare two Elements, first sort on simple name, and if
+             * applicable on the fully qualified name, and finally if applicable
+             * on the parameter types.
+             * @param e1 - an element.
+             * @param e2 - an element.
+             * @return a negative integer, zero, or a positive integer as the first
+             *         argument is less than, equal to, or greater than the second.
+             */
+            @Override
+            public int compare(Element e1, Element e2) {
+                int result = compareNames(e1, e2);
+                if (result != 0) {
+                    return result;
+                }
+                result = compareFullyQualifiedNames(e1, e2);
+                if (result != 0) {
+                    return result;
+                }
+                if (hasParameters(e1) && hasParameters(e2)) {
+                    @SuppressWarnings("unchecked")
+                    List<VariableElement> parameters1 = (List<VariableElement>) ((ExecutableElement)e1).getParameters();
+                    @SuppressWarnings("unchecked")
+                    List<VariableElement> parameters2 = (List<VariableElement>) ((ExecutableElement)e2).getParameters();
+                    result =  compareParameters(false, parameters1, parameters2);
+                    if (result != 0) {
+                        return result;
+                    }
+                    result =  compareParameters(true, parameters1, parameters2);
+                }
+                if (result != 0) {
+                    return result;
+                }
+                return compareElementTypeKinds(e1, e2);
+            }
+        };
+    }
+
+    /**
+     * A general purpose comparator to sort Element entities, basically provides the building blocks
+     * for creating specific comparators for an use-case.
+     * @param <T> an Element
+     */
+    private abstract class ElementComparator<T extends Element> implements Comparator<Element> {
+        /**
+         * compares two parameter arrays by first comparing the length of the arrays, and
+         * then each Type of the parameter in the array.
+         * @param params1 the first parameter array.
+         * @param params2 the first parameter array.
+         * @return a negative integer, zero, or a positive integer as the first
+         *         argument is less than, equal to, or greater than the second.
+         */
+        final EnumMap<ElementKind, Integer> elementKindOrder;
+        public ElementComparator() {
+            elementKindOrder = new EnumMap<>(ElementKind.class);
+            elementKindOrder.put(ElementKind.PACKAGE, 0);
+            elementKindOrder.put(ElementKind.CLASS, 1);
+            elementKindOrder.put(ElementKind.ENUM, 2);
+            elementKindOrder.put(ElementKind.ENUM_CONSTANT, 3);
+            elementKindOrder.put(ElementKind.INTERFACE, 4);
+            elementKindOrder.put(ElementKind.ANNOTATION_TYPE, 5);
+            elementKindOrder.put(ElementKind.FIELD, 6);
+            elementKindOrder.put(ElementKind.CONSTRUCTOR, 7);
+            elementKindOrder.put(ElementKind.METHOD, 8);
+        }
+
+        protected int compareParameters(boolean caseSensitive, List<? extends VariableElement> params1,
+                                                               List<? extends VariableElement> params2) {
+
+            return compareStrings(caseSensitive, getParametersAsString(params1),
+                                                 getParametersAsString(params2));
+        }
+
+        String getParametersAsString(List<? extends VariableElement> params) {
+            StringBuilder sb = new StringBuilder();
+            for (VariableElement param : params) {
+                TypeMirror t = param.asType();
+                // prefix P for primitive and R for reference types, thus items will
+                // be ordered lexically and correctly.
+                sb.append(getTypeCode(t)).append("-").append(t).append("-");
+            }
+            return sb.toString();
+        }
+
+        private String getTypeCode(TypeMirror t) {
+            return new SimpleTypeVisitor9<String, Void>() {
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitPrimitive(PrimitiveType t, Void p) {
+                    return "P";
+                }
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitArray(ArrayType t, Void p) {
+                    return visit(t.getComponentType());
+                }
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected String defaultAction(TypeMirror e, Void p) {
+                    return "R";
+                }
+
+            }.visit(t);
+        }
+
+        /**
+         * Compares two Elements, typically the name of a method,
+         * field or constructor.
+         * @param e1 the first Element.
+         * @param e2 the second Element.
+         * @return a negative integer, zero, or a positive integer as the first
+         *         argument is less than, equal to, or greater than the second.
+         */
+        protected int compareNames(Element e1, Element e2) {
+            return compareStrings(getSimpleName(e1), getSimpleName(e2));
+        }
+
+        /**
+         * Compares the fully qualified names of the entities
+         * @param e1 the first Element.
+         * @param e2 the first Element.
+         * @return a negative integer, zero, or a positive integer as the first
+         *         argument is less than, equal to, or greater than the second.
+         */
+        protected int compareFullyQualifiedNames(Element e1, Element e2) {
+            // add simplename to be compatible
+            String thisElement = getFullyQualifiedName(e1);
+            String thatElement = getFullyQualifiedName(e2);
+            return compareStrings(thisElement, thatElement);
+        }
+        protected int compareElementTypeKinds(Element e1, Element e2) {
+            return Integer.compare(elementKindOrder.get(e1.getKind()),
+                                   elementKindOrder.get(e2.getKind()));
+        }
+        boolean hasParameters(Element e) {
+            return new SimpleElementVisitor9<Boolean, Void>() {
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitExecutable(ExecutableElement e, Void p) {
+                    return true;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected Boolean defaultAction(Element e, Void p) {
+                    return false;
+                }
+
+            }.visit(e);
+        }
+
+        /**
+         * The fully qualified names of the entities, used solely by the comparator.
+         *
+         * @param p1 the first Element.
+         * @param p2 the first Element.
+         * @return a negative integer, zero, or a positive integer as the first argument is less
+         * than, equal to, or greater than the second.
+         */
+        private String getFullyQualifiedName(Element e) {
+            return new SimpleElementVisitor9<String, Void>() {
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitPackage(PackageElement e, Void p) {
+                    return e.getQualifiedName().toString();
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitExecutable(ExecutableElement e, Void p) {
+                    // For backward compatibility
+                    return getFullyQualifiedName(e.getEnclosingElement())
+                            + "." + e.getSimpleName().toString();
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitType(TypeElement e, Void p) {
+                    return e.getQualifiedName().toString();
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected String defaultAction(Element e, Void p) {
+                    return getEnclosingTypeElement(e).getQualifiedName().toString()
+                            + "." + e.getSimpleName().toString();
+                }
+            }.visit(e);
+        }
+    }
+
+    public Iterable<TypeElement> getEnclosedTypeElements(PackageElement pkg) {
+        List<TypeElement> out = getInterfaces(pkg);
+        out.addAll(getClasses(pkg));
+        out.addAll(getEnums(pkg));
+        out.addAll(getAnnotationTypes(pkg));
+        return out;
+    }
+
+    // Element related methods
+    public List<Element> getAnnotationMembers(TypeElement aClass) {
+        List<Element> members = getAnnotationFields(aClass);
+        members.addAll(getAnnotationMethods(aClass));
+        return members;
+    }
+
+    public List<Element> getAnnotationFields(TypeElement aClass) {
+        return getItems0(aClass, true, FIELD);
+    }
+
+    List<Element> getAnnotationFieldsUnfiltered(TypeElement aClass) {
+        return getItems0(aClass, true, FIELD);
+    }
+
+    public List<Element> getAnnotationMethods(TypeElement aClass) {
+        return getItems0(aClass, true, METHOD);
+    }
+
+    public List<TypeElement> getAnnotationTypes(Element e) {
+        return convertToTypeElement(getItems(e, true, ANNOTATION_TYPE));
+    }
+
+    public List<TypeElement> getAnnotationTypesUnfiltered(Element e) {
+        return convertToTypeElement(getItems(e, false, ANNOTATION_TYPE));
+    }
+
+    public List<VariableElement> getFields(Element e) {
+        return convertToVariableElement(getItems(e, true, FIELD));
+    }
+
+    public List<VariableElement> getFieldsUnfiltered(Element e) {
+        return convertToVariableElement(getItems(e, false, FIELD));
+    }
+
+    public List<TypeElement> getClasses(Element e) {
+       return convertToTypeElement(getItems(e, true, CLASS));
+    }
+
+    public List<TypeElement> getClassesUnfiltered(Element e) {
+       return convertToTypeElement(getItems(e, false, CLASS));
+    }
+
+    public List<ExecutableElement> getConstructors(Element e) {
+        return convertToExecutableElement(getItems(e, true, CONSTRUCTOR));
+    }
+
+    public List<ExecutableElement> getMethods(Element e) {
+        return convertToExecutableElement(getItems(e, true, METHOD));
+    }
+
+    List<ExecutableElement> getMethodsUnfiltered(Element e) {
+        return convertToExecutableElement(getItems(e, false, METHOD));
+    }
+
+    public long getLineNumber(Element e) {
+        TreePath path = getTreePath(e);
+        if (path == null) { // maybe null if synthesized
+            TypeElement encl = getEnclosingTypeElement(e);
+            path = getTreePath(encl);
+        }
+        CompilationUnitTree cu = path.getCompilationUnit();
+        LineMap lineMap = cu.getLineMap();
+        DocSourcePositions spos = docTrees.getSourcePositions();
+        long pos = spos.getStartPosition(cu, path.getLeaf());
+        return lineMap.getLineNumber(pos);
+    }
+
+    public List<ExecutableElement> convertToExecutableElement(List<Element> list) {
+        List<ExecutableElement> out = new ArrayList<>(list.size());
+        for (Element e : list) {
+            out.add((ExecutableElement)e);
+        }
+        return out;
+    }
+
+    public List<TypeElement> convertToTypeElement(List<Element> list) {
+        List<TypeElement> out = new ArrayList<>(list.size());
+        for (Element e : list) {
+            out.add((TypeElement)e);
+        }
+        return out;
+    }
+
+    public List<VariableElement> convertToVariableElement(List<Element> list) {
+        List<VariableElement> out = new ArrayList<>(list.size());
+        for (Element e : list) {
+            out.add((VariableElement) e);
+        }
+        return out;
+    }
+
+    public List<TypeElement> getInterfaces(Element e)  {
+        return convertToTypeElement(getItems(e, true, INTERFACE));
+    }
+
+    public List<TypeElement> getInterfacesUnfiltered(Element e)  {
+        return convertToTypeElement(getItems(e, false, INTERFACE));
+    }
+
+    List<Element> getNestedClasses(TypeElement e) {
+        List<Element> result = new ArrayList<>();
+        recursiveGetItems(result, e, true, CLASS);
+        return result;
+    }
+
+    List<Element> getNestedClassesUnfiltered(TypeElement e) {
+        List<Element> result = new ArrayList<>();
+        recursiveGetItems(result, e, false, CLASS);
+        return result;
+    }
+
+    public List<Element> getEnumConstants(Element e) {
+        return getItems(e, true, ENUM_CONSTANT);
+    }
+
+    public List<TypeElement> getEnums(Element e) {
+        return convertToTypeElement(getItems(e, true, ENUM));
+    }
+
+    public List<TypeElement> getEnumsUnfiltered(Element e) {
+        return convertToTypeElement(getItems(e, false, ENUM));
+    }
+
+    public SortedSet<TypeElement> getAllClassesUnfiltered(Element e) {
+        List<TypeElement> clist = getClassesUnfiltered(e);
+        clist.addAll(getInterfacesUnfiltered(e));
+        clist.addAll(getAnnotationTypesUnfiltered(e));
+        SortedSet<TypeElement> oset = new TreeSet<>(makeGeneralPurposeComparator());
+        oset.addAll(clist);
+        return oset;
+    }
+
+    // cache these two as they are repeatedly called.
+    private Set<TypeElement> specifiedClasses = null;
+    private Set<PackageElement> specifiedPackages = null;
+
+    private void initSpecifiedElements() {
+        specifiedClasses = new LinkedHashSet<>(
+                ElementFilter.typesIn(configuration.root.getSpecifiedElements()));
+        specifiedPackages = new LinkedHashSet<>(
+                ElementFilter.packagesIn(configuration.root.getSpecifiedElements()));
+    }
+
+    public Set<TypeElement> getSpecifiedClasses() {
+        if (specifiedClasses == null || specifiedPackages == null) {
+            initSpecifiedElements();
+        }
+        return specifiedClasses;
+    }
+
+    public Set<PackageElement> getSpecifiedPackages() {
+        if (specifiedClasses == null || specifiedPackages == null) {
+            initSpecifiedElements();
+        }
+        return specifiedPackages;
+    }
+
+    private final HashMap<Element, SortedSet<TypeElement>> cachedClasses = new HashMap<>();
+    /**
+     * Returns a list containing classes and interfaces,
+     * including annotation types.
+     * @param e Element
+     * @return List
+     */
+    public SortedSet<TypeElement> getAllClasses(Element e) {
+        SortedSet<TypeElement> oset = cachedClasses.get(e);
+        if (oset != null)
+            return oset;
+        List<TypeElement> clist = getClasses(e);
+        clist.addAll(getInterfaces(e));
+        clist.addAll(getAnnotationTypes(e));
+        clist.addAll(getEnums(e));
+        oset = new TreeSet<>(makeGeneralPurposeComparator());
+        oset.addAll(clist);
+        cachedClasses.put(e, oset);
+        return oset;
+    }
+
+    /*
+     * Get all the elements unfiltered and filter them finally based
+     * on its visibility, this works differently from the other getters.
+     */
+    private List<TypeElement> getInnerClasses(Element e, boolean filter) {
+        List<TypeElement> olist = new ArrayList<>();
+        for (TypeElement te : getClassesUnfiltered(e)) {
+            if (!filter || configuration.workArounds.isVisible(te)) {
+                olist.add(te);
+            }
+        }
+        for (TypeElement te : getInterfacesUnfiltered(e)) {
+            if (!filter || configuration.workArounds.isVisible(te)) {
+                olist.add(te);
+            }
+        }
+        for (TypeElement te : getAnnotationTypesUnfiltered(e)) {
+            if (!filter || configuration.workArounds.isVisible(te)) {
+                olist.add(te);
+            }
+        }
+        for (TypeElement te : getEnumsUnfiltered(e)) {
+            if (!filter || configuration.workArounds.isVisible(te)) {
+                olist.add(te);
+            }
+        }
+        return olist;
+    }
+
+    public List<TypeElement> getInnerClasses(Element e) {
+        return getInnerClasses(e, true);
+    }
+
+    public List<TypeElement> getInnerClassesUnfiltered(Element e) {
+        return getInnerClasses(e, false);
+    }
+
+    /**
+     * Returns a list of classes that are not errors or exceptions
+     * @param e Element
+     * @return List
+     */
+    public List<TypeElement> getOrdinaryClasses(Element e) {
+        return getClasses(e).stream()
+                .filter(te -> (!isException(te) && !isError(te)))
+                .collect(Collectors.toList());
+    }
+
+    public List<TypeElement> getErrors(Element e) {
+        return getClasses(e)
+                .stream()
+                .filter(this::isError)
+                .collect(Collectors.toList());
+    }
+
+    public List<TypeElement> getExceptions(Element e) {
+        return getClasses(e)
+                .stream()
+                .filter(this::isException)
+                .collect(Collectors.toList());
+    }
+
+    List<Element> getItems(Element e, boolean filter, ElementKind select) {
+        List<Element> elements = new ArrayList<>();
+        // maintain backward compatibility by returning a null list, see AnnotationDocType.methods().
+        if (configuration.backwardCompatibility && e.getKind() == ANNOTATION_TYPE)
+            return elements;
+        return new SimpleElementVisitor9<List<Element>, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public List<Element> visitPackage(PackageElement e, Void p) {
+                recursiveGetItems(elements, e, filter, select);
+                return elements;
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            protected List<Element> defaultAction(Element e0, Void p) {
+                return getItems0(e0, filter, select);
+            }
+
+        }.visit(e);
+    }
+
+    EnumSet<ElementKind> nestedKinds = EnumSet.of(ANNOTATION_TYPE, CLASS, ENUM, INTERFACE);
+
+    void recursiveGetItems(Collection<Element> list, Element e, boolean filter, ElementKind... select) {
+        list.addAll(getItems0(e, filter, select));
+        List<Element> classes = getItems0(e, filter, nestedKinds);
+        for (Element c : classes) {
+            list.addAll(getItems0(c, filter, select));
+            if (isTypeElement(c)) {
+                recursiveGetItems(list, c, filter, select);
+            }
+        }
+    }
+
+    private List<Element> getItems0(Element te, boolean filter, ElementKind... select) {
+        EnumSet<ElementKind> kinds = EnumSet.copyOf(Arrays.asList(select));
+        return getItems0(te, filter, kinds);
+    }
+
+    private List<Element> getItems0(Element te, boolean filter, Set<ElementKind> kinds) {
+        List<Element> elements = new ArrayList<>();
+        for (Element e : te.getEnclosedElements()) {
+            if (kinds.contains(e.getKind())) {
+                if (!filter || configuration.workArounds.shouldDocument(e)) {
+                    elements.add(e);
+                }
+            }
+        }
+        return elements;
+    }
+
+    /*
+     * nameCache is maintained for improving the comparator
+     * performance, noting that the Collator used by the comparators
+     * use Strings, as of this writing.
+     * TODO: when those APIs handle charSequences, the use of
+     * this nameCache must be re-investigated and removed.
+     */
+    private final Map<Element, String> nameCache = new LinkedHashMap<>();
+
+    /**
+     * Returns the name of the element after the last dot of the package name.
+     * This emulates the behavior of the old doclet.
+     * @param e an element whose name is required
+     * @return the name
+     */
+    public String getSimpleName(Element e) {
+        return nameCache.computeIfAbsent(e, this::getSimpleName0);
+    }
+
+    private SimpleElementVisitor9<String, Void> snvisitor = null;
+
+    private String getSimpleName0(Element e) {
+        if (snvisitor == null) {
+            snvisitor = new SimpleElementVisitor9<String, Void>() {
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitType(TypeElement e, Void p) {
+                    StringBuilder sb = new StringBuilder(e.getSimpleName());
+                    Element enclosed = e.getEnclosingElement();
+                    while (enclosed != null
+                            && (enclosed.getKind().isClass() || enclosed.getKind().isInterface())) {
+                        sb.insert(0, enclosed.getSimpleName() + ".");
+                        enclosed = enclosed.getEnclosingElement();
+                    }
+                    return sb.toString();
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitExecutable(ExecutableElement e, Void p) {
+                    if (e.getKind() == CONSTRUCTOR || e.getKind() == STATIC_INIT) {
+                        return e.getEnclosingElement().getSimpleName().toString();
+                    }
+                    return e.getSimpleName().toString();
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected String defaultAction(Element e, Void p) {
+                    return e.getSimpleName().toString();
+                }
+            };
+        }
+        return snvisitor.visit(e);
+    }
+
+    public TypeElement getEnclosingTypeElement(Element e) {
+        if (e.getKind() == ElementKind.PACKAGE)
+            return null;
+        Element encl = e.getEnclosingElement();
+        ElementKind kind = encl.getKind();
+        if (kind == ElementKind.PACKAGE)
+            return null;
+        while (!(kind.isClass() || kind.isInterface())) {
+            encl = encl.getEnclosingElement();
+        }
+        return (TypeElement)encl;
+    }
+
+    private ConstantValueExpression cve = null;
+
+    public String constantValueExpresion(VariableElement ve) {
+        if (cve == null)
+            cve = new ConstantValueExpression();
+        return cve.constantValueExpression(configuration.workArounds, ve);
+    }
+
+    private static class ConstantValueExpression {
+        public String constantValueExpression(WorkArounds workArounds, VariableElement ve) {
+            return new TypeKindVisitor9<String, Object>() {
+                /* TODO: we need to fix this correctly.
+                 * we have a discrepancy here, note the use of getConstValue
+                 * vs. getConstantValue, at some point we need to use
+                 * getConstantValue.
+                 * In the legacy world byte and char primitives appear as Integer values,
+                 * thus a byte value of 127 will appear as 127, but in the new world,
+                 * a byte value appears as Byte thus 0x7f will be printed, similarly
+                 * chars will be  translated to \n, \r etc. however, in the new world,
+                 * they will be printed as decimal values. The new world is correct,
+                 * and we should fix this by using getConstantValue and the visitor to
+                 * address this in the future.
+                 */
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitPrimitiveAsBoolean(PrimitiveType t, Object val) {
+                    return (int)val == 0 ? "false" : "true";
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitPrimitiveAsDouble(PrimitiveType t, Object val) {
+                    return sourceForm(((Double)val), 'd');
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitPrimitiveAsFloat(PrimitiveType t, Object val) {
+                    return sourceForm(((Float)val).doubleValue(), 'f');
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public String visitPrimitiveAsLong(PrimitiveType t, Object val) {
+                    return val + "L";
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected String defaultAction(TypeMirror e, Object val) {
+                    if (val == null)
+                        return null;
+                    else if (val instanceof Character)
+                        return sourceForm(((Character)val));
+                    else if (val instanceof Byte)
+                        return sourceForm(((Byte)val));
+                    else if (val instanceof String)
+                        return sourceForm((String)val);
+                    return val.toString(); // covers int, short
+                }
+            }.visit(ve.asType(), workArounds.getConstValue(ve));
+        }
+
+        // where
+        private String sourceForm(double v, char suffix) {
+            if (Double.isNaN(v))
+                return "0" + suffix + "/0" + suffix;
+            if (v == Double.POSITIVE_INFINITY)
+                return "1" + suffix + "/0" + suffix;
+            if (v == Double.NEGATIVE_INFINITY)
+                return "-1" + suffix + "/0" + suffix;
+            return v + (suffix == 'f' || suffix == 'F' ? "" + suffix : "");
+        }
+
+        private  String sourceForm(char c) {
+            StringBuilder buf = new StringBuilder(8);
+            buf.append('\'');
+            sourceChar(c, buf);
+            buf.append('\'');
+            return buf.toString();
+        }
+
+        private String sourceForm(byte c) {
+            return "0x" + Integer.toString(c & 0xff, 16);
+        }
+
+        private String sourceForm(String s) {
+            StringBuilder buf = new StringBuilder(s.length() + 5);
+            buf.append('\"');
+            for (int i=0; i<s.length(); i++) {
+                char c = s.charAt(i);
+                sourceChar(c, buf);
+            }
+            buf.append('\"');
+            return buf.toString();
+        }
+
+        private void sourceChar(char c, StringBuilder buf) {
+            switch (c) {
+            case '\b': buf.append("\\b"); return;
+            case '\t': buf.append("\\t"); return;
+            case '\n': buf.append("\\n"); return;
+            case '\f': buf.append("\\f"); return;
+            case '\r': buf.append("\\r"); return;
+            case '\"': buf.append("\\\""); return;
+            case '\'': buf.append("\\\'"); return;
+            case '\\': buf.append("\\\\"); return;
+            default:
+                if (isPrintableAscii(c)) {
+                    buf.append(c); return;
+                }
+                unicodeEscape(c, buf);
+                return;
+            }
+        }
+
+        private void unicodeEscape(char c, StringBuilder buf) {
+            final String chars = "0123456789abcdef";
+            buf.append("\\u");
+            buf.append(chars.charAt(15 & (c>>12)));
+            buf.append(chars.charAt(15 & (c>>8)));
+            buf.append(chars.charAt(15 & (c>>4)));
+            buf.append(chars.charAt(15 & (c>>0)));
+        }
+        private boolean isPrintableAscii(char c) {
+            return c >= ' ' && c <= '~';
+        }
+    }
+
+    public boolean isEnclosingPackageIncluded(TypeElement te) {
+        return isIncluded(containingPackage(te));
+    }
+
+    public boolean isIncluded(Element e) {
+        return configuration.root.isIncluded(e);
+    }
+
+    /**
+     * package name, an unnamed package is returned as &lt;Unnamed&gt;
+     * @param pkg
+     * @return
+     */
+    public String getPackageName(PackageElement pkg) {
+        if (pkg == null || pkg.isUnnamed()) {
+            return DocletConstants.DEFAULT_PACKAGE_NAME;
+        }
+        return pkg.getQualifiedName().toString();
+    }
+
+    public boolean isAttribute(DocTree doctree) {
+        return isKind(doctree, ATTRIBUTE);
+    }
+
+    public boolean isAuthor(DocTree doctree) {
+        return isKind(doctree, AUTHOR);
+    }
+
+    public boolean isComment(DocTree doctree) {
+        return isKind(doctree, COMMENT);
+    }
+
+    public boolean isDeprecated(DocTree doctree) {
+        return isKind(doctree, DEPRECATED);
+    }
+
+    public boolean isDocComment(DocTree doctree) {
+        return isKind(doctree, DOC_COMMENT);
+    }
+
+    public boolean isDocRoot(DocTree doctree) {
+        return isKind(doctree, DOC_ROOT);
+    }
+
+    public boolean isEndElement(DocTree doctree) {
+        return isKind(doctree, END_ELEMENT);
+    }
+
+    public boolean isEntity(DocTree doctree) {
+        return isKind(doctree, ENTITY);
+    }
+
+    public boolean isErroneous(DocTree doctree) {
+        return isKind(doctree, ERRONEOUS);
+    }
+
+    public boolean isException(DocTree doctree) {
+        return isKind(doctree, EXCEPTION);
+    }
+
+    public boolean isIdentifier(DocTree doctree) {
+        return isKind(doctree, IDENTIFIER);
+    }
+
+    public boolean isInheritDoc(DocTree doctree) {
+        return isKind(doctree, INHERIT_DOC);
+    }
+
+    public boolean isLink(DocTree doctree) {
+        return isKind(doctree, LINK);
+    }
+
+    public boolean isLinkPlain(DocTree doctree) {
+        return isKind(doctree, LINK_PLAIN);
+    }
+
+    public boolean isLiteral(DocTree doctree) {
+        return isKind(doctree, LITERAL);
+    }
+
+    public boolean isOther(DocTree doctree) {
+        return doctree.getKind() == DocTree.Kind.OTHER;
+    }
+
+    public boolean isParam(DocTree doctree) {
+        return isKind(doctree, PARAM);
+    }
+
+    public boolean isReference(DocTree doctree) {
+        return isKind(doctree, REFERENCE);
+    }
+
+    public boolean isReturn(DocTree doctree) {
+        return isKind(doctree, RETURN);
+    }
+
+    public boolean isSee(DocTree doctree) {
+        return isKind(doctree, SEE);
+    }
+
+    public boolean isSerial(DocTree doctree) {
+        return isKind(doctree, SERIAL);
+    }
+
+    public boolean isSerialData(DocTree doctree) {
+        return isKind(doctree, SERIAL_DATA);
+    }
+
+    public boolean isSerialField(DocTree doctree) {
+        return isKind(doctree, SERIAL_FIELD);
+    }
+
+    public boolean isSince(DocTree doctree) {
+        return isKind(doctree, SINCE);
+    }
+
+    public boolean isStartElement(DocTree doctree) {
+        return isKind(doctree, START_ELEMENT);
+    }
+
+    public boolean isText(DocTree doctree) {
+        return isKind(doctree, TEXT);
+    }
+
+    public boolean isThrows(DocTree doctree) {
+        return isKind(doctree, THROWS);
+    }
+
+    public boolean isUnknownBlockTag(DocTree doctree) {
+        return isKind(doctree, UNKNOWN_BLOCK_TAG);
+    }
+
+    public boolean isUnknownInlineTag(DocTree doctree) {
+        return isKind(doctree, UNKNOWN_INLINE_TAG);
+    }
+
+    public boolean isValue(DocTree doctree) {
+        return isKind(doctree, VALUE);
+    }
+
+    public boolean isVersion(DocTree doctree) {
+        return isKind(doctree, VERSION);
+    }
+
+    private boolean isKind(DocTree doctree, DocTree.Kind match) {
+        return  doctree.getKind() == match;
+    }
+
+    private final WeakSoftHashMap wksMap = new WeakSoftHashMap(this);
+
+    public CommentHelper getCommentHelper(Element element) {
+        return wksMap.computeIfAbsent(element);
+    }
+
+    public void removeCommentHelper(Element element) {
+        wksMap.remove(element);
+    }
+
+    public List<? extends DocTree> filteredList(List<? extends DocTree> dlist, DocTree.Kind... select) {
+        List<DocTree> list = new ArrayList<>(dlist.size());
+        if (select == null)
+            return dlist;
+        for (DocTree dt : dlist) {
+            if (dt.getKind() != ERRONEOUS) {
+                for (DocTree.Kind kind : select) {
+                    if (dt.getKind() == kind) {
+                        list.add(dt);
+                    }
+                }
+            }
+        }
+        return list;
+    }
+
+    private List<? extends DocTree> getBlockTags0(Element element, DocTree.Kind... kinds) {
+        DocCommentTree dcTree = getDocCommentTree(element);
+        if (dcTree == null)
+            return Collections.emptyList();
+
+        return filteredList(dcTree.getBlockTags(), kinds);
+    }
+
+    public List<? extends DocTree> getBlockTags(Element element) {
+        return getBlockTags0(element, (Kind[]) null);
+    }
+
+    public List<? extends DocTree> getBlockTags(Element element, DocTree.Kind... kinds) {
+        return getBlockTags0(element, kinds);
+    }
+
+    public List<? extends DocTree> getBlockTags(Element element, String tagName) {
+        DocTree.Kind kind = null;
+        switch (tagName) {
+            case "author":
+            case "deprecated":
+            case "param":
+            case "return":
+            case "see":
+            case "serial":
+            case "since":
+            case "throws":
+            case "exception":
+            case "version":
+                kind = DocTree.Kind.valueOf(tagName.toUpperCase());
+                return getBlockTags(element, kind);
+            case "serialData":
+                kind = SERIAL_DATA;
+                return getBlockTags(element, kind);
+            case "serialField":
+                kind = SERIAL_FIELD;
+                return getBlockTags(element, kind);
+            default:
+                kind = DocTree.Kind.UNKNOWN_BLOCK_TAG;
+                break;
+        }
+        List<? extends DocTree> blockTags = getBlockTags(element, kind);
+        List<DocTree> out = new ArrayList<>();
+        String tname = tagName.startsWith("@") ? tagName.substring(1) : tagName;
+        CommentHelper ch = wksMap.get(element);
+        for (DocTree dt : blockTags) {
+            if (ch.getTagName(dt).equals(tname)) {
+                out.add(dt);
+            }
+        }
+        return out;
+    }
+
+    /**
+     * Gets a TreePath for an Element. Note this method is called very
+     * frequently, care must be taken to ensure this method is lithe
+     * and efficient.
+     * @param e an Element
+     * @return TreePath
+     */
+    public TreePath getTreePath(Element e) {
+        DocCommentDuo duo = dcTreeCache.get(e);
+        if (isValidDuo(duo) && duo.treePath != null) {
+            return duo.treePath;
+        }
+        duo = configuration.cmtUtils.getSyntheticCommentDuo(e);
+        if (isValidDuo(duo) && duo.treePath != null) {
+            return duo.treePath;
+        }
+        Map<Element, TreePath> elementToTreePath = configuration.workArounds.getElementToTreePath();
+        TreePath path = elementToTreePath.get(e);
+        if (path != null || elementToTreePath.containsKey(e)) {
+            // expedite the path and one that is a null
+            return path;
+        }
+        return elementToTreePath.computeIfAbsent(e, docTrees::getPath);
+    }
+
+    private final Map<Element, DocCommentDuo> dcTreeCache = new LinkedHashMap<>();
+
+    /**
+     * Retrieves the doc comments for a given element.
+     * @param element
+     * @return DocCommentTree for the Element
+     */
+    public DocCommentTree getDocCommentTree0(Element element) {
+
+        DocCommentDuo duo = null;
+
+        ElementKind kind = element.getKind();
+        if (kind == ElementKind.PACKAGE || kind == ElementKind.OTHER) {
+            duo = dcTreeCache.get(element); // local cache
+            if (!isValidDuo(duo) && kind == ElementKind.PACKAGE) {
+                // package-info.java
+                duo = getDocCommentTuple(element);
+            }
+            if (!isValidDuo(duo)) {
+                // package.html or overview.html
+                duo = configuration.cmtUtils.getHtmlCommentDuo(element); // html source
+            }
+        } else {
+            duo = configuration.cmtUtils.getSyntheticCommentDuo(element);
+            if (!isValidDuo(duo)) {
+                duo = dcTreeCache.get(element); // local cache
+            }
+            if (!isValidDuo(duo)) {
+                duo = getDocCommentTuple(element); // get the real mccoy
+            }
+        }
+
+        DocCommentTree docCommentTree = isValidDuo(duo) ? duo.dcTree : null;
+        TreePath path = isValidDuo(duo) ? duo.treePath : null;
+        if (!dcTreeCache.containsKey(element)) {
+            if (docCommentTree != null && path != null) {
+                configuration.workArounds.runDocLint(path);
+            }
+            dcTreeCache.put(element, duo);
+        }
+        return docCommentTree;
+    }
+
+    private DocCommentDuo getDocCommentTuple(Element element) {
+        // prevent nasty things downstream with overview element
+        if (element.getKind() != ElementKind.OTHER) {
+            TreePath path = getTreePath(element);
+            if (path != null) {
+                DocCommentTree docCommentTree = docTrees.getDocCommentTree(path);
+                return new DocCommentDuo(path, docCommentTree);
+            }
+        }
+        return null;
+    }
+
+    boolean isValidDuo(DocCommentDuo duo) {
+        return duo != null && duo.dcTree != null;
+    }
+
+    public DocCommentTree getDocCommentTree(Element element) {
+        CommentHelper ch = wksMap.get(element);
+        if (ch != null) {
+            return ch.dctree;
+        }
+        DocCommentTree dcTree = getDocCommentTree0(element);
+        if (dcTree != null) {
+            wksMap.put(element, new CommentHelper(configuration, element, getTreePath(element), dcTree));
+        }
+        return dcTree;
+    }
+
+    public List<? extends DocTree> getBody(Element element) {
+        DocCommentTree docCommentTree = getDocCommentTree(element);
+        if (docCommentTree == null)
+            return Collections.emptyList();
+
+        return docCommentTree.getFullBody();
+    }
+
+    public List<? extends DocTree> getDeprecatedTrees(Element element) {
+        return getBlockTags(element, DEPRECATED);
+    }
+
+    public List<? extends DocTree> getSeeTrees(Element element) {
+        return getBlockTags(element, SEE);
+    }
+
+    public List<? extends DocTree> getSerialTrees(Element element) {
+        return getBlockTags(element, SERIAL);
+    }
+
+    public List<? extends DocTree> getSerialFieldTrees(VariableElement field) {
+        return getBlockTags(field, DocTree.Kind.SERIAL_FIELD);
+    }
+
+    public List<? extends DocTree> getThrowsTrees(Element element) {
+        return getBlockTags(element, DocTree.Kind.EXCEPTION, DocTree.Kind.THROWS);
+    }
+
+    public List<? extends DocTree> getTypeParamTrees(Element element) {
+        return getParamTrees(element, true);
+    }
+
+    public List<? extends DocTree> getParamTrees(Element element) {
+        return getParamTrees(element, false);
+    }
+
+    private  List<? extends DocTree> getParamTrees(Element element, boolean isTypeParameters) {
+        List<DocTree> out = new ArrayList<>();
+        for (DocTree dt : getBlockTags(element, PARAM)) {
+            ParamTree pt = (ParamTree) dt;
+            if (pt.isTypeParameter() == isTypeParameters) {
+                out.add(dt);
+            }
+        }
+        return out;
+    }
+
+    public  List<? extends DocTree> getReturnTrees(Element element) {
+        List<DocTree> out = new ArrayList<>();
+        for (DocTree dt : getBlockTags(element, RETURN)) {
+            out.add(dt);
+        }
+        return out;
+    }
+
+    public List<? extends DocTree> getFirstSentenceTrees(Element element) {
+        DocCommentTree dcTree = getDocCommentTree(element);
+        if (dcTree == null) {
+            return Collections.emptyList();
+        }
+        List<DocTree> out = new ArrayList<>();
+        for (DocTree dt : dcTree.getFirstSentence()) {
+            out.add(dt);
+        }
+        return out;
+    }
+
+    public PackageElement containingPackage(Element e) {
+        return elementUtils.getPackageOf(e);
+    }
+
+    public TypeElement getTopMostContainingTypeElement(Element e) {
+        if (isPackage(e)) {
+            return null;
+        }
+        TypeElement outer = getEnclosingTypeElement(e);
+        if (outer == null)
+            return (TypeElement)e;
+        while (outer != null && outer.getNestingKind().isNested()) {
+            outer = getEnclosingTypeElement(outer);
+        }
+        return outer;
+    }
+
+    static class WeakSoftHashMap implements Map<Element, CommentHelper> {
+
+        private final WeakHashMap<Element, SoftReference<CommentHelper>> wkMap;
+        private final Utils utils;
+        public WeakSoftHashMap(Utils utils) {
+            wkMap = new WeakHashMap<>();
+            this.utils = utils;
+        }
+
+        @Override
+        public boolean containsKey(Object key) {
+            return wkMap.containsKey(key);
+        }
+
+        @Override
+        public Collection<CommentHelper> values() {
+            Set<CommentHelper> out = new LinkedHashSet<>();
+            for (SoftReference<CommentHelper> v : wkMap.values()) {
+                out.add(v.get());
+            }
+            return out;
+        }
+
+        @Override
+        public boolean containsValue(Object value) {
+            return wkMap.containsValue(new SoftReference<>((CommentHelper)value));
+        }
+
+        @Override
+        public CommentHelper remove(Object key) {
+            SoftReference<CommentHelper> value = wkMap.remove(key);
+            return value == null ? null : value.get();
+        }
+
+
+        @Override
+        public CommentHelper put(Element key, CommentHelper value) {
+            SoftReference<CommentHelper> nvalue = wkMap.put(key, new SoftReference<>(value));
+            return nvalue == null ? null : nvalue.get();
+        }
+
+        @Override
+        public CommentHelper get(Object key) {
+            SoftReference<CommentHelper> value = wkMap.get(key);
+            return value == null ? null : value.get();
+        }
+
+        @Override
+        public int size() {
+            return wkMap.size();
+        }
+
+        @Override
+        public boolean isEmpty() {
+            return wkMap.isEmpty();
+        }
+
+        @Override
+        public void clear() {
+            wkMap.clear();
+        }
+
+        public CommentHelper computeIfAbsent(Element key) {
+            if (wkMap.containsKey(key)) {
+                SoftReference<CommentHelper> value = wkMap.get(key);
+                if (value != null) {
+                    CommentHelper cvalue = value.get();
+                    if (cvalue != null) {
+                        return cvalue;
+                    }
+                }
+            }
+            CommentHelper newValue = new CommentHelper(utils.configuration, key, utils.getTreePath(key),
+                    utils.getDocCommentTree(key));
+            wkMap.put(key, new SoftReference<>(newValue));
+            return newValue;
+        }
+
+
+        @Override
+        public void putAll(Map<? extends Element, ? extends CommentHelper> map) {
+            for (Map.Entry<? extends Element, ? extends CommentHelper> entry : map.entrySet()) {
+                put(entry.getKey(), entry.getValue());
+            }
+        }
+
+        @Override
+        public Set<Element> keySet() {
+            return wkMap.keySet();
+        }
+
+        @Override
+        public Set<Entry<Element, CommentHelper>> entrySet() {
+            Set<Entry<Element, CommentHelper>> out = new LinkedHashSet<>();
+            for (Element e : wkMap.keySet()) {
+                SimpleEntry<Element, CommentHelper> n = new SimpleEntry<>(e, get(e));
+                out.add(n);
+            }
+            return out;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberMap.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,793 @@
+/*
+ * Copyright (c) 1999, 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 jdk.javadoc.internal.doclets.toolkit.util;
+
+import java.util.*;
+import java.util.regex.Pattern;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.type.TypeKind;
+import javax.lang.model.type.TypeMirror;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.doctree.DocTree;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+
+/**
+ * A data structure that encapsulates the visible members of a particular
+ * type for a given class tree.  To use this data structure, you must specify
+ * the type of member you are interested in (nested class, field, constructor
+ * or method) and the leaf of the class tree.  The data structure will map
+ * all visible members in the leaf and classes above the leaf in the tree.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Atul M Dambalkar
+ * @author Jamie Ho (rewrite)
+ */
+public class VisibleMemberMap {
+
+    private boolean noVisibleMembers = true;
+
+    public static enum Kind {
+        INNER_CLASSES,
+        ENUM_CONSTANTS,
+        FIELDS,
+        CONSTRUCTORS,
+        METHODS,
+        ANNOTATION_TYPE_FIELDS,
+        ANNOTATION_TYPE_MEMBER_OPTIONAL,
+        ANNOTATION_TYPE_MEMBER_REQUIRED,
+        PROPERTIES;
+
+        public static final EnumSet<Kind> summarySet = EnumSet.range(INNER_CLASSES, METHODS);
+        public static final EnumSet<Kind> detailSet = EnumSet.range(ENUM_CONSTANTS, METHODS);
+        public static String getNavLinkLabels(Kind kind) {
+            switch (kind) {
+                case INNER_CLASSES:
+                    return "doclet.navNested";
+                case ENUM_CONSTANTS:
+                    return "doclet.navEnum";
+                case FIELDS:
+                    return "doclet.navField";
+                case CONSTRUCTORS:
+                    return "doclet.navConstructor";
+                case METHODS:
+                    return "doclet.navMethod";
+                default:
+                    throw new AssertionError("unknown kind:" + kind);
+            }
+        }
+    }
+
+    public static final String STARTLEVEL = "start";
+
+    // properties aren't named setA* or getA*
+    private static final Pattern GETTERSETTERPATTERN = Pattern.compile("[sg]et\\p{Upper}.*");
+    /**
+     * List of TypeElement objects for which ClassMembers objects are built.
+     */
+    private final Set<TypeElement> visibleClasses;
+
+    /**
+     * Map for each member name on to a map which contains members with same
+     * name-signature. The mapped map will contain mapping for each MemberDoc
+     * onto it's respecive level string.
+     */
+    private final Map<Object, Map<Element, String>> memberNameMap = new HashMap<>();
+
+    /**
+     * Map of class and it's ClassMembers object.
+     */
+    private final Map<TypeElement, ClassMembers> classMap = new HashMap<>();
+
+    /**
+     * Type whose visible members are requested.  This is the leaf of
+     * the class tree being mapped.
+     */
+    private final TypeElement typeElement;
+
+    /**
+     * Member kind: InnerClasses/Fields/Methods?
+     */
+    private final Kind kind;
+
+    /**
+     * The configuration this VisibleMemberMap was created with.
+     */
+    private final Configuration configuration;
+    private final Utils utils;
+    private final Comparator<Element> comparator;
+
+    private final Map<TypeElement, List<Element>> propertiesCache;
+    private final Map<Element, Element> classPropertiesMap;
+    private final Map<Element, GetterSetter> getterSetterMap;
+
+    /**
+     * Construct a VisibleMemberMap of the given type for the given class.
+     *
+     * @param typeElement whose members are being mapped.
+     * @param kind the kind of member that is being mapped.
+     * @param configuration the configuration to use to construct this
+     * VisibleMemberMap. If the field configuration.nodeprecated is true the
+     * deprecated members are excluded from the map. If the field
+     * configuration.javafx is true the JavaFX features are used.
+     */
+    public VisibleMemberMap(TypeElement typeElement,
+                            Kind kind,
+                            Configuration configuration) {
+        this.typeElement = typeElement;
+        this.kind = kind;
+        this.configuration = configuration;
+        this.utils = configuration.utils;
+        propertiesCache = configuration.propertiesCache;
+        classPropertiesMap = configuration.classPropertiesMap;
+        getterSetterMap = configuration.getterSetterMap;
+        comparator  = utils.makeGeneralPurposeComparator();
+        visibleClasses = new LinkedHashSet<>();
+        new ClassMembers(typeElement, STARTLEVEL).build();
+    }
+
+    /**
+     * Return the list of visible classes in this map.
+     *
+     * @return the list of visible classes in this map.
+     */
+    public SortedSet<TypeElement> getVisibleClasses() {
+        SortedSet<TypeElement> vClasses = new TreeSet<>(comparator);
+        vClasses.addAll(visibleClasses);
+        return vClasses;
+    }
+
+    /**
+     * Returns the property field documentation belonging to the given member.
+     * @param element the member for which the property documentation is needed.
+     * @return the property field documentation, null if there is none.
+     */
+    public Element getPropertyMemberDoc(Element element) {
+        return classPropertiesMap.get(element);
+    }
+
+    /**
+     * Returns the getter documentation belonging to the given property method.
+     * @param propertyMethod the method for which the getter is needed.
+     * @return the getter documentation, null if there is none.
+     */
+    public Element getGetterForProperty(Element propertyMethod) {
+        return getterSetterMap.get(propertyMethod).getGetter();
+    }
+
+    /**
+     * Returns the setter documentation belonging to the given property method.
+     * @param propertyMethod the method for which the setter is needed.
+     * @return the setter documentation, null if there is none.
+     */
+    public Element getSetterForProperty(Element propertyMethod) {
+        return getterSetterMap.get(propertyMethod).getSetter();
+    }
+
+    /**
+     * Return the package private members inherited by the class.  Only return
+     * if parent is package private and not documented.
+     *
+     * @return the package private members inherited by the class.
+     */
+    private List<Element> getInheritedPackagePrivateMethods() {
+        List<Element> results = new ArrayList<>();
+        for (TypeElement currentClass : visibleClasses) {
+            if (currentClass != typeElement &&
+                utils.isPackagePrivate(currentClass) &&
+                !utils.isLinkable(currentClass)) {
+                // Document these members in the child class because
+                // the parent is inaccessible.
+                results.addAll(classMap.get(currentClass).members);
+            }
+        }
+        return results;
+    }
+
+    /**
+     * Return the visible members of the class being mapped.  Also append at the
+     * end of the list members that are inherited by inaccessible parents. We
+     * document these members in the child because the parent is not documented.
+     *
+     * @param configuration the current configuration of the doclet.
+     */
+    public SortedSet<Element> getLeafClassMembers() {
+        SortedSet<Element> result = getMembersFor(typeElement);
+        result.addAll(getInheritedPackagePrivateMethods());
+        return result;
+    }
+
+    public Set<Element> getLeafClassMembersSourceOrder() {
+        Set<Element> result = new LinkedHashSet<>(classMap.get(typeElement).members);
+        result.addAll(getInheritedPackagePrivateMethods());
+        return result;
+    }
+
+    /**
+     * Retrn the list of members for the given class.
+     *
+     * @param typeElement the class to retrieve the list of visible members for.
+     *
+     * @return the list of members for the given class.
+     */
+    public SortedSet<Element> getMembersFor(TypeElement typeElement) {
+        return asSortedSet(classMap.get(typeElement).members);
+    }
+
+    public boolean hasMembersFor(TypeElement typeElement) {
+        return !classMap.get(typeElement).members.isEmpty();
+    }
+
+    private SortedSet<Element> asSortedSet(Collection<Element> in) {
+        if (in == null) {
+            return Collections.emptySortedSet();
+        }
+        TreeSet<Element> out = new TreeSet<>(comparator);
+        out.addAll(in);
+        return out;
+    }
+
+    private void fillMemberLevelMap(List<? extends Element> list, String level) {
+        for (Element element : list) {
+            Object key = getMemberKey(element);
+            Map<Element, String> memberLevelMap = memberNameMap.get(key);
+            if (memberLevelMap == null) {
+                memberLevelMap = new HashMap<>();
+                memberNameMap.put(key, memberLevelMap);
+            }
+            memberLevelMap.put(element, level);
+        }
+    }
+
+    private void purgeMemberLevelMap(Iterable<? extends Element> list, String level) {
+        for (Element element : list) {
+            Object key = getMemberKey(element);
+            Map<Element, String> memberLevelMap = memberNameMap.get(key);
+            if (memberLevelMap != null && level.equals(memberLevelMap.get(element)))
+                memberLevelMap.remove(element);
+        }
+    }
+
+    /**
+     * Represents a class member.
+     */
+    private class ClassMember {
+        private Set<Element> members;
+
+        public ClassMember(Element element) {
+            members = new HashSet<>();
+            members.add(element);
+        }
+
+        public boolean isEqual(ExecutableElement member) {
+            for (Element element : members) {
+                if (utils.executableMembersEqual(member, (ExecutableElement) element)) {
+                    members.add(member);
+                    return true;
+                }
+            }
+            return false;
+        }
+    }
+
+    /**
+     * A data structure that represents the class members for
+     * a visible class.
+     */
+    private class ClassMembers {
+
+        /**
+         * The mapping class, whose inherited members are put in the
+         * {@link #members} list.
+         */
+        private final TypeElement typeElement;
+
+        /**
+         * List of inherited members from the mapping class.
+         */
+        private Set<Element> members = new LinkedHashSet<>();
+
+        /**
+         * Level/Depth of inheritance.
+         */
+        private final String level;
+
+        private ClassMembers(TypeElement mappingClass, String level) {
+            this.typeElement = mappingClass;
+            this.level = level;
+            if (classMap.containsKey(mappingClass) &&
+                        level.startsWith(classMap.get(mappingClass).level)) {
+                //Remove lower level class so that it can be replaced with
+                //same class found at higher level.
+                purgeMemberLevelMap(getClassMembers(mappingClass, false),
+                    classMap.get(mappingClass).level);
+                classMap.remove(mappingClass);
+                visibleClasses.remove(mappingClass);
+            }
+            if (!classMap.containsKey(mappingClass)) {
+                classMap.put(mappingClass, this);
+                visibleClasses.add(mappingClass);
+            }
+        }
+
+        private void build() {
+            if (kind == Kind.CONSTRUCTORS) {
+                addMembers(typeElement);
+            } else {
+                mapClass();
+            }
+        }
+
+        private void mapClass() {
+            addMembers(typeElement);
+            List<? extends TypeMirror> interfaces = typeElement.getInterfaces();
+            for (TypeMirror anInterface : interfaces) {
+                String locallevel = level + 1;
+                ClassMembers cm = new ClassMembers(utils.asTypeElement(anInterface), locallevel);
+                cm.mapClass();
+            }
+            if (utils.isClass(typeElement)) {
+                TypeElement superclass = utils.getSuperClass(typeElement);
+                if (!(superclass == null || typeElement.equals(superclass))) {
+                    ClassMembers cm = new ClassMembers(superclass, level + "c");
+                    cm.mapClass();
+                }
+            }
+        }
+
+        /**
+         * Get all the valid members from the mapping class. Get the list of
+         * members for the class to be included into(ctii), also get the level
+         * string for ctii. If mapping class member is not already in the
+         * inherited member list and if it is visible in the ctii and not
+         * overridden, put such a member in the inherited member list.
+         * Adjust member-level-map, class-map.
+         */
+        private void addMembers(TypeElement fromClass) {
+            List<? extends Element> classMembers = getClassMembers(fromClass, true);
+            List<Element> incllist = new ArrayList<>();
+            for (Element element : classMembers) {
+                if (!found(members, element)) {
+                    if (memberIsVisible(element)) {
+                        if (!isOverridden(element, level)) {
+                            if (!isTreatedAsPrivate(element)) {
+                                incllist.add(element);
+                            }
+                        }
+                    }
+                }
+            }
+            if (!incllist.isEmpty()) {
+                noVisibleMembers = false;
+            }
+            members.addAll(incllist);
+            fillMemberLevelMap(getClassMembers(fromClass, false), level);
+        }
+
+        private boolean isTreatedAsPrivate(Element pgmelem) {
+            if (!configuration.javafx) {
+                return false;
+            }
+
+            List<? extends DocTree> aspTags = utils.getBlockTags(pgmelem, "@treatAsPrivate");
+            boolean result = (aspTags != null) && (!aspTags.isEmpty());
+            return result;
+        }
+
+        /**
+         * Is given element visible in given typeElement in terms of inheritance? The given element
+         * is visible in the given typeElement if it is public or protected and if it is
+         * package-private if it's containing class is in the same package as the given typeElement.
+         */
+        private boolean memberIsVisible(Element element) {
+            if (utils.getEnclosingTypeElement(element).equals(VisibleMemberMap.this.typeElement)) {
+                //Member is in class that we are finding visible members for.
+                //Of course it is visible.
+                return true;
+            } else if (utils.isPrivate(element)) {
+                //Member is in super class or implemented interface.
+                //Private, so not inherited.
+                return false;
+            } else if (utils.isPackagePrivate(element)) {
+                //Member is package private.  Only return true if its class is in
+                //same package.
+                return utils.containingPackage(element).equals(utils.containingPackage(VisibleMemberMap.this.typeElement));
+            } else {
+                //Public members are always inherited.
+                return true;
+            }
+        }
+
+        /**
+         * Return all available class members.
+         */
+        private List<? extends Element> getClassMembers(TypeElement te, boolean filter) {
+            if (utils.isEnum(te) && kind == Kind.CONSTRUCTORS) {
+                //If any of these rules are hit, return empty array because
+                //we don't document these members ever.
+                return Collections.emptyList();
+            }
+            List<? extends Element> list;
+            switch (kind) {
+                case ANNOTATION_TYPE_FIELDS:
+                    list = (filter)
+                            ? utils.getAnnotationFields(te)
+                            : utils.getAnnotationFieldsUnfiltered(te);
+                    break;
+                case ANNOTATION_TYPE_MEMBER_OPTIONAL:
+                    list = utils.isAnnotationType(te)
+                            ? filterAnnotations(te, false)
+                            : Collections.emptyList();
+                    break;
+                case ANNOTATION_TYPE_MEMBER_REQUIRED:
+                    list = utils.isAnnotationType(te)
+                            ? filterAnnotations(te, true)
+                            : Collections.emptyList();
+                    break;
+                case INNER_CLASSES:
+                    List<TypeElement> xlist = filter
+                            ? utils.getInnerClasses(te)
+                            : utils.getInnerClassesUnfiltered(te);
+                    list = new ArrayList<>(xlist);
+                    break;
+                case ENUM_CONSTANTS:
+                    list = utils.getEnumConstants(te);
+                    break;
+                case FIELDS:
+                    if (filter) {
+                        list = utils.isAnnotationType(te)
+                                ? utils.getAnnotationFields(te)
+                                : utils.getFields(te);
+                    } else {
+                        list = utils.isAnnotationType(te)
+                                ? utils.getAnnotationFieldsUnfiltered(te)
+                                : utils.getFieldsUnfiltered(te);
+                    }
+                    break;
+                case CONSTRUCTORS:
+                    list = utils.getConstructors(te);
+                    break;
+                case METHODS:
+                    list = filter ? utils.getMethods(te) : utils.getMethodsUnfiltered(te);
+                    checkOnPropertiesTags(list);
+                    break;
+                case PROPERTIES:
+                    list = properties(te, filter);
+                    break;
+                default:
+                    list = Collections.emptyList();
+            }
+            // Deprected members should be excluded or not?
+            if (configuration.nodeprecated) {
+                return utils.excludeDeprecatedMembers(list);
+            }
+            return list;
+        }
+
+        /**
+         * Filter the annotation type members and return either the required
+         * members or the optional members, depending on the value of the
+         * required parameter.
+         *
+         * @param typeElement The annotation type to process.
+         * @param required
+         * @return the annotation type members and return either the required
+         * members or the optional members, depending on the value of the
+         * required parameter.
+         */
+        private List<Element> filterAnnotations(TypeElement typeElement, boolean required) {
+            List<Element> members = utils.getAnnotationMethods(typeElement);
+            List<Element> targetMembers = new ArrayList<>();
+            for (Element member : members) {
+                ExecutableElement ee = (ExecutableElement)member;
+                if ((required && ee.getDefaultValue() == null)
+                        || ((!required) && ee.getDefaultValue() != null)) {
+                    targetMembers.add(member);
+                }
+            }
+            return targetMembers;
+        }
+
+        private boolean found(Iterable<Element> list, Element elem) {
+            for (Element pgmelem : list) {
+                if (utils.matches(pgmelem, elem)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+
+        /**
+         * Is member overridden? The member is overridden if it is found in the
+         * same level hierarchy e.g. member at level "11" overrides member at
+         * level "111".
+         */
+        private boolean isOverridden(Element element, String level) {
+            Object key = getMemberKey(element);
+            Map<?, String> memberLevelMap = (Map<?, String>) memberNameMap.get(key);
+            if (memberLevelMap == null)
+                return false;
+            for (String mappedlevel : memberLevelMap.values()) {
+                if (mappedlevel.equals(STARTLEVEL)
+                        || (level.startsWith(mappedlevel)
+                        && !level.equals(mappedlevel))) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+        private List<Element> properties(final TypeElement typeElement, final boolean filter) {
+            final List<ExecutableElement> allMethods = filter
+                    ? utils.getMethods(typeElement)
+                    : utils.getMethodsUnfiltered(typeElement);
+            final List<VariableElement> allFields = utils.getFieldsUnfiltered(typeElement);
+
+            if (propertiesCache.containsKey(typeElement)) {
+                return propertiesCache.get(typeElement);
+            }
+
+            final List<Element> result = new ArrayList<>();
+
+            for (final Element propertyMethod : allMethods) {
+                ExecutableElement ee = (ExecutableElement)propertyMethod;
+                if (!isPropertyMethod(ee)) {
+                    continue;
+                }
+
+                final ExecutableElement getter = getterForField(allMethods, ee);
+                final ExecutableElement setter = setterForField(allMethods, ee);
+                final VariableElement field = fieldForProperty(allFields, ee);
+
+                addToPropertiesMap(setter, getter, ee, field);
+                getterSetterMap.put(propertyMethod, new GetterSetter(getter, setter));
+                result.add(ee);
+            }
+            propertiesCache.put(typeElement, result);
+            return result;
+        }
+
+        private void addToPropertiesMap(ExecutableElement setter,
+                                        ExecutableElement getter,
+                                        ExecutableElement propertyMethod,
+                                        VariableElement field) {
+            if (field == null || utils.getDocCommentTree(field) == null) {
+                addToPropertiesMap(setter, propertyMethod);
+                addToPropertiesMap(getter, propertyMethod);
+                addToPropertiesMap(propertyMethod, propertyMethod);
+            } else {
+                addToPropertiesMap(getter, field);
+                addToPropertiesMap(setter, field);
+                addToPropertiesMap(propertyMethod, field);
+            }
+        }
+
+        private void addToPropertiesMap(Element propertyMethod,
+                                        Element commentSource) {
+            if (null == propertyMethod || null == commentSource) {
+                return;
+            }
+            DocCommentTree docTree = utils.getDocCommentTree(propertyMethod);
+
+            /* The second condition is required for the property buckets. In
+             * this case the comment is at the property method (not at the field)
+             * and it needs to be listed in the map.
+             */
+            if ((docTree == null) || propertyMethod.equals(commentSource)) {
+                classPropertiesMap.put(propertyMethod, commentSource);
+            }
+        }
+
+        private ExecutableElement getterForField(List<ExecutableElement> methods,
+                                         ExecutableElement propertyMethod) {
+            final String propertyMethodName = utils.getSimpleName(propertyMethod);
+            final String fieldName = propertyMethodName.substring(0,
+                            propertyMethodName.lastIndexOf("Property"));
+            final String fieldNameUppercased =
+                    "" + Character.toUpperCase(fieldName.charAt(0))
+                                            + fieldName.substring(1);
+            final String getterNamePattern;
+            final String fieldTypeName = propertyMethod.getReturnType().toString();
+            if ("boolean".equals(fieldTypeName)
+                    || fieldTypeName.endsWith("BooleanProperty")) {
+                getterNamePattern = "(is|get)" + fieldNameUppercased;
+            } else {
+                getterNamePattern = "get" + fieldNameUppercased;
+            }
+
+            for (ExecutableElement method : methods) {
+                if (Pattern.matches(getterNamePattern, utils.getSimpleName(method))) {
+                    if (method.getParameters().isEmpty() &&
+                            utils.isPublic(method) || utils.isProtected(method)) {
+                        return method;
+                    }
+                }
+            }
+            return null;
+        }
+
+        private ExecutableElement setterForField(List<ExecutableElement> methods,
+                                         ExecutableElement propertyMethod) {
+            final String propertyMethodName = utils.getSimpleName(propertyMethod);
+            final String fieldName =
+                    propertyMethodName.substring(0,
+                            propertyMethodName.lastIndexOf("Property"));
+            final String fieldNameUppercased =
+                    "" + Character.toUpperCase(fieldName.charAt(0))
+                                             + fieldName.substring(1);
+            final String setter = "set" + fieldNameUppercased;
+
+            for (ExecutableElement method : methods) {
+                if (setter.equals(utils.getSimpleName(method))) {
+                    if (method.getParameters().size() == 1
+                            && method.getReturnType().getKind() == TypeKind.VOID
+                            && (utils.isPublic(method) || utils.isProtected(method))) {
+                        return method;
+                    }
+                }
+            }
+            return null;
+        }
+
+        private VariableElement fieldForProperty(List<VariableElement> fields, ExecutableElement property) {
+
+            for (VariableElement field : fields) {
+                final String fieldName = utils.getSimpleName(field);
+                final String propertyName = fieldName + "Property";
+                if (propertyName.equals(utils.getSimpleName(property))) {
+                    return field;
+                }
+            }
+            return null;
+        }
+
+        private boolean isPropertyMethod(ExecutableElement method) {
+            if (!configuration.javafx) {
+               return false;
+            }
+            if (!utils.getSimpleName(method).endsWith("Property")) {
+                return false;
+            }
+
+            if (!memberIsVisible(method)) {
+                return false;
+            }
+
+            if (GETTERSETTERPATTERN.matcher(utils.getSimpleName(method)).matches()) {
+                return false;
+            }
+            if (!method.getTypeParameters().isEmpty()) {
+                return false;
+            }
+            return method.getParameters().isEmpty()
+                    && method.getReturnType().getKind() != TypeKind.VOID;
+        }
+
+        private void checkOnPropertiesTags(List<? extends Element> members) {
+            for (Element e: members) {
+                ExecutableElement ee = (ExecutableElement)e;
+                if (utils.isIncluded(ee)) {
+                    CommentHelper ch = utils.getCommentHelper(ee);
+                    for (DocTree tree: utils.getBlockTags(ee)) {
+                        String tagName = ch.getTagName(tree);
+                        if (tagName.equals("@propertySetter")
+                                || tagName.equals("@propertyGetter")
+                                || tagName.equals("@propertyDescription")) {
+                            if (!isPropertyGetterOrSetter(members, ee)) {
+                                configuration.message.warning(ch.getDocTreePath(tree),
+                                        "doclet.javafx_tag_misuse");
+                            }
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+
+        private boolean isPropertyGetterOrSetter(List<? extends Element> members,
+                                                 ExecutableElement method) {
+            String propertyName = utils.propertyName(method);
+            if (!propertyName.isEmpty()) {
+                String propertyMethodName = propertyName + "Property";
+                for (Element member: members) {
+                    if (utils.getSimpleName(member).equals(propertyMethodName)) {
+                        return true;
+                    }
+                }
+            }
+            return false;
+        }
+    }
+
+    public class GetterSetter {
+        private final Element getter;
+        private final Element setter;
+
+        public GetterSetter(Element getter, Element setter) {
+            this.getter = getter;
+            this.setter = setter;
+        }
+
+        public Element getGetter() {
+            return getter;
+        }
+
+        public Element getSetter() {
+            return setter;
+        }
+    }
+
+    /**
+     * Return true if this map has no visible members.
+     *
+     * @return true if this map has no visible members.
+     */
+    public boolean noVisibleMembers() {
+        return noVisibleMembers;
+    }
+
+    private ClassMember getClassMember(ExecutableElement member) {
+        for (Object key : memberNameMap.keySet()) {
+            if (key instanceof String) {
+                continue;
+            }
+            if (((ClassMember) key).isEqual(member)) {
+                return (ClassMember) key;
+            }
+        }
+        return new ClassMember(member);
+    }
+
+    /**
+     * Return the key to the member map for the given member.
+     */
+    private Object getMemberKey(Element element) {
+        if (utils.isConstructor(element)) {
+            return utils.getSimpleName(element) + utils.flatSignature((ExecutableElement)element);
+        } else if (utils.isMethod(element)) {
+            return getClassMember((ExecutableElement) element);
+        } else if (utils.isField(element) || utils.isEnumConstant(element) || utils.isAnnotationType(element)) {
+            return utils.getSimpleName(element);
+        } else { // it's a class or interface
+            String classOrIntName = utils.getSimpleName(element);
+            //Strip off the containing class name because we only want the member name.
+            classOrIntName = classOrIntName.indexOf('.') != 0
+                    ? classOrIntName.substring(classOrIntName.lastIndexOf('.'))
+                    : classOrIntName;
+            return "clint" + classOrIntName;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkFactory.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,310 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.util.links;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.lang.model.element.AnnotationMirror;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.TypeParameterElement;
+import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.TypeVariable;
+import javax.lang.model.type.WildcardType;
+import javax.lang.model.util.SimpleTypeVisitor9;
+
+import jdk.javadoc.internal.doclets.formats.html.LinkInfoImpl;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+import jdk.javadoc.internal.doclets.toolkit.util.Utils;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+
+/**
+ * A factory that constructs links from given link information.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public abstract class LinkFactory {
+
+    /**
+     * Return an empty instance of a content object.
+     *
+     * @return an empty instance of a content object.
+     */
+    protected abstract Content newContent();
+
+    /**
+     * Constructs a link from the given link information.
+     *
+     * @param linkInfo the information about the link.
+     * @return the output of the link.
+     */
+    public Content getLink(LinkInfo linkInfo) {
+        Utils utils = ((LinkInfoImpl) linkInfo).configuration.utils;
+        if (linkInfo.type != null) {
+            SimpleTypeVisitor9<Content, LinkInfo> linkVisitor =
+                    new SimpleTypeVisitor9<Content, LinkInfo>() {
+
+                TypeMirror componentType = utils.getComponentType(linkInfo.type);
+                Content link = newContent();
+
+                // handles primitives, no types and error types
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                protected Content defaultAction(TypeMirror type, LinkInfo linkInfo) {
+                    link.addContent(utils.getTypeName(type, false));
+                    return link;
+                }
+
+                int currentDepth = 0;
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Content visitArray(ArrayType type, LinkInfo linkInfo) {
+                    // keep track of the dimension depth and replace the last dimension
+                    // specifier with vararags, when the stack is fully unwound.
+                    currentDepth++;
+                    linkInfo.type = type.getComponentType();
+                    visit(linkInfo.type, linkInfo);
+                    currentDepth--;
+                    if (utils.isAnnotated(type)) {
+                        linkInfo.type = type;
+                        link.addContent(" ");
+                        link.addContent(getTypeAnnotationLinks(linkInfo));
+                    }
+                    // use vararg if required
+                    if (linkInfo.isVarArg && currentDepth == 0) {
+                        link.addContent("...");
+                    } else {
+                        link.addContent("[]");
+                    }
+                    return link;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Content visitWildcard(WildcardType type, LinkInfo linkInfo) {
+                    linkInfo.isTypeBound = true;
+                    link.addContent("?");
+                    TypeMirror extendsBound = type.getExtendsBound();
+                    if (extendsBound != null) {
+                        link.addContent(" extends ");
+                        setBoundsLinkInfo(linkInfo, extendsBound);
+                        link.addContent(getLink(linkInfo));
+                    }
+                    TypeMirror superBound = type.getSuperBound();
+                    if (superBound != null) {
+                        link.addContent(" super ");
+                        setBoundsLinkInfo(linkInfo, superBound);
+                        link.addContent(getLink(linkInfo));
+                    }
+                    return link;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Content visitTypeVariable(TypeVariable type, LinkInfo linkInfo) {
+                    link.addContent(getTypeAnnotationLinks(linkInfo));
+                    linkInfo.isTypeBound = true;
+                    TypeVariable typevariable = (utils.isArrayType(type))
+                            ? (TypeVariable) componentType
+                            : type;
+                    Element owner = typevariable.asElement().getEnclosingElement();
+                    if ((!linkInfo.excludeTypeParameterLinks) && utils.isTypeElement(owner)) {
+                        linkInfo.typeElement = (TypeElement) owner;
+                        Content label = newContent();
+                        label.addContent(utils.getTypeName(type, false));
+                        linkInfo.label = label;
+                        link.addContent(getClassLink(linkInfo));
+                    } else {
+                        // No need to link method type parameters.
+                        link.addContent(utils.getTypeName(typevariable, false));
+                    }
+
+                    if (!linkInfo.excludeTypeBounds) {
+                        linkInfo.excludeTypeBounds = true;
+                        TypeParameterElement tpe = ((TypeParameterElement) typevariable.asElement());
+                        boolean more = false;
+                        List<? extends TypeMirror> bounds = utils.getBounds(tpe);
+                        for (TypeMirror bound : bounds) {
+                            // we get everything as extends java.lang.Object we suppress
+                            // all of them except those that have multiple extends
+                            if (bounds.size() == 1 &&
+                                    bound.equals(utils.getObjectType()) &&
+                                    !utils.isAnnotated(bound)) {
+                                continue;
+                            }
+                            link.addContent(more ? " & " : " extends ");
+                            setBoundsLinkInfo(linkInfo, bound);
+                            link.addContent(getLink(linkInfo));
+                            more = true;
+                        }
+                    }
+                    return link;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Content visitDeclared(DeclaredType type, LinkInfo linkInfo) {
+                    if (linkInfo.isTypeBound && linkInfo.excludeTypeBoundsLinks) {
+                        // Since we are excluding type parameter links, we should not
+                        // be linking to the type bound.
+                        link.addContent(utils.getTypeName(type, false));
+                        link.addContent(getTypeParameterLinks(linkInfo));
+                        return link;
+                    } else {
+                        link = newContent();
+                        link.addContent(getTypeAnnotationLinks(linkInfo));
+                        linkInfo.typeElement = utils.asTypeElement(type);
+                        link.addContent(getClassLink(linkInfo));
+                        if (linkInfo.includeTypeAsSepLink) {
+                            link.addContent(getTypeParameterLinks(linkInfo, false));
+                        }
+                    }
+                    return link;
+                }
+            };
+            return linkVisitor.visit(linkInfo.type, linkInfo);
+        } else if (linkInfo.typeElement != null) {
+            Content link = newContent();
+            link.addContent(getClassLink(linkInfo));
+            if (linkInfo.includeTypeAsSepLink) {
+                link.addContent(getTypeParameterLinks(linkInfo, false));
+            }
+            return link;
+        } else {
+            return null;
+        }
+    }
+
+    private void setBoundsLinkInfo(LinkInfo linkInfo, TypeMirror bound) {
+        linkInfo.typeElement = null;
+        linkInfo.label = null;
+        linkInfo.type = bound;
+    }
+
+    /**
+     * Return the link to the given class.
+     *
+     * @param linkInfo the information about the link to construct.
+     *
+     * @return the link for the given class.
+     */
+    protected abstract Content getClassLink(LinkInfo linkInfo);
+
+    /**
+     * Return the link to the given type parameter.
+     *
+     * @param linkInfo     the information about the link to construct.
+     * @param typeParam the type parameter to link to.
+     */
+    protected abstract Content getTypeParameterLink(LinkInfo linkInfo, TypeMirror typeParam);
+
+    protected abstract Content getTypeAnnotationLink(LinkInfo linkInfo, AnnotationMirror annotation);
+
+    /**
+     * Return the links to the type parameters.
+     *
+     * @param linkInfo     the information about the link to construct.
+     * @return the links to the type parameters.
+     */
+    public Content getTypeParameterLinks(LinkInfo linkInfo) {
+        return getTypeParameterLinks(linkInfo, true);
+    }
+
+    /**
+     * Return the links to the type parameters.
+     *
+     * @param linkInfo     the information about the link to construct.
+     * @param isClassLabel true if this is a class label.  False if it is
+     *                     the type parameters portion of the link.
+     * @return the links to the type parameters.
+     */
+    public Content getTypeParameterLinks(LinkInfo linkInfo, boolean isClassLabel) {
+        Utils utils = ((LinkInfoImpl)linkInfo).utils;
+        Content links = newContent();
+        List<TypeMirror> vars = new ArrayList<>();
+        TypeMirror ctype = linkInfo.type != null
+                ? utils.getComponentType(linkInfo.type)
+                : null;
+        if (linkInfo.executableElement != null) {
+            linkInfo.executableElement.getTypeParameters().stream().forEach((t) -> {
+                vars.add(t.asType());
+            });
+        } else if (linkInfo.type != null && utils.isDeclaredType(linkInfo.type)) {
+            ((DeclaredType)linkInfo.type).getTypeArguments().stream().forEach((t) -> {
+                vars.add(t);
+            });
+        } else if (ctype != null && utils.isDeclaredType(ctype)) {
+            ((DeclaredType)ctype).getTypeArguments().stream().forEach((t) -> {
+                vars.add(t);
+            });
+        } else if (linkInfo.typeElement != null) {
+            linkInfo.typeElement.getTypeParameters().stream().forEach((t) -> {
+                vars.add(t.asType());
+            });
+        } else {
+            // Nothing to document.
+            return links;
+        }
+        if (((linkInfo.includeTypeInClassLinkLabel && isClassLabel)
+                || (linkInfo.includeTypeAsSepLink && !isClassLabel)) && !vars.isEmpty()) {
+            links.addContent("<");
+            boolean many = false;
+            for (TypeMirror t : vars) {
+                if (many) {
+                    links.addContent(",");
+                }
+                links.addContent(getTypeParameterLink(linkInfo, t));
+                many = true;
+            }
+            links.addContent(">");
+        }
+        return links;
+    }
+
+    public Content getTypeAnnotationLinks(LinkInfo linkInfo) {
+        Utils utils = ((LinkInfoImpl)linkInfo).utils;
+        Content links = newContent();
+        if (!utils.isAnnotated(linkInfo.type))
+            return links;
+
+        List<? extends AnnotationMirror> annotations = linkInfo.type.getAnnotationMirrors();
+        boolean needSpace = false;
+        for (AnnotationMirror anno : annotations) {
+            if (needSpace) {
+                links.addContent(" ");
+            }
+            links.addContent(getTypeAnnotationLink(linkInfo, anno));
+            needSpace = true;
+        }
+
+        links.addContent(" ");
+        return links;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkInfo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.util.links;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+
+import jdk.javadoc.internal.doclets.toolkit.Configuration;
+import jdk.javadoc.internal.doclets.toolkit.Content;
+
+/**
+ * Encapsulates information about a link.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public abstract class LinkInfo {
+
+    /**
+     * The class we want to link to.  Null if we are not linking
+     * to a class.
+     */
+    public TypeElement typeElement;
+
+    /**
+     * The executable element we want to link to.  Null if we are not linking
+     * to an executable element.
+     */
+    public ExecutableElement executableElement;
+
+    /**
+     * The Type we want to link to.  Null if we are not linking to a type.
+     */
+    public TypeMirror type;
+
+    /**
+     * True if this is a link to a VarArg.
+     */
+    public boolean isVarArg = false;
+
+    /**
+     * Set this to true to indicate that you are linking to a type parameter.
+     */
+    public boolean isTypeBound = false;
+
+    /**
+     * Whether the document element is in a Java 5 declaration
+     * location or not.
+     */
+    public boolean isJava5DeclarationLocation = true;
+
+    /**
+     * The label for the link.
+     */
+    public Content label;
+
+    /**
+     * True if the link should be strong.
+     */
+    public boolean isStrong = false;
+
+    /**
+     * True if we should include the type in the link label.  False otherwise.
+     */
+    public boolean includeTypeInClassLinkLabel = true;
+
+    /**
+     * True if we should include the type as separate link.  False otherwise.
+     */
+    public boolean includeTypeAsSepLink = false;
+
+    /**
+     * True if we should exclude the type bounds for the type parameter.
+     */
+    public boolean excludeTypeBounds = false;
+
+    /**
+     * True if we should print the type parameters, but not link them.
+     */
+    public boolean excludeTypeParameterLinks = false;
+
+    /**
+     * True if we should print the type bounds, but not link them.
+     */
+    public boolean excludeTypeBoundsLinks = false;
+
+    /**
+     * By default, the link can be to the page it's already on.  However,
+     * there are cases where we don't want this (e.g. heading of class page).
+     */
+    public boolean linkToSelf = true;
+
+    /**
+     * Return an empty instance of a content object.
+     *
+     * @return an empty instance of a content object.
+     */
+    protected abstract Content newContent();
+
+    /**
+     * 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 abstract boolean isLinkable();
+
+    /**
+     * Return the label for this class link.
+     *
+     * @param configuration the current configuration of the doclet.
+     * @return the label for this class link.
+     */
+    public Content getClassLinkLabel(Configuration configuration) {
+        if (label != null && !label.isEmpty()) {
+            return label;
+        } else if (isLinkable()) {
+            Content tlabel = newContent();
+            tlabel.addContent(configuration.utils.getSimpleName(typeElement));
+            return tlabel;
+        } else {
+            Content tlabel = newContent();
+            tlabel.addContent(configuration.getClassName(typeElement));
+            return tlabel;
+        }
+    }
+
+    @Override
+    public String toString() {
+        return "LinkInfo{" + "typeElement=" + typeElement +
+                ", executableElement=" + executableElement +
+                ", type=" + type +
+                ", isVarArg=" + isVarArg +
+                ", isTypeBound=" + isTypeBound +
+                ", isJava5DeclarationLocation=" + isJava5DeclarationLocation +
+                ", label=" + label +
+                ", isStrong=" + isStrong +
+                ", includeTypeInClassLinkLabel=" + includeTypeInClassLinkLabel +
+                ", includeTypeAsSepLink=" + includeTypeAsSepLink +
+                ", excludeTypeBounds=" + excludeTypeBounds +
+                ", excludeTypeParameterLinks=" + excludeTypeParameterLinks +
+                ", excludeTypeBoundsLinks=" + excludeTypeBoundsLinks +
+                ", linkToSelf=" + linkToSelf + '}';
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/LinkOutput.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2003, 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 jdk.javadoc.internal.doclets.toolkit.util.links;
+
+/**
+ * Stores output of a link.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Jamie Ho
+ */
+public interface LinkOutput {
+
+    /**
+     * Append the given object to the output.
+     *
+     * @param o the object to append.
+     */
+    public void append(Object o);
+
+    /**
+     * Insert the given object into the output sequence.
+     *
+     * @param offset the offset.
+     * @param o the object to be inserted.
+     */
+    public void insert(int offset, Object o);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/links/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+/**
+    Provides a factory for constructing links.
+
+    <p><b>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.</b>
+*/
+
+package jdk.javadoc.internal.doclets.toolkit.util.links;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+/**
+    This package has utility classes that perform common services required
+    for API documentation generation.
+
+    <p><b>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.</b>
+*/
+
+package jdk.javadoc.internal.doclets.toolkit.util;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/DocEnv.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,846 @@
+/*
+ * Copyright (c) 2000, 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 jdk.javadoc.internal.tool;
+
+
+import java.lang.reflect.Modifier;
+import java.util.*;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.SimpleElementVisitor9;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+
+import com.sun.source.util.DocTrees;
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.api.JavacTrees;
+import com.sun.tools.javac.code.ClassFinder;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.code.Kinds.Kind;
+import com.sun.tools.javac.code.Source;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symbol.ClassSymbol;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
+import com.sun.tools.javac.code.Symbol.MethodSymbol;
+import com.sun.tools.javac.code.Symbol.PackageSymbol;
+import com.sun.tools.javac.code.Symbol.VarSymbol;
+import com.sun.tools.javac.code.Symtab;
+import com.sun.tools.javac.comp.AttrContext;
+import com.sun.tools.javac.comp.Check;
+import com.sun.tools.javac.comp.Enter;
+import com.sun.tools.javac.comp.Env;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.model.JavacElements;
+import com.sun.tools.javac.model.JavacTypes;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
+import com.sun.tools.javac.tree.JCTree.JCPackageDecl;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.DefinedBy;
+import com.sun.tools.javac.util.DefinedBy.Api;
+import com.sun.tools.javac.util.Names;
+
+import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
+
+/**
+ * Holds the environment for a run of javadoc.
+ * Holds only the information needed throughout the
+ * run and not the compiler info that could be GC'ed
+ * or ported.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Neal Gafter (rewrite)
+ * @author Scott Seligman (generics)
+ */
+public class DocEnv {
+    protected static final Context.Key<DocEnv> docEnvKey = new Context.Key<>();
+
+    public static DocEnv instance(Context context) {
+        DocEnv instance = context.get(docEnvKey);
+        if (instance == null)
+            instance = new DocEnv(context);
+        return instance;
+    }
+
+    private final Messager messager;
+
+    /** Predefined symbols known to the compiler. */
+    public final Symtab syms;
+
+    /** Referenced directly in RootDocImpl. */
+    private final ClassFinder finder;
+
+    /** Javadoc's own version of the compiler's enter phase. */
+    final Enter enter;
+
+    /** The name table. */
+    private Names names;
+
+    /** The encoding name. */
+    private String encoding;
+
+    final Symbol externalizableSym;
+
+    /** Access filter (public, protected, ...).  */
+    protected ModifierFilter filter;
+
+    /**
+     * True if we do not want to print any notifications at all.
+     */
+    boolean quiet = false;
+
+    Check chk;
+    com.sun.tools.javac.code.Types types;
+    JavaFileManager fileManager;
+    public final Context context;
+
+    WeakHashMap<JCTree, TreePath> treePaths = new WeakHashMap<>();
+
+    public final HashMap<PackageElement, JavaFileObject> pkgToJavaFOMap = new HashMap<>();
+
+    /** Allow documenting from class files? */
+    boolean docClasses = false;
+
+    /**
+     * The source language version.
+     */
+    public final Source source;
+
+    public final Elements elements;
+
+    public final JavacTypes typeutils;
+
+    protected RootDocImpl root;
+
+    public final DocTrees docTrees;
+
+    public final Map<Element, TreePath> elementToTreePath;
+
+    /**
+     * Constructor
+     *
+     * @param context      Context for this javadoc instance.
+     */
+    protected DocEnv(Context context) {
+        context.put(docEnvKey, this);
+        this.context = context;
+
+        messager = Messager.instance0(context);
+        syms = Symtab.instance(context);
+        finder = JavadocClassFinder.instance(context);
+        enter = JavadocEnter.instance(context);
+        names = Names.instance(context);
+        externalizableSym = syms.enterClass(names.fromString("java.io.Externalizable"));
+        chk = Check.instance(context);
+        types = com.sun.tools.javac.code.Types.instance(context);
+        fileManager = context.get(JavaFileManager.class);
+        if (fileManager instanceof JavacFileManager) {
+            ((JavacFileManager)fileManager).setSymbolFileEnabled(false);
+        }
+        docTrees = JavacTrees.instance(context);
+        source = Source.instance(context);
+        elements =  JavacElements.instance(context);
+        typeutils = JavacTypes.instance(context);
+        elementToTreePath = new HashMap<>();
+    }
+
+    public void intialize(String encoding,
+            String showAccess,
+            String overviewpath,
+            List<String> javaNames,
+            Iterable<? extends JavaFileObject> fileObjects,
+            List<String> subPackages,
+            List<String> excludedPackages,
+            boolean docClasses,
+            boolean quiet) {
+        this.filter = ModifierFilter.getModifierFilter(showAccess);
+        this.quiet = quiet;
+
+        this.setEncoding(encoding);
+        this.docClasses = docClasses;
+    }
+
+    /**
+     * Load a class by qualified name.
+     */
+    public TypeElement loadClass(String name) {
+        try {
+            ClassSymbol c = finder.loadClass(names.fromString(name));
+            return c;
+        } catch (CompletionFailure ex) {
+            chk.completionError(null, ex);
+            return null;
+        }
+    }
+
+    private boolean isSynthetic(long flags) {
+        return (flags & Flags.SYNTHETIC) != 0;
+    }
+
+    private boolean isSynthetic(Symbol sym) {
+        return isSynthetic(sym.flags_field);
+    }
+
+    SimpleElementVisitor9<Boolean, Void> shouldDocumentVisitor = null;
+    public boolean shouldDocument(Element e) {
+        if (shouldDocumentVisitor == null) {
+            shouldDocumentVisitor = new SimpleElementVisitor9<Boolean, Void>() {
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitType(TypeElement e, Void p) {
+                return shouldDocument((ClassSymbol)e);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitVariable(VariableElement e, Void p) {
+                return shouldDocument((VarSymbol)e);
+            }
+
+            @Override @DefinedBy(Api.LANGUAGE_MODEL)
+            public Boolean visitExecutable(ExecutableElement e, Void p) {
+                return shouldDocument((MethodSymbol)e);
+            }
+        };
+        }
+        return shouldDocumentVisitor.visit(e);
+    }
+
+    /** Check whether this member should be documented. */
+    public boolean shouldDocument(VarSymbol sym) {
+        long mod = sym.flags();
+        if (isSynthetic(mod)) {
+            return false;
+        }
+        return filter.checkModifier(translateModifiers(mod));
+    }
+
+    /** Check whether this member should be documented. */
+    public boolean shouldDocument(MethodSymbol sym) {
+        long mod = sym.flags();
+        if (isSynthetic(mod)) {
+            return false;
+        }
+        return filter.checkModifier(translateModifiers(mod));
+    }
+
+    void setElementToTreePath(Element e, TreePath tree) {
+        if (e == null || tree == null)
+            return;
+        elementToTreePath.put(e, tree);
+    }
+
+    private boolean hasLeaf(ClassSymbol sym) {
+        TreePath path = elementToTreePath.get(sym);
+        if (path == null)
+            return false;
+        return path.getLeaf() != null;
+    }
+
+    /** check whether this class should be documented. */
+    public boolean shouldDocument(ClassSymbol sym) {
+        return
+            !isSynthetic(sym.flags_field) && // no synthetics
+            (docClasses || hasLeaf(sym)) &&
+            isVisible(sym);
+    }
+
+    //### Comment below is inaccurate wrt modifier filter testing
+    /**
+     * Check the visibility if this is an nested class.
+     * if this is not a nested class, return true.
+     * if this is an static visible nested class,
+     *    return true.
+     * if this is an visible nested class
+     *    if the outer class is visible return true.
+     *    else return false.
+     * IMPORTANT: This also allows, static nested classes
+     * to be defined inside an nested class, which is not
+     * allowed by the compiler. So such an test case will
+     * not reach upto this method itself, but if compiler
+     * allows it, then that will go through.
+     */
+    public boolean isVisible(ClassSymbol sym) {
+        long mod = sym.flags_field;
+        if (!filter.checkModifier(translateModifiers(mod))) {
+            return false;
+        }
+        ClassSymbol encl = sym.owner.enclClass();
+        return (encl == null || (mod & Flags.STATIC) != 0 || isVisible(encl));
+    }
+
+    //---------------- print forwarders ----------------//
+
+    // ERRORS
+    /**
+     * Print error message, increment error count.
+     *
+     * @param msg message to print.
+     */
+    public void printError(String msg) {
+        messager.printError(msg);
+    }
+
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param key selects message from resource
+//     */
+//    public void error(Element element, String key) {
+//        if (element == null)
+//            messager.error(key);
+//        else
+//            messager.error(element, key);
+//    }
+//
+//    public void error(String prefix, String key) {
+//        printError(prefix + ":" + messager.getText(key));
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param path the path to the source
+//     * @param key selects message from resource
+//     */
+//    public void error(DocTreePath path, String key) {
+//        messager.error(path, key);
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param path the path to the source
+//     * @param msg message to print.
+//     */
+//    public void printError(DocTreePath path, String msg) {
+//        messager.printError(path, msg);
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     * @param e the target element
+//     * @param msg message to print.
+//     */
+//    public void printError(Element e, String msg) {
+//        messager.printError(e, msg);
+//    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param element the source element
+     * @param key selects message from resource
+     * @param args replacement arguments
+     */
+    public void error(Element element, String key, String... args) {
+        if (element == null)
+            messager.error(key, (Object[]) args);
+        else
+            messager.error(element, key, (Object[]) args);
+    }
+
+    // WARNINGS
+
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param msg message to print.
+//     */
+//    public void printWarning(String msg) {
+//        messager.printWarning(msg);
+//    }
+//
+//    public void warning(String key) {
+//        warning((Element)null, key);
+//    }
+
+    public void warning(String key, String... args) {
+        warning((Element)null, key, args);
+    }
+
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param element the source element
+//     * @param key selects message from resource
+//     */
+//    public void warning(Element element, String key) {
+//        if (element == null)
+//            messager.warning(key);
+//        else
+//            messager.warning(element, key);
+//    }
+//
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param path the path to the source
+//     * @param msg message to print.
+//     */
+//    public void printWarning(DocTreePath path, String msg) {
+//        messager.printWarning(path, msg);
+//    }
+//
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param e  the source element
+//     * @param msg message to print.
+//     */
+//    public void printWarning(Element e, String msg) {
+//        messager.printWarning(e, msg);
+//    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param e    the source element
+     * @param key  selects message from resource
+     * @param args the replace arguments
+     */
+    public void warning(Element e, String key, String... args) {
+        if (e == null)
+            messager.warning(key, (Object[]) args);
+        else
+            messager.warning(e, key, (Object[]) args);
+    }
+
+//    Note: no longer required
+//    /**
+//     * Print a message.
+//     *
+//     * @param msg message to print.
+//     */
+//    public void printNotice(String msg) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.printNotice(msg);
+//    }
+
+//  Note: no longer required
+//    /**
+//     * Print a message.
+//     *
+//     * @param e the source element
+//     * @param msg message to print.
+//     */
+//    public void printNotice(Element e, String msg) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.printNotice(e, msg);
+//    }
+
+    //  NOTICES
+    /**
+     * Print a message.
+     *
+     * @param key selects message from resource
+     */
+    public void notice(String key) {
+        if (quiet) {
+            return;
+        }
+        messager.notice(key);
+    }
+
+//    Note: not used anymore
+//    /**
+//     * Print a message.
+//     *
+//     * @param path the path to the source
+//     * @param msg message to print.
+//     */
+//    public void printNotice(DocTreePath path, String msg) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.printNotice(path, msg);
+//    }
+
+    /**
+     * Print a message.
+     *
+     * @param key selects message from resource
+     * @param a1 first argument
+     */
+    public void notice(String key, String a1) {
+        if (quiet) {
+            return;
+        }
+        messager.notice(key, a1);
+    }
+
+//    Note: not used anymore
+//    /**
+//     * Print a message.
+//     *
+//     * @param key selects message from resource
+//     * @param a1 first argument
+//     * @param a2 second argument
+//     */
+//    public void notice(String key, String a1, String a2) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.notice(key, a1, a2);
+//    }
+//
+
+//    Note: not used anymore
+//    /**
+//     * Print a message.
+//     *
+//     * @param key selects message from resource
+//     * @param a1 first argument
+//     * @param a2 second argument
+//     * @param a3 third argument
+//     */
+//    public void notice(String key, String a1, String a2, String a3) {
+//        if (quiet) {
+//            return;
+//        }
+//        messager.notice(key, a1, a2, a3);
+//    }
+
+    /**
+     * Exit, reporting errors and warnings.
+     */
+    public void exit() {
+        // Messager should be replaced by a more general
+        // compilation environment.  This can probably
+        // subsume DocEnv as well.
+        messager.exit();
+    }
+
+    /**
+     * Adds all inner classes of this class, and their inner classes recursively, to the list
+     */
+    void addAllClasses(Collection<TypeElement> list, TypeElement typeElement, boolean filtered) {
+        ClassSymbol klass = (ClassSymbol)typeElement;
+        try {
+            if (isSynthetic(klass.flags())) return;
+            // sometimes synthetic classes are not marked synthetic
+            if (!JavadocTool.isValidClassName(klass.name.toString())) return;
+            if (filtered && !shouldDocument(klass)) return;
+            if (list.contains(klass)) return;
+            list.add(klass);
+            for (Symbol sym : klass.members().getSymbols(NON_RECURSIVE)) {
+                if (sym != null && sym.kind == Kind.TYP) {
+                    ClassSymbol s = (ClassSymbol)sym;
+                    if (!isSynthetic(s.flags())) {
+                        addAllClasses(list, s, filtered);
+                    }
+                }
+            }
+        } catch (CompletionFailure e) {
+            // quietly ignore completion failures
+        }
+    }
+
+    /**
+     * Return a list of all classes contained in this package, including
+     * member classes of those classes, and their member classes, etc.
+     */
+    void addAllClasses(Collection<TypeElement> list, PackageElement pkg) {
+        boolean filtered = true;
+        PackageSymbol sym = (PackageSymbol)pkg;
+        for (Symbol isym : sym.members().getSymbols(NON_RECURSIVE)) {
+            if (isym != null) {
+                ClassSymbol s = (ClassSymbol)isym;
+                if (!isSynthetic(s)) {
+                    addAllClasses(list, s, filtered);
+                }
+            }
+        }
+    }
+
+    TreePath getTreePath(JCCompilationUnit tree) {
+        TreePath p = treePaths.get(tree);
+        if (p == null)
+            treePaths.put(tree, p = new TreePath(tree));
+        return p;
+    }
+
+    TreePath getTreePath(JCCompilationUnit toplevel, JCPackageDecl tree) {
+        TreePath p = treePaths.get(tree);
+        if (p == null)
+            treePaths.put(tree, p = new TreePath(getTreePath(toplevel), tree));
+        return p;
+    }
+
+    TreePath getTreePath(JCCompilationUnit toplevel, JCClassDecl tree) {
+        TreePath p = treePaths.get(tree);
+        if (p == null)
+            treePaths.put(tree, p = new TreePath(getTreePath(toplevel), tree));
+        return p;
+    }
+
+    TreePath getTreePath(JCCompilationUnit toplevel, JCClassDecl cdecl, JCTree tree) {
+        return new TreePath(getTreePath(toplevel, cdecl), tree);
+    }
+
+    public com.sun.tools.javac.code.Types getTypes() {
+        return types;
+    }
+
+    /**
+     * Set the encoding.
+     */
+    public void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    public Env<AttrContext> getEnv(ClassSymbol tsym) {
+        return enter.getEnv(tsym);
+    }
+
+    /**
+     * Get the encoding.
+     */
+    public String getEncoding() {
+        return encoding;
+    }
+
+    /**
+     * Convert modifier bits from private coding used by
+     * the compiler to that of java.lang.reflect.Modifier.
+     */
+    static int translateModifiers(long flags) {
+        int result = 0;
+        if ((flags & Flags.ABSTRACT) != 0)
+            result |= Modifier.ABSTRACT;
+        if ((flags & Flags.FINAL) != 0)
+            result |= Modifier.FINAL;
+        if ((flags & Flags.INTERFACE) != 0)
+            result |= Modifier.INTERFACE;
+        if ((flags & Flags.NATIVE) != 0)
+            result |= Modifier.NATIVE;
+        if ((flags & Flags.PRIVATE) != 0)
+            result |= Modifier.PRIVATE;
+        if ((flags & Flags.PROTECTED) != 0)
+            result |= Modifier.PROTECTED;
+        if ((flags & Flags.PUBLIC) != 0)
+            result |= Modifier.PUBLIC;
+        if ((flags & Flags.STATIC) != 0)
+            result |= Modifier.STATIC;
+        if ((flags & Flags.SYNCHRONIZED) != 0)
+            result |= Modifier.SYNCHRONIZED;
+        if ((flags & Flags.TRANSIENT) != 0)
+            result |= Modifier.TRANSIENT;
+        if ((flags & Flags.VOLATILE) != 0)
+            result |= Modifier.VOLATILE;
+        return result;
+    }
+
+    private final Set<Element> includedSet = new HashSet<>();
+
+    public void setIncluded(Element element) {
+        includedSet.add(element);
+    }
+
+    private SimpleElementVisitor9<Boolean, Void> includedVisitor = null;
+
+    public boolean isIncluded(Element e) {
+        if (e == null) {
+            return false;
+        }
+        if (includedVisitor == null) {
+            includedVisitor = new SimpleElementVisitor9<Boolean, Void>() {
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitType(TypeElement e, Void p) {
+                    if (includedSet.contains(e)) {
+                        return true;
+                    }
+                    if (shouldDocument(e)) {
+                        // Class is nameable from top-level and
+                        // the class and all enclosing classes
+                        // pass the modifier filter.
+                        PackageElement pkg = elements.getPackageOf(e);
+                        if (includedSet.contains(pkg)) {
+                            setIncluded(e);
+                            return true;
+                        }
+                        Element enclosing = e.getEnclosingElement();
+                        if (enclosing != null && includedSet.contains(enclosing)) {
+                            setIncluded(e);
+                            return true;
+                        }
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean defaultAction(Element e, Void p) {
+                    if (includedSet.contains(e) || shouldDocument(e)) {
+                        return true;
+                    }
+                    return false;
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitPackage(PackageElement e, Void p) {
+                    return includedSet.contains(e);
+                }
+
+                @Override @DefinedBy(Api.LANGUAGE_MODEL)
+                public Boolean visitUnknown(Element e, Void p) {
+                    throw new AssertionError("got element: " + e);
+                }
+            };
+        }
+        return includedVisitor.visit(e);
+    }
+
+    public boolean isQuiet() {
+        return quiet;
+    }
+
+    /**
+     * A class which filters the access flags on classes, fields, methods, etc.
+     *
+     * <p>
+     * <b>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.</b>
+     *
+     * @see javax.lang.model.element.Modifier
+     * @author Robert Field
+     */
+
+    private static class ModifierFilter {
+
+        static enum FilterFlag {
+            PACKAGE,
+            PRIVATE,
+            PROTECTED,
+            PUBLIC
+        }
+
+        private Set<FilterFlag> oneOf;
+
+        /**
+         * Constructor - Specify a filter.
+         *
+         * @param oneOf a set containing desired flags to be matched.
+         */
+        ModifierFilter(Set<FilterFlag> oneOf) {
+            this.oneOf = oneOf;
+        }
+
+        /**
+         * Constructor - Specify a filter.
+         *
+         * @param oneOf an array containing desired flags to be matched.
+         */
+        ModifierFilter(FilterFlag... oneOf) {
+            this.oneOf = new HashSet<>();
+            this.oneOf.addAll(Arrays.asList(oneOf));
+        }
+
+        static ModifierFilter getModifierFilter(String showAccess) {
+            switch (showAccess) {
+                case "public":
+                    return new ModifierFilter(FilterFlag.PUBLIC);
+                case "package":
+                    return new ModifierFilter(FilterFlag.PUBLIC, FilterFlag.PROTECTED,
+                                              FilterFlag.PACKAGE);
+                case "private":
+                    return new ModifierFilter(FilterFlag.PRIVATE);
+                default:
+                    return new ModifierFilter(FilterFlag.PUBLIC, FilterFlag.PROTECTED);
+            }
+        }
+
+        private boolean hasFlag(long flag, long modifierBits) {
+            return (flag & modifierBits) != 0;
+        }
+
+        private List<FilterFlag> flagsToModifiers(long modifierBits) {
+            List<FilterFlag> list = new ArrayList<>();
+            boolean isPackage = true;
+            if (hasFlag(com.sun.tools.javac.code.Flags.PRIVATE, modifierBits)) {
+                list.add(FilterFlag.PRIVATE);
+                isPackage = false;
+            }
+            if (hasFlag(com.sun.tools.javac.code.Flags.PROTECTED, modifierBits)) {
+                list.add(FilterFlag.PROTECTED);
+                isPackage = false;
+            }
+            if (hasFlag(com.sun.tools.javac.code.Flags.PUBLIC, modifierBits)) {
+                list.add(FilterFlag.PUBLIC);
+                isPackage = false;
+            }
+            if (isPackage) {
+                list.add(FilterFlag.PACKAGE);
+            }
+            return list;
+        }
+
+        /**
+         * Filter on modifier bits.
+         *
+         * @param modifierBits Bits as specified in the Modifier class
+         *
+         * @return Whether the modifierBits pass this filter.
+         */
+        public boolean checkModifier(int modifierBits) {
+            return checkModifier(flagsToModifiers(modifierBits));
+        }
+
+        /**
+         * Filter on Filter flags
+         *
+         * @param modifiers Flags as specified in the FilterFlags enumeration.
+         *
+         * @return if the modifier is contained.
+         */
+        public boolean checkModifier(List<FilterFlag> modifiers) {
+            if (oneOf.contains(FilterFlag.PRIVATE)) {
+                return true;
+            }
+            for (FilterFlag mod : modifiers) {
+                if (oneOf.contains(mod)) {
+                    return true;
+                }
+            }
+            return false;
+        }
+
+    } // end ModifierFilter
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocClassFinder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,91 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+import java.util.EnumSet;
+
+import javax.tools.JavaFileObject;
+
+import com.sun.tools.javac.code.Symbol.PackageSymbol;
+import com.sun.tools.javac.code.ClassFinder;
+import com.sun.tools.javac.util.Context;
+
+/** Javadoc uses an extended class finder that records package.html entries
+ *
+ *  <p><b>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.</b>
+ *
+ *  @author Neal Gafter
+ */
+public class JavadocClassFinder extends ClassFinder {
+
+    public static JavadocClassFinder instance(Context context) {
+        ClassFinder instance = context.get(classFinderKey);
+        if (instance == null)
+            instance = new JavadocClassFinder(context);
+        return (JavadocClassFinder)instance;
+    }
+
+    public static void preRegister(Context context) {
+        context.put(classFinderKey, new Context.Factory<ClassFinder>() {
+            public ClassFinder make(Context c) {
+                return new JavadocClassFinder(c);
+            }
+        });
+    }
+
+    private DocEnv docenv;
+    private EnumSet<JavaFileObject.Kind> all = EnumSet.of(JavaFileObject.Kind.CLASS,
+                                                          JavaFileObject.Kind.SOURCE,
+                                                          JavaFileObject.Kind.HTML);
+    private EnumSet<JavaFileObject.Kind> noSource = EnumSet.of(JavaFileObject.Kind.CLASS,
+                                                               JavaFileObject.Kind.HTML);
+
+    public JavadocClassFinder(Context context) {
+        super(context);
+        docenv = DocEnv.instance(context);
+        preferSource = true;
+    }
+
+    /**
+     * Override getPackageFileKinds to include search for package.html
+     */
+    @Override
+    protected EnumSet<JavaFileObject.Kind> getPackageFileKinds() {
+        return docenv.docClasses ? noSource : all;
+    }
+
+    /**
+     * Override extraFileActions to check for package documentation
+     */
+    @Override
+    protected void extraFileActions(PackageSymbol pack, JavaFileObject fo) {
+        if (fo.isNameCompatible("package", JavaFileObject.Kind.HTML))
+            docenv.pkgToJavaFOMap.put(pack, fo);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocEnter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,109 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+import javax.tools.JavaFileObject;
+
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.comp.Enter;
+import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
+import com.sun.tools.javac.util.List;
+
+import static com.sun.tools.javac.code.Kinds.Kind.*;
+
+/**
+ *  Javadoc's own enter phase does a few things above and beyond that
+ *  done by javac.
+ *
+ *  <p><b>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.</b>
+ *
+ *  @author Neal Gafter
+ */
+public class JavadocEnter extends Enter {
+    public static JavadocEnter instance(Context context) {
+        Enter instance = context.get(enterKey);
+        if (instance == null)
+            instance = new JavadocEnter(context);
+        return (JavadocEnter)instance;
+    }
+
+    public static void preRegister(Context context) {
+        context.put(enterKey, new Context.Factory<Enter>() {
+               public Enter make(Context c) {
+                   return new JavadocEnter(c);
+               }
+        });
+    }
+
+    protected JavadocEnter(Context context) {
+        super(context);
+        messager = Messager.instance0(context);
+        docenv = DocEnv.instance(context);
+    }
+
+    final Messager messager;
+    final DocEnv docenv;
+
+    @Override
+    public void main(List<JCCompilationUnit> trees) {
+        // count all Enter errors as warnings.
+        int nerrors = messager.nerrors;
+        super.main(trees);
+        messager.nwarnings += (messager.nerrors - nerrors);
+        messager.nerrors = nerrors;
+    }
+
+    @Override
+    public void visitTopLevel(JCCompilationUnit tree) {
+        super.visitTopLevel(tree);
+        if (tree.sourcefile.isNameCompatible("package-info", JavaFileObject.Kind.SOURCE)) {
+            JCPackageDecl pd = tree.getPackage();
+            TreePath tp = pd == null ? docenv.getTreePath(tree) : docenv.getTreePath(tree, pd);
+            docenv.setElementToTreePath(tree.packge, tp);
+        }
+    }
+
+    @Override
+    public void visitClassDef(JCClassDecl tree) {
+        super.visitClassDef(tree);
+        if (tree.sym == null) return;
+        if (tree.sym.kind == TYP || tree.sym.kind == ERR) {
+            ClassSymbol c = tree.sym;
+            docenv.setElementToTreePath(c, docenv.getTreePath(env.toplevel, tree));
+        }
+    }
+
+    /** Don't complain about a duplicate class. */
+    @Override
+    protected void duplicateClass(DiagnosticPosition pos, ClassSymbol c) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocMemberEnter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,202 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.comp.MemberEnter;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.util.Context;
+
+import static com.sun.tools.javac.code.Flags.*;
+import static com.sun.tools.javac.code.Kinds.Kind.*;
+
+/**
+ *  Javadoc's own memberEnter phase does a few things above and beyond that
+ *  done by javac.
+ *
+ *  <p><b>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.</b>
+ *
+ *  @author Neal Gafter
+ */
+public class JavadocMemberEnter extends MemberEnter {
+    public static JavadocMemberEnter instance0(Context context) {
+        MemberEnter instance = context.get(memberEnterKey);
+        if (instance == null)
+            instance = new JavadocMemberEnter(context);
+        return (JavadocMemberEnter)instance;
+    }
+
+    public static void preRegister(Context context) {
+        context.put(memberEnterKey, new Context.Factory<MemberEnter>() {
+               public MemberEnter make(Context c) {
+                   return new JavadocMemberEnter(c);
+               }
+        });
+    }
+
+    final DocEnv docenv;
+
+    protected JavadocMemberEnter(Context context) {
+        super(context);
+        docenv = DocEnv.instance(context);
+    }
+
+    @Override
+    public void visitMethodDef(JCMethodDecl tree) {
+        super.visitMethodDef(tree);
+        MethodSymbol meth = tree.sym;
+        if (meth == null || meth.kind != MTH) return;
+        TreePath treePath = docenv.getTreePath(env.toplevel, env.enclClass, tree);
+        // do not add those methods that may be mandated by the spec,
+        // or those that are synthesized, thus if it does not exist in
+        // tree best to let other logic determine the TreePath.
+        if (env.enclClass.defs.contains(tree)) {
+            docenv.setElementToTreePath(meth, treePath);
+        }
+        // release resources
+        tree.body = null;
+    }
+
+    @Override
+    public void visitVarDef(JCVariableDecl tree) {
+        if (tree.init != null) {
+            boolean isFinal = (tree.mods.flags & FINAL) != 0
+                    || (env.enclClass.mods.flags & INTERFACE) != 0;
+            if (!isFinal || containsNonConstantExpression(tree.init)) {
+                // Avoid unnecessary analysis and release resources.
+                // In particular, remove non-constant expressions
+                // which may trigger Attr.attribClass, since
+                // method bodies are also removed, in visitMethodDef.
+                tree.init = null;
+            }
+        }
+        super.visitVarDef(tree);
+        if (tree.sym != null && tree.sym.kind == VAR && !isParameter(tree.sym)) {
+            docenv.setElementToTreePath(tree.sym, docenv.getTreePath(env.toplevel, env.enclClass, tree));
+        }
+    }
+
+    private static boolean isParameter(VarSymbol var) {
+        return (var.flags() & Flags.PARAMETER) != 0;
+    }
+
+    /**
+     * Simple analysis of an expression tree to see if it contains tree nodes
+     * for any non-constant expression. This does not include checking references
+     * to other fields which may or may not be constant.
+     */
+    private static boolean containsNonConstantExpression(JCExpression tree) {
+        return new MaybeConstantExpressionScanner().containsNonConstantExpression(tree);
+    }
+
+    /**
+     * See JLS 15.18, Constant Expression
+     */
+    private static class MaybeConstantExpressionScanner extends JCTree.Visitor {
+        boolean maybeConstantExpr = true;
+
+        public boolean containsNonConstantExpression(JCExpression tree) {
+            scan(tree);
+            return !maybeConstantExpr;
+        }
+
+        public void scan(JCTree tree) {
+            // short circuit scan when end result is definitely false
+            if (maybeConstantExpr && tree != null)
+                tree.accept(this);
+        }
+
+        @Override
+        /** default for any non-overridden visit method. */
+        public void visitTree(JCTree tree) {
+            maybeConstantExpr = false;
+        }
+
+        @Override
+        public void visitBinary(JCBinary tree) {
+            switch (tree.getTag()) {
+                case MUL: case DIV: case MOD:
+                case PLUS: case MINUS:
+                case SL: case SR: case USR:
+                case LT: case LE: case GT: case GE:
+                case EQ: case NE:
+                case BITAND: case BITXOR: case BITOR:
+                case AND: case OR:
+                    break;
+                default:
+                    maybeConstantExpr = false;
+            }
+        }
+
+        @Override
+        public void visitConditional(JCConditional tree) {
+            scan(tree.cond);
+            scan(tree.truepart);
+            scan(tree.falsepart);
+        }
+
+        @Override
+        public void visitIdent(JCIdent tree) { }
+
+        @Override
+        public void visitLiteral(JCLiteral tree) { }
+
+        @Override
+        public void visitParens(JCParens tree) {
+            scan(tree.expr);
+        }
+
+        @Override
+        public void visitSelect(JCTree.JCFieldAccess tree) {
+            scan(tree.selected);
+        }
+
+        @Override
+        public void visitTypeCast(JCTypeCast tree) {
+            scan(tree.clazz);
+            scan(tree.expr);
+        }
+
+        @Override
+        public void visitTypeIdent(JCPrimitiveTypeTree tree) { }
+
+        @Override
+        public void visitUnary(JCUnary tree) {
+            switch (tree.getTag()) {
+                case POS: case NEG: case COMPL: case NOT:
+                    break;
+                default:
+                    maybeConstantExpr = false;
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTodo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,64 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+import com.sun.tools.javac.comp.*;
+import com.sun.tools.javac.util.*;
+
+/**
+ *  Javadoc's own todo queue doesn't queue its inputs, as javadoc
+ *  doesn't perform attribution of method bodies or semantic checking.
+ *
+ *  <p><b>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.</b>
+ *
+ *  @author Neal Gafter
+ */
+public class JavadocTodo extends Todo {
+    public static void preRegister(Context context) {
+        context.put(todoKey, new Context.Factory<Todo>() {
+               public Todo make(Context c) {
+                   return new JavadocTodo(c);
+               }
+        });
+    }
+
+    protected JavadocTodo(Context context) {
+        super(context);
+    }
+
+    @Override
+    public void append(Env<AttrContext> e) {
+        // do nothing; Javadoc doesn't perform attribution.
+    }
+
+    @Override
+    public boolean offer(Env<AttrContext> e) {
+        return false;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/JavadocTool.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,412 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.HashSet;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileManager.Location;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+
+import com.sun.tools.javac.code.ClassFinder;
+import com.sun.tools.javac.code.Symbol.Completer;
+import com.sun.tools.javac.code.Symbol.CompletionFailure;
+import com.sun.tools.javac.comp.Enter;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import com.sun.tools.javac.tree.JCTree.JCCompilationUnit;
+import com.sun.tools.javac.util.Abort;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.ListBuffer;
+import com.sun.tools.javac.util.Position;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+
+/**
+ *  This class could be the main entry point for Javadoc when Javadoc is used as a
+ *  component in a larger software system. It provides operations to
+ *  construct a new javadoc processor, and to run it on a set of source
+ *  files.
+ *
+ *  <p><b>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.</b>
+ *
+ *  @author Neal Gafter
+ */
+public class JavadocTool extends com.sun.tools.javac.main.JavaCompiler {
+    DocEnv docenv;
+
+    final Messager messager;
+    final ClassFinder javadocFinder;
+    final Enter javadocEnter;
+    final Set<JavaFileObject> uniquefiles;
+
+    /**
+     * Construct a new JavaCompiler processor, using appropriately
+     * extended phases of the underlying compiler.
+     */
+    protected JavadocTool(Context context) {
+        super(context);
+        messager = Messager.instance0(context);
+        javadocFinder = JavadocClassFinder.instance(context);
+        javadocEnter = JavadocEnter.instance(context);
+        uniquefiles = new HashSet<>();
+    }
+
+    /**
+     * For javadoc, the parser needs to keep comments. Overrides method from JavaCompiler.
+     */
+    protected boolean keepComments() {
+        return true;
+    }
+
+    /**
+     *  Construct a new javadoc tool.
+     */
+    public static JavadocTool make0(Context context) {
+        Messager messager = null;
+        try {
+            // force the use of Javadoc's class finder
+            JavadocClassFinder.preRegister(context);
+
+            // force the use of Javadoc's own enter phase
+            JavadocEnter.preRegister(context);
+
+            // force the use of Javadoc's own member enter phase
+            JavadocMemberEnter.preRegister(context);
+
+            // force the use of Javadoc's own todo phase
+            JavadocTodo.preRegister(context);
+
+            // force the use of Messager as a Log
+            messager = Messager.instance0(context);
+
+            return new JavadocTool(context);
+        } catch (CompletionFailure ex) {
+            messager.error(Position.NOPOS, ex.getMessage());
+            return null;
+        }
+    }
+
+    public DocletEnvironment getEnvironment(String encoding,
+                                      String showAccess,
+                                      String overviewpath,
+                                      List<String> args,
+                                      Iterable<? extends JavaFileObject> fileObjects,
+                                      List<String> subPackages,
+                                      List<String> excludedPackages,
+                                      boolean docClasses,
+                                      boolean quiet) throws IOException {
+        docenv = DocEnv.instance(context);
+        docenv.intialize(encoding, showAccess, overviewpath, args, fileObjects,
+                         subPackages, excludedPackages, docClasses, quiet);
+
+        javadocFinder.sourceCompleter = docClasses ? Completer.NULL_COMPLETER : sourceCompleter;
+
+        if (docClasses) {
+            // If -Xclasses is set, the args should be a series of class names
+            for (String arg: args) {
+                if (!isValidPackageName(arg)) // checks
+                    docenv.error(null, "main.illegal_class_name", arg);
+            }
+            if (messager.nerrors() != 0) {
+                return null;
+            }
+            return new RootDocImpl(docenv, args);
+        }
+
+        ListBuffer<JCCompilationUnit> classTrees = new ListBuffer<>();
+        Set<String> includedPackages = new LinkedHashSet<>();
+
+        try {
+            StandardJavaFileManager fm = docenv.fileManager instanceof StandardJavaFileManager
+                    ? (StandardJavaFileManager) docenv.fileManager : null;
+            Set<String> packageNames = new LinkedHashSet<>();
+            // Normally, the args should be a series of package names or file names.
+            // Parse the files and collect the package names.
+            for (String arg: args) {
+                if (fm != null && arg.endsWith(".java") && new File(arg).exists()) {
+                    parse(fm.getJavaFileObjects(arg), classTrees, true);
+                } else if (isValidPackageName(arg)) {
+                    packageNames.add(arg);
+                } else if (arg.endsWith(".java")) {
+                    if (fm == null)
+                        throw new IllegalArgumentException();
+                    else
+                        docenv.error(null, "main.file_not_found", arg);
+                } else {
+                    docenv.error(null, "main.illegal_package_name", arg);
+                }
+            }
+
+            // Parse file objects provide via the DocumentationTool API
+            parse(fileObjects, classTrees, true);
+
+            // Build up the complete list of any packages to be documented
+            Location location = docenv.fileManager.hasLocation(StandardLocation.SOURCE_PATH)
+                ? StandardLocation.SOURCE_PATH : StandardLocation.CLASS_PATH;
+
+            PackageTable t = new PackageTable(docenv.fileManager, location)
+                    .packages(packageNames)
+                    .subpackages(subPackages, excludedPackages);
+
+            includedPackages = t.getIncludedPackages();
+
+            // Parse the files in the packages to be documented
+            ListBuffer<JCCompilationUnit> packageTrees = new ListBuffer<>();
+            for (String packageName: includedPackages) {
+                List<JavaFileObject> files = t.getFiles(packageName);
+                docenv.notice("main.Loading_source_files_for_package", packageName);
+                if (files.isEmpty())
+                    docenv.warning("main.no_source_files_for_package", packageName);
+                parse(files, packageTrees, false);
+            }
+
+            if (messager.nerrors() != 0) {
+                return null;
+            }
+
+            // Enter symbols for all files
+            docenv.notice("main.Building_tree");
+            javadocEnter.main(classTrees.toList().appendList(packageTrees.toList()));
+        } catch (Abort ex) {}
+
+        if (messager.nerrors() != 0)
+            return null;
+        docenv.root = new RootDocImpl(docenv, listClasses(classTrees.toList()),
+                                      new ArrayList<>(includedPackages));
+        return docenv.root;
+    }
+
+    /** Is the given string a valid package name? */
+    boolean isValidPackageName(String s) {
+        int index;
+        while ((index = s.indexOf('.')) != -1) {
+            if (!isValidClassName(s.substring(0, index))) return false;
+            s = s.substring(index+1);
+        }
+        return isValidClassName(s);
+    }
+
+    private void parse(Iterable<? extends JavaFileObject> files, ListBuffer<JCCompilationUnit> trees,
+                       boolean trace) {
+        for (JavaFileObject fo: files) {
+            if (uniquefiles.add(fo)) { // ignore duplicates
+                if (trace)
+                    docenv.notice("main.Loading_source_file", fo.getName());
+                trees.append(parse(fo));
+            }
+        }
+    }
+
+    /** Are surrogates supported?
+     */
+    final static boolean surrogatesSupported = surrogatesSupported();
+    private static boolean surrogatesSupported() {
+        try {
+            boolean b = Character.isHighSurrogate('a');
+            return true;
+        } catch (NoSuchMethodError ex) {
+            return false;
+        }
+    }
+
+    /**
+     * Return true if given file name is a valid class name
+     * (including "package-info").
+     * @param s the name of the class to check.
+     * @return true if given class name is a valid class name
+     * and false otherwise.
+     */
+    public static boolean isValidClassName(String s) {
+        if (s.length() < 1) return false;
+        if (s.equals("package-info")) return true;
+        if (surrogatesSupported) {
+            int cp = s.codePointAt(0);
+            if (!Character.isJavaIdentifierStart(cp))
+                return false;
+            for (int j=Character.charCount(cp); j<s.length(); j+=Character.charCount(cp)) {
+                cp = s.codePointAt(j);
+                if (!Character.isJavaIdentifierPart(cp))
+                    return false;
+            }
+        } else {
+            if (!Character.isJavaIdentifierStart(s.charAt(0)))
+                return false;
+            for (int j=1; j<s.length(); j++)
+                if (!Character.isJavaIdentifierPart(s.charAt(j)))
+                    return false;
+        }
+        return true;
+    }
+
+    /**
+     * From a list of top level trees, return the list of contained class definitions
+     */
+    List<JCClassDecl> listClasses(List<JCCompilationUnit> trees) {
+        List<JCClassDecl> result = new ArrayList<>();
+        for (JCCompilationUnit t : trees) {
+            for (JCTree def : t.defs) {
+                if (def.hasTag(JCTree.Tag.CLASSDEF))
+                    result.add((JCClassDecl)def);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * A table to manage included and excluded packages.
+     */
+    static class PackageTable {
+        private final Map<String, Entry> entries = new LinkedHashMap<>();
+        private final Set<String> includedPackages = new LinkedHashSet<>();
+        private final JavaFileManager fm;
+        private final Location location;
+        private final Set<JavaFileObject.Kind> sourceKinds = EnumSet.of(JavaFileObject.Kind.SOURCE);
+
+        /**
+         * Creates a table to manage included and excluded packages.
+         * @param fm The file manager used to locate source files
+         * @param locn the location used to locate source files
+         */
+        PackageTable(JavaFileManager fm, Location locn) {
+            this.fm = fm;
+            this.location = locn;
+            getEntry("").excluded = false;
+        }
+
+        PackageTable packages(Collection<String> packageNames) {
+            includedPackages.addAll(packageNames);
+            return this;
+        }
+
+        PackageTable subpackages(Collection<String> packageNames, Collection<String> excludePackageNames)
+                throws IOException {
+            for (String p: excludePackageNames) {
+                getEntry(p).excluded = true;
+            }
+
+            for (String packageName: packageNames) {
+                for (JavaFileObject fo: fm.list(location, packageName, sourceKinds, true)) {
+                    String binaryName = fm.inferBinaryName(location, fo);
+                    String pn = getPackageName(binaryName);
+                    String simpleName = getSimpleName(binaryName);
+                    Entry e = getEntry(pn);
+                    if (!e.isExcluded() && isValidClassName(simpleName)) {
+                        includedPackages.add(pn);
+                        e.files = (e.files == null
+                                ? com.sun.tools.javac.util.List.of(fo)
+                                : e.files.prepend(fo));
+                    }
+                }
+            }
+            return this;
+        }
+
+        /**
+         * Returns the aggregate set of included packages.
+         * @return the aggregate set of included packages
+         */
+        Set<String> getIncludedPackages() {
+            return includedPackages;
+        }
+
+        /**
+         * Returns the set of source files for a package.
+         * @param packageName the specified package
+         * @return the set of file objects for the specified package
+         * @throws IOException if an error occurs while accessing the files
+         */
+        List<JavaFileObject> getFiles(String packageName) throws IOException {
+            Entry e = getEntry(packageName);
+            // The files may have been found as a side effect of searching for subpackages
+            if (e.files != null)
+                return e.files;
+
+            ListBuffer<JavaFileObject> lb = new ListBuffer<>();
+            for (JavaFileObject fo: fm.list(location, packageName, sourceKinds, false)) {
+                String binaryName = fm.inferBinaryName(location, fo);
+                String simpleName = getSimpleName(binaryName);
+                if (isValidClassName(simpleName)) {
+                    lb.append(fo);
+                }
+            }
+
+            return lb.toList();
+        }
+
+
+        private Entry getEntry(String name) {
+            Entry e = entries.get(name);
+            if (e == null)
+                entries.put(name, e = new Entry(name));
+            return e;
+        }
+
+        private String getPackageName(String name) {
+            int lastDot = name.lastIndexOf(".");
+            return (lastDot == -1 ? "" : name.substring(0, lastDot));
+        }
+
+        private String getSimpleName(String name) {
+            int lastDot = name.lastIndexOf(".");
+            return (lastDot == -1 ? name : name.substring(lastDot + 1));
+        }
+
+        class Entry {
+            final String name;
+            Boolean excluded;
+            com.sun.tools.javac.util.List<JavaFileObject> files;
+
+            Entry(String name) {
+                this.name = name;
+            }
+
+            boolean isExcluded() {
+                if (excluded == null)
+                    excluded = getEntry(getPackageName(name)).isExcluded();
+                return excluded;
+            }
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2000, 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 jdk.javadoc.internal.tool;
+
+import java.io.PrintWriter;
+
+/**
+ * Provides external entry points (tool and programmatic) for the javadoc program.
+ *
+ *  <p><b>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.</b>
+ */
+
+public class Main {
+
+    /**
+     * Constructor should never be called.
+     */
+    private Main() {}
+
+    /**
+     * The main entry point called by the launcher. This will call
+     * System.exit with an appropriate return value.
+     *
+     * @param args The command line parameters.
+     */
+    public static void main(String... args) {
+        System.exit(execute(args));
+    }
+
+    /**
+     * Programmatic interface.
+     *
+     * @param args The command line parameters.
+     * @return The return code.
+     */
+    public static int execute(String... args) {
+        // NOTE: the following should be removed when the old doclet
+        // is removed.
+        if (args != null && args.length > 0 && "-Xold".equals(args[0])) {
+            String[] nargs = new String[args.length - 1];
+            System.arraycopy(args, 1, nargs, 0, nargs.length);
+            return com.sun.tools.javadoc.Main.execute(nargs);
+        }
+        Start jdoc = new Start();
+        return jdoc.begin(args);
+    }
+
+    /**
+     * Programmatic interface.
+     *
+     * @param writer PrintWriter to receive notice messages.
+     * @param args The command line parameters.
+     * @return The return code.
+     */
+    public static int execute(String[] args, PrintWriter writer) {
+        Start jdoc = new Start(writer);
+        return jdoc.begin(args);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Messager.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,445 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+
+import java.io.PrintWriter;
+import java.util.Locale;
+import java.util.ResourceBundle;
+
+import javax.lang.model.element.Element;
+import javax.tools.Diagnostic.Kind;
+
+import jdk.javadoc.doclet.Reporter;
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.util.DocSourcePositions;
+import com.sun.source.util.DocTreePath;
+import com.sun.source.util.TreePath;
+import com.sun.tools.javac.api.JavacTrees;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticType;
+import com.sun.tools.javac.util.JavacMessages;
+import com.sun.tools.javac.util.Log;
+
+/**
+ * Utility for integrating with javadoc tools and for localization.
+ * Handle Resources. Access to error and warning counts.
+ * Message formatting.
+ * <br>
+ * Also provides implementation for DocErrorReporter.
+ *
+ *  <p><b>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.</b>
+ *
+ * @see java.util.ResourceBundle
+ * @see java.text.MessageFormat
+ * @author Neal Gafter (rewrite)
+ */
+public class Messager extends Log implements Reporter {
+    final Context context;
+
+    /** Get the current messager, which is also the compiler log. */
+    public static Messager instance0(Context context) {
+        Log instance = context.get(logKey);
+        if (instance == null || !(instance instanceof Messager))
+            throw new InternalError("no messager instance!");
+        return (Messager)instance;
+    }
+
+    public static void preRegister(Context context,
+                                   final String programName) {
+        context.put(logKey, new Context.Factory<Log>() {
+            public Log make(Context c) {
+                return new Messager(c, programName);
+            }
+        });
+    }
+
+    public static void preRegister(Context context, final String programName,
+            final PrintWriter outWriter, final PrintWriter errWriter) {
+        context.put(logKey, new Context.Factory<Log>() {
+            public Log make(Context c) {
+                return new Messager(c, programName, outWriter, errWriter);
+            }
+        });
+    }
+
+    @Override
+    public void print(Kind kind, String msg) {
+        switch (kind) {
+            case ERROR:
+                printError(msg);
+                return;
+            case WARNING:
+            case MANDATORY_WARNING:
+                printWarning(msg);
+                return;
+            default:
+                printNotice(msg);
+                return;
+        }
+    }
+
+    @Override
+    public void print(Kind kind, DocTreePath path, String msg) {
+        switch (kind) {
+            case ERROR:
+                printError(path, msg);
+                return;
+            case WARNING:
+            case MANDATORY_WARNING:
+                printWarning(path, msg);
+                return;
+            default:
+                printWarning(path, msg);
+                return;
+        }
+    }
+
+    @Override
+    public void print(Kind kind, Element e, String msg) {
+                switch (kind) {
+            case ERROR:
+                printError(e, msg);
+                return;
+            case WARNING:
+            case MANDATORY_WARNING:
+                printWarning(e, msg);
+                return;
+            default:
+                printWarning(e, msg);
+                return;
+        }
+    }
+
+    public class ExitJavadoc extends Error {
+        private static final long serialVersionUID = 0;
+    }
+
+    final String programName;
+
+    private Locale locale;
+    private final JavacMessages messages;
+    private final JCDiagnostic.Factory javadocDiags;
+
+    /** The default writer for diagnostics
+     */
+    static final PrintWriter defaultOutWriter = new PrintWriter(System.out);
+    static final PrintWriter defaultErrWriter = new PrintWriter(System.err);
+
+    /**
+     * Constructor
+     * @param programName  Name of the program (for error messages).
+     */
+    public Messager(Context context, String programName) {
+        this(context, programName, defaultOutWriter, defaultErrWriter);
+    }
+
+    /**
+     * Constructor
+     * @param programName  Name of the program (for error messages).
+     * @param outWriter    Stream for notices etc.
+     * @param errWriter    Stream for errors and warnings
+     */
+    @SuppressWarnings("deprecation")
+    public Messager(Context context, String programName, PrintWriter outWriter, PrintWriter errWriter) {
+        super(context, errWriter, errWriter, outWriter);
+        messages = JavacMessages.instance(context);
+        messages.add(locale -> ResourceBundle.getBundle("jdk.javadoc.internal.tool.resources.javadoc",
+                                                         locale));
+        javadocDiags = new JCDiagnostic.Factory(messages, "javadoc");
+        this.programName = programName;
+        this.context = context;
+        locale = Locale.getDefault();
+    }
+
+    public void setLocale(Locale locale) {
+        this.locale = locale;
+    }
+
+    /**
+     * get and format message string from resource
+     *
+     * @param key selects message from resource
+     * @param args arguments for the message
+     */
+    String getText(String key, Object... args) {
+        return messages.getLocalizedString(locale, key, args);
+    }
+
+    private String getDiagSource(DocTreePath path) {
+        if (path == null) {
+            return programName;
+        }
+        JavacTrees trees = JavacTrees.instance(context);
+        DocSourcePositions sourcePositions = trees.getSourcePositions();
+        CompilationUnitTree cu = path.getTreePath().getCompilationUnit();
+        long spos = sourcePositions.getStartPosition(cu, path.getDocComment(), path.getLeaf());
+        long lineNumber = cu.getLineMap().getLineNumber(spos);
+        String fname = cu.getSourceFile().getName();
+        String posString = fname + ":" + lineNumber;
+        return posString;
+    }
+
+    private String getDiagSource(Element e) {
+        if (e == null) {
+            return programName;
+        }
+        JavacTrees trees = JavacTrees.instance(context);
+        TreePath path = trees.getPath(e);
+        DocSourcePositions sourcePositions = trees.getSourcePositions();
+        JCTree tree = trees.getTree(e);
+        CompilationUnitTree cu = path.getCompilationUnit();
+        long spos = sourcePositions.getStartPosition(cu, tree);
+        long lineNumber = cu.getLineMap().getLineNumber(spos);
+        String fname = cu.getSourceFile().getName();
+        String posString = fname + ":" + lineNumber;
+        return posString;
+    }
+
+    /**
+     * Print error message, increment error count.
+     * Part of DocErrorReporter.
+     *
+     * @param msg message to print
+     */
+    public void printError(String msg) {
+        printError((DocTreePath)null, msg);
+    }
+
+    public void printError(DocTreePath path, String msg) {
+        String prefix = getDiagSource(path);
+        if (diagListener != null) {
+            report(DiagnosticType.ERROR, prefix, msg);
+            return;
+        }
+        incrementErrorCount(prefix, msg);
+    }
+
+    public void printError(Element e, String msg) {
+        String prefix = getDiagSource(e);
+        if (diagListener != null) {
+            report(DiagnosticType.ERROR, prefix, msg);
+            return;
+        }
+        incrementErrorCount(prefix, msg);
+    }
+
+    private void incrementErrorCount(String prefix, String msg) {
+        if (nerrors < MaxErrors) {
+            errWriter.println(prefix + ": " + getText("javadoc.error") + " - " + msg);
+            errWriter.flush();
+            prompt();
+            nerrors++;
+        }
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     * Part of DocErrorReporter.
+     *
+     * @param msg message to print
+     */
+    public void printWarning(String msg) {
+        printWarning((DocTreePath)null, msg);
+    }
+
+    public void printWarning(DocTreePath path, String msg) {
+        String prefix = getDiagSource(path);
+        if (diagListener != null) {
+            report(DiagnosticType.WARNING, prefix, msg);
+            return;
+        }
+        incrementWarningCount(prefix, msg);
+    }
+
+    public void printWarning(Element e, String msg) {
+        String prefix = getDiagSource(e);
+        if (diagListener != null) {
+            report(DiagnosticType.WARNING, prefix, msg);
+            return;
+        }
+        incrementWarningCount(prefix, msg);
+    }
+
+    private void incrementWarningCount(String prefix, String msg) {
+        if (nwarnings < MaxWarnings) {
+            warnWriter.println(prefix + ": " + getText("javadoc.warning") + " - " + msg);
+            warnWriter.flush();
+            nwarnings++;
+        }
+    }
+
+    /**
+     * Print a message.
+     * Part of DocErrorReporter.
+     *
+     * @param msg message to print
+     */
+    public void printNotice(String msg) {
+        printNotice((DocTreePath)null, msg);
+    }
+
+    public void printNotice(DocTreePath path, String msg) {
+        String prefix = getDiagSource(path);
+        if (diagListener != null) {
+            report(DiagnosticType.NOTE, null, prefix + ": " + msg);
+            return;
+        }
+
+        if (path == null) {
+            noticeWriter.println(msg);
+        } else {
+            noticeWriter.println(prefix + ": " + msg);
+        }
+        noticeWriter.flush();
+    }
+
+    public void printNotice(Element e, String msg) {
+        String pos = getDiagSource(e);
+        if (diagListener != null) {
+            report(DiagnosticType.NOTE, pos, msg);
+            return;
+        }
+
+        if (e == null) {
+            noticeWriter.println(msg);
+        } else {
+            noticeWriter.println(pos + ": " + msg);
+        }
+        noticeWriter.flush();
+    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param key selects message from resource
+     */
+    public void error(Element e, String key, Object... args) {
+        printError(e, getText(key, args));
+    }
+
+    /**
+     * Print error message, increment error count.
+     *
+     * @param key selects message from resource
+     */
+    public void error(DocTreePath path, String key, Object... args) {
+        printError(path, getText(key, args));
+    }
+
+    public void error(String key, Object... args) {
+        printError((Element)null, getText(key, args));
+    }
+
+    public void warning(String key, Object... args) {
+        printWarning((Element)null, getText(key, args));
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param key selects message from resource
+     */
+    public void warning(Element e, String key, Object... args) {
+        printWarning(e, getText(key, args));
+    }
+
+    /**
+     * Print warning message, increment warning count.
+     *
+     * @param key selects message from resource
+     */
+    public void warning(DocTreePath path, String key, Object... args) {
+        printWarning(path, getText(key, args));
+    }
+
+    /**
+     * Print a message.
+     *
+     * @param key selects message from resource
+     */
+    public void notice(String key, Object... args) {
+        printNotice(getText(key, args));
+    }
+
+    /**
+     * Return total number of errors, including those recorded
+     * in the compilation log.
+     */
+    public int nerrors() { return nerrors; }
+
+    /**
+     * Return total number of warnings, including those recorded
+     * in the compilation log.
+     */
+    public int nwarnings() { return nwarnings; }
+
+    /**
+     * Print exit message.
+     */
+    public void exitNotice() {
+        if (nerrors > 0) {
+            notice((nerrors > 1) ? "main.errors" : "main.error",
+                   "" + nerrors);
+        }
+        if (nwarnings > 0) {
+            notice((nwarnings > 1) ?  "main.warnings" : "main.warning",
+                   "" + nwarnings);
+        }
+    }
+
+    /**
+     * Force program exit, e.g., from a fatal error.
+     * <p>
+     * TODO: This method does not really belong here.
+     */
+    public void exit() {
+        throw new ExitJavadoc();
+    }
+
+    private void report(DiagnosticType type, String pos, String msg) {
+        switch (type) {
+            case ERROR:
+            case WARNING:
+                Object prefix = (pos == null) ? programName : pos;
+                report(javadocDiags.create(type, null, null, "msg", prefix, msg));
+                break;
+
+            case NOTE:
+                String key = (pos == null) ? "msg" : "pos.msg";
+                report(javadocDiags.create(type, null, null, key, pos, msg));
+                break;
+
+            default:
+                throw new IllegalArgumentException(type.toString());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/RootDocImpl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,304 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.PackageElement;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+import javax.lang.model.util.Types;
+import javax.tools.JavaFileManager;
+
+import com.sun.source.util.DocTrees;
+import com.sun.tools.javac.code.Source;
+import com.sun.tools.javac.tree.JCTree.JCClassDecl;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+/**
+ * This class holds the information from one run of javadoc.
+ * Particularly the packages, classes and options specified
+ * by the user.
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Atul M Dambalkar
+ * @author Neal Gafter (rewrite)
+ */
+public class RootDocImpl implements DocletEnvironment {
+
+    /**
+     * list of classes specified on the command line.
+     */
+    private Set<TypeElement> cmdLineClasses;
+
+    /**
+     * list of packages specified on the command line.
+     */
+    private  Set<PackageElement> cmdLinePackages;
+
+    public final DocEnv env;
+
+    /**
+     * Constructor used when reading source files.
+     *
+     * @param env the documentation environment, state for this javadoc run
+     * @param classes list of classes specified on the commandline
+     * @param packages list of package names specified on the commandline
+     */
+    public RootDocImpl(DocEnv env, List<JCClassDecl> classes, List<String> packages) {
+        this.env = env;
+        setPackages(env, packages);
+        setClasses(env, classes);
+    }
+
+    /**
+     * Constructor used when reading class files.
+     *
+     * @param env the documentation environment, state for this javadoc run
+     * @param classes list of class names specified on the commandline
+     */
+    public RootDocImpl(DocEnv env, List<String> classes) {
+        //super(env, null);
+        this.env = env;
+
+        Set<TypeElement> classList = new LinkedHashSet<>();
+        for (String className : classes) {
+            TypeElement c = env.loadClass(className);
+            if (c == null)
+                env.error(null, "javadoc.class_not_found", className);
+            else
+                classList.add(c);
+        }
+        cmdLineClasses = classList;
+    }
+
+    /**
+     * Initialize classes information. Those classes are input from
+     * command line.
+     *
+     * @param env the compilation environment
+     * @param classes a list of ClassDeclaration
+     */
+    private void setClasses(DocEnv env, List<JCClassDecl> classes) {
+        Set<TypeElement> result = new LinkedHashSet<>();
+        classes.stream().filter((def) -> (env.shouldDocument(def.sym))).forEach((def) -> {
+            TypeElement te = (TypeElement)def.sym;
+            if (te != null) {
+                env.setIncluded((Element)def.sym);
+                result.add(te);
+            }
+        });
+        cmdLineClasses = Collections.unmodifiableSet(result);
+    }
+
+    /**
+     * Initialize packages information.
+     *
+     * @param env the compilation environment
+     * @param packages a list of package names (String)
+     */
+    private void setPackages(DocEnv env, List<String> packages) {
+        Set<PackageElement> packlist = new LinkedHashSet<>();
+        packages.stream().forEach((name) -> {
+            PackageElement pkg =  getElementUtils().getPackageElement(name);
+            if (pkg != null) {
+                env.setIncluded(pkg);
+                packlist.add(pkg);
+            } else {
+                env.warning("main.no_source_files_for_package", name);
+            }
+        });
+        cmdLinePackages = Collections.unmodifiableSet(packlist);
+    }
+
+    /**
+     * Packages specified on the command line.
+     */
+    public Set<PackageElement> specifiedPackages() {
+        return cmdLinePackages;
+    }
+
+    /**
+     * Classes and interfaces specified on the command line,
+     * including their inner classes
+     */
+    public Set<TypeElement> specifiedClasses() {
+       Set<TypeElement> out = new LinkedHashSet<>();
+       cmdLineClasses.stream().forEach((te) -> {
+            env.addAllClasses(out, te, true);
+        });
+       return out;
+    }
+
+    private Set<TypeElement> classesToDocument = null;
+    /**
+     * Return all classes and interfaces (including those inside
+     * packages) to be documented.
+     */
+    public Set<TypeElement> getIncludedClasses() {
+        if (classesToDocument == null) {
+            Set<TypeElement> classes = new LinkedHashSet<>();
+
+            cmdLineClasses.stream().forEach((te) -> {
+                env.addAllClasses(classes, te, true);
+            });
+            cmdLinePackages.stream().forEach((pkg) -> {
+                env.addAllClasses(classes, pkg);
+            });
+            classesToDocument = Collections.unmodifiableSet(classes);
+        }
+        return classesToDocument;
+    }
+
+    /**
+     * Return the name of this  item.
+     *
+     * @return the string <code>"*RootDocImpl*"</code>.
+     */
+    public String name() {
+        return "*RootDocImpl*";
+    }
+
+    /**
+     * Return the name of this Doc item.
+     *
+     * @return the string <code>"*RootDocImpl*"</code>.
+     */
+    public String qualifiedName() {
+        return "*RootDocImpl*";
+    }
+
+    /**
+     * Return true if this Element is included in the active set.
+     * RootDocImpl isn't even a program entity so it is always false.
+     */
+    @Override
+    public boolean isIncluded(Element e) {
+        return env.isIncluded(e);
+    }
+
+//    Note: these reporting methods are no longer used.
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param msg message to print
+//     */
+//    public void printError(String msg) {
+//        env.printError(msg);
+//    }
+//
+//    /**
+//     * Print error message, increment error count.
+//     *
+//     * @param msg message to print
+//     */
+//    public void printError(DocTreePath path, String msg) {
+//        env.printError(path, msg);
+//    }
+//
+//    public void printError(Element e, String msg) {
+//        env.printError(e, msg);
+//    }
+//
+//    public void printWarning(Element e, String msg) {
+//        env.printWarning(e, msg);
+//    }
+//
+//    public void printNotice(Element e, String msg) {
+//       env.printNotice(e, msg);
+//    }
+//
+//    /**
+//     * Print warning message, increment warning count.
+//     *
+//     * @param msg message to print
+//     */
+//    public void printWarning(String msg) {
+//        env.printWarning(msg);
+//    }
+
+    /**
+     * Return the current file manager.
+     */
+    public JavaFileManager getFileManager() {
+        return env.fileManager;
+    }
+
+    @Override
+    public DocTrees getDocTrees() {
+        return env.docTrees;
+    }
+
+    @Override
+    public Elements getElementUtils() {
+        return env.elements;
+    }
+
+    @Override
+    public List<Element> getSelectedElements(List<? extends Element> elements) {
+        return elements.stream()
+                .filter(e -> isIncluded(e))
+                .collect(Collectors.toList());
+    }
+
+    @Override
+    public Set<Element> getSpecifiedElements() {
+        Set<Element> out = new LinkedHashSet<>();
+        specifiedPackages().stream().forEach((pe) -> {
+            out.add(pe);
+        });
+        specifiedClasses().stream().forEach((e) -> {
+            out.add(e);
+        });
+        return out;
+    }
+
+    @Override
+    public Types getTypeUtils() {
+        return env.typeutils;
+    }
+
+    @Override
+    public JavaFileManager getJavaFileManager() {
+        return env.fileManager;
+    }
+
+    @Override
+    public SourceVersion getSourceVersion() {
+        return Source.toSourceVersion(env.source);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,666 @@
+/*
+ * 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 jdk.javadoc.internal.tool;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.nio.file.Path;
+import java.text.BreakIterator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Objects;
+import java.util.Set;
+import static javax.tools.DocumentationTool.Location.*;
+import javax.tools.JavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+
+import com.sun.tools.javac.api.JavacTrees;
+import com.sun.tools.javac.file.BaseFileManager;
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.main.CommandLine;
+import com.sun.tools.javac.platform.PlatformDescription;
+import com.sun.tools.javac.platform.PlatformUtils;
+import com.sun.tools.javac.util.ClientCodeException;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Log;
+import com.sun.tools.javac.util.Options;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Doclet.Option;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+import static com.sun.tools.javac.main.Option.*;
+/**
+ * Main program of Javadoc.
+ * Previously named "Main".
+ *
+ *  <p><b>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.</b>
+ *
+ * @author Robert Field
+ * @author Neal Gafter (rewrite)
+ */
+public class Start extends ToolOption.Helper {
+    /** Context for this invocation. */
+    private final Context context;
+
+    private static final String ProgramName = "javadoc";
+
+    // meaning we allow all visibility of PROTECTED and PUBLIC
+    private static final String defaultModifier = "protected";
+
+    private Messager messager;
+
+    private final String docletName;
+
+    private final ClassLoader classLoader;
+
+    private Class<?> docletClass;
+
+    private Doclet doclet;
+
+    // used to determine the locale for the messager
+    private Locale locale;
+
+
+    /**
+     * In API mode, exceptions thrown while calling the doclet are
+     * propagated using ClientCodeException.
+     */
+    private boolean apiMode;
+
+    private JavaFileManager fileManager;
+
+    Start() {
+        this(null, null, null, null, null);
+    }
+
+    Start(PrintWriter writer) {
+        this(null, null, writer, null, null);
+    }
+
+    Start(Context context, String programName, PrintWriter writer,
+            String docletName, ClassLoader classLoader) {
+        this.context = context == null ? new Context() : context;
+        String pname = programName == null ? ProgramName : programName;
+        this.messager = writer == null
+                ? new Messager(this.context, pname)
+                : new Messager(this.context, pname, writer, writer);
+        this.docletName = docletName;
+        this.classLoader = classLoader;
+        this.docletClass = null;
+        this.locale = Locale.getDefault();
+    }
+
+    public Start(Context context) {
+        this.docletClass = null;
+        this.context = Objects.requireNonNull(context);
+        this.apiMode = true;
+        this.docletName = null;
+        this.classLoader = null;
+        this.locale = Locale.getDefault();
+    }
+
+    void initMessager() {
+        if (!apiMode)
+            return;
+        if (messager == null) {
+            Log log = context.get(Log.logKey);
+            if (log instanceof Messager) {
+                messager = (Messager) log;
+            } else {
+                PrintWriter out = context.get(Log.outKey);
+                messager = (out == null)
+                        ? new Messager(context, ProgramName)
+                        : new Messager(context, ProgramName, out, out);
+            }
+        }
+    }
+
+    /**
+     * Usage
+     */
+    @Override
+    void usage() {
+        usage(true);
+    }
+
+    void usage(boolean exit) {
+        usage("main.usage", "-help", null, exit);
+    }
+
+    @Override
+    void Xusage() {
+        Xusage(true);
+    }
+
+    void Xusage(boolean exit) {
+        usage("main.Xusage", "-X", "main.Xusage.foot", exit);
+    }
+
+    private void usage(String main, String option, String foot, boolean exit) {
+        messager.notice(main);
+        // let doclet print usage information (does nothing on error)
+        if (docletClass != null) {
+            String name = doclet.getName();
+            Set<Option> supportedOptions = doclet.getSupportedOptions();
+            messager.notice("main.doclet.usage.header", name);
+            Option.Kind myKind = option.equals("-X")
+                    ? Option.Kind.EXTENDED
+                    : Option.Kind.STANDARD;
+            supportedOptions.stream()
+                    .filter(opt -> opt.getKind() == myKind)
+                    .forEach(opt -> messager.printNotice(opt.toString()));
+        }
+        if (foot != null)
+            messager.notice(foot);
+
+        if (exit) exit();
+    }
+
+    /**
+     * Exit
+     */
+    private void exit() {
+        messager.exit();
+    }
+
+    /**
+     * Main program - external wrapper
+     */
+    int begin(String... argv) {
+        // Preprocess @file arguments
+        try {
+            argv = CommandLine.parse(argv);
+        } catch (FileNotFoundException e) {
+            messager.error("main.cant.read", e.getMessage());
+            exit();
+        } catch (IOException e) {
+            e.printStackTrace(System.err);
+            exit();
+        }
+
+        List<String> argList = Arrays.asList(argv);
+        boolean ok = begin(argList, Collections.<JavaFileObject> emptySet());
+        return ok ? 0 : 1;
+    }
+
+    // Called by 199 API.
+    public boolean begin(Class<?> docletClass,
+            Iterable<String> options,
+            Iterable<? extends JavaFileObject> fileObjects) {
+        this.docletClass = docletClass;
+        List<String> opts = new ArrayList<>();
+        for (String opt: options)
+            opts.add(opt);
+        return begin(opts, fileObjects);
+    }
+
+    private boolean begin(List<String> options, Iterable<? extends JavaFileObject> fileObjects) {
+
+        fileManager = context.get(JavaFileManager.class);
+        if (fileManager == null) {
+            JavacFileManager.preRegister(context);
+            fileManager = context.get(JavaFileManager.class);
+            if (fileManager instanceof BaseFileManager) {
+                ((BaseFileManager) fileManager).autoClose = true;
+            }
+        }
+        // locale and doclet needs to be determined first
+        docletClass = preProcess(fileManager, options);
+
+        if (jdk.javadoc.doclet.Doclet.class.isAssignableFrom(docletClass)) {
+            // no need to dispatch to old, safe to init now
+            initMessager();
+            messager.setLocale(locale);
+            try {
+                doclet = (Doclet) docletClass.newInstance();
+            } catch (InstantiationException | IllegalAccessException exc) {
+                if (!apiMode) {
+                    error("main.could_not_instantiate_class", docletClass);
+                    messager.exit();
+                }
+                throw new ClientCodeException(exc);
+            }
+        } else {
+            if (this.apiMode) {
+                com.sun.tools.javadoc.Start ostart
+                        = new com.sun.tools.javadoc.Start(context);
+                return ostart.begin(docletClass, options, fileObjects);
+            }
+            String[] array = options.toArray(new String[options.size()]);
+            return com.sun.tools.javadoc.Main.execute(array) == 0;
+        }
+
+        boolean failed = false;
+        try {
+            failed = !parseAndExecute(options, fileObjects);
+        } catch (Messager.ExitJavadoc exc) {
+            // ignore, we just exit this way
+        } catch (OutOfMemoryError ee) {
+            messager.error("main.out.of.memory");
+            failed = true;
+        } catch (ClientCodeException e) {
+            // simply rethrow these exceptions, to be caught and handled by JavadocTaskImpl
+            throw e;
+        } catch (Error ee) {
+            ee.printStackTrace(System.err);
+            messager.error("main.fatal.error");
+            failed = true;
+        } catch (Exception ee) {
+            ee.printStackTrace(System.err);
+            messager.error("main.fatal.exception");
+            failed = true;
+        } finally {
+            if (fileManager != null
+                    && fileManager instanceof BaseFileManager
+                    && ((BaseFileManager) fileManager).autoClose) {
+                try {
+                    fileManager.close();
+                } catch (IOException ignore) {}
+            }
+            boolean haveErrorWarnings = messager.nerrors() > 0 ||
+                    (rejectWarnings && messager.nwarnings() > 0);
+            if (failed && !haveErrorWarnings) {
+                // the doclet failed, but nothing reported, flag it!.
+                messager.error("main.unknown.error");
+            }
+            failed |= haveErrorWarnings;
+            messager.exitNotice();
+            messager.flush();
+        }
+        return !failed;
+    }
+
+    /**
+     * Main program - internal
+     */
+    private boolean parseAndExecute(List<String> argList,
+            Iterable<? extends JavaFileObject> fileObjects) throws IOException {
+        long tm = System.currentTimeMillis();
+
+        List<String> javaNames = new ArrayList<>();
+
+        compOpts = Options.instance(context);
+
+        // Make sure no obsolete source/target messages are reported
+        compOpts.put("-Xlint:-options", "-Xlint:-options");
+
+        doclet.init(locale, messager);
+        parseArgs(argList, javaNames);
+
+        if (fileManager instanceof BaseFileManager) {
+            ((BaseFileManager) fileManager).handleOptions(fileManagerOpts);
+        }
+
+        String platformString = compOpts.get("-release");
+
+        if (platformString != null) {
+            if (compOpts.isSet("-source")) {
+                usageError("main.release.bootclasspath.conflict", "-source");
+            }
+            if (fileManagerOpts.containsKey(BOOTCLASSPATH)) {
+                usageError("main.release.bootclasspath.conflict", BOOTCLASSPATH.getText());
+            }
+
+            PlatformDescription platformDescription =
+                    PlatformUtils.lookupPlatformDescription(platformString);
+
+            if (platformDescription == null) {
+                usageError("main.unsupported.release.version", platformString);
+            }
+
+            compOpts.put(SOURCE, platformDescription.getSourceVersion());
+
+            context.put(PlatformDescription.class, platformDescription);
+
+            Collection<Path> platformCP = platformDescription.getPlatformPath();
+
+            if (platformCP != null) {
+                if (fileManager instanceof StandardJavaFileManager) {
+                    StandardJavaFileManager sfm = (StandardJavaFileManager) fileManager;
+
+                    sfm.setLocationFromPaths(StandardLocation.PLATFORM_CLASS_PATH, platformCP);
+                } else {
+                    usageError("main.release.not.standard.file.manager", platformString);
+                }
+            }
+        }
+
+        compOpts.notifyListeners();
+
+        if (javaNames.isEmpty() && subPackages.isEmpty() && isEmpty(fileObjects)) {
+            usageError("main.No_packages_or_classes_specified");
+        }
+
+        JavadocTool comp = JavadocTool.make0(context);
+        if (comp == null) return false;
+
+        if (showAccess == null) {
+            setFilter(defaultModifier);
+        }
+
+        DocletEnvironment root = comp.getEnvironment(
+                encoding,
+                showAccess,
+                overviewpath,
+                javaNames,
+                fileObjects,
+                subPackages,
+                excludedPackages,
+                docClasses,
+                quiet);
+
+        // release resources
+        comp = null;
+
+        if (breakiterator || !locale.getLanguage().equals(Locale.ENGLISH.getLanguage())) {
+            JavacTrees trees = JavacTrees.instance(context);
+            trees.setBreakIterator(BreakIterator.getSentenceInstance(locale));
+        }
+        // pass off control to the doclet
+        boolean ok = root != null;
+        if (ok) ok = doclet.run(root);
+
+        // We're done.
+        if (compOpts.get("-verbose") != null) {
+            tm = System.currentTimeMillis() - tm;
+            messager.notice("main.done_in", Long.toString(tm));
+        }
+
+        return ok;
+    }
+
+    Set<Doclet.Option> docletOptions = null;
+    int handleDocletOptions(int idx, List<String> args, boolean isToolOption) {
+        if (docletOptions == null) {
+            docletOptions = doclet.getSupportedOptions();
+        }
+        String arg = args.get(idx);
+
+        for (Doclet.Option opt : docletOptions) {
+            if (opt.matches(arg)) {
+                if (args.size() - idx < opt.getArgumentCount()) {
+                    usageError("main.requires_argument", arg);
+                }
+                opt.process(arg, args.listIterator(idx + 1));
+                idx += opt.getArgumentCount();
+                return idx;
+            }
+        }
+        // check if arg is accepted by the tool before emitting error
+        if (!isToolOption)
+            usageError("main.invalid_flag", arg);
+        return idx;
+    }
+
+    private Class<?> preProcess(JavaFileManager jfm, List<String> argv) {
+        // doclet specifying arguments
+        String userDocletPath = null;
+        String userDocletName = null;
+
+        // Step 1: loop through the args, set locale early on, if found.
+        for (int i = 0 ; i < argv.size() ; i++) {
+            String arg = argv.get(i);
+            if (arg.equals(ToolOption.LOCALE.opt)) {
+                oneArg(argv, i++);
+                String lname = argv.get(i);
+                locale = getLocale(lname);
+            } else if (arg.equals(ToolOption.DOCLET.opt)) {
+                oneArg(argv, i++);
+                if (userDocletName != null) {
+                    usageError("main.more_than_one_doclet_specified_0_and_1",
+                               userDocletName, argv.get(i));
+                }
+                if (docletName != null) {
+                    usageError("main.more_than_one_doclet_specified_0_and_1",
+                            docletName, argv.get(i));
+                }
+                userDocletName = argv.get(i);
+            } else if (arg.equals(ToolOption.DOCLETPATH.opt)) {
+                oneArg(argv, i++);
+                if (userDocletPath == null) {
+                    userDocletPath = argv.get(i);
+                } else {
+                    userDocletPath += File.pathSeparator + argv.get(i);
+                }
+            }
+        }
+        // Step 2: a doclet has already been provided,
+        // nothing more to do.
+        if (docletClass != null) {
+            return docletClass;
+        }
+        // Step 3: doclet name specified ? if so find a ClassLoader,
+        // and load it.
+        if (userDocletName != null) {
+            ClassLoader cl = classLoader;
+            if (cl == null) {
+                if (!fileManager.hasLocation(DOCLET_PATH)) {
+                    List<File> paths = new ArrayList<>();
+                    if (userDocletPath != null) {
+                        for (String pathname : userDocletPath.split(File.pathSeparator)) {
+                            paths.add(new File(pathname));
+                        }
+                    }
+                    try {
+                        ((StandardJavaFileManager)fileManager).setLocation(DOCLET_PATH, paths);
+                    } catch (IOException ioe) {
+                        panic("main.doclet_no_classloader_found", ioe);
+                        return null; // keep compiler happy
+                    }
+                }
+                cl = fileManager.getClassLoader(DOCLET_PATH);
+                if (cl == null) {
+                    // despite doclet specified on cmdline no classloader found!
+                    panic("main.doclet_no_classloader_found", userDocletName);
+                    return null; // keep compiler happy
+                }
+                try {
+                    return cl.loadClass(userDocletName);
+                } catch (ClassNotFoundException cnfe) {
+                    panic("main.doclet_class_not_found", userDocletName);
+                    return null; // keep compiler happy
+                }
+            }
+        }
+        // Step 4: we have a doclet, try loading it, otherwise
+        // return back the standard doclet
+        if (docletName != null) {
+            try {
+                return Class.forName(docletName, true, getClass().getClassLoader());
+            } catch (ClassNotFoundException cnfe) {
+                panic("main.doclet_class_not_found", userDocletName);
+                return null; // happy compiler, should not happen
+            }
+        } else {
+            return jdk.javadoc.internal.doclets.standard.Standard.class;
+        }
+    }
+
+    private void parseArgs(List<String> args, List<String> javaNames) {
+        for (int i = 0 ; i < args.size() ; i++) {
+            String arg = args.get(i);
+            ToolOption o = ToolOption.get(arg);
+            if (o != null) {
+                // handle a doclet argument that may be needed however
+                // don't increment the index, and allow the tool to consume args
+                handleDocletOptions(i, args, true);
+
+                if (o.hasArg) {
+                    oneArg(args, i++);
+                    o.process(this, args.get(i));
+                } else {
+                    setOption(arg);
+                    o.process(this);
+                }
+            } else if (arg.startsWith("-XD")) {
+                // hidden javac options
+                String s = arg.substring("-XD".length());
+                int eq = s.indexOf('=');
+                String key = (eq < 0) ? s : s.substring(0, eq);
+                String value = (eq < 0) ? s : s.substring(eq+1);
+                compOpts.put(key, value);
+            } else if (arg.startsWith("-")) {
+                i = handleDocletOptions(i, args, false);
+            } else {
+                javaNames.add(arg);
+            }
+        }
+    }
+
+    private <T> boolean isEmpty(Iterable<T> iter) {
+        return !iter.iterator().hasNext();
+    }
+
+    /**
+     * Set one arg option.
+     * Error and exit if one argument is not provided.
+     */
+    private void oneArg(List<String> args, int index) {
+        if ((index + 1) < args.size()) {
+            setOption(args.get(index), args.get(index+1));
+        } else {
+            usageError("main.requires_argument", args.get(index));
+        }
+    }
+
+    @Override
+    void usageError(String key, Object... args) {
+        error(key, args);
+        usage(true);
+    }
+
+    // a terminal call, will not return
+    void panic(String key, Object... args) {
+        error(key, args);
+        messager.exit();
+    }
+
+    void error(String key, Object... args) {
+        messager.error(key, args);
+    }
+
+    /**
+     * indicate an option with no arguments was given.
+     */
+    private void setOption(String opt) {
+        String[] option = { opt };
+        options.add(Arrays.asList(option));
+    }
+
+    /**
+     * indicate an option with one argument was given.
+     */
+    private void setOption(String opt, String argument) {
+        String[] option = { opt, argument };
+        options.add(Arrays.asList(option));
+    }
+
+    /**
+     * indicate an option with the specified list of arguments was given.
+     */
+    private void setOption(String opt, List<String> arguments) {
+        List<String> args = new ArrayList<>(arguments.size() + 1);
+        args.add(opt);
+        args.addAll(arguments);
+        options.add(args);
+    }
+
+    /**
+     * Get the locale if specified on the command line
+     * else return null and if locale option is not used
+     * then return default locale.
+     */
+    private Locale getLocale(String localeName) {
+        Locale userlocale = null;
+        if (localeName == null || localeName.isEmpty()) {
+            return Locale.getDefault();
+        }
+        int firstuscore = localeName.indexOf('_');
+        int seconduscore = -1;
+        String language = null;
+        String country = null;
+        String variant = null;
+        if (firstuscore == 2) {
+            language = localeName.substring(0, firstuscore);
+            seconduscore = localeName.indexOf('_', firstuscore + 1);
+            if (seconduscore > 0) {
+                if (seconduscore != firstuscore + 3
+                        || localeName.length() <= seconduscore + 1) {
+                    usageError("main.malformed_locale_name", localeName);
+                    return null;
+                }
+                country = localeName.substring(firstuscore + 1,
+                        seconduscore);
+                variant = localeName.substring(seconduscore + 1);
+            } else if (localeName.length() == firstuscore + 3) {
+                country = localeName.substring(firstuscore + 1);
+            } else {
+                usageError("main.malformed_locale_name", localeName);
+                return null;
+            }
+        } else if (firstuscore == -1 && localeName.length() == 2) {
+            language = localeName;
+        } else {
+            usageError("main.malformed_locale_name", localeName);
+            return null;
+        }
+        userlocale = searchLocale(language, country, variant);
+        if (userlocale == null) {
+            usageError("main.illegal_locale_name", localeName);
+            return null;
+        } else {
+            return userlocale;
+        }
+    }
+
+    /**
+     * Search the locale for specified language, specified country and
+     * specified variant.
+     */
+    private Locale searchLocale(String language, String country,
+                                String variant) {
+        for (Locale loc : Locale.getAvailableLocales()) {
+            if (loc.getLanguage().equals(language) &&
+                (country == null || loc.getCountry().equals(country)) &&
+                (variant == null || loc.getVariant().equals(variant))) {
+                return loc;
+            }
+        }
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/ToolOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,364 @@
+/*
+ * Copyright (c) 2012, 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 jdk.javadoc.internal.tool;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import com.sun.tools.javac.main.Option;
+import com.sun.tools.javac.util.Options;
+
+/**
+ * javadoc tool options.
+ *
+ *  <p><b>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.</b>
+ */
+public enum ToolOption {
+    // ----- options for underlying compiler -----
+
+    BOOTCLASSPATH("-bootclasspath", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setFileManagerOpt(Option.BOOTCLASSPATH, arg);
+        }
+    },
+
+    CLASSPATH("-classpath", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setFileManagerOpt(Option.CLASSPATH, arg);
+        }
+    },
+
+    CP("-cp", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setFileManagerOpt(Option.CP, arg);
+        }
+    },
+
+    EXTDIRS("-extdirs", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setFileManagerOpt(Option.EXTDIRS, arg);
+        }
+    },
+
+    SOURCEPATH("-sourcepath", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setFileManagerOpt(Option.SOURCEPATH, arg);
+        }
+    },
+
+    SYSCLASSPATH("-sysclasspath", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setFileManagerOpt(Option.BOOTCLASSPATH, arg);
+        }
+    },
+
+    ENCODING("-encoding", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.encoding = arg;
+            helper.setCompilerOpt(opt, arg);
+        }
+    },
+
+    RELEASE("-release", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setCompilerOpt(opt, arg);
+        }
+    },
+
+    SOURCE("-source", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setCompilerOpt(opt, arg);
+        }
+    },
+
+    XMAXERRS("-Xmaxerrs", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setCompilerOpt(opt, arg);
+        }
+    },
+
+    XMAXWARNS("-Xmaxwarns", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setCompilerOpt(opt, arg);
+        }
+    },
+
+    // ----- doclet options -----
+
+    DOCLET("-doclet", true), // handled in setDocletInvoker
+
+    DOCLETPATH("-docletpath", true), // handled in setDocletInvoker
+
+    // ----- selection options -----
+
+    SUBPACKAGES("-subpackages", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.addToList(helper.subPackages, arg);
+        }
+    },
+
+    EXCLUDE("-exclude", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.addToList(helper.excludedPackages, arg);
+        }
+    },
+
+    // ----- filtering options -----
+
+    PACKAGE("-package") {
+        @Override
+        public void process(Helper helper) {
+            helper.setFilter("package");
+        }
+    },
+
+    PRIVATE("-private") {
+        @Override
+        public void process(Helper helper) {
+            helper.setFilter("private");
+        }
+    },
+
+    PROTECTED("-protected") {
+        @Override
+        public void process(Helper helper) {
+            helper.setFilter("protected");
+        }
+    },
+
+    PUBLIC("-public") {
+        @Override
+        public void process(Helper helper) {
+            helper.setFilter("public");
+        }
+    },
+
+    // ----- output control options -----
+
+    PROMPT("-prompt") {
+        @Override
+        public void process(Helper helper) {
+            helper.compOpts.put("-prompt", "-prompt");
+            helper.promptOnError = true;
+        }
+    },
+
+    QUIET("-quiet") {
+        @Override
+        public void process(Helper helper) {
+            helper.quiet = true;
+        }
+    },
+
+    VERBOSE("-verbose") {
+        @Override
+        public void process(Helper helper) {
+            helper.compOpts.put("-verbose", "");
+        }
+    },
+
+    XWERROR("-Xwerror") {
+        @Override
+        public void process(Helper helper) {
+            helper.rejectWarnings = true;
+
+        }
+    },
+
+    // ----- other options -----
+
+    BREAKITERATOR("-breakiterator") {
+        @Override
+        public void process(Helper helper) {
+            helper.breakiterator = true;
+        }
+    },
+
+    LOCALE("-locale", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.docLocale = arg;
+        }
+    },
+
+    // the doclet consumes this
+    OVERVIEW("-overview", true) {
+        @Override
+        public void process(Helper helper, String arg) {
+            helper.setOverviewpath(arg);
+        }
+    },
+
+    XCLASSES("-Xclasses") {
+        @Override
+        public void process(Helper helper) {
+            helper.docClasses = true;
+
+        }
+    },
+
+    // ----- help options -----
+
+    HELP("-help") {
+        @Override
+        public void process(Helper helper) {
+            helper.usage();
+        }
+    },
+
+    X("-X") {
+        @Override
+        public void process(Helper helper) {
+            helper.Xusage();
+        }
+    };
+
+    public final String opt;
+    public final boolean hasArg;
+
+    ToolOption(String opt) {
+        this(opt, false);
+    }
+
+    ToolOption(String opt, boolean hasArg) {
+        this.opt = opt;
+        this.hasArg = hasArg;
+    }
+
+    void process(Helper helper, String arg) { }
+
+    void process(Helper helper) { }
+
+    static ToolOption get(String name) {
+        for (ToolOption o: values()) {
+            if (name.equals(o.opt))
+                return o;
+        }
+        return null;
+    }
+
+    static abstract class Helper {
+        /** List of decoded options. */
+        final List<List<String>> options = new ArrayList<>();
+
+        /** Selected packages, from -subpackages. */
+        final List<String> subPackages = new ArrayList<>();
+
+        /** Excluded packages, from -exclude. */
+        final List<String> excludedPackages = new ArrayList<>();
+
+        // File manager options
+        final Map<Option, String> fileManagerOpts = new LinkedHashMap<>();
+
+        /** javac options, set by various options. */
+        Options compOpts; // = Options.instance(context)
+
+        /* Encoding for javac, and files written? set by -encoding. */
+        String encoding = null;
+
+        /** Set by -breakiterator. */
+        boolean breakiterator = false;
+
+        /** Set by -quiet. */
+        boolean quiet = false;
+
+        /** Set by -Xclasses. */
+        boolean docClasses = false;
+
+        /** Set by -Xwerror. */
+        boolean rejectWarnings = false;
+
+        /** Set by -prompt. */
+        boolean promptOnError;
+
+        /** Set by -locale. */
+        String docLocale = "";
+
+        /** Set by -public, private, -protected, -package. */
+        String showAccess = null;
+        String overviewpath;
+
+        abstract void usage();
+        abstract void Xusage();
+
+        abstract void usageError(String msg, Object... args);
+
+        void addToList(List<String> list, String str){
+            StringTokenizer st = new StringTokenizer(str, ":");
+            String current;
+            while(st.hasMoreTokens()){
+                current = st.nextToken();
+                list.add(current);
+            }
+        }
+
+        void setFilter(String showAccess) {
+            if (showAccess != null) {
+                if (!"public".equals(showAccess)
+                        && !"protected".equals(showAccess)
+                        && !"private".equals(showAccess)
+                        && !"package".equals(showAccess)) {
+                    usageError("main.incompatible.access.flags");
+                }
+                this.showAccess = showAccess;
+            }
+        }
+
+        void setCompilerOpt(String opt, String arg) {
+            if (compOpts.get(opt) != null) {
+                usageError("main.option.already.seen", opt);
+            }
+            compOpts.put(opt, arg);
+        }
+
+        void setFileManagerOpt(Option opt, String arg) {
+            fileManagerOpts.put(opt, arg);
+        }
+
+        private void setOverviewpath(String arg) {
+            this.overviewpath = arg;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,102 @@
+#
+# 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.
+#
+
+main.errors={0} errors
+main.error={0} error
+main.warnings={0} warnings
+main.warning={0} warning
+
+main.usage=Usage: javadoc [options] [packagenames] [sourcefiles] [@files]\n\
+\  -overview <file>                 Read overview documentation from HTML file\n\
+\  -public                          Show only public classes and members\n\
+\  -protected                       Show protected/public classes and members (default)\n\
+\  -package                         Show package/protected/public classes and members\n\
+\  -private                         Show all classes and members\n\
+\  -help                            Display command line options and exit\n\
+\  -doclet <class>                  Generate output via alternate doclet\n\
+\  -docletpath <path>               Specify where to find doclet class files\n\
+\  -sourcepath <pathlist>           Specify where to find source files\n\
+\  -classpath <pathlist>            Specify where to find user class files\n\
+\  -cp <pathlist>                   Specify where to find user class files\n\
+\  -exclude <pkglist>               Specify a list of packages to exclude\n\
+\  -subpackages <subpkglist>        Specify subpackages to recursively load\n\
+\  -breakiterator                   Compute first sentence with BreakIterator\n\
+\  -bootclasspath <pathlist>        Override location of class files loaded\n\
+\                                   by the bootstrap class loader\n\
+\  -source <release>                Provide source compatibility with specified release\n\
+\  -extdirs <dirlist>               Override location of installed extensions\n\
+\  -verbose                         Output messages about what Javadoc is doing\n\
+\  -locale <name>                   Locale to be used, e.g. en_US or en_US_WIN\n\
+\  -encoding <name>                 Source file encoding name\n\
+\  -quiet                           Do not display status messages\n\
+\  -J<flag>                         Pass <flag> directly to the runtime system\n\
+\  -X                               Print a synopsis of nonstandard options and exit\n
+
+main.Xusage=\
+\  -Xmaxerrs <number>               Set the maximum number of errors to print\n\
+\  -Xmaxwarns <number>              Set the maximum number of warnings to print\n
+
+main.Xusage.foot=\
+These options are non-standard and subject to change without notice.
+
+main.doclet.usage.header=Provided by the {0} doclet:
+
+main.option.already.seen=The {0} option may be specified no more than once.
+main.requires_argument=option {0} requires an argument.
+main.invalid_flag=invalid flag: {0}
+main.No_packages_or_classes_specified=No packages or classes specified.
+main.incompatible.access.flags=More than one of -public, -private, -package, or -protected specified.
+main.cant.read=cannot read {0}
+main.Loading_source_files_for_package=Loading source files for package {0}...
+main.Loading_source_file=Loading source file {0}...
+main.Building_tree=Constructing Javadoc information...
+main.no_source_files_for_package=No source files for package {0}
+main.fatal.error=fatal error
+main.fatal.exception=fatal exception
+main.out.of.memory=java.lang.OutOfMemoryError: Please increase memory.\n\
+For example, on the JDK Classic or HotSpot VMs, add the option -J-Xmx\n\
+such as -J-Xmx32m.
+main.done_in=[done in {0} ms]
+main.more_than_one_doclet_specified_0_and_1=More than one doclet specified ({0} and {1}).
+main.doclet_no_classloader_found=Could not obtain classloader to load {0}
+main.could_not_instantiate_class=Could not instantiate class {0}
+main.doclet_class_not_found=Cannot find doclet class {0}
+main.illegal_locale_name=Locale not available: {0}
+main.malformed_locale_name=Malformed locale name: {0}
+main.file_not_found=File not found: "{0}"
+main.illegal_class_name=Illegal class name: "{0}"
+main.illegal_package_name=Illegal package name: "{0}"
+main.release.bootclasspath.conflict=option {0} cannot be used together with -release
+main.unsupported.release.version=release version {0} not supported
+main.release.not.standard.file.manager=-release option specified, but the provided JavaFileManager is not a StandardJavaFileManager.
+main.unknown.error=an unknown error has occurred
+javadoc.class_not_found=Class {0} not found.
+javadoc.error=error
+javadoc.warning=warning
+
+javadoc.error.msg={0}: error - {1}
+javadoc.warning.msg={0}: warning - {1}
+javadoc.note.msg = {1}
+javadoc.note.pos.msg= {0}: {1}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,72 @@
+#
+# 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.
+#
+
+main.errors=\u30a8\u30e9\u30fc{0}\u500b
+main.error=\u30a8\u30e9\u30fc{0}\u500b
+main.warnings=\u8b66\u544a{0}\u500b
+main.warning=\u8b66\u544a{0}\u500b
+
+main.usage=\u4f7f\u7528\u65b9\u6cd5: javadoc [options] [packagenames] [sourcefiles] [@files]\n  -overview <file>          HTML\u30d5\u30a1\u30a4\u30eb\u304b\u3089\u6982\u8981\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u8aad\u307f\u8fbc\u3080\n  -public                   public\u30af\u30e9\u30b9\u3068\u30e1\u30f3\u30d0\u30fc\u306e\u307f\u3092\u793a\u3059\n  -protected                protected/public\u30af\u30e9\u30b9\u3068\u30e1\u30f3\u30d0\u30fc\u3092\u793a\u3059(\u30c7\u30d5\u30a9\u30eb\u30c8)\n  -package                  package/protected/public\u30af\u30e9\u30b9\u3068\u30e1\u30f3\u30d0\u30fc\u3092\u793a\u3059\n  -private                  \u3059\u3079\u3066\u306e\u30af\u30e9\u30b9\u3068\u30e1\u30f3\u30d0\u30fc\u3092\u793a\u3059\n  -help                     \u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30fb\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u8868\u793a\u3057\u3066\u7d42\u4e86\u3059\u308b\n  -doclet <class>           \u4ee3\u66ffdoclet\u3092\u4ecb\u3057\u3066\u51fa\u529b\u3092\u751f\u6210\u3059\u308b\n  -docletpath <path>        doclet\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u63a2\u3059\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n  -sourcepath <pathlist>    \u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u3042\u308b\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n  -classpath <pathlist>     \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u3042\u308b\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\n  -cp <pathlist>                   \u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u3042\u308b\u5834\u6240\u3092\u6307\u5b9a\u3059\u308b\r\n  -exclude <pkglist>        \u9664\u5916\u3059\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u30fb\u30ea\u30b9\u30c8\u3092\u6307\u5b9a\u3059\u308b\n  -subpackages <subpkglist> \u518d\u5e30\u7684\u306b\u30ed\u30fc\u30c9\u3059\u308b\u30b5\u30d6\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u6307\u5b9a\u3059\u308b\n  -breakiterator            BreakIterator\u3067\u6700\u521d\u306e\u6587\u3092\u8a08\u7b97\u3059\u308b\n  -bootclasspath <pathlist> \u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u30fb\u30af\u30e9\u30b9\u30fb\u30ed\u30fc\u30c0\u30fc\u306b\u3088\u308a\u30ed\u30fc\u30c9\u3055\u308c\u305f\n                                   \u30af\u30e9\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u5834\u6240\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b\n  -source <release>         \u6307\u5b9a\u3055\u308c\u305f\u30ea\u30ea\u30fc\u30b9\u3068\u30bd\u30fc\u30b9\u306e\u4e92\u63db\u6027\u3092\u63d0\u4f9b\u3059\u308b\n  -extdirs <dirlist>        \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u62e1\u5f35\u6a5f\u80fd\u306e\u5834\u6240\u3092\u30aa\u30fc\u30d0\u30fc\u30e9\u30a4\u30c9\u3059\u308b\n  -verbose                  Javadoc\u306e\u52d5\u4f5c\u306b\u3064\u3044\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u51fa\u529b\u3059\u308b\n  -locale <name>            en_US\u3084en_US_WIN\u306a\u3069\u306e\u4f7f\u7528\u3059\u308b\u30ed\u30b1\u30fc\u30eb\n  -encoding <name>          \u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u540d\n  -quiet                    \u72b6\u614b\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3057\u306a\u3044\n  -J<flag>                  <flag>\u3092\u5b9f\u884c\u6642\u30b7\u30b9\u30c6\u30e0\u306b\u76f4\u63a5\u6e21\u3059\n  -X                        \u975e\u6a19\u6e96\u30aa\u30d7\u30b7\u30e7\u30f3\u306e\u6982\u8981\u3092\u51fa\u529b\u3057\u7d42\u4e86\u3059\u308b\n
+
+main.Xusage=\  -Xmaxerrs <number>        \u51fa\u529b\u3059\u308b\u30a8\u30e9\u30fc\u306e\u6700\u5927\u6570\u3092\u8a2d\u5b9a\u3059\u308b\n  -Xmaxwarns <number>       \u51fa\u529b\u3059\u308b\u8b66\u544a\u306e\u6700\u5927\u6570\u3092\u8a2d\u5b9a\u3059\u308b\n
+
+main.Xusage.foot=\u3053\u308c\u3089\u306f\u975e\u6a19\u6e96\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u3042\u308a\u4e88\u544a\u306a\u3057\u306b\u5909\u66f4\u3055\u308c\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002
+
+main.option.already.seen={0}\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u8907\u6570\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002
+main.requires_argument=\u30aa\u30d7\u30b7\u30e7\u30f3{0}\u306b\u306f\u5f15\u6570\u304c\u5fc5\u8981\u3067\u3059\u3002
+main.locale_first=\u30aa\u30d7\u30b7\u30e7\u30f3-locale\u306f\u3001\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306e\u6700\u521d\u306b\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
+main.invalid_flag={0}\u306f\u7121\u52b9\u306a\u30d5\u30e9\u30b0\u3067\u3059
+main.No_packages_or_classes_specified=\u30d1\u30c3\u30b1\u30fc\u30b8\u307e\u305f\u306f\u30af\u30e9\u30b9\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002
+main.incompatible.access.flags=-public\u3001-private\u3001-package\u307e\u305f\u306f-protected\u306e\u3046\u3061\u306e2\u3064\u4ee5\u4e0a\u3092\u6307\u5b9a\u3057\u307e\u3057\u305f\u3002
+main.cant.read={0}\u3092\u8aad\u307f\u8fbc\u3081\u307e\u305b\u3093
+main.Loading_source_files_for_package=\u30d1\u30c3\u30b1\u30fc\u30b8{0}\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...
+main.Loading_source_file=\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb{0}\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...
+main.Building_tree=Javadoc\u60c5\u5831\u3092\u69cb\u7bc9\u3057\u3066\u3044\u307e\u3059...
+main.no_source_files_for_package=\u30d1\u30c3\u30b1\u30fc\u30b8{0}\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1\u30a4\u30eb\u304c\u3042\u308a\u307e\u305b\u3093
+main.fatal.error=\u81f4\u547d\u7684\u30a8\u30e9\u30fc
+main.fatal.exception=\u81f4\u547d\u7684\u4f8b\u5916
+main.out.of.memory=java.lang.OutOfMemoryError: \u30e1\u30e2\u30ea\u30fc\u3092\u5897\u3084\u3057\u3066\u304f\u3060\u3055\u3044\u3002\n\u305f\u3068\u3048\u3070\u3001JDK\u306eclassic\u3082\u3057\u304f\u306fhotspot VM\u3067\u306f\u3001-J-Xmx32m\u306e\u3088\u3046\u306b\n-J-Xmx\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002
+main.done_in=[{0}\u30df\u30ea\u79d2\u3067\u5b8c\u4e86]
+main.must_return_int=doclet\u30af\u30e9\u30b9{0}\u3067\u306f\u3001\u30e1\u30bd\u30c3\u30c9{1}\u306fint\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
+main.must_return_boolean=doclet\u30af\u30e9\u30b9{0}\u3067\u306f\u3001\u30e1\u30bd\u30c3\u30c9{1}\u306fboolean\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
+main.must_return_languageversion=doclet\u30af\u30e9\u30b9{0}\u3067\u306f\u3001\u30e1\u30bd\u30c3\u30c9{1}\u306fLanguageVersion\u3092\u8fd4\u3059\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002
+main.more_than_one_doclet_specified_0_and_1=\u8907\u6570\u306edoclet({0}\u3068{1})\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u307e\u3059\u3002
+main.doclet_class_not_found=doclet\u30af\u30e9\u30b9{0}\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093
+main.doclet_method_not_found=doclet\u30af\u30e9\u30b9{0}\u306b\u306f\u30e1\u30bd\u30c3\u30c9{1}\u304c\u3042\u308a\u307e\u305b\u3093
+main.doclet_method_not_accessible=doclet\u30af\u30e9\u30b9{0}\u3067\u306f\u3001\u30e1\u30bd\u30c3\u30c9{1}\u306b\u30a2\u30af\u30bb\u30b9\u3067\u304d\u307e\u305b\u3093
+main.internal_error_exception_thrown=doclet\u30af\u30e9\u30b9{0}\u306e\u5185\u90e8\u30a8\u30e9\u30fc\u3067\u3059\u3002\u30e1\u30bd\u30c3\u30c9{1}\u306f\u4f8b\u5916{2}\u3092\u30b9\u30ed\u30fc\u3057\u307e\u3057\u305f
+main.exception_thrown=doclet\u30af\u30e9\u30b9{0}\u3067\u306f\u3001\u30e1\u30bd\u30c3\u30c9{1}\u306f\u4f8b\u5916{2}\u3092\u30b9\u30ed\u30fc\u3057\u307e\u3057\u305f
+main.illegal_locale_name=\u30ed\u30b1\u30fc\u30eb{0}\u304c\u7121\u52b9\u3067\u3059
+main.malformed_locale_name=\u30ed\u30b1\u30fc\u30eb\u540d{0}\u306e\u66f8\u5f0f\u304c\u6b63\u3057\u304f\u3042\u308a\u307e\u305b\u3093
+main.file_not_found=\u30d5\u30a1\u30a4\u30eb"{0}"\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093
+main.illegal_package_name=\u30d1\u30c3\u30b1\u30fc\u30b8\u540d"{0}"\u306f\u4e0d\u6b63\u3067\u3059
+javadoc.class_not_found=\u30af\u30e9\u30b9{0}\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002
+javadoc.error=\u30a8\u30e9\u30fc
+javadoc.warning=\u8b66\u544a
+
+javadoc.error.msg={0}: \u30a8\u30e9\u30fc - {1}
+javadoc.warning.msg={0}: \u8b66\u544a - {1}
+javadoc.note.msg = {1}
+javadoc.note.pos.msg= {0}: {1}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,72 @@
+#
+# 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.
+#
+
+main.errors={0} \u4e2a\u9519\u8bef
+main.error={0} \u4e2a\u9519\u8bef
+main.warnings={0} \u4e2a\u8b66\u544a
+main.warning={0} \u4e2a\u8b66\u544a
+
+main.usage=\u7528\u6cd5: javadoc [options] [packagenames] [sourcefiles] [@files]\n  -overview <file>                 \u4ece HTML \u6587\u4ef6\u8bfb\u53d6\u6982\u89c8\u6587\u6863\n  -public                          \u4ec5\u663e\u793a public \u7c7b\u548c\u6210\u5458\n  -protected                       \u663e\u793a protected/public \u7c7b\u548c\u6210\u5458 (\u9ed8\u8ba4\u503c)\n  -package                         \u663e\u793a package/protected/public \u7c7b\u548c\u6210\u5458\n  -private                         \u663e\u793a\u6240\u6709\u7c7b\u548c\u6210\u5458\n  -help                            \u663e\u793a\u547d\u4ee4\u884c\u9009\u9879\u5e76\u9000\u51fa\n  -doclet <class>                  \u901a\u8fc7\u66ff\u4ee3 doclet \u751f\u6210\u8f93\u51fa\n  -docletpath <path>               \u6307\u5b9a\u67e5\u627e doclet \u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n  -sourcepath <pathlist>           \u6307\u5b9a\u67e5\u627e\u6e90\u6587\u4ef6\u7684\u4f4d\u7f6e\n  -classpath <pathlist>            \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n  -cp <pathlist>                   \u6307\u5b9a\u67e5\u627e\u7528\u6237\u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n  -exclude <pkglist>               \u6307\u5b9a\u8981\u6392\u9664\u7684\u7a0b\u5e8f\u5305\u5217\u8868\n  -subpackages <subpkglist>        \u6307\u5b9a\u8981\u9012\u5f52\u52a0\u8f7d\u7684\u5b50\u7a0b\u5e8f\u5305\n  -breakiterator                   \u8ba1\u7b97\u5e26\u6709 BreakIterator \u7684\u7b2c\u4e00\u4e2a\u8bed\u53e5\n  -bootclasspath <pathlist>        \u8986\u76d6\u7531\u5f15\u5bfc\u7c7b\u52a0\u8f7d\u5668\u6240\u52a0\u8f7d\u7684\n                                   \u7c7b\u6587\u4ef6\u7684\u4f4d\u7f6e\n  -source <release>                \u63d0\u4f9b\u4e0e\u6307\u5b9a\u53d1\u884c\u7248\u7684\u6e90\u517c\u5bb9\u6027\n  -extdirs <dirlist>               \u8986\u76d6\u6240\u5b89\u88c5\u6269\u5c55\u7684\u4f4d\u7f6e\n  -verbose                         \u8f93\u51fa\u6709\u5173 Javadoc \u6b63\u5728\u6267\u884c\u7684\u64cd\u4f5c\u7684\u4fe1\u606f\n  -locale <name>                   \u8981\u4f7f\u7528\u7684\u533a\u57df\u8bbe\u7f6e, \u4f8b\u5982 en_US \u6216 en_US_WIN\n  -encoding <name>                 \u6e90\u6587\u4ef6\u7f16\u7801\u540d\u79f0\n  -quiet                           \u4e0d\u663e\u793a\u72b6\u6001\u6d88\u606f\n  -J<flag>                         \u76f4\u63a5\u5c06 <flag> \u4f20\u9012\u5230\u8fd0\u884c\u65f6\u7cfb\u7edf\n  -X                               \u8f93\u51fa\u975e\u6807\u51c6\u9009\u9879\u7684\u63d0\u8981\n
+
+main.Xusage=\  -Xmaxerrs <number>               \u8bbe\u7f6e\u8981\u8f93\u51fa\u7684\u6700\u5927\u9519\u8bef\u6570\n  -Xmaxwarns <number>              \u8bbe\u7f6e\u8981\u8f93\u51fa\u7684\u6700\u5927\u8b66\u544a\u6570\n
+
+main.Xusage.foot=\u8fd9\u4e9b\u9009\u9879\u90fd\u662f\u975e\u6807\u51c6\u9009\u9879, \u5982\u6709\u66f4\u6539, \u6055\u4e0d\u53e6\u884c\u901a\u77e5\u3002
+
+main.option.already.seen={0}\u9009\u9879\u53ea\u80fd\u6307\u5b9a\u4e00\u6b21\u3002
+main.requires_argument=\u9009\u9879{0}\u9700\u8981\u53c2\u6570\u3002
+main.locale_first=\u5728\u547d\u4ee4\u884c\u4e2d, \u9009\u9879 -locale \u5fc5\u987b\u4e3a\u7b2c\u4e00\u4e2a\u9009\u9879\u3002
+main.invalid_flag=\u65e0\u6548\u7684\u6807\u8bb0: {0}
+main.No_packages_or_classes_specified=\u672a\u6307\u5b9a\u7a0b\u5e8f\u5305\u6216\u7c7b\u3002
+main.incompatible.access.flags=\u6307\u5b9a\u4e86\u591a\u4e2a -public, -private, -package \u6216 -protected\u3002
+main.cant.read=\u65e0\u6cd5\u8bfb\u53d6{0}
+main.Loading_source_files_for_package=\u6b63\u5728\u52a0\u8f7d\u7a0b\u5e8f\u5305{0}\u7684\u6e90\u6587\u4ef6...
+main.Loading_source_file=\u6b63\u5728\u52a0\u8f7d\u6e90\u6587\u4ef6{0}...
+main.Building_tree=\u6b63\u5728\u6784\u9020 Javadoc \u4fe1\u606f...
+main.no_source_files_for_package=\u6ca1\u6709\u7a0b\u5e8f\u5305{0}\u7684\u6e90\u6587\u4ef6
+main.fatal.error=\u81f4\u547d\u9519\u8bef
+main.fatal.exception=\u81f4\u547d\u5f02\u5e38\u9519\u8bef
+main.out.of.memory=java.lang.OutOfMemoryError: \u8bf7\u589e\u5927\u5185\u5b58\u3002\n\u4f8b\u5982, \u5bf9\u4e8e JDK \u7ecf\u5178\u6216 HotSpot VM, \u8bf7\u589e\u5927\u9009\u9879 -J-Xmx,\n\u4f8b\u5982 -J-Xmx32m\u3002
+main.done_in=[\u5728 {0} \u6beb\u79d2\u5185\u5b8c\u6210]
+main.must_return_int=\u5728 doclet \u7c7b{0}\u4e2d, \u65b9\u6cd5{1}\u5fc5\u987b\u8fd4\u56de\u6574\u578b\u503c\u3002
+main.must_return_boolean=\u5728 doclet \u7c7b{0}\u4e2d, \u65b9\u6cd5{1}\u5fc5\u987b\u8fd4\u56de\u5e03\u5c14\u503c\u3002
+main.must_return_languageversion=\u5728 doclet \u7c7b{0}\u4e2d, \u65b9\u6cd5{1}\u5fc5\u987b\u8fd4\u56de\u8bed\u8a00\u7248\u672c\u3002
+main.more_than_one_doclet_specified_0_and_1=\u6307\u5b9a\u4e86\u591a\u4e2a doclet ({0}\u548c{1})\u3002
+main.doclet_class_not_found=\u627e\u4e0d\u5230 doclet \u7c7b{0}
+main.doclet_method_not_found=doclet \u7c7b{0}\u4e0d\u5305\u542b{1}\u65b9\u6cd5
+main.doclet_method_not_accessible=\u5728 doclet \u7c7b{0}\u4e2d, \u65e0\u6cd5\u8bbf\u95ee\u65b9\u6cd5{1}
+main.internal_error_exception_thrown=\u5185\u90e8\u9519\u8bef: \u5728 doclet \u7c7b{0}\u4e2d, \u65b9\u6cd5{1}\u5df2\u629b\u51fa\u5f02\u5e38\u9519\u8bef{2}
+main.exception_thrown=\u5728 doclet \u7c7b{0}\u4e2d, \u65b9\u6cd5{1}\u5df2\u629b\u51fa\u5f02\u5e38\u9519\u8bef{2}
+main.illegal_locale_name=\u8bed\u8a00\u73af\u5883\u4e0d\u53ef\u7528: {0}
+main.malformed_locale_name=\u683c\u5f0f\u9519\u8bef\u7684\u8bed\u8a00\u73af\u5883\u540d\u79f0: {0}
+main.file_not_found=\u627e\u4e0d\u5230\u6587\u4ef6: "{0}"
+main.illegal_package_name=\u975e\u6cd5\u7684\u7a0b\u5e8f\u5305\u540d\u79f0: "{0}"
+javadoc.class_not_found=\u627e\u4e0d\u5230\u7c7b{0}\u3002
+javadoc.error=\u9519\u8bef
+javadoc.warning=\u8b66\u544a
+
+javadoc.error.msg={0}: \u9519\u8bef - {1}
+javadoc.warning.msg={0}: \u8b66\u544a - {1}
+javadoc.note.msg = {1}
+javadoc.note.pos.msg= {0}: {1}
--- a/test/Makefile	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/Makefile	Thu Jan 28 15:42:06 2016 -0800
@@ -278,7 +278,7 @@
 	@mkdir -p $(JTREG_OUTPUT_DIR)
 	JT_JAVA=$(JT_JAVA) $(JTREG) \
 	  -J-Xmx512m \
-	  -vmoption:-Xmx768m \
+	  -vmoption:-Xmx1024m \
 	  -a -ignore:quiet $(if $(JTREG_VERBOSE),-v:$(JTREG_VERBOSE)) \
           -r:$(JTREG_OUTPUT_DIR)/JTreport \
           -w:$(JTREG_OUTPUT_DIR)/JTwork \
--- a/test/TEST.groups	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/TEST.groups	Thu Jan 28 15:42:06 2016 -0800
@@ -24,9 +24,10 @@
 
 # All langtools tests are tier 1.
 tier1 = \
-    tools \
     com \
-    lib
+    jdk \
+    lib \
+    tools
 
 # No langtools tests are tier 2.
 tier2 = 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/5093723/DocumentedClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2009 Google, Inc.  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.
+ *
+ * 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.
+ */
+
+/** A documented class. */
+public class DocumentedClass extends UndocumentedClass {
+  /** {@link #method} */
+  public void m1() {}
+  /** {@link #publicMethod} */
+  public void m2() {}
+  /** {@link #protectedMethod} */
+  public void m3() {}
+  /** {@link #privateMethod} */
+  public void m4() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/5093723/T5093723.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2009 Google, Inc.  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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      5093723
+ * @summary  REGRESSION: ClassCastException in SingleIndexWriter
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main T5093723
+ */
+
+public class T5093723 extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        T5093723 tester = new T5093723();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-Xdoclint:none",
+                testSrc("DocumentedClass.java"),
+                testSrc("UndocumentedClass.java"));
+        checkExit(Exit.OK);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/5093723/UndocumentedClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2009 Google, Inc.  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.
+ *
+ * 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.
+ */
+
+class UndocumentedClass {
+    void method() {}
+    public void publicMethod() {}
+    protected void protectedMethod() {}
+    private void privateMethod() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessAsciiArt/AccessAsciiArt.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4706779 4956908
+ * @summary  Add text equivalent of class tree ASCII art for accessibility
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main AccessAsciiArt
+ */
+
+public class AccessAsciiArt extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        AccessAsciiArt tester = new AccessAsciiArt();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "p1", "p1.subpkg");
+        checkExit(Exit.OK);
+
+        checkOutput("p1/subpkg/SSC.html", true,
+                // Test the top line of the class tree
+                "<li><a href=\"../../p1/C.html\" title=\"class in p1\">p1.C</a></li>",
+                // Test the second line of the class tree
+                "<li><a href=\"../../p1/SC.html\" title=\"class in p1\">p1.SC</a></li>",
+                // Test the third line of the class tree
+                "<li>p1.subpkg.SSC</li>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessAsciiArt/p1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C implements SI {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessAsciiArt/p1/I.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public interface I {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessAsciiArt/p1/SC.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class SC extends C {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessAsciiArt/p1/SI.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public interface SI extends I {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessAsciiArt/p1/subpkg/SSC.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1.subpkg;
+
+public class SSC extends p1.SC {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessFrameTitle/AccessFrameTitle.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4636655
+ * @summary  Add title attribute to <FRAME> tags for accessibility
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main AccessFrameTitle
+ */
+
+public class AccessFrameTitle extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        AccessFrameTitle tester = new AccessFrameTitle();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Testing only for the presence of the title attributes.
+        // To make this test more robust, only
+        // the initial part of each title string is tested for,
+        // in case the ending part of the string later changes
+        checkOutput("index.html", true,
+                "title=\"All classes and interfaces (except non-static nested types)\"",
+                "title=\"All Packages\"",
+                "title=\"Package, class and interface descriptions\"");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessFrameTitle/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessFrameTitle/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessH1/AccessH1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4636667 7052425 8016549
+ * @summary  Use <H1, <H2>, and <H3> in proper sequence for accessibility
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main AccessH1
+ */
+
+
+public class AccessH1 extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        AccessH1 tester = new AccessH1();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-doctitle", "Document Title",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Test the style sheet
+        checkOutput("stylesheet.css", true,
+                "h1 {\n"
+                + "    font-size:20px;\n"
+                + "}");
+
+        // Test the doc title in the overview page
+        checkOutput("overview-summary.html", true,
+                "<h1 class=\"title\">Document Title</h1>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessH1/p1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessH1/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessSkipNav/AccessSkipNav.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4638136 7198273 8025633 8081854
+ * @summary  Add ability to skip over nav bar for accessibility
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main AccessSkipNav
+ */
+
+public class AccessSkipNav extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        AccessSkipNav tester = new AccessSkipNav();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Testing only for the presence of the <a href> and <a name>
+        checkOutput("p1/C1.html", true,
+                // Top navbar <a href>
+                "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
+                // Top navbar <a name>
+                "<a name=\"skip.navbar.top\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                // Bottom navbar <a href>
+                "<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
+                // Bottom navbar <a name>
+                "<a name=\"skip.navbar.bottom\">\n"
+                + "<!--   -->\n"
+                + "</a>");
+
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessSkipNav/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessSkipNav/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessSummary/AccessSummary.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4637604 4775148
+ * @summary  Test the tables for summary attribute
+ * @author   dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main AccessSummary
+ */
+
+public class AccessSummary extends JavadocTester {
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     * @throws Exception if the test fails
+     */
+    public static void main(String... args) throws Exception {
+        AccessSummary tester = new AccessSummary();
+        tester.runTests();
+    }
+
+    @Test
+    void testAccessSummary() {
+        javadoc("-d", "out", "-sourcepath", testSrc, "p1", "p2");
+        checkExit(Exit.OK);
+        checkOutput("overview-summary.html", true,
+                 "summary=\"Packages table, listing packages, and an explanation\"");
+
+        // Test that the summary attribute appears
+        checkOutput("p1/C1.html", true,
+                 "summary=\"Constructor Summary table, listing constructors, and an explanation\"");
+
+        // Test that the summary attribute appears
+        checkOutput("constant-values.html", true,
+                 "summary=\"Constant Field Values table, listing constant fields, and values\"");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessSummary/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C1 {
+
+    public static final String STATICFINALFIELD = "test";
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AccessSummary/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AuthorDD/AuthorDD.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4651598 8026567
+ * @summary Javadoc wrongly inserts </DD> tags when using multiple @author tags
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main AuthorDD
+ */
+
+/**
+ * Runs javadoc and runs regression tests on the resulting HTML.
+ */
+public class AuthorDD extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        AuthorDD tester = new AuthorDD();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        // Test for all cases except the split index page
+        javadoc("-d", "out",
+                "-author",
+                "-version",
+                "-sourcepath", testSrc,
+                "p1");
+        checkExit(Exit.OK);
+
+        checkOutput("p1/C1.html", true,
+                // Test single @since tag:
+                "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>JDK 1.0</dd>",
+                // Test multiple @author tags:
+                "<dt><span class=\"simpleTagLabel\">Author:</span></dt>\n"
+                + "<dd>Doug Kramer, Jamie, Neal</dd>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/AuthorDD/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+/**
+ * This is the class documentation.
+ * Testing multiple @since and @version tags only to see if all
+ * instances of SimpleTaglet have the same bug
+ *
+ * @author Doug Kramer
+ * @author Jamie
+ * @author Neal
+ *
+ * @since  JDK 1.0
+ *
+ * @version 1.1
+ * @version 1.2
+ * @version 1.3
+ */
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/DocRootSlash/DocRootSlash.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,149 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4524350 4662945 4633447
+ * @summary stddoclet: {@docRoot} inserts an extra trailing "/"
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main DocRootSlash
+ */
+
+import java.util.regex.*;
+
+/**
+ * Runs javadoc and runs regression tests on the resulting HTML.
+ * It reads each file, complete with newlines, into a string to easily
+ * find strings that contain newlines.
+ */
+public class DocRootSlash extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        DocRootSlash tester = new DocRootSlash();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        // Directory that contains source files that javadoc runs on
+        String srcdir = System.getProperty("test.src", ".");
+
+        javadoc("-d", "out",
+                "-Xdoclint:none",
+                "-overview", (srcdir + "/overview.html"),
+                "-header", "<A HREF=\"{@docroot}/package-list\">{&#064;docroot}</A> <A HREF=\"{@docRoot}/help-doc\">{&#064;docRoot}</A>",
+                "-sourcepath", srcdir,
+                "p1", "p2");
+
+        checkFiles(
+                "p1/C1.html",
+                "p1/package-summary.html",
+                "overview-summary.html");
+
+        // Bug 4633447: Special test for overview-frame.html
+        // Find two strings in file "overview-frame.html"
+        checkOutput("overview-frame.html", true,
+                "<A HREF=\"./package-list\">",
+                "<A HREF=\"./help-doc\">");
+    }
+
+    void checkFiles(String... filenameArray) {
+        int count = 0;
+
+        for (String f : filenameArray) {
+            // Read contents of file into a string
+            String fileString = readFile(f);
+            System.out.println("\nSub-tests for file: " + f + " --------------");
+            // Loop over all tests in a single file
+            for ( int j = 0; j < 11; j++ ) {
+
+                // Compare actual to expected string for a single subtest
+                compareActualToExpected(++count, fileString);
+            }
+        }
+    }
+
+    /**
+     * Regular expression pattern matching code
+     *
+     * Prefix Pattern:
+     * flag   (?i)            (case insensitive, so "a href" == "A HREF" and all combinations)
+     * group1 (
+     *          <a or <A
+     *          \\s+          (one or more whitespace characters)
+     *          href or HREF
+     *          \"            (double quote)
+     *        )
+     * group2 ([^\"]*)        (link reference -- characters that don't include a quote)
+     * group3 (\".*?>)        (" target="frameName">)
+     * group4 (.*?)           (label - zero or more characters)
+     * group5 (</a>)          (end tag)
+     */
+    private static final String prefix = "(?i)(<a\\s+href=";    // <a href=     (start group1)
+    private static final String ref1   = "\")([^\"]*)(\".*?>)"; // doublequotes (end group1, group2, group3)
+    private static final String ref2   = ")(\\S+?)([^<>]*>)";   // no quotes    (end group1, group2, group3)
+    private static final String label  = "(.*?)";               // text label   (group4)
+    private static final String end    = "(</a>)";              // </a>         (group5)
+
+    /**
+     * Compares the actual string to the expected string in the specified string
+     * @param str   String to search through
+     */
+    void compareActualToExpected(int count, String str) {
+        checking("comparison for " + str);
+
+        // Pattern must be compiled each run because numTestsRun is incremented
+        Pattern actualLinkPattern1 =
+            Pattern.compile("Sub-test " + count + " Actual: " + prefix + ref1, Pattern.DOTALL);
+        Pattern expectLinkPattern1 =
+            Pattern.compile("Sub-test " + count + " Expect: " + prefix + ref1, Pattern.DOTALL);
+        // Pattern linkPattern2 = Pattern.compile(prefix + ref2 + label + end, Pattern.DOTALL);
+
+        Matcher actualLinkMatcher1 = actualLinkPattern1.matcher(str);
+        Matcher expectLinkMatcher1 = expectLinkPattern1.matcher(str);
+        if (expectLinkMatcher1.find() && actualLinkMatcher1.find()) {
+            String expectRef = expectLinkMatcher1.group(2);
+            String actualRef = actualLinkMatcher1.group(2);
+            if (actualRef.equals(expectRef)) {
+                passed(expectRef);
+                // System.out.println("pattern:   " + actualLinkPattern1.pattern());
+                // System.out.println("actualRef: " + actualRef);
+                // System.out.println("group0:    " + actualLinkMatcher1.group());
+                // System.out.println("group1:    " + actualLinkMatcher1.group(1));
+                // System.out.println("group2:    " + actualLinkMatcher1.group(2));
+                // System.out.println("group3:    " + actualLinkMatcher1.group(3));
+                // System.exit(0);
+            } else {
+                failed("\n"
+                        + "Actual: \"" + actualRef + "\"\n"
+                        + "Expect: \"" + expectRef + "\"");
+            }
+        } else {
+            failed("Didn't find <A HREF> that fits the pattern: "
+                    + expectLinkPattern1.pattern());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/DocRootSlash/overview.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+<HTML>
+<HEAD>
+</HEAD>
+
+<BODY>
+
+Dummy first sentence to suppress BreakIterator warning.
+<p>
+
+Case 0 Actual: <A HREF=".">.</A> &nbsp; Current directory
+<p>
+Sub-test 23 Actual: <A HREF="{@docroot}">{&#064;docroot}</A> Bare tag - ALL LOWERCASE <br>
+Sub-test 23 Expect: <A HREF=""></A> <br>
+(Expect empty string because lowercase docroot is illegal) 
+<p>
+
+Sub-test 24 Actual: <A HREF="{@docRoot}">{&#064;docRoot}</A> Bare tag - "R" UPPERCASE <br>
+Sub-test 24 Expect: <A HREF=".">.</A>
+<p>
+
+Sub-test 25 Actual: <A HREF="{@docRoot}/package-list">{&#064;docRoot}/package-list</A>  <br>
+Sub-test 25 Expect: <A HREF="./package-list">./package-list</A>
+<p>
+
+Sub-test 26 Actual: <A HREF="{@docRoot}/p2/C2.html">{&#064;docRoot}/p2/C2.html</A>  <br>
+Sub-test 26 Expect: <A HREF="./p2/C2.html">./p2/C2.html</A>
+<p>
+
+Sub-test 27 Actual: <A HREF="{@docRoot}/../docs1/p2/C2.html">{&#064;docRoot}/../docs1/p2/C2.html</A> <br>
+Sub-test 27 Expect: <A HREF="./../docs1/p2/C2.html">./../docs1/p2/C2.html</A>
+<p>
+
+Sub-test 28 Actual: <A HREF="{@docRoot}/p2/package-summary.html#package_description">{&#064;docRoot}/p2/package-summary.html#package_description</A>  <br>
+Sub-test 28 Expect: <A HREF="./p2/package-summary.html#package_description">./p2/package-summary.html#package_description</A>
+<p>
+
+Sub-test 29 Actual: <A HREF="{@docRoot}/../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
+Sub-test 29 Expect: <A HREF="./../docs1/p2/package-summary.html#package_description">./../docs1/p2/package-summary.html#package_description</A>
+<p>
+
+<!-- ============================================================== -->
+
+Allow docRoot to work without a trailing slash for those who had to change their comments
+to work with the 1.4.0 bug:
+<p>
+
+Sub-test 30 Actual: <A HREF="{@docRoot}p2/C2.html">{&#064;docRoot}p2/C2.html</A>  <br>
+Sub-test 30 Expect: <A HREF=".p2/C2.html">./p2/C2.html</A>
+<p>
+
+Sub-test 31 Actual: <A HREF="{@docRoot}../docs1/p2/C2.html">{&#064;docRoot}../docs1/p2/C2.html</A> <br>
+Sub-test 31 Expect: <A HREF=".../docs1/p2/C2.html">./../docs1/p2/C2.html</A>
+<p>
+
+Sub-test 32 Actual: <A HREF="{@docRoot}p2/package-summary.html#package_description">{&#064;docRoot}/p2/package-summary.html#package_description</A>  <br>
+Sub-test 32 Expect: <A HREF=".p2/package-summary.html#package_description">./p2/package-summary.html#package_description</A>
+
+<p>
+Sub-test 33 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
+Sub-test 33 Expect: <A HREF=".../docs1/p2/package-summary.html#package_description">./../docs1/p2/package-summary.html#package_description</A>
+
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/DocRootSlash/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+/**
+ * Dummy first sentence to suppress breakiterator warning.
+ * <p>
+ *
+ * Case 0 Actual: <A HREF=".">.</A> &nbsp; Current directory
+ * <p>
+ *
+ * Sub-test 1 Actual: <A HREF="{@docroot}">{&#064;docroot}</A> Bare tag - ALL LOWERCASE <br>
+ * Sub-test 1 Expect: <A HREF=""></A> <br>
+ * (Expect empty string because lowercase docroot is illegal)
+ * <p>
+ *
+ * Sub-test 2 Actual: <A HREF="{@docRoot}">{&#064;docRoot}</A> Bare tag - "R" UPPERCASE <br>
+ * Sub-test 2 Expect: <A HREF="..">..</A>
+ * <p>
+ *
+ * Sub-test 3 Actual: <A HREF="{@docRoot}/package-list">{&#064;docRoot}/package-list</A> <br>
+ * Sub-test 3 Expect: <A HREF="../package-list">../package-list</A>
+ * <p>
+ *
+ * Sub-test 4 Actual: <A HREF="{@docRoot}/p2/C2.html">{&#064;docRoot}/p2/C2.html</A> <br>
+ * Sub-test 4 Expect: <A HREF="../p2/C2.html">../p2/C2.html</A>
+ * <p>
+ *
+ * Sub-test 5 Actual: <A HREF="{@docRoot}/../docs1/p2/C2.html">{&#064;docRoot}/../docs1/p2/C2.html</A> <br>
+ * Sub-test 5 Expect: <A HREF="../../docs1/p2/C2.html">../../docs1/p2/C2.html</A>
+ * <p>
+ *
+ * Sub-test 6 Actual: <A HREF="{@docRoot}/p2/package-summary.html#package_description">{&#064;docRoot}/p2/package-summary.html#package_description</A> <br>
+ * Sub-test 6 Expect: <A HREF="../p2/package-summary.html#package_description">../p2/package-summary.html#package_description</A>
+ * <p>
+ *
+ * Sub-test 7 Actual: <A HREF="{@docRoot}/../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
+ * Sub-test 7 Expect: <A HREF="../../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
+ * <p>
+ *
+ * <!-- =================================================================== -->
+ *
+ * Allow docRoot to work without a trailing slash for those who had to change their comments
+ * to work with the 1.4.0 bug:
+ * <p>
+ *
+ * Sub-test 8 Actual: <A HREF="{@docRoot}p2/C2.html">{&#064;docRoot}p2/C2.html</A> <br>
+ * Sub-test 8 Expect: <A HREF="..p2/C2.html">../p2/C2.html</A>
+ * <p>
+ *
+ * Sub-test 9 Actual: <A HREF="{@docRoot}../docs1/p2/C2.html">{&#064;docRoot}../docs1/p2/C2.html</A> <br>
+ * Sub-test 9 Expect: <A HREF="..../docs1/p2/C2.html">../../docs1/p2/C2.html</A>
+ * <p>
+ *
+ * Sub-test 10 Actual: <A HREF="{@docRoot}p2/package-summary.html#package_description">{&#064;docRoot}/p2/package-summary.html#package_description</A> <br>
+ * Sub-test 10 Expect: <A HREF="..p2/package-summary.html#package_description">../p2/package-summary.html#package_description#package_description</A>
+ * <p>
+ *
+ * Sub-test 11 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
+ * Sub-test 11 Expect: <A HREF="..../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
+ *
+ */
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/DocRootSlash/p1/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,64 @@
+<HTML>
+<HEAD>
+</HEAD>
+
+<BODY>
+
+Dummy first sentence to suppress breakiterator warning.
+<p>
+
+Case 0 Actual: <A HREF=".">.</A> &nbsp; Current directory
+<p>
+
+Sub-test 12 Actual: <A HREF="{@docroot}">{&#064;docroot}</A> Bare tag - ALL LOWERCASE <br>
+Sub-test 12 Expect: <A HREF=""></A> <br>
+(Expect empty string because lowercase docroot is illegal)
+<p>
+
+Sub-test 13 Actual: <A HREF="{@docRoot}">{&#064;docRoot}</A> Bare tag - "R" UPPERCASE <br>
+Sub-test 13 Expect: <A HREF="..">..</A>
+<p>
+
+Sub-test 14 Actual: <A HREF="{@docRoot}/package-list">{&#064;docRoot}/package-list</A> <br>
+Sub-test 14 Expect: <A HREF="../package-list">../package-list</A>
+<p>
+
+Sub-test 15 Actual: <A HREF="{@docRoot}/p2/C2.html">{&#064;docRoot}/p2/C2.html</A> <br>
+Sub-test 15 Expect: <A HREF="../p2/C2.html">../p2/C2.html</A>
+<p>
+
+Sub-test 16 Actual: <A HREF="{@docRoot}/../docs1/p2/C2.html">{&#064;docRoot}/../docs1/p2/C2.html</A> <br>
+Sub-test 16 Expect: <A HREF="../../docs1/p2/C2.html">../../docs1/p2/C2.html</A>
+<p>
+
+Sub-test 17 Actual: <A HREF="{@docRoot}/p2/package-summary.html#package_description">{&#064;docRoot}/p2/package-summary.html#package_description</A> <br>
+Sub-test 17 Expect: <A HREF="../p2/package-summary.html#package_description">../p2/package-summary.html#package_description</A>
+<p>
+
+Sub-test 18 Actual: <A HREF="{@docRoot}/../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
+Sub-test 18 Expect: <A HREF="../../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
+<p>
+
+<!-- ================================================================== -->
+
+Allow docRoot to work without a trailing slash for those who had to change their comments
+to work with the 1.4.0 bug:
+<p>
+
+Sub-test 19 Actual: <A HREF="{@docRoot}p2/C2.html">{&#064;docRoot}p2/C2.html</A> <br>
+Sub-test 19 Expect: <A HREF="..p2/C2.html">../p2/C2.html</A>
+<p>
+
+Sub-test 20 Actual: <A HREF="{@docRoot}../docs1/p2/C2.html">{&#064;docRoot}../docs1/p2/C2.html</A> <br>
+Sub-test 20 Expect: <A HREF="..../docs1/p2/C2.html">../../docs1/p2/C2.html</A>
+<p>
+
+Sub-test 21 Actual: <A HREF="{@docRoot}p2/package-summary.html#package_description">{&#064;docRoot}/p2/package-summary.html#package_description</A><br>
+Sub-test 21 Expect: <A HREF="..p2/package-summary.html#package_description">../p2/package-summary.html#package_description</A>
+<p>
+
+Sub-test 22 Actual: <A HREF="{@docRoot}../docs1/p2/package-summary.html#package_description">{&#064;docRoot}/../docs1/p2/package-summary.html#package_description</A> <br>
+Sub-test 22 Expect: <A HREF="..../docs1/p2/package-summary.html#package_description">../../docs1/p2/package-summary.html#package_description</A>
+
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/DocRootSlash/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+/**
+ * Source file for C2
+ */
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/DocRootSlash/p2/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,9 @@
+<HTML>
+<HEAD>
+</HEAD>
+
+<BODY>
+This is the description of package p2.
+
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/InheritDocForUserTags/DocTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,248 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8008768
+ * @summary Using {@inheritDoc} in simple tag defined via -tag fails
+ * @author Mike Duigou
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main DocTest
+ */
+
+/**
+ * DocTest documentation.
+ *
+ * @apiNote DocTest API note.
+ * @implSpec DocTest implementation spec.
+ * @implNote DocTest implementation note.
+ */
+public class DocTest extends JavadocTester {
+    public static void main(String... args) throws Exception {
+        DocTest tester = new DocTest();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-verbose",
+                "-d", "DocTest",
+                "-tag", "apiNote:optcm:<em>API Note</em>",
+                "-tag", "implSpec:optcm:<em>Implementation Requirements</em>:",
+                "-tag", "implNote:optcm:<em>Implementation Note</em>:",
+                "-package",
+                testSrc("DocTest.java")
+        );
+        checkExit(Exit.OK);
+
+        // javadoc does not report an exit code for an internal exception (!)
+        // so monitor stderr for stack dumps.
+        checkOutput(Output.STDERR, false, "at com.sun");
+    }
+
+    /**
+     * DocTest() documentation.
+     *
+     * @apiNote DocTest() API note.
+     * @implSpec DocTest() implementation spec.
+     * @implNote DocTest() implementation note.
+     */
+    public DocTest() {
+    }
+
+    /**
+     * DocTest.testMethod() documentation.
+     *
+     * @apiNote DocTest.testMethod() API note.
+     * @implSpec DocTest.testMethod() implementation spec.
+     * @implNote DocTest.testMethod() implementation note.
+     */
+    public void testMethod() {
+    }
+}
+
+/**
+ * DocTestWithTags documentation.
+ *
+ * @apiNote DocTestWithTags API note.
+ * <pre>
+ *    DocTestWithTags API note code sample.
+ * </pre>
+ * @implSpec DocTestWithTags implementation spec.
+ * <pre>
+ *    DocTestWithTags implementation spec code sample.
+ * </pre>
+ * @implNote DocTestWithTags implementation note.
+ * <pre>
+ *    DocTestWithTags implementation note code sample.
+ * </pre>
+ */
+class DocTestWithTags {
+
+    /**
+     * DocTestWithTags() documentation.
+     *
+     * @apiNote DocTestWithTags() API note.
+     * <pre>
+     *    DocTestWithTags() API note code sample.
+     * </pre>
+     * @implSpec DocTestWithTags() implementation spec.
+     * <pre>
+     *    DocTestWithTags() implementation spec code sample.
+     * </pre>
+     * @implNote DocTest() implementation note.
+     * <pre>
+     *    DocTest() implementation note code sample.
+     * </pre>
+     */
+    public DocTestWithTags() {
+    }
+
+    /**
+     * DocTest.testMethod() documentation.
+     *
+     * @apiNote DocTestWithTags.testMethod() API note.
+     * <pre>
+     *    DocTestWithTags.testMethod() API note code sample.
+     * </pre>
+     * @implSpec DocTestWithTags.testMethod() implementation spec.
+     * <pre>
+     *    DocTestWithTags.testMethod() API implementation spec code sample.
+     * </pre>
+     * @implNote DocTest.testMethod() implementation note.
+     * <pre>
+     *    DocTest.testMethod() API implementation code sample.
+     * </pre>
+     */
+    public void testMethod() {
+    }
+}
+
+class MinimallyExtendsDocTest extends DocTest {
+}
+
+/**
+ * SimpleExtendsDocTest documentation.
+ */
+class SimpleExtendsDocTest extends DocTest {
+
+    /**
+     * SimpleExtendsDocTest() documentation.
+     */
+    public SimpleExtendsDocTest() {
+
+    }
+
+    /**
+     * SimpleExtendsDocTest.testMethod() documenation.
+     */
+    @java.lang.Override
+    public void testMethod() {
+    }
+}
+
+/**
+ * {@inheritDoc}
+ */
+class SimpleInheritDocDocTest extends DocTest {
+
+    /**
+     * {@inheritDoc}
+     */
+    public SimpleInheritDocDocTest() {
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @java.lang.Override
+    public void testMethod() {
+    }
+}
+
+/**
+ * {@inheritDoc}
+ *
+ * @apiNote {@inheritDoc}
+ * @implSpec {@inheritDoc}
+ * @implNote {@inheritDoc}
+ */
+class FullInheritDocDocTest extends DocTest {
+
+    /**
+     * {@inheritDoc}
+     *
+     * @apiNote {@inheritDoc}
+     * @implSpec {@inheritDoc}
+     * @implNote {@inheritDoc}
+     */
+    public FullInheritDocDocTest() {
+
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @apiNote {@inheritDoc}
+     * @implSpec {@inheritDoc}
+     * @implNote {@inheritDoc}
+     */
+    @java.lang.Override
+    public void testMethod() {
+    }
+}
+
+/**
+ * {@inheritDoc} and FullInheritDocPlusDocTest documentation.
+ *
+ * @implSpec {@inheritDoc} and FullInheritDocPlusDocTest API note.
+ * @implNote {@inheritDoc} and FullInheritDocPlusDocTest implementation specification.
+ * @apiNote {@inheritDoc} and FullInheritDocPlusDocTest implementation note.
+ */
+class FullInheritDocPlusDocTest extends DocTest {
+
+    /**
+     * {@inheritDoc} and FullInheritDocPlusDocTest() documentation.
+     *
+     * @implSpec {@inheritDoc} and FullInheritDocPlusDocTest() API note.
+     * @implNote {@inheritDoc} and FullInheritDocPlusDocTest() implementation specification.
+     * @apiNote {@inheritDoc} and FullInheritDocPlusDocTest() implementation note.
+     */
+    public FullInheritDocPlusDocTest() {
+
+    }
+
+    /**
+     * {@inheritDoc} and FullInheritDocPlusDocTest.testMethod() documentation.
+     *
+     * @implSpec {@inheritDoc} and FullInheritDocPlusDocTest.testMethod() API note.
+     * @implNote {@inheritDoc} and FullInheritDocPlusDocTest.testMethod() implementation specification.
+     * @apiNote {@inheritDoc} and FullInheritDocPlusDocTest.testMethod() implementation note.
+     */
+    @java.lang.Override
+    public void testMethod() {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/JavascriptWinTitle/JavascriptWinTitle.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4645058 4747738 4855054 8024756 8141492
+ * @summary  Javascript IE load error when linked by -linkoffline
+ *           Window title shouldn't change when loading left frames (javascript)
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main JavascriptWinTitle
+ */
+
+public class JavascriptWinTitle extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        JavascriptWinTitle tester = new JavascriptWinTitle();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-doctitle", "Document Title",
+                "-windowtitle", "Window Title",
+                "-overview", testSrc("overview.html"),
+                "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api", testSrc,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+        checkOutput("overview-summary.html", true,
+                "<script type=\"text/javascript\">",
+                "<body>");
+
+        // Test that "onload" is not present in BODY tag:
+        checkOutput("p1/package-summary.html", true, "<body>");
+        checkOutput("overview-frame.html", true, "<body>");
+        checkOutput("allclasses-frame.html", true, "<body>");
+        checkOutput("p1/package-frame.html", true, "<body>");
+
+        // Test that win title javascript is followed by NOSCRIPT code.
+        checkOutput("p1/C.html", true,
+                "<script type=\"text/javascript\"><!--\n"
+                + "    try {\n"
+                + "        if (location.href.indexOf('is-external=true') == -1) {\n"
+                + "            parent.document.title=\"C (Window Title)\";\n"
+                + "        }\n"
+                + "    }\n"
+                + "    catch(err) {\n"
+                + "    }\n"
+                + "//-->\n");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/JavascriptWinTitle/overview.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+This document is generated from sample source code and HTML files 
+with examples of a wide variety of Java language constructs: packages, 
+subclasses, subinterfaces, nested classes, nested interfaces,
+inheriting from other packages, constructors, fields,
+methods, and so forth.
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/JavascriptWinTitle/p1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/JavascriptWinTitle/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/JavascriptWinTitle/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,135 @@
+java.applet
+java.awt
+java.awt.color
+java.awt.datatransfer
+java.awt.dnd
+java.awt.event
+java.awt.font
+java.awt.geom
+java.awt.im
+java.awt.im.spi
+java.awt.image
+java.awt.image.renderable
+java.awt.print
+java.beans
+java.beans.beancontext
+java.io
+java.lang
+java.lang.ref
+java.lang.reflect
+java.math
+java.net
+java.nio
+java.nio.channels
+java.nio.channels.spi
+java.nio.charset
+java.nio.charset.spi
+java.rmi
+java.rmi.activation
+java.rmi.dgc
+java.rmi.registry
+java.rmi.server
+java.security
+java.security.acl
+java.security.cert
+java.security.interfaces
+java.security.spec
+java.sql
+java.text
+java.util
+java.util.jar
+java.util.logging
+java.util.prefs
+java.util.regex
+java.util.zip
+javax.accessibility
+javax.crypto
+javax.crypto.interfaces
+javax.crypto.spec
+javax.imageio
+javax.imageio.event
+javax.imageio.metadata
+javax.imageio.plugins.jpeg
+javax.imageio.spi
+javax.imageio.stream
+javax.naming
+javax.naming.directory
+javax.naming.event
+javax.naming.ldap
+javax.naming.spi
+javax.net
+javax.net.ssl
+javax.print
+javax.print.attribute
+javax.print.attribute.standard
+javax.print.event
+javax.rmi
+javax.rmi.CORBA
+javax.security.auth
+javax.security.auth.callback
+javax.security.auth.kerberos
+javax.security.auth.login
+javax.security.auth.spi
+javax.security.auth.x500
+javax.security.cert
+javax.sound.midi
+javax.sound.midi.spi
+javax.sound.sampled
+javax.sound.sampled.spi
+javax.sql
+javax.swing
+javax.swing.border
+javax.swing.colorchooser
+javax.swing.event
+javax.swing.filechooser
+javax.swing.plaf
+javax.swing.plaf.basic
+javax.swing.plaf.metal
+javax.swing.plaf.multi
+javax.swing.table
+javax.swing.text
+javax.swing.text.html
+javax.swing.text.html.parser
+javax.swing.text.rtf
+javax.swing.tree
+javax.swing.undo
+javax.transaction
+javax.transaction.xa
+javax.xml.parsers
+javax.xml.transform
+javax.xml.transform.dom
+javax.xml.transform.sax
+javax.xml.transform.stream
+org.ietf.jgss
+org.omg.CORBA
+org.omg.CORBA.DynAnyPackage
+org.omg.CORBA.ORBPackage
+org.omg.CORBA.TypeCodePackage
+org.omg.CORBA.portable
+org.omg.CORBA_2_3
+org.omg.CORBA_2_3.portable
+org.omg.CosNaming
+org.omg.CosNaming.NamingContextExtPackage
+org.omg.CosNaming.NamingContextPackage
+org.omg.Dynamic
+org.omg.DynamicAny
+org.omg.DynamicAny.DynAnyFactoryPackage
+org.omg.DynamicAny.DynAnyPackage
+org.omg.IOP
+org.omg.IOP.CodecFactoryPackage
+org.omg.IOP.CodecPackage
+org.omg.Messaging
+org.omg.PortableInterceptor
+org.omg.PortableInterceptor.ORBInitInfoPackage
+org.omg.PortableServer
+org.omg.PortableServer.CurrentPackage
+org.omg.PortableServer.POAManagerPackage
+org.omg.PortableServer.POAPackage
+org.omg.PortableServer.ServantLocatorPackage
+org.omg.PortableServer.portable
+org.omg.SendingContext
+org.omg.stub.java.rmi
+org.w3c.dom
+org.xml.sax
+org.xml.sax.ext
+org.xml.sax.helpers
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/MetaTag/MetaTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4034096 4764726 6235799
+ * @summary  Add support for HTML keywords via META tag for
+ *           class and member names to improve API search
+ * @author   dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main MetaTag
+ */
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+public class MetaTag extends JavadocTester {
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments
+     * @throws Exception if the test fails
+     */
+    public static void main(String... args) throws Exception {
+        MetaTag tester = new MetaTag();
+        tester.runTests();
+    }
+
+    @Test
+    void testStandard() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "-keywords",
+                "-doctitle", "Sample Packages",
+                "p1", "p2");
+
+        checkExit(Exit.OK);
+
+        checkOutput("p1/C1.html", true,
+                "<meta name=\"keywords\" content=\"p1.C1 class\">",
+                "<meta name=\"keywords\" content=\"field1\">",
+                "<meta name=\"keywords\" content=\"field2\">",
+                "<meta name=\"keywords\" content=\"method1()\">",
+                "<meta name=\"keywords\" content=\"method2()\">");
+
+        checkOutput("p1/package-summary.html", true,
+                "<meta name=\"keywords\" content=\"p1 package\">");
+
+        checkOutput("overview-summary.html", true,
+                "<meta name=\"keywords\" content=\"Overview, Sample Packages\">");
+
+        // NOTE: Hopefully, this regression test is not run at midnight.  If the output
+        // was generated yesterday and this test is run today, the test will fail.
+        checkOutput("overview-summary.html", true,
+                "<meta name=\"date\" content=\"" + date() + "\">");
+    }
+
+    @Test
+    void testNoTimestamp() {
+        javadoc("-d", "out-2",
+                "-sourcepath", testSrc,
+                "-notimestamp",
+                "-doctitle", "Sample Packages",
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // No keywords when -keywords is not used.
+        checkOutput("p1/C1.html", false,
+                "<META NAME=\"keywords\" CONTENT=\"p1.C1 class\">",
+                "<META NAME=\"keywords\" CONTENT=\"field1\">",
+                "<META NAME=\"keywords\" CONTENT=\"field2\">",
+                "<META NAME=\"keywords\" CONTENT=\"method1()\">",
+                "<META NAME=\"keywords\" CONTENT=\"method2()\">");
+
+        checkOutput("p1/package-summary.html", false,
+                "<META NAME=\"keywords\" CONTENT=\"p1 package\">");
+
+        checkOutput("overview-summary.html", false,
+                "<META NAME=\"keywords\" CONTENT=\"Overview Summary, Sample Packages\">");
+
+        // The date metatag should not show up when -notimestamp is used.
+        // NOTE: Hopefully, this regression test is not run at midnight.  If the output
+        // was generated yesterday and this test is run today, the test will fail.
+        checkOutput("overview-summary.html", false,
+                "<META NAME=\"date\" CONTENT=\"" + date() + "\">");
+    }
+
+    private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
+
+    String date() {
+        return dateFormat.format(new Date());
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/MetaTag/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C1 {
+
+    public C1() {
+    }
+
+    public C1(Object obj) {
+    }
+
+    public int field1 = 0;
+
+    public int field2 = 0;
+
+    public int method1() {
+        return 0;
+    }
+
+    /**
+     * Overload of method1() to demonstrate how all
+     * overloads are combined into a single meta keyword
+     */
+    public int method1(String s) {
+        return 0;
+    }
+
+    public int method2(String s1, String s2) {
+        return 0;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/MetaTag/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/PackagesHeader/PackagesHeader.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4766385
+ * @summary  Test that the header option for upper left frame
+ *           is present for three sets of options: (1) -header,
+ *           (2) -packagesheader, and (3) -header -packagesheader
+ * @author   dkramer
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main PackagesHeader
+ */
+
+public class PackagesHeader extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        JavadocTester tester = new PackagesHeader();
+        tester.runTests();
+    }
+
+    @Test
+    void testHeader() {
+        // First test with -header only
+        javadoc("-d", "out-header",
+                "-header", "Main Frame Header",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Test that the -header shows up in the packages frame
+        checkOutput("overview-frame.html", true,
+                "Main Frame Header");
+    }
+
+    @Test
+    void testPackagesHeader() {
+        // Second test with -packagesheader only
+        javadoc("-d", "out-packages-header",
+                "-packagesheader", "Packages Frame Header",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Test that the -packagesheader string shows
+        // up in the packages frame
+        checkOutput("overview-frame.html", true,
+                "Packages Frame Header");
+    }
+
+    @Test
+    void testBothHeaders() {
+        // Third test with both -packagesheader and -header
+        javadoc("-d", "out-both",
+                "-packagesheader", "Packages Frame Header",
+                "-header", "Main Frame Header",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Test that the both headers show up and are different
+        checkOutput("overview-frame.html", true,
+                "Packages Frame Header");
+
+        checkOutput("overview-summary.html", true,
+                "Main Frame Header");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/PackagesHeader/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/PackagesHeader/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/T6735320/SerialFieldTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+import java.io.ObjectStreamField;
+import java.io.Serializable;
+
+public class SerialFieldTest implements Serializable {
+    /**
+     * @serialField
+     * @serialField count int
+     * @serialField name String a test
+     */
+    private static final ObjectStreamField[] serialPersistentFields = {
+        new ObjectStreamField("i", int.class),
+        new ObjectStreamField("count", Integer.TYPE),
+        new ObjectStreamField("name", String.class)
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/T6735320/T6735320.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6735320
+ * @summary javadoc throws exception if serialField value is missing
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main T6735320
+ */
+
+public class T6735320 extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        T6735320 tester = new T6735320();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                testSrc("SerialFieldTest.java"));
+        checkExit(Exit.FAILED);
+        checkOutput(Output.STDERR, false,
+                "OutOfBoundsException");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/ValidHtml/ValidHtml.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4275630 4749453 4625400 4753048 4415270 8074521
+ * @summary  Generated HTML is invalid with frames.
+ *           Displays unnecessary horizontal scroll bars.
+ *           Missing whitespace in DOCTYPE declaration
+ *           HTML table tags inserted in wrong place in pakcage use page
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main ValidHtml
+ */
+
+public class ValidHtml extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        ValidHtml tester = new ValidHtml();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        // Test for all cases except the split index page
+        javadoc("-d", "out",
+                    "-doctitle", "Document Title",
+                    "-windowtitle", "Window Title",
+                    "-use",
+                    "-overview", testSrc("overview.html"),
+                    "-sourcepath", testSrc,
+                    "p1", "p2");
+        checkExit(Exit.OK);
+
+        // Test the proper DOCTYPE element are present:
+        checkOutput("index.html",              true, LOOSE);
+        checkOutput("overview-summary.html",   true, LOOSE);
+        checkOutput("p1/package-summary.html", true, LOOSE);
+        checkOutput("p1/C.html",               true, LOOSE);
+        checkOutput("overview-frame.html",     true, LOOSE);
+        checkOutput("allclasses-frame.html",   true, LOOSE);
+        checkOutput("p1/package-frame.html",   true, LOOSE);
+
+        // Test for IFRAME element:
+        checkOutput("index.html", true,
+                "<iframe");
+
+        // Test the table elements are in the correct order:
+        checkOutput("p1/package-use.html", true,
+                "</td>\n"
+                + "</tr>");
+    }
+
+    private static final String LOOSE =
+            "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/ValidHtml/overview.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+This document is generated from sample source code and HTML files 
+with examples of a wide variety of Java language constructs: packages, 
+subclasses, subinterfaces, nested classes, nested interfaces,
+inheriting from other packages, constructors, fields,
+methods, and so forth.
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/ValidHtml/p1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C {
+    /**
+     * @param  classparam  C type included for "use"test
+     * @return String "Hi"
+     */
+
+    public String publicMethod(C classparam) {
+        return "Hi";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/ValidHtml/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/VersionNumber/VersionNumber.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4720849
+ * @summary  Standard doclet contains hard-coded version number
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main VersionNumber
+ */
+
+
+/**
+ * Runs javadoc and runs regression tests on the resulting HTML.
+ */
+public class VersionNumber extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        VersionNumber tester = new VersionNumber();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "p1");
+        checkExit(Exit.OK);
+
+        // Test the proper DOCTYPE element is present:
+        checkOutput("p1/C.html", true,
+                "<!-- Generated by javadoc (");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/VersionNumber/p1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+public class C {
+    /**
+     * @param  classparam  C type included for "use"test
+     * @return String "Hi"
+     */
+
+    public String publicMethod(C classparam) {
+        return "Hi";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/WindowTitles/WindowTitles.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4530730
+ * @summary stddoclet: With frames off, window titles have "()" appended
+ * @author dkramer
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main WindowTitles
+ */
+
+/**
+ * Runs javadoc and runs regression tests on the resulting HTML.
+ */
+public class WindowTitles extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        WindowTitles tester = new WindowTitles();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        // Test for all cases except the split index page
+        javadoc("-d", "out-1",
+                "-use",
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkTitle("overview-summary.html",     "Overview");
+        checkTitle("overview-tree.html",        "Class Hierarchy");
+        checkTitle("overview-frame.html",       "Overview List");
+        checkTitle("p1/package-summary.html",   "p1");
+        checkTitle("p1/package-frame.html",     "p1");
+        checkTitle("p1/package-tree.html",      "p1 Class Hierarchy");
+        checkTitle("p1/package-use.html",       "Uses of Package p1");
+        checkTitle("p1/C1.html",                "C1");
+        checkTitle("allclasses-frame.html",     "All Classes");
+        checkTitle("allclasses-noframe.html",   "All Classes");
+        checkTitle("constant-values.html",      "Constant Field Values");
+        checkTitle("deprecated-list.html",      "Deprecated List");
+        checkTitle("serialized-form.html",      "Serialized Form");
+        checkTitle("help-doc.html",             "API Help");
+        checkTitle("index-all.html",            "Index");
+        checkTitle("p1/class-use/C1.html",      "Uses of Class p1.C1");
+    }
+
+    @Test
+    void test2() {
+        // Test only for the split-index case (and run on only one package)
+        javadoc("-d", "out-2",
+                "-splitindex",
+                "-sourcepath", testSrc,
+                "p1");
+        checkExit(Exit.OK);
+
+        checkTitle("index-files/index-1.html", "C-Index");
+    }
+
+    void checkTitle(String file, String title) {
+        checkOutput(file, true, "<title>" + title + "</title>");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/WindowTitles/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p1;
+
+import java.io.Serializable;
+
+public class C1 implements Serializable {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/WindowTitles/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/_template/Template.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @ test
+ * @ bug      <BUG-ID>
+ * @ summary  <BUG-SYNOPSIS>
+ * @ author   <AUTHOR> or delete
+ * @ library  ../lib/
+ * @ build    JavadocTester <CLASS NAME>
+ * @ run main <CLASS NAME>
+ */
+
+public class Template extends JavadocTester {
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR
+    };
+
+    //Input for string search tests.
+    private static final String[][] TEST = NO_TEST;
+    private static final String[][] NEGATED_TEST = NO_TEST;
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        Template tester = new Template();
+        tester.run(ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/_template/TemplateComplete.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @ test
+ * @ bug      <BUG-ID>
+ * @ summary  <BUG-SYNOPSIS>
+ * @ author   <AUTHOR> or delete
+ * @ library  ../lib/
+ * @ build    JavadocTester <CLASS NAME>
+ * @ run main <CLASS NAME>
+ */
+
+public class TemplateComplete extends JavadocTester {
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR
+    };
+
+    //Input for string search tests.
+    private static final String[][] TEST = NO_TEST;
+    private static final String[][] NEGATED_TEST = NO_TEST;
+
+    //Input for Javadoc return code test.
+    private static final int EXPECTED_EXIT_CODE = 0;
+
+
+    //Input for file diff test.
+    private static final String DIFFDIR1 = null;
+    private static final String DIFFDIR2 = null;
+    private static final String[][] FILES_TO_DIFF = {};
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TemplateComplete tester = new TemplateComplete();
+        int actualExitCode = tester.run(ARGS, TEST, NEGATED_TEST);
+        tester.checkExitCode(EXPECTED_EXIT_CODE, actualExitCode);
+        tester.runDiffs(DIFFDIR1, DIFFDIR2, FILES_TO_DIFF, false);
+        tester.printSummary();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/constantValues/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 pkg2;
+
+public class A {
+   /** Test constant. */
+   public static final String DEMO= "y<abs(x)";
+   /** Connection URL for the JDBC Driver. */
+   public static final String THIS_IS_OK= "y < abs(x)";
+
+   public static final String DEMO_STRING = "<Hello World>";
+
+   public A() {
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/constantValues/TestConstantValues.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+public class TestConstantValues {
+
+    /**
+     * Test 1 passes ({@value}).
+     */
+    public static final int TEST1PASSES = 500000;
+
+
+    /**
+     * Test 2 passes ({@value}).
+     */
+    public static final String TEST2PASSES = "My String";
+
+    // all of if not most are in the JDK sources, it is
+    // crucial we catch any discrepancies now.
+    public static final byte BYTE_MAX_VALUE = 127;
+    public static final byte BYTE_MIN_VALUE = -127;
+
+    public static final char CHAR_MAX_VALUE = 65535;
+
+    public static final double DOUBLE_MAX_VALUE = 1.7976931348623157E308;
+    public static final double DOUBLE_MIN_VALUE = 4.9E-324;
+
+    public static final float MAX_FLOAT_VALUE = 3.4028234663852886E38f;
+    public static final float MIN_FLOAT_VALUE = 1.401298464324817E-45f;
+
+    public static final boolean HELLO = true;
+    public static final boolean GOODBYE = false;
+
+    public static final int INT_MAX_VALUE = 2147483647;
+    public static final int INT_MIN_VALUE = -2147483647;
+
+    public static final long LONG_MAX_LONG_VALUE = 9223372036854775807L;
+    public static final long LONG_MIN_LONG_VALUE = -9223372036854775808L;
+
+    public static final short SHORT_MAX_VALUE = 32767;
+    public static final short SHORT_MIN_VALUE = -32767;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/constantValues/TestConstantValues2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+public interface TestConstantValues2 {
+
+    /**
+     * Test 3 passes ({@value}).
+     */
+    public static final int TEST3PASSES = 500000;
+
+
+    /**
+     * Test 4 passes ({@value}).
+     */
+    public static final String TEST4PASSES = "My String";
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/constantValues/TestConstantValuesDriver.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4504730 4526070 5077317
+ * @summary Test the generation of constant-values.html.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestConstantValuesDriver
+ */
+public class TestConstantValuesDriver extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestConstantValuesDriver tester = new TestConstantValuesDriver();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                testSrc("TestConstantValues.java"),
+                testSrc("TestConstantValues2.java"),
+                testSrc("A.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("constant-values.html", true,
+                "TEST1PASSES",
+                "TEST2PASSES",
+                "TEST3PASSES",
+                "TEST4PASSES",
+                "<code>\"&lt;Hello World&gt;\"</code>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;byte</code></td>\n" +
+                    "<td><code><a href=\"TestConstantValues.html#BYTE_MAX_VALUE\">" +
+                    "BYTE_MAX_VALUE</a></code></td>\n" +
+                    "<td class=\"colLast\"><code>127</code></td>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;byte</code></td>\n" +
+                    "<td><code><a href=\"TestConstantValues.html#BYTE_MIN_VALUE\">" +
+                    "BYTE_MIN_VALUE</a></code></td>\n" +
+                    "<td class=\"colLast\"><code>-127</code></td>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;char</code></td>\n" +
+                    "<td><code><a href=\"TestConstantValues.html#CHAR_MAX_VALUE\">" +
+                    "CHAR_MAX_VALUE</a></code></td>\n" +
+                    "<td class=\"colLast\"><code>65535</code></td>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;double</code></td>",
+                    "<td><code><a href=\"TestConstantValues.html#DOUBLE_MAX_VALUE\">" +
+                    "DOUBLE_MAX_VALUE</a></code></td>\n" +
+                    "<td class=\"colLast\"><code>1.7976931348623157E308</code></td>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;double</code></td>\n" +
+                    "<td><code><a href=\"TestConstantValues.html#DOUBLE_MIN_VALUE\">" +
+                    "DOUBLE_MIN_VALUE</a></code></td>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;boolean</code></td>\n" +
+                    "<td><code><a href=\"TestConstantValues.html#GOODBYE\">" +
+                    "GOODBYE</a></code></td>",
+                "</a><code>public&nbsp;static&nbsp;final&nbsp;boolean</code></td>\n" +
+                    "<td><code><a href=\"TestConstantValues.html#HELLO\">HELLO</a></code></td>\n" +
+                    "<td class=\"colLast\"><code>true</code></td>"
+        );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/dupThrowsTags/TestDupThrowsTags.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4525364
+ * @summary Determine if duplicate throws tags can be used.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestDupThrowsTags
+ */
+public class TestDupThrowsTags extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDupThrowsTags tester = new TestDupThrowsTags();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                testSrc("TestDupThrowsTags.java"));
+        checkExit(Exit.FAILED);
+
+        checkOutput("TestDupThrowsTags.html", true,
+                "Test 1 passes",
+                "Test 2 passes",
+                "Test 3 passes",
+                "Test 4 passes");
+    }
+
+    /**
+     * @throws java.io.IOException Test 1 passes
+     * @throws java.io.IOException Test 2 passes
+     * @throws java.lang.NullPointerException Test 3 passes
+     * @throws java.io.IOException Test 4 passes
+     */
+    public void method() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/lib/JavadocTester.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,768 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+import java.io.BufferedWriter;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.ref.SoftReference;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.ArrayList;
+import java.util.EnumMap;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+
+/**
+ * Test framework for running javadoc and performing tests on the resulting output.
+ *
+ * <p>
+ * Tests are typically written as subtypes of JavadocTester, with a main
+ * method that creates an instance of the test class and calls the runTests()
+ * method. The runTests() methods calls all the test methods declared in the class,
+ * and then calls a method to print a summary, and throw an exception if
+ * any of the test methods reported a failure.
+ *
+ * <p>
+ * Test methods are identified with a @Test annotation. They have no parameters.
+ * The name of the method is not important, but if you have more than one, it is
+ * recommended that the names be meaningful and suggestive of the test case
+ * contained therein.
+ *
+ * <p>
+ * Typically, a test method will invoke javadoc, and then perform various
+ * checks on the results. The standard checks are:
+ *
+ * <dl>
+ * <dt>checkExitCode
+ * <dd>Check the exit code returned from javadoc.
+ * <dt>checkOutput
+ * <dd>Perform a series of checks on the contents on a file or output stream
+ *     generated by javadoc.
+ *     The checks can be either that a series of strings are found or are not found.
+ * <dt>checkFiles
+ * <dd>Perform a series of checks on the files generated by javadoc.
+ *     The checks can be that a series of files are found or are not found.
+ * </dl>
+ *
+ * <pre><code>
+ *  public class MyTester extends JavadocTester {
+ *      public static void main(String... args) throws Exception {
+ *          MyTester tester = new MyTester();
+ *          tester.runTests();
+ *      }
+ *
+ *      // test methods...
+ *      @Test
+ *      void test() {
+ *          javadoc(<i>args</i>);
+ *          checkExit(Exit.OK);
+ *          checkOutput(<i>file</i>, true,
+ *              <i>strings-to-find</i>);
+ *          checkOutput(<i>file</i>, false,
+ *              <i>strings-to-not-find</i>);
+ *      }
+ *  }
+ * </code></pre>
+ *
+ * <p>
+ * If javadoc is run more than once in a test method, you can compare the
+ * results that are generated with the diff method. Since files written by
+ * javadoc typically contain a timestamp, you may want to use the -notimestamp
+ * option if you are going to compare the results from two runs of javadoc.
+ *
+ * <p>
+ * If you have many calls of checkOutput that are very similar, you can write
+ * your own check... method to reduce the amount of duplication. For example,
+ * if you want to check that many files contain the same string, you could
+ * write a method that takes a varargs list of files and calls checkOutput
+ * on each file in turn with the string to be checked.
+ *
+ * <p>
+ * You can also write you own custom check methods, which can use
+ * readFile to get the contents of a file generated by javadoc,
+ * and then use pass(...) or fail(...) to report whether the check
+ * succeeded or not.
+ *
+ * <p>
+ * You can have many separate test methods, each identified with a @Test
+ * annotation. However, you should <b>not</b> assume they will be called
+ * in the order declared in your source file.  If the order of a series
+ * of javadoc invocations is important, do that within a single method.
+ * If the invocations are independent, for better clarity, use separate
+ * test methods, each with their own set of checks on the results.
+ *
+ * @author Doug Kramer
+ * @author Jamie Ho
+ * @author Jonathan Gibbons (rewrite)
+ */
+public abstract class JavadocTester {
+
+    public static final String FS = System.getProperty("file.separator");
+    public static final String PS = System.getProperty("path.separator");
+    public static final String NL = System.getProperty("line.separator");
+
+    public enum Output {
+        /** The name of the output stream from javadoc. */
+        OUT,
+        /** The name for any output written to System.out. */
+        STDOUT,
+        /** The name for any output written to System.err. */
+        STDERR
+    }
+
+    /** The output directory used in the most recent call of javadoc. */
+    protected File outputDir;
+
+    /** The exit code of the most recent call of javadoc. */
+    private int exitCode;
+
+    /** The output generated by javadoc to the various writers and streams. */
+    private final Map<Output, String> outputMap = new EnumMap<>(Output.class);
+
+    /** A cache of file content, to avoid reading files unnecessarily. */
+    private final Map<File,SoftReference<String>> fileContentCache = new HashMap<>();
+
+    /** Stream used for logging messages. */
+    private final PrintStream out = System.out;
+
+    /** The directory containing the source code for the test. */
+    public static final String testSrc = System.getProperty("test.src");
+
+    /**
+     * Get the path for a source file in the test source directory.
+     * @param path the path of a file or directory in the source directory
+     * @return the full path of the specified file
+     */
+    public static String testSrc(String path) {
+        return new File(testSrc, path).getPath();
+    }
+
+    /**
+     * Alternatives for checking the contents of a directory.
+     */
+    public enum DirectoryCheck {
+        /**
+         * Check that the directory is empty.
+         */
+        EMPTY((file, name) -> true),
+        /**
+         * Check that the directory does not contain any HTML files,
+         * such as may have been generated by a prior run of javadoc
+         * using this directory.
+         * For now, the check is only performed on the top level directory.
+         */
+        NO_HTML_FILES((file, name) -> name.endsWith(".html")),
+        /**
+         * No check is performed on the directory contents.
+         */
+        NONE(null) { @Override void check(File dir) { } };
+
+        /** The filter used to detect that files should <i>not</i> be present. */
+        FilenameFilter filter;
+
+        DirectoryCheck(FilenameFilter f) {
+            filter = f;
+        }
+
+        void check(File dir) {
+            if (dir.isDirectory()) {
+                String[] contents = dir.list(filter);
+                if (contents == null)
+                    throw new Error("cannot list directory: " + dir);
+                if (contents.length > 0) {
+                    System.err.println("Found extraneous files in dir:" + dir.getAbsolutePath());
+                    for (String x : contents) {
+                        System.err.println(x);
+                    }
+                    throw new Error("directory has unexpected content: " + dir);
+                }
+            }
+        }
+    }
+
+    private DirectoryCheck outputDirectoryCheck = DirectoryCheck.EMPTY;
+
+    /** The current subtest number. Incremented when checking(...) is called. */
+    private int numTestsRun = 0;
+
+    /** The number of subtests passed. Incremented when passed(...) is called. */
+    private int numTestsPassed = 0;
+
+    /** The current run of javadoc. Incremented when javadoc is called. */
+    private int javadocRunNum = 0;
+
+    /** Marker annotation for test methods to be invoked by runTests. */
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface Test { }
+
+    /**
+     * Run all methods annotated with @Test, followed by printSummary.
+     * Typically called on a tester object in main()
+     * @throws Exception if any errors occurred
+     */
+    public void runTests() throws Exception {
+        for (Method m: getClass().getDeclaredMethods()) {
+            Annotation a = m.getAnnotation(Test.class);
+            if (a != null) {
+                try {
+                    out.println("Running test " + m.getName());
+                    m.invoke(this, new Object[] { });
+                } catch (InvocationTargetException e) {
+                    Throwable cause = e.getCause();
+                    throw (cause instanceof Exception) ? ((Exception) cause) : e;
+                }
+                out.println();
+            }
+        }
+        printSummary();
+    }
+
+    /**
+     * Run javadoc.
+     * The output directory used by this call and the final exit code
+     * will be saved for later use.
+     * To aid the reader, it is recommended that calls to this method
+     * put each option and the arguments it takes on a separate line.
+     *
+     * Example:
+     * <pre><code>
+     *  javadoc("-d", "out",
+     *          "-sourcepath", testSrc,
+     *          "-notimestamp",
+     *          "pkg1", "pkg2", "pkg3/C.java");
+     * </code></pre>
+     *
+     * @param args the arguments to pass to javadoc
+     */
+    public void javadoc(String... args) {
+        outputMap.clear();
+        fileContentCache.clear();
+
+        javadocRunNum++;
+        if (javadocRunNum == 1) {
+            out.println("Running javadoc...");
+        } else {
+            out.println("Running javadoc (run "
+                                    + javadocRunNum + ")...");
+        }
+        outputDir = new File(".");
+        for (int i = 0; i < args.length - 2; i++) {
+            if (args[i].equals("-d")) {
+                outputDir = new File(args[++i]);
+                break;
+            }
+        }
+        out.println("args: " + Arrays.toString(args));
+//        log.setOutDir(outputDir);
+
+        outputDirectoryCheck.check(outputDir);
+
+        // This is the sole stream used by javadoc
+        WriterOutput outOut = new WriterOutput();
+
+        // These are to catch output to System.out and System.err,
+        // in case these are used instead of the primary streams
+        StreamOutput sysOut = new StreamOutput(System.out, System::setOut);
+        StreamOutput sysErr = new StreamOutput(System.err, System::setErr);
+
+        try {
+            exitCode = jdk.javadoc.internal.tool.Main.execute(args, outOut.pw);
+        } finally {
+            outputMap.put(Output.STDOUT, sysOut.close());
+            outputMap.put(Output.STDERR, sysErr.close());
+            outputMap.put(Output.OUT, outOut.close());
+        }
+
+        outputMap.forEach((name, text) -> {
+            if (!text.isEmpty()) {
+                out.println("javadoc " + name + ":");
+                out.println(text);
+            }
+        });
+    }
+
+    /**
+     * Set the kind of check for the initial contents of the output directory
+     * before javadoc is run.
+     * The filter should return true for files that should <b>not</b> appear.
+     * @param c the kind of check to perform
+     */
+    public void setOutputDirectoryCheck(DirectoryCheck c) {
+        outputDirectoryCheck = c;
+    }
+
+    public enum Exit {
+        OK(0),
+        FAILED(1);
+
+        Exit(int code) {
+            this.code = code;
+        }
+
+        final int code;
+    }
+
+    /**
+     * Check the exit code of the most recent call of javadoc.
+     *
+     * @param expected the exit code that is required for the test
+     * to pass.
+     */
+    public void checkExit(Exit expected) {
+        checking("check exit code");
+        if (exitCode == expected.code) {
+            passed("return code " + exitCode);
+        } else {
+            failed("return code " + exitCode +"; expected " + expected.code + " (" + expected + ")");
+        }
+    }
+
+    /**
+     * Check for content in (or not in) the generated output.
+     * Within the search strings, the newline character \n
+     * will be translated to the platform newline character sequence.
+     * @param path a path within the most recent output directory
+     *  or the name of one of the output buffers, identifying
+     *  where to look for the search strings.
+     * @param expectedFound true if all of the search strings are expected
+     *  to be found, or false if all of the strings are expected to be
+     *  not found
+     * @param strings the strings to be searched for
+     */
+    public void checkOutput(String path, boolean expectedFound, String... strings) {
+        // Read contents of file
+        String fileString;
+        try {
+            fileString = readFile(outputDir, path);
+        } catch (Error e) {
+            if (!expectedFound) {
+                failed("Error reading file: " + e);
+                return;
+            }
+            throw e;
+        }
+        checkOutput(path, fileString, expectedFound, strings);
+    }
+
+    /**
+     * Check for content in (or not in) the one of the output streams written by
+     * javadoc. Within the search strings, the newline character \n
+     * will be translated to the platform newline character sequence.
+     * @param output the output stream to check
+     * @param expectedFound true if all of the search strings are expected
+     *  to be found, or false if all of the strings are expected to be
+     *  not found
+     * @param strings the strings to be searched for
+     */
+    public void checkOutput(Output output, boolean expectedFound, String... strings) {
+        checkOutput(output.toString(), outputMap.get(output), expectedFound, strings);
+    }
+
+    private void checkOutput(String path, String fileString, boolean expectedFound, String... strings) {
+        for (String stringToFind : strings) {
+//            log.logCheckOutput(path, expectedFound, stringToFind);
+            checking("checkOutput");
+            // Find string in file's contents
+            boolean isFound = findString(fileString, stringToFind);
+            if (isFound == expectedFound) {
+                passed(path + ": " + (isFound ? "found:" : "not found:") + "\n"
+                        + stringToFind + "\n");
+            } else {
+                failed(path + ": " + (isFound ? "found:" : "not found:") + "\n"
+                        + stringToFind + "\n");
+            }
+        }
+    }
+
+    /**
+     * Check for files in (or not in) the generated output.
+     * @param expectedFound true if all of the files are expected
+     *  to be found, or false if all of the files are expected to be
+     *  not found
+     * @param paths the files to check, within the most recent output directory.
+     * */
+    public void checkFiles(boolean expectedFound, String... paths) {
+        for (String path: paths) {
+//            log.logCheckFile(path, expectedFound);
+            checking("checkFile");
+            File file = new File(outputDir, path);
+            boolean isFound = file.exists();
+            if (isFound == expectedFound) {
+                passed(path + ": " + (isFound ? "found:" : "not found:") + "\n");
+            } else {
+                failed(path + ": " + (isFound ? "found:" : "not found:") + "\n");
+            }
+        }
+    }
+
+    /**
+     * Check that a series of strings are found in order in a file in
+     * the generated output.
+     * @param path the file to check
+     * @param strings  the strings whose order to check
+     */
+    public void checkOrder(String path, String... strings) {
+        String fileString = readOutputFile(path);
+        int prevIndex = -1;
+        for (String s : strings) {
+            s = s.replace("\n", NL); // normalize new lines
+            int currentIndex = fileString.indexOf(s);
+            checking(s + " at index " + currentIndex);
+            if (currentIndex == -1) {
+                failed(s + " not found.");
+                continue;
+            }
+            if (currentIndex > prevIndex) {
+                passed(s + " is in the correct order");
+            } else {
+                failed("file: " + path + ": " + s + " is in the wrong order.");
+            }
+            prevIndex = currentIndex;
+        }
+    }
+
+    /**
+     * Ensures that a series of strings appear only once, in the generated output,
+     * noting that, this test does not exhaustively check for all other possible
+     * duplicates once one is found.
+     * @param path the file to check
+     * @param strings ensure each are unique
+     */
+    public void checkUnique(String path, String... strings) {
+        String fileString = readOutputFile(path);
+        for (String s : strings) {
+            int currentIndex = fileString.indexOf(s);
+            checking(s + " at index " + currentIndex);
+            if (currentIndex == -1) {
+                failed(s + " not found.");
+                continue;
+            }
+            int nextindex = fileString.indexOf(s, currentIndex + s.length());
+            if (nextindex == -1) {
+                passed(s + " is unique");
+            } else {
+                failed(s + " is not unique, found at " + nextindex);
+            }
+        }
+    }
+
+    /**
+     * Compare a set of files in each of two directories.
+     *
+     * @param baseDir1 the directory containing the first set of files
+     * @param baseDir2 the directory containing the second set of files
+     * @param files the set of files to be compared
+     */
+    public void diff(String baseDir1, String baseDir2, String... files) {
+        File bd1 = new File(baseDir1);
+        File bd2 = new File(baseDir2);
+        for (String file : files) {
+            diff(bd1, bd2, file);
+        }
+    }
+
+    /**
+     * A utility to copy a directory from one place to another.
+     *
+     * @param targetDir the directory to copy.
+     * @param destDir the destination to copy the directory to.
+     */
+    // TODO: convert to using java.nio.Files.walkFileTree
+    public void copyDir(String targetDir, String destDir) {
+        try {
+            File targetDirObj = new File(targetDir);
+            File destDirParentObj = new File(destDir);
+            File destDirObj = new File(destDirParentObj, targetDirObj.getName());
+            if (! destDirParentObj.exists()) {
+                destDirParentObj.mkdir();
+            }
+            if (! destDirObj.exists()) {
+                destDirObj.mkdir();
+            }
+            String[] files = targetDirObj.list();
+            for (String file : files) {
+                File srcFile = new File(targetDirObj, file);
+                File destFile = new File(destDirObj, file);
+                if (srcFile.isFile()) {
+                    out.println("Copying " + srcFile + " to " + destFile);
+                    copyFile(destFile, srcFile);
+                } else if(srcFile.isDirectory()) {
+                    copyDir(srcFile.getAbsolutePath(), destDirObj.getAbsolutePath());
+                }
+            }
+        } catch (IOException exc) {
+            throw new Error("Could not copy " + targetDir + " to " + destDir);
+        }
+    }
+
+    /**
+     * Copy source file to destination file.
+     *
+     * @param destfile the destination file
+     * @param srcfile the source file
+     * @throws IOException
+     */
+    public void copyFile(File destfile, File srcfile) throws IOException {
+        Files.copy(srcfile.toPath(), destfile.toPath());
+    }
+
+    /**
+     * Read a file from the output directory.
+     *
+     * @param fileName  the name of the file to read
+     * @return          the file in string format
+     */
+    public String readOutputFile(String fileName) throws Error {
+        return readFile(outputDir, fileName);
+    }
+
+    protected String readFile(String fileName) throws Error {
+        return readFile(outputDir, fileName);
+    }
+
+    protected String readFile(String baseDir, String fileName) throws Error {
+        return readFile(new File(baseDir), fileName);
+    }
+
+    /**
+     * Read the file and return it as a string.
+     *
+     * @param baseDir   the directory in which to locate the file
+     * @param fileName  the name of the file to read
+     * @return          the file in string format
+     */
+    private String readFile(File baseDir, String fileName) throws Error {
+        try {
+            File file = new File(baseDir, fileName);
+            SoftReference<String> ref = fileContentCache.get(file);
+            String content = (ref == null) ? null : ref.get();
+            if (content != null)
+                return content;
+
+            content = new String(Files.readAllBytes(file.toPath()));
+            fileContentCache.put(file, new SoftReference(content));
+            return content;
+        } catch (FileNotFoundException e) {
+            System.err.println(e);
+            throw new Error("File not found: " + fileName);
+        } catch (IOException e) {
+            System.err.println(e);
+            throw new Error("Error reading file: " + fileName);
+        }
+    }
+
+    protected void checking(String message) {
+        numTestsRun++;
+        print("Starting subtest " + numTestsRun, message);
+    }
+
+    protected void passed(String message) {
+        numTestsPassed++;
+        print("Passed", message);
+    }
+
+    protected void failed(String message) {
+        print("FAILED", message);
+    }
+
+    private void print(String prefix, String message) {
+        if (message.isEmpty())
+            out.println(prefix);
+        else {
+            out.print(prefix);
+            out.print(": ");
+            out.println(message.replace("\n", NL));
+        }
+    }
+
+    /**
+     * Print a summary of the test results.
+     */
+    protected void printSummary() {
+//        log.write();
+        if (numTestsRun != 0 && numTestsPassed == numTestsRun) {
+            // Test passed
+            out.println();
+            out.println("All " + numTestsPassed + " subtests passed");
+        } else {
+            // Test failed
+            throw new Error((numTestsRun - numTestsPassed)
+                    + " of " + (numTestsRun)
+                    + " subtests failed");
+        }
+    }
+
+    /**
+     * Search for the string in the given file and return true
+     * if the string was found.
+     *
+     * @param fileString    the contents of the file to search through
+     * @param stringToFind  the string to search for
+     * @return              true if the string was found
+     */
+    private boolean findString(String fileString, String stringToFind) {
+        // javadoc (should) always use the platform newline sequence,
+        // but in the strings to find it is more convenient to use the Java
+        // newline character. So we translate \n to NL before we search.
+        stringToFind = stringToFind.replace("\n", NL);
+        return fileString.contains(stringToFind);
+    }
+
+    /**
+     * Compare the two given files.
+     *
+     * @param baseDir1 the directory in which to locate the first file
+     * @param baseDir2 the directory in which to locate the second file
+     * @param file the file to compare in the two base directories
+     * @param throwErrorIFNoMatch flag to indicate whether or not to throw
+     * an error if the files do not match.
+     * @return true if the files are the same and false otherwise.
+     */
+    private void diff(File baseDir1, File baseDir2, String file) {
+        String file1Contents = readFile(baseDir1, file);
+        String file2Contents = readFile(baseDir2, file);
+        checking("diff " + new File(baseDir1, file) + ", " + new File(baseDir2, file));
+        if (file1Contents.trim().compareTo(file2Contents.trim()) == 0) {
+            passed("files are equal");
+        } else {
+            failed("files differ");
+        }
+    }
+
+    /**
+     * Utility class to simplify the handling of temporarily setting a
+     * new stream for System.out or System.err.
+     */
+    private static class StreamOutput {
+        // functional interface to set a stream.
+        private interface Initializer {
+            void set(PrintStream s);
+        }
+
+        private final ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        private final PrintStream ps = new PrintStream(baos);
+        private final PrintStream prev;
+        private final Initializer init;
+
+        StreamOutput(PrintStream s, Initializer init) {
+            prev = s;
+            init.set(ps);
+            this.init = init;
+        }
+
+        String close() {
+            init.set(prev);
+            ps.close();
+            return baos.toString();
+        }
+    }
+
+    /**
+     * Utility class to simplify the handling of creating an in-memory PrintWriter.
+     */
+    private static class WriterOutput {
+        private final StringWriter sw = new StringWriter();
+        final PrintWriter pw = new PrintWriter(sw);
+        String close() {
+            pw.close();
+            return sw.toString();
+        }
+    }
+
+
+//    private final Logger log = new Logger();
+
+    //--------- Logging --------------------------------------------------------
+    //
+    // This class writes out the details of calls to checkOutput and checkFile
+    // in a canonical way, so that the resulting file can be checked against
+    // similar files from other versions of JavadocTester using the same logging
+    // facilities.
+
+    static class Logger {
+        private static final int PREFIX = 40;
+        private static final int SUFFIX = 20;
+        private static final int MAX = PREFIX + SUFFIX;
+        List<String> tests = new ArrayList<>();
+        String outDir;
+        String rootDir = rootDir();
+
+        static String rootDir() {
+            File f = new File(".").getAbsoluteFile();
+            while (!new File(f, ".hg").exists())
+                f = f.getParentFile();
+            return f.getPath();
+        }
+
+        void setOutDir(File outDir) {
+            this.outDir = outDir.getPath();
+        }
+
+        void logCheckFile(String file, boolean positive) {
+            // Strip the outdir because that will typically not be the same
+            if (file.startsWith(outDir + "/"))
+                file = file.substring(outDir.length() + 1);
+            tests.add(file + " " + positive);
+        }
+
+        void logCheckOutput(String file, boolean positive, String text) {
+            // Compress the string to be displayed in the log file
+            String simpleText = text.replaceAll("\\s+", " ").replace(rootDir, "[ROOT]");
+            if (simpleText.length() > MAX)
+                simpleText = simpleText.substring(0, PREFIX)
+                        + "..." + simpleText.substring(simpleText.length() - SUFFIX);
+            // Strip the outdir because that will typically not be the same
+            if (file.startsWith(outDir + "/"))
+                file = file.substring(outDir.length() + 1);
+            // The use of text.hashCode ensure that all of "text" is taken into account
+            tests.add(file + " " + positive + " " + text.hashCode() + " " + simpleText);
+        }
+
+        void write() {
+            // sort the log entries because the subtests may not be executed in the same order
+            tests.sort((a, b) -> a.compareTo(b));
+            try (BufferedWriter bw = new BufferedWriter(new FileWriter("tester.log"))) {
+                for (String t: tests) {
+                    bw.write(t);
+                    bw.newLine();
+                }
+            } catch (IOException e) {
+                throw new Error("problem writing log: " + e);
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbsLinkPath/TestAbsLinkPath.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4640745
+ * @summary This test verifys that the -link option handles absolute paths.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestAbsLinkPath
+ */
+
+public class TestAbsLinkPath extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestAbsLinkPath tester = new TestAbsLinkPath();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        String out1 = "out1";
+        javadoc("-d", out1, "-sourcepath", testSrc, "pkg2");
+        checkExit(Exit.OK);
+
+        javadoc("-d", "out2",
+                "-sourcepath", testSrc,
+                "-link", "../" + out1,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/C1.html", true,
+                "C2.html");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbsLinkPath/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1;
+
+import pkg2.*;
+
+
+/**
+ * Class 1
+ */
+public class C1 extends C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbsLinkPath/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg2;
+
+/**
+ * Class 2
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbstractMethod/TestAbstractMethod.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8004891
+ * @summary  Make sure that the abstract method is identified correctly
+ *           if the abstract modifier is present explicitly or implicitly.
+ * @author   bpatel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestAbstractMethod
+ */
+
+public class TestAbstractMethod extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestAbstractMethod tester = new TestAbstractMethod();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/A.html", true,
+                "<td class=\"colFirst\"><code>default void</code></td>",
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>"
+                + "All Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(2);\">Instance Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span><span id=\"t3\" "
+                + "class=\"tableTab\"><span><a href=\"javascript:show(4);\">"
+                + "Abstract Methods</a></span><span class=\"tabEnd\">&nbsp;</span>"
+                + "</span><span id=\"t5\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(16);\">Default Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span></caption>");
+
+        checkOutput("pkg/B.html", true,
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>"
+                + "All Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(2);\">Instance Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span><span id=\"t3\" "
+                + "class=\"tableTab\"><span><a href=\"javascript:show(4);\">Abstract "
+                + "Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t4\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(8);\">Concrete Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span></caption>",
+                "<td class=\"colFirst\"><code>abstract void</code></td>");
+
+        checkOutput("pkg/C.html", true,
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>"
+                + "All Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(2);\">Instance Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t5\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(16);\">Default Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span></caption>",
+                "<td class=\"colFirst\"><code>default void</code></td>");
+
+        checkOutput("pkg/A.html", false,
+                "<td class=\"colFirst\"><code>abstract void</code></td>");
+
+        checkOutput("pkg/B.html", false,
+                "<span><a href=\"javascript:show(16);\">Default Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span>",
+                "<td class=\"colFirst\"><code>default void</code></td>");
+
+        checkOutput("pkg/C.html", false,
+                "<span><a href=\"javascript:show(4);\">Abstract Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbstractMethod/pkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+public interface A {
+
+    public void method1();
+
+    public default void defaultMethod() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbstractMethod/pkg/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+public abstract class B {
+
+    public abstract void method1();
+
+    public void method2() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAbstractMethod/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+public interface C {
+
+    public default void onlyMethod() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnchorNames/TestAnchorNames.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8025633 8025524 8081854
+ * @summary Test for valid name attribute in HTML anchors.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestAnchorNames
+ */
+
+public class TestAnchorNames extends JavadocTester {
+
+    private static final String[] ARGS = new String[] {
+
+    };
+
+    public static void main(String[] args) throws Exception {
+        TestAnchorNames tester = new TestAnchorNames();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-source", "8", //so that '_' can be used as an identifier
+                "-use",
+                "pkg1");
+        checkExit(Exit.OK);
+
+        // Test some section markers and links to these markers
+        checkOutput("pkg1/RegClass.html", true,
+                "<a name=\"skip.navbar.top\">",
+                "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">",
+                "<a name=\"nested.class.summary\">",
+                "<a href=\"#nested.class.summary\">",
+                "<a name=\"method.summary\">",
+                "<a href=\"#method.summary\">",
+                "<a name=\"field.detail\">",
+                "<a href=\"#field.detail\">",
+                "<a name=\"constructor.detail\">",
+                "<a href=\"#constructor.detail\">");
+
+        // Test some members and link to these members
+        checkOutput("pkg1/RegClass.html", true,
+                //The marker for this appears in the serialized-form.html which we will
+                //test below
+                "<a href=\"../serialized-form.html#pkg1.RegClass\">");
+
+        // Test some fields
+        checkOutput("pkg1/RegClass.html", true,
+                "<a name=\"Z:Z_\">",
+                "<a href=\"../pkg1/RegClass.html#Z:Z_\">",
+                "<a name=\"Z:Z_:D\">",
+                "<a href=\"../pkg1/RegClass.html#Z:Z_:D\">",
+                "<a name=\"Z:Z:D_\">",
+                "<a href=\"../pkg1/RegClass.html#Z:Z:D_\">",
+                "<a name=\"Z:Z:Dfield\">",
+                "<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">",
+                "<a name=\"fieldInCla:D:D\">",
+                "<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">",
+                "<a name=\"S_:D:D:D:D:DINT\">",
+                "<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">",
+                "<a name=\"method:D:D\">",
+                "<a href=\"../pkg1/RegClass.html#method:D:D\">");
+
+        checkOutput("pkg1/DeprMemClass.html", true,
+                "<a name=\"Z:Z_field_In_Class\">",
+                "<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">");
+
+        // Test constructor
+        checkOutput("pkg1/RegClass.html", true,
+                "<a name=\"RegClass-java.lang.String-int-\">",
+                "<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">");
+
+        // Test some methods
+        checkOutput("pkg1/RegClass.html", true,
+                "<a name=\"Z:Z_methodInClass-java.lang.String-\">",
+                "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">",
+                "<a name=\"method--\">",
+                "<a href=\"../pkg1/RegClass.html#method--\">",
+                "<a name=\"foo-java.util.Map-\">",
+                "<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">",
+                "<a name=\"methodInCla:Ds-java.lang.String:A-\">",
+                "<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">",
+                "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">",
+                "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">",
+                "<a name=\"methodD-pkg1.RegClass.:DA-\">",
+                "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">",
+                "<a name=\"methodD-pkg1.RegClass.D:A-\">",
+                "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">");
+
+        checkOutput("pkg1/DeprMemClass.html", true,
+                "<a name=\"Z:Z:Dmethod_In_Class--\">",
+                "<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
+
+        // Test enum
+        checkOutput("pkg1/RegClass.Te$t_Enum.html", true,
+                "<a name=\"Z:Z:DFLD2\">",
+                "<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">");
+
+        // Test nested class
+        checkOutput("pkg1/RegClass._NestedClas$.html", true,
+                "<a name=\"Z:Z_NestedClas:D--\">",
+                "<a href=\"../pkg1/RegClass._NestedClas$.html#Z:Z_NestedClas:D--\">");
+
+        // Test class use page
+        checkOutput("pkg1/class-use/DeprMemClass.html", true,
+                "<a href=\"../../pkg1/RegClass.html#d____mc\">");
+
+        // Test deprecated list page
+        checkOutput("deprecated-list.html", true,
+                "<a href=\"pkg1/DeprMemClass.html#Z:Z_field_In_Class\">",
+                "<a href=\"pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">");
+
+        // Test constant values page
+        checkOutput("constant-values.html", true,
+                "<a href=\"pkg1/RegClass.html#S_:D:D:D:D:DINT\">");
+
+        // Test serialized form page
+        checkOutput("serialized-form.html", true,
+                //This is the marker for the link that appears in the pkg1.RegClass.html page
+                "<a name=\"pkg1.RegClass\">");
+
+        // Test member name index page
+        checkOutput("index-all.html", true,
+                "<a name=\"I:Z:Z:D\">",
+                "<a href=\"#I:Z:Z:D\">$",
+                "<a href=\"#I:Z:Z_\">_");
+
+        // The marker name conversion should only affect HTML anchors. It should not
+        // affect the lables.
+        checkOutput("pkg1/RegClass.html", false,
+                " Z:Z_",
+                " Z:Z:Dfield",
+                " Z:Z_field_In_Class",
+                " S_:D:D:D:D:DINT");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnchorNames/pkg1/DeprMemClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+public class DeprMemClass
+{
+    /**
+     * Field in the class.
+     * @deprecated Do not use this field.
+     */
+    public int _field_In_Class;
+
+    public int _fld;
+
+    /**
+     * Method in the class.
+     * @deprecated Do not use this method.
+     */
+    public void $method_In_Class() {
+    }
+
+    public void regularMethod() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnchorNames/pkg1/RegClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,186 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @serial This is the serial tag's comment.
+ */
+public class RegClass implements Serializable {
+
+    /**
+     * Normal field in class.
+     */
+    public String field;
+
+    /**
+     * Normal field in class.
+     */
+    public String method$$;
+
+    /**
+     * Filed staring with $.
+     */
+    public String $field;
+
+    /**
+     * Filed staring with underscore.
+     */
+    public String _field;
+
+    /**
+     * Serial field
+     * @serial
+     */
+    public boolean t_e$t;
+
+    /**
+     * Field in class with a $ in the name.
+     */
+    public String fieldInCla$$;
+
+    /**
+     * Field name as just an underscore.
+     */
+    public int _;
+
+    /**
+     * Field name as just a $.
+     */
+    public int $;
+
+    /**
+     * Field name with underscore and $.
+     */
+    public int _$;
+
+    /**
+     * Field name with $ and underscore.
+     */
+    public int $_;
+
+    /**
+     * An array.
+     */
+    public int arr[];
+
+    /**
+     * Another array.
+     */
+    public int[] arr1;
+
+    /**
+     * A constant field.
+     */
+    public static final int S_$$$$$INT = 0;
+
+    /**
+     * Another field.
+     */
+    public DeprMemClass d____mc;
+
+    /**
+     * An enum.
+     */
+    public static enum Te$t_Enum {
+        FLD_1,
+        $FLD2
+    };
+
+    /**
+     * A constructor.
+     */
+    public RegClass(String p, int i) {
+    }
+
+    /**
+     * Method in Class.
+     * @param p a string
+     */
+    public void _methodInClass(String p) {
+    }
+
+    /**
+     * Method in Class.
+     * @param p a string
+     * @param i an int
+     */
+    public void _methodInClas$(String p, int i) {
+    }
+
+    /**
+     * Method with $ in the name.
+     * @param p a string array
+     */
+    public void methodInCla$s(String[] p) {
+    }
+
+    /**
+     * Method with D[] as a parameter.
+     * @param p an array of D
+     */
+    public void methodD(D[] p) {
+    }
+
+    /**
+     * Method with $A as a parameter.
+     * @param p an object of $A
+     */
+    public void methodD($A p) {
+    }
+
+    /**
+     * Serial test.
+     * @serialData This is a serial data comment.
+     * @return null
+     */
+    protected Object $readResolve(){return null;}
+
+    /**
+     * Simple method.
+     */
+    public void method() {}
+
+    /**
+     * Generics.
+     */
+    public static <A> void foo(Map<A, Map<A, A>> map) {}
+
+    /**
+     * A nested class.
+     */
+    public class _NestedClas$ {}
+
+    /**
+     * Nested class D.
+     */
+    class D {}
+
+    /**
+     * Nested class $A.
+     */
+    class $A {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnnotationOptional/TestAnnotationOptional.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8025633 8081854
+ * @summary  Make sure that annotations types with optional elements have
+ *           element headers
+ * @author   Mahmood Ali
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestAnnotationOptional
+ */
+
+public class TestAnnotationOptional extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestAnnotationOptional tester = new TestAnnotationOptional();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/AnnotationOptional.html", true,
+            "<a name=\"annotation.type.element.detail\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnnotationOptional/pkg/AnnotationOptional.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test annotation type with optional value element.
+ *
+ * @author Mahmood Ali
+ * @since 1.5
+ */
+@Documented public @interface AnnotationOptional {
+    String value() default "";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnnotationTypes/TestAnnotationTypes.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4973609 8015249 8025633 8026567
+ * @summary  Make sure that annotation types with 0 members does not have
+ *           extra HR tags.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestAnnotationTypes
+ */
+
+public class TestAnnotationTypes extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestAnnotationTypes tester = new TestAnnotationTypes();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/AnnotationTypeField.html", true,
+                "<li>Summary:&nbsp;</li>\n"
+                + "<li><a href=\"#annotation.type."
+                + "field.summary\">Field</a>&nbsp;|&nbsp;</li>",
+                "<li>Detail:&nbsp;</li>\n"
+                + "<li><a href=\"#annotation.type."
+                + "field.detail\">Field</a>&nbsp;|&nbsp;</li>",
+                "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->",
+                "<h3>Field Summary</h3>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../"
+                + "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>"
+                + "</code>&nbsp;</td>",
+                "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->",
+                "<h4>DEFAULT_NAME</h4>\n"
+                + "<pre>public static final&nbsp;java."
+                + "lang.String&nbsp;DEFAULT_NAME</pre>");
+
+        checkOutput("pkg/AnnotationType.html", true,
+                "<li>Summary:&nbsp;</li>\n"
+                + "<li>Field&nbsp;|&nbsp;</li>",
+                "<li>Detail:&nbsp;</li>\n"
+                + "<li>Field&nbsp;|&nbsp;</li>");
+
+        checkOutput("pkg/AnnotationType.html", false,
+                "<HR>\n\n"
+                + "<P>\n\n"
+                + "<P>"
+                + "<!-- ========= END OF CLASS DATA ========= -->" + "<HR>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnnotationTypes/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test annotation type.
+ *
+ * @author Jamie Ho.
+ * @since 1.5
+ */
+@Documented public @interface AnnotationType {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testAnnotationTypes/pkg/AnnotationTypeField.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test for annotation type fields.
+ */
+@Documented public @interface AnnotationTypeField {
+    String DEFAULT_NAME = "test";
+
+    String name() default DEFAULT_NAME;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBackSlashInLink/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,7 @@
+/* /nodynamiccopyright/ */
+
+/**
+ * This is a comment.
+ */
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBackSlashInLink/TestBackSlashInLink.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4511110
+ * @summary Test to make sure that the link to source documentation
+ * has a forward slash.  It would be wrong to use a back slash.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestBackSlashInLink
+ */
+
+public class TestBackSlashInLink extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestBackSlashInLink tester = new TestBackSlashInLink();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-linksource",
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", true,
+                "src-html/C.html#line.7");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBadPackageFileInJar/TestBadPackageFileInJar.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4691095 6306394
+ * @summary Test to make sure that Javadoc emits a useful warning
+ * when a bad package.html file is in the JAR.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestBadPackageFileInJar
+ */
+
+public class TestBadPackageFileInJar extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestBadPackageFileInJar tester = new TestBadPackageFileInJar();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-classpath",  testSrc("badPackageFileInJar.jar"),
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true,
+                "badPackageFileInJar.jar(/pkg/package.html):1: warning: no comment");
+    }
+}
Binary file test/jdk/javadoc/doclet/testBadPackageFileInJar/badPackageFileInJar.jar has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBadPackageFileInJar/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBadSourceFile/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.package1;
+
+/**
+ * This is a comment.
+ */
+public class C1 {
+
+
+        public void foo(int p) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBadSourceFile/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @see C1#foo(int)
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBadSourceFile/TestBadSourceFile.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4835749
+ * @summary  Make sure exception is not thrown if there is a bad source
+ *           file in the same directory as the file being documented.
+ * @author   jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestBadSourceFile
+ */
+
+public class TestBadSourceFile extends JavadocTester {
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments
+     * @throws Exception if the test fails
+     */
+    public static void main(String... args) throws Exception {
+        TestBadSourceFile tester = new TestBadSourceFile();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                testSrc("C2.java"));
+        checkExit(Exit.FAILED);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBaseClass/Bar.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 1999, 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.
+ *
+ * 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.
+ */
+
+import baz.*;
+
+/** First line of comments for Bar
+ *  Second line of comments for Bar
+ */
+public class Bar extends Foo {
+
+    /**
+     * A public method.
+     */
+    public void aPublicMethod(){}
+    /**
+     * A protected method.
+     */
+    protected void aProtectedMethod(){}
+    /**
+     * A private method.
+     */
+    private void aPrivateMethod(){}
+    /**
+     * A package protected method.
+     */
+    void aPackagePrivateMethod(){}
+} // end class Bar
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBaseClass/BaseClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 1999, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Regression test for:
+ * Javadoc does not process base class. If user specifies few classes on the
+ * command line and few packages, with a situation where one of the specified
+ * classes(on the command line) extends a class from one of the packages, then
+ * due to some anomaly in ordering in which all the class and package objects
+ * get constructed, few classes were getting marked as "not included", even
+ * thought they were included in this run and hence documentation for those
+ * packages was wrong. The test case for which javadoc was failing is given
+ * in bug# 4197513.
+ *
+ * @bug 4197513
+ * @summary Javadoc does not process base class.
+ * @build BaseClass.java
+ * @author Atul M Dambalkar
+ */
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+import javax.lang.model.SourceVersion;
+
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.util.Elements;
+
+import jdk.javadoc.doclet.*;
+
+public class BaseClass implements Doclet {
+
+    public boolean run(DocletEnvironment root) {
+        Elements elementUtils = root.getElementUtils();
+        TypeElement klass = elementUtils.getTypeElement("baz.Foo");
+        if (!root.isIncluded(klass)) {
+            throw new AssertionError("Base class is not included: baz.Foo");
+        }
+
+        for (Element e : root.getSpecifiedElements()) {
+            if (e.getKind() == ElementKind.CLASS &&
+                    e.getSimpleName().contentEquals("Bar")) {
+                klass = (TypeElement)e;
+            }
+        }
+        if (klass == null) {
+            throw new AssertionError("class Bar not found");
+        }
+        List<? extends Element> members = klass.getEnclosedElements();
+        List<Element> selected = root.getSelectedElements(members);
+
+        boolean foundPublic = false;
+        boolean foundProtected = false;
+
+        boolean foundPackagePrivate = false;
+        boolean foundPrivate = false;
+
+
+        for (Element e :selected) {
+            System.out.println("element: " + e);
+            if (e.getSimpleName().toString().equals("aPublicMethod")) {
+                foundPublic = true;
+            }
+            if (e.getSimpleName().toString().equals("aProtectedMethod")) {
+                foundProtected = true;
+            }
+            if (e.getSimpleName().toString().equals("aPackagePrivateMethod")) {
+                foundPackagePrivate = true;
+            }
+            if (e.getSimpleName().toString().equals("aPackagePrivateMethod")) {
+                foundPrivate = true;
+            }
+        }
+        if (!foundPublic || !foundProtected) {
+            throw new AssertionError("selected methods not found");
+        }
+
+        if (foundPrivate || foundPackagePrivate) {
+             throw new AssertionError("unselected methods found");
+        }
+
+        return true;
+    }
+
+    public Set<Doclet.Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+
+    @Override
+    public String getName() {
+        return "BaseClass";
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBaseClass/TestBaseClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4197513
+ * @summary Javadoc does not process base class.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build BaseClass
+ * @build JavadocTester
+ * @run main TestBaseClass
+ */
+
+public class TestBaseClass extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestBaseClass tester = new TestBaseClass();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-sourcepath", testSrc,
+                "-docletpath", System.getProperty("test.classes", "."),
+                "-doclet", "BaseClass",
+                testSrc("Bar.java"), "baz");
+        checkExit(Exit.OK);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBaseClass/baz/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 baz;
+
+public class Foo {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBreakIterator/TestBreakIterator.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4165985
+ * @summary Determine the end of the first sentence using BreakIterator.
+ * If the first sentence of "method" is parsed correctly, the test passes.
+ * Correct Answer: "This is a class (i.e. it is indeed a class)."
+ * Wrong Answer: "This is a class (i.e."
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestBreakIterator
+ */
+
+public class TestBreakIterator extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestBreakIterator tester = new TestBreakIterator();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-breakiterator",
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/BreakIteratorTest.html", true,
+            "<div class=\"block\">This is a class (i.e. it is indeed a class).</div>");
+
+        checkOutput("pkg/BreakIteratorTest.html", true,
+                "<div class=\"block\">tests the breakiterator (i.e. how the firstSentence is broken up).</div>");
+
+        checkOutput("pkg/BreakIteratorTest.html", true,
+                "<div class=\"block\">with an inline tag <code>jdk.javadoc.taglet.Taglet</code> does it work.</div>");
+
+        checkOutput("pkg/BreakIteratorTest.html", true,
+                "<div class=\"block\">with a block tag</div>");
+
+        checkOutput("pkg/BreakIteratorTest.html", true,
+                "<div class=\"block\">Return methods to the specified\n" +
+                " <a href=\"../com/sun/javadoc/package-summary.html#included\">access\n" +
+                " modifier option</a>.</div>");
+
+        checkOutput("pkg/BreakIteratorTest.html", true,
+                "<div class=\"block\">A constant indicating that the keyLocation is indeterminate\n" +
+                " or not relevant.</div>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testBreakIterator/pkg/BreakIteratorTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a class (i.e. it is indeed a class).
+ */
+public class BreakIteratorTest {
+    /**
+     * tests the breakiterator (i.e. how the firstSentence is broken up). Second sentence.
+     */
+    public void foo(){}
+
+    /**
+     * with an inline tag <code>jdk.javadoc.taglet.Taglet</code> does it work. Second line.
+     */
+    public void bar(){}
+
+    /**
+     * with a block tag <p> does it work. Second line.
+     */
+    public void baz(){}
+
+    /**
+     * Return methods to the specified
+     * <a href="{@docRoot}/com/sun/javadoc/package-summary.html#included">access
+     * modifier option</a>.  Second line.
+     */
+    public void foobar(){}
+
+    /**
+     * A constant indicating that the keyLocation is indeterminate
+     * or not relevant.
+     * <code>KEY_TYPED</code> events do not have a keyLocation; this value
+     * is used instead.
+     */
+    public void fe(){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCRLineSeparator/TestCRLineSeparator.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4979486
+ * @summary  Make sure tool parses CR line separators properly.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestCRLineSeparator
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class TestCRLineSeparator extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestCRLineSeparator tester = new TestCRLineSeparator();
+        tester.runTests();
+    }
+
+    @Test
+    void test() throws IOException {
+        initFiles(new File(testSrc), new File("src"), "pkg");
+        javadoc("-d", "out",
+                "-sourcepath", "src",
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/MyClass.html", true,
+                "Line 1\n"
+                + " Line 2");
+    }
+
+    // recursively copy files from fromDir to toDir, replacing newlines
+    // with \r
+    void initFiles(File fromDir, File toDir, String f) throws IOException {
+        File from_f = new File(fromDir, f);
+        File to_f = new File(toDir, f);
+        if (from_f.isDirectory()) {
+            to_f.mkdirs();
+            for (String child: from_f.list()) {
+                initFiles(from_f, to_f, child);
+            }
+        } else {
+            List<String> lines = new ArrayList<>();
+            try (BufferedReader in = new BufferedReader(new FileReader(from_f))) {
+                String line;
+                while ((line = in.readLine()) != null)
+                    lines.add(line);
+            }
+            try (BufferedWriter out = new BufferedWriter(new FileWriter(to_f))) {
+                for (String line: lines) {
+                    out.write(line);
+                    out.write("\r");
+                }
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCRLineSeparator/pkg/MyClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2004, 2009, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Line 1
+ * Line 2
+ */
+public class MyClass {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCharset/TestCharset.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      7052170 8047745
+ * @summary  Run a test on -charset to make sure the charset gets generated as a
+ *           part of the meta tag.
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestCharset
+ */
+
+public class TestCharset extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestCharset tester = new TestCharset();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-charset", "ISO-8859-1",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("index.html", true,
+            "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">");
+        checkOutput("pkg/Foo.html", true,
+            "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">");
+
+        checkOutput("index.html", false,
+            "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"ISO-8859-1\">");
+        checkOutput("pkg/Foo.html", false,
+            "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"ISO-8859-1\">");
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("index.html", true,
+            "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
+        checkOutput("pkg/Foo.html", true,
+            "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCharset/pkg/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+public class Foo {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassCrossReferences/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002, 2003, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Cross link to package: {@link java.math Link to math package}<br>
+ * Cross link to inner class: {@link javax.swing.text.AbstractDocument.AttributeContext Link to AttributeContext innerclass} <br>
+ * Cross link to class: {@link java.math.BigDecimal Link to external class BigDecimal}<br>
+ * Cross link to member: {@link java.math.BigInteger#gcd(java.math.BigInteger) Link to external member gcd}<br>
+ */
+public class C {
+
+    public String toString() {
+        return "";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassCrossReferences/TestClassCrossReferences.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4652655 4857717 8025633 8026567
+ * @summary This test verifies that class cross references work properly.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @build TestClassCrossReferences
+ * @run main TestClassCrossReferences
+ */
+
+public class TestClassCrossReferences extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestClassCrossReferences tester = new TestClassCrossReferences();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        final String uri = "http://java.sun.com/j2se/1.4/docs/api/";
+
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-linkoffline", uri, testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", true,
+                "<a href=\"" + uri + "java/math/package-summary.html?is-external=true\">"
+                + "<code>Link to math package</code></a>",
+                "<a href=\"" + uri + "javax/swing/text/AbstractDocument.AttributeContext.html?is-external=true\" "
+                + "title=\"class or interface in javax.swing.text\"><code>Link to AttributeContext innerclass</code></a>",
+                "<a href=\"" + uri + "java/math/BigDecimal.html?is-external=true\" "
+                + "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>",
+                "<a href=\"" + uri + "java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" "
+                + "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>",
+                "<dl>\n"
+                + "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>\n"
+                + "</dl>");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassCrossReferences/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+java.math
+javax.swing.text
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassTree/TestClassTree.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4632553 4973607 8026567
+ * @summary  No need to include type name (class, interface, etc.) before
+ *           every single type in class tree.
+ *           Make sure class tree includes heirarchy for enums and annotation
+ *           types.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestClassTree
+ */
+
+public class TestClassTree extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestClassTree tester = new TestClassTree();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/package-tree.html", true,
+                "<ul>\n"
+                + "<li class=\"circle\">pkg.<a href=\"../pkg/ParentClass.html\" "
+                + "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a>",
+                "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n"
+                + "<ul>\n"
+                + "<li class=\"circle\">pkg.<a href=\"../pkg/AnnotationType.html\" "
+                + "title=\"annotation in pkg\"><span class=\"typeNameLink\">AnnotationType</span></a> "
+                + "(implements java.lang.annotation.Annotation)</li>\n"
+                + "</ul>",
+                "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n"
+                + "<ul>\n"
+                + "<li class=\"circle\">java.lang.Object\n"
+                + "<ul>\n"
+                + "<li class=\"circle\">java.lang.Enum&lt;E&gt; (implements java.lang."
+                + "Comparable&lt;T&gt;, java.io.Serializable)\n"
+                + "<ul>\n"
+                + "<li class=\"circle\">pkg.<a href=\"../pkg/Coin.html\" "
+                + "title=\"enum in pkg\"><span class=\"typeNameLink\">Coin</span></a></li>\n"
+                + "</ul>\n"
+                + "</li>\n"
+                + "</ul>\n"
+                + "</li>\n"
+                + "</ul>");
+
+        checkOutput("pkg/package-tree.html", false,
+                "<li class=\"circle\">class pkg.<a href=\"../pkg/ParentClass.html\" "
+                + "title=\"class in pkg\"><span class=\"typeNameLink\">ParentClass</span></a></li>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassTree/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test annotation type.
+ *
+ * @author Jamie Ho.
+ * @since 1.5
+ */
+@Documented public @interface AnnotationType {
+
+    /**
+     * The copyright holder.
+     */
+    String optional() default "unknown";
+
+   /**
+    * The year of the copyright.
+    */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassTree/pkg/ChildClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class ChildClass extends ParentClass {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassTree/pkg/Coin.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a sample Enum.
+ *
+ * @author Jamie Ho
+ */
+public enum Coin {
+
+  Penny, Nickel, Dime;
+
+public Coin(int i) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testClassTree/pkg/ParentClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class ParentClass {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/C5.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/**
+ *This is a description for C5.
+ */
+
+public class C5  {
+
+    public static final int I = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/TestCmndLineClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4506980
+ * @summary Test to make sure that there is no difference in the output
+ * when specifying packages on the command line and specifying individual
+ * classes.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestCmndLineClass
+ */
+
+public class TestCmndLineClass extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestCmndLineClass tester = new TestCmndLineClass();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        String outdir1 = "out-1";
+        String outdir2 = "out-2";
+
+        javadoc("-d", outdir1,
+                "-sourcepath", testSrc,
+                "-notimestamp",
+                testSrc("C5.java"), "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        javadoc("-d", outdir2,
+                "-sourcepath", testSrc,
+                "-notimestamp",
+                testSrc("C5.java"),
+                testSrc("pkg1/C1.java"),
+                testSrc("pkg1/C2.java"),
+                testSrc("pkg2/C3.java"),
+                testSrc("pkg2/C4.java"));
+        checkExit(Exit.OK);
+
+        diff(outdir1, outdir2,
+                "C5.html",
+                "pkg1/C1.html",
+                "pkg1/C2.html",
+                "pkg2/C3.html",
+                "pkg2/C4.html");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1;
+
+/**
+ *This is a description for C1.
+ */
+
+public class C1 {
+
+    public static final int I = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1;
+
+/**
+ *This is a description for C2.
+ */
+
+public class C2  {
+
+    public static final int I = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/pkg1/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,7 @@
+<html>
+<body>
+
+    This is a description for package 1.
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/pkg2/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg2;
+
+/**
+ *This is a description for C3.
+ */
+
+public class C3  {
+
+    public static final int I = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/pkg2/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg2;
+
+/**
+ *This is a description for C4.
+ */
+
+public class C4  {
+
+    public static final int I = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCmndLineClass/pkg2/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,7 @@
+<html>
+<body>
+
+    This is a description for package 2.
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCompletionFailure/TestCompletionFailure.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8027977
+ * @summary Test to verify javadoc executes without CompletionFailure exception.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestCompletionFailure
+ */
+
+public class TestCompletionFailure extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestCompletionFailure tester = new TestCompletionFailure();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.STDERR, false,
+                "sun.util.locale.provider.LocaleProviderAdapter");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testCompletionFailure/pkg1/NumberFormatTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.text.NumberFormat;
+
+public abstract class NumberFormatTest extends NumberFormat { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testConstantValuesPage/TestConstantValuesPage.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4681599
+ * @summary Test to make sure that constant values page does not get
+ * generated when doclet has nothing to document.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestConstantValuesPage
+ */
+
+public class TestConstantValuesPage extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestConstantValuesPage tester = new TestConstantValuesPage();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "foo");
+        checkExit(Exit.FAILED);
+
+        checkOutput(Output.OUT, false,
+                "constant-values.html...");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testConstructorIndent/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+public class C {
+
+    /**
+     * This is just a simple constructor.
+     * @param i a param.
+     */
+    public C(int i) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testConstructorIndent/TestConstructorIndent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4904037 8026567
+ * @summary  The constructor comments should be surrounded by
+ *           <dl></dl>.  Check for this in the output.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestConstructorIndent
+ */
+
+public class TestConstructorIndent extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestConstructorIndent tester = new TestConstructorIndent();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", true,
+                "<div class=\"block\">"
+                + "This is just a simple constructor.</div>\n"
+                + "<dl>\n"
+                + "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
+                + "<dd><code>i</code> - a param.</dd>\n"
+                + "</dl>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testConstructors/TestConstructors.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8025524 8031625 8081854
+ * @summary Test for constructor name which should be a non-qualified name.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestConstructors
+ */
+
+public class TestConstructors extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestConstructors tester = new TestConstructors();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/Outer.html", true,
+                "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><a href=\"../pkg1/Outer.Inner.html#Inner--\"><code>Inner()</code></a>, \n"
+                + "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\"><code>Inner(int)</code></a>, \n"
+                + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\"><code>NestedInner()</code></a>, \n"
+                + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>NestedInner(int)</code></a>, \n"
+                + "<a href=\"../pkg1/Outer.html#Outer--\"><code>Outer()</code></a>, \n"
+                + "<a href=\"../pkg1/Outer.html#Outer-int-\"><code>Outer(int)</code></a>",
+                "Link: <a href=\"../pkg1/Outer.Inner.html#Inner--\"><code>Inner()</code></a>, "
+                + "<a href=\"../pkg1/Outer.html#Outer-int-\"><code>Outer(int)</code></a>, "
+                + "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\"><code>"
+                + "NestedInner(int)</code></a>",
+                "<a href=\"../pkg1/Outer.html#Outer--\">Outer</a></span>()",
+                "<a name=\"Outer--\">",
+                "<a href=\"../pkg1/Outer.html#Outer-int-\">Outer</a></span>(int&nbsp;i)",
+                "<a name=\"Outer-int-\">");
+
+        checkOutput("pkg1/Outer.Inner.html", true,
+                "<a href=\"../pkg1/Outer.Inner.html#Inner--\">Inner</a></span>()",
+                "<a name=\"Inner--\">",
+                "<a href=\"../pkg1/Outer.Inner.html#Inner-int-\">Inner</a></span>(int&nbsp;i)",
+                "<a name=\"Inner-int-\">");
+
+        checkOutput("pkg1/Outer.Inner.NestedInner.html", true,
+                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner--\">NestedInner</a></span>()",
+                "<a name=\"NestedInner--\">",
+                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#NestedInner-int-\">NestedInner</a></span>(int&nbsp;i)",
+                "<a name=\"NestedInner-int-\">");
+
+        checkOutput("pkg1/Outer.Inner.html", false,
+                "Outer.Inner--",
+                "Outer.Inner-int-");
+
+        checkOutput("pkg1/Outer.Inner.NestedInner.html", false,
+                "Outer.Inner.NestedInner--",
+                "Outer.Inner.NestedInner-int-");
+
+        checkOutput("pkg1/Outer.html", false,
+                "<a href=\"../pkg1/Outer.Inner.html#Outer.Inner--\"><code>Outer.Inner()</code></a>",
+                "<a href=\"../pkg1/Outer.Inner.html#Outer.Inner-int-\"><code>Outer.Inner(int)</code></a>",
+                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#Outer.Inner.NestedInner--\"><code>Outer.Inner.NestedInner()</code></a>",
+                "<a href=\"../pkg1/Outer.Inner.NestedInner.html#Outer.Inner.NestedInner-int-\"><code>Outer.Inner.NestedInner(int)</code></a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testConstructors/pkg1/Outer.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Test link tag.
+ * Link: {@link pkg1.Outer.Inner#Inner()}, {@link pkg1.Outer#Outer(int)}, {@link pkg1.Outer.Inner.NestedInner#NestedInner(int)}
+ *
+ * @see Outer.Inner#Inner()
+ * @see Outer.Inner#Inner(int)
+ * @see Outer.Inner.NestedInner#NestedInner()
+ * @see Outer.Inner.NestedInner#NestedInner(int)
+ * @see Outer#Outer()
+ * @see Outer#Outer(int)
+ */
+public class Outer {
+
+    /**
+     * An outer constructor.
+     */
+    public Outer() {
+    }
+
+    /**
+     * Another outer constructor.
+     */
+    public Outer(int i) {
+    }
+
+    /**
+     * A nested class.
+     */
+    public class Inner {
+
+        /**
+         * An inner constructor.
+         */
+        public Inner() {
+        }
+
+        /**
+         * Another inner constructor.
+         */
+        public Inner(int i) {
+        }
+
+        /**
+         * A nested inner class.
+         */
+        public class NestedInner {
+
+            /**
+             * A nested inner constructor.
+             */
+            public NestedInner() {
+            }
+
+            /**
+             * Another nested inner constructor.
+             */
+            public NestedInner(int i) {
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/TestDeprecatedDocs.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4927552 8026567
+ * @summary  <DESC>
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestDeprecatedDocs
+ */
+
+public class TestDeprecatedDocs extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDeprecatedDocs tester = new TestDeprecatedDocs();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("deprecated-list.html", true,
+                "annotation_test1 passes",
+                "annotation_test2 passes",
+                "annotation_test3 passes",
+                "class_test1 passes",
+                "class_test2 passes",
+                "class_test3 passes",
+                "class_test4 passes",
+                "enum_test1 passes",
+                "enum_test2 passes",
+                "error_test1 passes",
+                "error_test2 passes",
+                "error_test3 passes",
+                "error_test4 passes",
+                "exception_test1 passes",
+                "exception_test2 passes",
+                "exception_test3 passes",
+                "exception_test4 passes",
+                "interface_test1 passes",
+                "interface_test2 passes",
+                "interface_test3 passes",
+                "interface_test4 passes",
+                "pkg.DeprecatedClassByAnnotation",
+                "pkg.DeprecatedClassByAnnotation()",
+                "pkg.DeprecatedClassByAnnotation.method()",
+                "pkg.DeprecatedClassByAnnotation.field"
+        );
+
+        checkOutput("pkg/DeprecatedClassByAnnotation.html", true,
+                "<pre>@Deprecated\n"
+                + "public class <span class=\"typeNameLabel\">DeprecatedClassByAnnotation</span>\n"
+                + "extends java.lang.Object</pre>",
+                "<pre>@Deprecated\n"
+                + "public&nbsp;int field</pre>\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
+                "<pre>@Deprecated\n"
+                + "public&nbsp;DeprecatedClassByAnnotation()</pre>\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
+                "<pre>@Deprecated\n"
+                + "public&nbsp;void&nbsp;method()</pre>\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/DeprecatedClassByAnnotation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+@Deprecated()
+public class DeprecatedClassByAnnotation {
+
+    @Deprecated()
+    public int field;
+
+    @Deprecated()
+    public DeprecatedClassByAnnotation() {}
+
+    @Deprecated()
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestAnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * @deprecated annotation_test1 passes.
+ */
+@Documented public @interface TestAnnotationType {
+
+    /**
+     * @deprecated annotation_test2 passes.
+     */
+    String optional() default "unknown";
+
+   /**
+     * @deprecated annotation_test3 passes.
+     */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * @deprecated class_test1 passes.
+ */
+public class TestClass {
+
+    /**
+     * @deprecated class_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated class_test3 passes.
+     */
+    public TestClass() {}
+
+    /**
+     * @deprecated class_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestEnum.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * @deprecated enum_test1 passes.
+ */
+public enum TestEnum {
+
+    /**
+     * @deprecated enum_test2 passes.
+     */
+    ONE, TWO, THREE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestError.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * @deprecated error_test1 passes.
+ */
+public class TestError extends Error {
+
+    /**
+     * @deprecated error_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated error_test3 passes.
+     */
+    public TestError() {}
+
+    /**
+     * @deprecated error_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestException.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * @deprecated exception_test1 passes.
+ */
+public class TestException extends Exception {
+
+    /**
+     * @deprecated exception_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated exception_test3 passes.
+     */
+    public TestException() {}
+
+    /**
+     * @deprecated exception_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDeprecatedDocs/pkg/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @deprecated interface_test1 passes.
+ */
+public class TestInterface {
+
+    /**
+     * @deprecated interface_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated interface_test3 passes.
+     */
+    public TestInterface() {}
+
+    /**
+     * @deprecated interface_test4 passes.
+     */
+    public void method() {}
+
+    /**
+     * @deprecated methodA
+     */
+    public void methodA(Class<?> a) {}
+
+    /**
+     * @deprecated methodB
+     */
+    public void methodB(List<String> list){}
+
+    /**
+     * @deprecated methodC
+     */
+    public void methodC(List<List<String>> list){}
+    /**
+     * @deprecated methodD
+     */
+    public void methodD(List<? extends Iterator<String>> list){}
+    /**
+     * @deprecated methodE
+     */
+    public void methodE(Map<Integer, String> map){}
+    /**
+     * @deprecated methodF
+     */
+    public void methodF(List<? super Integer> list){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocEncoding/TestDocEncoding.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * Portions Copyright (c) 2012 IBM Corporation
+ */
+
+/*
+ * @test
+ * @bug      8000743
+ * @summary  Run tests on -docencoding to see if the value is
+             used for stylesheet as well.
+ * @author   jayashree viswanathan
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestDocEncoding
+ */
+
+public class TestDocEncoding extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDocEncoding tester = new TestDocEncoding();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-docencoding", "Cp930",
+                "-sourcepath", testSrc,
+                "-notimestamp",
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("stylesheet.css", false,
+                "body {\n"
+                + "    background-color:#ffffff;");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocEncoding/pkg/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * Portions Copyright (c) 2012 IBM Corporation
+ */
+
+package pkg;
+
+public class Test {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocErrorReporter/TestDocErrorReporter.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4927928
+ * @summary  Make sure that option validation errors and sent to the
+ *           DocErrorReporter.
+ * @author   jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestDocErrorReporter
+ */
+
+public class TestDocErrorReporter extends JavadocTester {
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments
+     * @throws Exception if the test fails
+     */
+    public static void main(String... args) throws Exception {
+        TestDocErrorReporter tester = new TestDocErrorReporter();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-encoding", "xyz",
+                testSrc("TestDocErrorReporter.java"));
+
+        checkExit(Exit.FAILED);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/TestDocFileDir.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4258405 4973606 8024096
+ * @summary This test verifies that the doc-file directory does not
+ *          get overwritten when the sourcepath is equal to the destination
+ *          directory.
+ *          Also test that -docfilessubdirs and -excludedocfilessubdir both work.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestDocFileDir
+ */
+
+public class TestDocFileDir extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDocFileDir tester = new TestDocFileDir();
+        tester.runTests();
+    }
+
+    // Output dir = "", Input dir = ""
+    @Test
+    void test1() {
+        copyDir(testSrc("pkg"), ".");
+        setOutputDirectoryCheck(DirectoryCheck.NO_HTML_FILES);
+        javadoc("pkg/C.java");
+        checkExit(Exit.OK);
+        checkOutput("pkg/doc-files/testfile.txt", true,
+            "This doc file did not get trashed.");
+    }
+
+    // Output dir = Input Dir
+    @Test
+    void test2() {
+        String outdir = "out2";
+        copyDir(testSrc("pkg"), outdir);
+        setOutputDirectoryCheck(DirectoryCheck.NO_HTML_FILES);
+        javadoc("-d", outdir,
+            "-sourcepath", "blah" + PS + outdir + PS + "blah",
+            "pkg");
+        checkExit(Exit.OK);
+        checkOutput("pkg/doc-files/testfile.txt", true,
+            "This doc file did not get trashed.");
+    }
+
+    // Exercising -docfilessubdirs and -excludedocfilessubdir
+    @Test
+    void test3() {
+        String outdir = "out3";
+        setOutputDirectoryCheck(DirectoryCheck.NONE);
+        javadoc("-d", outdir,
+                "-sourcepath", testSrc,
+                "-docfilessubdirs",
+                "-excludedocfilessubdir", "subdir-excluded1:subdir-excluded2",
+                "pkg");
+        checkExit(Exit.OK);
+        checkFiles(true,
+                "pkg/doc-files/subdir-used1/testfile.txt",
+                "pkg/doc-files/subdir-used2/testfile.txt");
+        checkFiles(false,
+                "pkg/doc-files/subdir-excluded1/testfile.txt",
+                "pkg/doc-files/subdir-excluded2/testfile.txt");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+/*******************************
+ * Just a dummy class used for
+ * testing purposes.
+ *******************************/
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/pkg/doc-files/subdir-excluded1/testfile.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+passed
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/pkg/doc-files/subdir-excluded2/testfile.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+passed
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/pkg/doc-files/subdir-used1/testfile.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+passed
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/pkg/doc-files/subdir-used2/testfile.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+passed
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFileDir/pkg/doc-files/testfile.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+This doc file did not get trashed.
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFiles/TestDocFiles.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8008949
+ * @summary verify that doc-files get copied
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestDocFiles
+ */
+
+public class TestDocFiles extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDocFiles tester = new TestDocFiles();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/doc-files/test.txt", true,
+                "test file");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFiles/pkg/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class Test { }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocFiles/pkg/doc-files/test.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,2 @@
+this is a test file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootInlineTag/TestDocRootInlineTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4369014 4851991
+ * @summary Determine if the docRoot inline tag works properly.
+ * If docRoot performs as documented, the test passes.
+ * Make sure that the docRoot tag works with the -bottom option.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestDocRootInlineTag
+ */
+
+public class TestDocRootInlineTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDocRootInlineTag tester = new TestDocRootInlineTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        String uri = "http://www.java.sun.com/j2se/1.4/docs/api";
+
+        javadoc("-bottom", "The value of @docRoot is \"{@docRoot}\"",
+                "-d", "out",
+                "-sourcepath", testSrc,
+                "-linkoffline", uri, testSrc,
+                testSrc("TestDocRootTag.java"), "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("TestDocRootTag.html", true,
+                "<a href=\"" + uri + "/java/io/File.html?is-external=true\" "
+                + "title=\"class or interface in java.io\"><code>File</code></a>",
+                "<a href=\"./glossary.html\">glossary</a>",
+                "<a href=\"" + uri + "/java/io/File.html?is-external=true\" "
+                + "title=\"class or interface in java.io\"><code>Second File Link</code></a>",
+                "The value of @docRoot is \"./\"");
+
+        checkOutput("index-all.html", true,
+                "My package page is <a href=\"./pkg/package-summary.html\">here</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootInlineTag/TestDocRootTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2001, 2002, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Here is the use of link: {@link java.io.File File}
+ * Here is the use of docRoot: <a href="{@docRoot}/glossary.html">glossary</a>.
+ * Here is the use of link: {@link java.io.File Second File Link}
+ */
+public class TestDocRootTag {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootInlineTag/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,1 @@
+java.io
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootInlineTag/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * My package page is <a href="{@docRoot}/pkg/package-summary.html">here</a>
+ *
+ */
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootLink/TestDocRootLink.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6553182 8025416 8029504
+ * @summary This test verifies the -Xdocrootparent option.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestDocRootLink
+ */
+public class TestDocRootLink extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestDocRootLink tester = new TestDocRootLink();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/C1.html", true,
+            "Refer <a href=\"../../technotes/guides/index.html\">Here</a>",
+            "This <a href=\"../pkg2/C2.html\">Here</a> should not be replaced\n" +
+            " with an absolute link.",
+            "Testing <a href=\"../technotes/guides/index.html\">Link 1</a> and\n" +
+            " <a href=\"../pkg2/C2.html\">Link 2</a>.");
+
+        checkOutput("pkg1/package-summary.html", true,
+            "<a href=\"../../technotes/guides/index.html\">\n" +
+            "            Test document 1</a>",
+            "<a href=\"../pkg2/C2.html\">\n" +
+            "            Another Test document 1</a>",
+            "<a href=\"../technotes/guides/index.html\">\n" +
+            "            Another Test document 2.</a>");
+
+        // TODO: should this check *any* reference to http://download.oracle.com/
+        checkOutput("pkg1/C1.html", false,
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">",
+            "<a href=\"http://download.oracle.com/javase/7/docs/pkg2/C2.html\">");
+
+        checkOutput("pkg1/package-summary.html", false,
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">",
+            "<a href=\"http://download.oracle.com/javase/7/docs/pkg2/C2.html\">");
+    }
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2",
+                "-Xdocrootparent", "http://download.oracle.com/javase/7/docs",
+                "-sourcepath", testSrc,
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg2/C2.html", true,
+            "Refer <a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">Here</a>",
+            "This <a href=\"../pkg1/C1.html\">Here</a> should not be replaced\n" +
+            " with an absolute link.",
+            "Testing <a href=\"../technotes/guides/index.html\">Link 1</a> and\n" +
+            " <a href=\"../pkg1/C1.html\">Link 2</a>.");
+
+        checkOutput("pkg2/package-summary.html", true,
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">\n" +
+            "            Test document 1</a>",
+            "<a href=\"../pkg1/C1.html\">\n" +
+            "            Another Test document 1</a>",
+            "<a href=\"../technotes/guides/index.html\">\n" +
+            "            Another Test document 2.</a>");
+
+        checkOutput("pkg2/C2.html", false,
+            "<a href=\"../../technotes/guides/index.html\">",
+            "<a href=\"http://download.oracle.com/javase/7/docs/pkg1/C1.html\">");
+
+        checkOutput("pkg2/package-summary.html", false,
+            "<a href=\"../../technotes/guides/index.html\">",
+            "<a href=\"http://download.oracle.com/javase/7/docs/pkg1/C1.html\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootLink/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Class 1. This is a test.
+ * Refer <a href="{@docRoot}/../technotes/guides/index.html">Here</a>. This link should
+ * not be replaced with an absolute link.
+ * This <a href="{@docRoot}/pkg2/C2.html">Here</a> should not be replaced
+ * with an absolute link.
+ * Testing <a href="{@docRoot}/technotes/guides/index.html">Link 1</a> and
+ * <a href="{@docRoot}/pkg2/C2.html">Link 2</a>. 2 back-to-back links using
+ * docroot. These should not be replaced with an absolute link.
+ */
+public class C1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootLink/pkg1/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>javax.management package</title>
+</head>
+<body bgcolor="white">
+    This is a test.
+    <p id="spec">
+        @see <a href="{@docRoot}/../technotes/guides/index.html">
+            Test document 1</a> should not be replaced with an absolute link.
+        @see <a href="{@docRoot}/pkg2/C2.html">
+            Another Test document 1</a> which should not be replaced with an absolute link.
+        <a href="{@docRoot}/technotes/guides/index.html">
+            Another Test document 2.</a> which should not be replaced with an absolute link.
+
+        @since 1.5
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootLink/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg2;
+
+/**
+ * Class 2. This is a test.
+ * Refer <a href="{@docRoot}/../technotes/guides/index.html">Here</a> should be
+ * replaced with an absolute link.
+ * This <a href="{@docRoot}/pkg1/C1.html">Here</a> should not be replaced
+ * with an absolute link.
+ * Testing <a href="{@docRoot}/technotes/guides/index.html">Link 1</a> and
+ * <a href="{@docRoot}/pkg1/C1.html">Link 2</a>. Both should not be replaced with
+ * an absolute link.
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDocRootLink/pkg2/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>javax.management package</title>
+</head>
+<body bgcolor="white">
+    This is a test.
+    <p id="spec">
+        @see <a href="{@docRoot}/../technotes/guides/index.html">
+            Test document 1</a> should be replaced with an absolute link.
+        @see <a href="{@docRoot}/pkg1/C1.html">
+            Another Test document 1</a> which should not be replaced with an absolute link.
+        <a href="{@docRoot}/technotes/guides/index.html">
+            Another Test document 2.</a> which should not be replaced with an absolute link.
+
+        @since 1.5
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDupParamWarn/TestDupParamWarn.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4745855
+ * @summary Test to ensure that the doclet does not print out bad
+ * warning messages about duplicate param tags.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestDupParamWarn
+ */
+
+public class TestDupParamWarn extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        JavadocTester tester = new TestDupParamWarn();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, false,
+            "Parameter \"a\" is documented more than once.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDupParamWarn/pkg/Bar.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public interface Bar {
+
+    /**
+     * @param a blah.
+     * @param b blah.
+     */
+    void method(int a, int b);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testDupParamWarn/pkg/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public interface Foo extends Bar {
+
+    /**
+     * @param a blah.
+     * @param b blah.
+     */
+    void method(int a, int b);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testEmptyClass/TestEmptyClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4483401 4483407 4483409 4483413 4494343
+ * @summary Test to make sure that Javadoc behaves properly when
+ * run on a completely empty class (no comments or members).
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestEmptyClass
+ */
+
+public class TestEmptyClass extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestEmptyClass tester = new TestEmptyClass();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-classpath", testSrc("src"),
+                "-d", "out",
+                "-sourcepath", testSrc("src"),
+                testSrc("src/Empty.java"));
+        checkExit(Exit.OK);
+
+        //The overview tree should not link to classes that were not documented
+        checkOutput("overview-tree.html", false,
+                "<A HREF=\"TestEmptyClass.html\">");
+
+        //The index page should not link to classes that were not documented
+        checkOutput("index-all.html", false,
+                "<A HREF=\"TestEmptyClass.html\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testEmptyClass/src/Empty.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2001, 2002, 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.
+ *
+ * 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.
+ */
+
+public class Empty
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testEnclosingClass/TestEnclosingClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      5008230
+ * @summary  Check the outer class when documenting enclosing class/interface.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestEnclosingClass
+ */
+
+public class TestEnclosingClass extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestEnclosingClass tester = new TestEnclosingClass();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/MyClass.MyInterface.html", true,
+                "Enclosing class:");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testEnclosingClass/pkg/MyClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class MyClass {
+    public interface MyInterface {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testEncoding/EncodeTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Testing en\u00e7\u00f4ded string.
+ * In the encoded comment string, Unicode U+00E7 is "Latin small letter C with cedilla"
+ * and Unicode U+00F4 is "Latin small letter O with circumflex"
+ */
+public class EncodeTest {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testEncoding/TestEncoding.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4661481 8024096
+ * @summary This test determines if the value of the -encoding option is
+ * properly passed from Javadoc to the source file parser.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestEncoding
+ */
+
+public class TestEncoding extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestEncoding tester = new TestEncoding();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-encoding", "iso-8859-1",
+                testSrc("EncodeTest.java"));
+        checkExit(Exit.OK);
+
+        // If ??? is found in the output, the source file was not read with the correct encoding setting.
+        checkOutput("EncodeTest.html", false,
+                "??");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testExternalOverridenMethod/TestExternalOverridenMethod.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4857717 8025633 8026567
+ * @summary Test to make sure that externally overriden and implemented methods
+ * are documented properly.  The method should still include "implements" or
+ * "overrides" documentation even though the method is external.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester TestExternalOverridenMethod
+ * @run main TestExternalOverridenMethod
+ */
+
+public class TestExternalOverridenMethod extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestExternalOverridenMethod tester = new TestExternalOverridenMethod();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        String uri = "http://java.sun.com/j2se/1.4.1/docs/api";
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-linkoffline", uri, testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/XReader.html", true,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"" + uri + "/java/io/FilterReader.html?is-external=true#read--\" "
+                + "title=\"class or interface in java.io\">read</a></code>&nbsp;in class&nbsp;<code>"
+                + "<a href=\"" + uri + "/java/io/FilterReader.html?is-external=true\" "
+                + "title=\"class or interface in java.io\">FilterReader</a></code></dd>",
+                "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+                + "<dd><code><a href=\"" + uri + "/java/io/DataInput.html?is-external=true#readInt--\" "
+                + "title=\"class or interface in java.io\">readInt</a></code>&nbsp;in interface&nbsp;<code>"
+                + "<a href=\"" + uri + "/java/io/DataInput.html?is-external=true\" "
+                + "title=\"class or interface in java.io\">DataInput</a></code></dd>"
+        );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testExternalOverridenMethod/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,1 @@
+java.io
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testExternalOverridenMethod/pkg/XReader.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.io.*;
+
+public abstract class XReader extends FilterReader implements DataInput {
+
+   /**
+    * This tests overridding an external method.
+    */
+    public int read() throws IOException {
+       return 'W';
+    }
+
+   /**
+    * This tests implementing an external method.
+    */
+    public int readInt() throws IOException {
+       return 'W';
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testGeneratedBy/TestGeneratedBy.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8000418 8024288
+ * @summary Verify that files use a common Generated By string
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestGeneratedBy
+ */
+
+public class TestGeneratedBy extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestGeneratedBy tester = new TestGeneratedBy();
+        tester.runTests();
+    }
+
+    @Test
+    void testTimestamp() {
+        javadoc("-d", "out-timestamp",
+            "-sourcepath", testSrc,
+            "pkg");
+        checkExit(Exit.OK);
+
+        checkTimestamps(true);
+    }
+
+    @Test
+    void testNoTimestamp() {
+        javadoc("-d", "out-notimestamp",
+            "-notimestamp",
+            "-sourcepath", testSrc,
+            "pkg");
+        checkExit(Exit.OK);
+
+        checkTimestamps(false);
+    }
+
+    void checkTimestamps(boolean timestamp) {
+        checkTimestamps(timestamp,
+        "pkg/MyClass.html",
+        "pkg/package-summary.html",
+        "pkg/package-frame.html",
+        "pkg/package-tree.html",
+        "allclasses-noframe.html",
+        "constant-values.html",
+        "allclasses-frame.html",
+        "overview-tree.html",
+        "deprecated-list.html",
+        "serialized-form.html",
+        "help-doc.html",
+        "index-all.html",
+        "index.html");
+
+    }
+
+    void checkTimestamps(boolean timestamp, String... files) {
+        String version = System.getProperty("java.version");
+        String genBy = "Generated by javadoc";
+        if (timestamp) genBy += " (" + version + ") on ";
+
+        for (String file: files) {
+            // genBy is the current standard "Generated by" text
+            checkOutput(file, true, genBy);
+
+            // These are older versions of the "Generated by" text
+            checkOutput(file, false,
+                (timestamp
+                    ? "Generated by javadoc (version"
+                    : "Generated by javadoc ("),
+                "Generated by javadoc on");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testGeneratedBy/pkg/MyClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.io.Serializable;
+
+public class MyClass implements Serializable {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testGroupOption/TestGroupOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4924383
+ * @summary  Test to make sure the -group option does not cause a bad warning
+ *           to be printed.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestGroupOption
+ */
+
+public class TestGroupOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestGroupOption tester = new TestGroupOption();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        //Make sure the warning is not printed when -group is used correctly.
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "-group", "Package One", "pkg1",
+                "-group", "Package Two", "pkg2",
+                "-group", "Package Three", "pkg3",
+                "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, false,
+                "-group");
+    }
+
+    @Test
+    void test2() {
+        //Make sure the warning is printed when -group is not used correctly.
+        javadoc("-d", "out-2",
+                "-sourcepath", testSrc,
+                "-group", "Package One", "pkg1",
+                "-group", "Package One", "pkg2",
+                "-group", "Package One", "pkg3",
+                "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true,
+                "-group");
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testGroupOption/pkg1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testGroupOption/pkg2/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg2;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testGroupOption/pkg3/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg3;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHeadings/TestHeadings.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,116 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4905786 6259611
+ * @summary  Make sure that headings use the TH tag instead of the TD tag.
+ * @author   jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @build    TestHeadings
+ * @run main TestHeadings
+ */
+
+public class TestHeadings extends JavadocTester {
+
+    private static final String[][] TEST = {
+
+        {
+        },
+        { "serialized-form.html"
+        },
+        { "serialized-form.html"
+        },
+
+        {
+        },
+        { "overview-frame.html"
+        },
+        {
+        }
+    };
+
+    public static void main(String... args) throws Exception {
+        TestHeadings tester = new TestHeadings();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-use",
+                "-header", "Test Files",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        //Package summary
+        checkOutput("pkg1/package-summary.html", true,
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Class</th>\n"
+                + "<th class=\"colLast\" scope=\"col\""
+                + ">Description</th>");
+
+        // Class documentation
+        checkOutput("pkg1/C1.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Field and Description</th>",
+                "<h3>Methods inherited from class&nbsp;java.lang.Object</h3>");
+
+        // Class use documentation
+        checkOutput("pkg1/class-use/C1.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Field and Description</th>");
+
+        // Deprecated
+        checkOutput("deprecated-list.html", true,
+                "<th class=\"colOne\" scope=\"col\">Method and Description</th>");
+
+        // Constant values
+        checkOutput("constant-values.html", true,
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Modifier and Type</th>\n"
+                + "<th scope=\"col\">Constant Field</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Value</th>");
+
+        // Serialized Form
+        checkOutput("serialized-form.html", true,
+                "<h2 title=\"Package\">Package&nbsp;pkg1</h2>",
+                "<h3>Class <a href=\"pkg1/C1.html\" title=\"class in pkg1\">"
+                + "pkg1.C1</a> extends java.lang.Object implements Serializable</h3>",
+                "<h3>Serialized Fields</h3>");
+
+        // Overview Frame
+        checkOutput("overview-frame.html", true,
+                "<h1 title=\"Test Files\" class=\"bar\">Test Files</h1>",
+                "<title>Overview List</title>");
+
+        // Overview Summary
+        checkOutput("overview-summary.html", true,
+                "<title>Overview</title>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHeadings/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+import pkg2.*;
+import java.io.Serializable;
+
+/**
+ * @serial This is the serial tag's comment.
+ */
+public class C1 implements Serializable {
+
+    public C2 field;
+
+    public static final String CONSTANT1 = "C1";
+
+    public C2 method(C2 param) {
+        return param;
+    }
+
+    /**
+     * @deprecated don't use this anymore.
+     */
+    public void deprecatedMethod() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHeadings/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg2;
+
+import pkg1.*;
+import java.io.Serializable;
+
+/**
+ * @serial This is the serial tag's comment.
+ */
+public class C2 implements Serializable {
+
+    public C1 field;
+
+    public static final String CONSTANT1 = "C2";
+
+    public C1 method(C1 param) {
+        return param;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHelpFile/TestHelpFile.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      7132631
+ * @summary  Make sure that the help file is generated correctly.
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestHelpFile
+ */
+
+public class TestHelpFile extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHelpFile tester = new TestHelpFile();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("TestHelpFile.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("help-doc.html", true,
+            "<a href=\"constant-values.html\">Constant Field Values</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHelpOption/Sample.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/**
+ * A Sample class to test with. That is all.
+ */
+public class Sample {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHelpOption/TestHelpOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4934778 4777599 6553182 8146427 8146475
+ * @summary  Make sure that -help, -helpfile and -nohelp options work correctly.
+ * @author   jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester TestHelpOption
+ * @run main TestHelpOption
+ */
+
+public class TestHelpOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHelpOption tester = new TestHelpOption();
+        tester.runTests();
+    }
+
+    @Test
+    void testWithOption() {
+        javadoc("-d", "out1",
+                "-sourcepath", testSrc,
+                "-help",
+                testSrc("Sample.java"));
+        checkExit(Exit.OK);
+
+        checkOutput(true);
+    }
+
+    @Test
+    void testWithoutOption() {
+        javadoc("-d", "out2",
+                "-sourcepath", testSrc,
+                testSrc("Sample.java"));
+        checkExit(Exit.OK);
+    }
+
+    @Test
+    void testNohelpOption() {
+        javadoc("-d", "out3",
+                "-sourcepath", testSrc,
+                "-nohelp",
+                testSrc("Sample.java"));
+        checkExit(Exit.OK);
+    }
+
+    @Test
+    void testHelpfileOption() {
+        javadoc("-d", "out4",
+                "-sourcepath", testSrc,
+                "-helpfile", testSrc("test-help.html"),
+                testSrc("Sample.java"));
+        checkExit(Exit.OK);
+        checkOutput("Sample.html", true,
+                "<li><a href=\"test-help.html\">Help</a></li>");
+    }
+
+    @Test
+    void testHelpfileReuseOption() {
+        javadoc("-d", "out5",
+                "-sourcepath", testSrc,
+                "-helpfile", testSrc("test-help.html"),
+                "-helpfile", testSrc("test-help.html"),
+                testSrc("Sample.java"));
+        checkExit(Exit.FAILED);
+    }
+
+    @Test
+    void testHelpfileNohelpConflict() {
+        javadoc("-d", "out6",
+                "-sourcepath", testSrc,
+                "-helpfile", testSrc("test-help.html"),
+                "-nohelp",
+                testSrc("Sample.java"));
+        checkExit(Exit.FAILED);
+    }
+
+    private void checkOutput(boolean withOption) {
+        checkOutput(Output.OUT, withOption,
+                "-d ",
+                "-use ",
+                "-version ",
+                "-author ",
+                "-docfilessubdirs ",
+                "-splitindex ",
+                "-windowtitle ",
+                "-doctitle ",
+                "-header ",
+                "-footer ",
+                "-bottom ",
+                "-link ",
+                "-linkoffline ",
+                "-excludedocfilessubdir ",
+                "-group ",
+                "-nocomment ",
+                "-nodeprecated ",
+                "-noqualifier ",
+                "-nosince ",
+                "-notimestamp ",
+                "-nodeprecatedlist ",
+                "-notree ",
+                "-noindex ",
+                "-nohelp ",
+                "-nonavbar ",
+                "-serialwarn ",
+                "-tag ",
+                "-taglet ",
+                "-tagletpath ",
+                "-charset ",
+                "-helpfile ",
+                "-linksource ",
+                "-sourcetab ",
+                "-keywords ",
+                "-stylesheetfile ",
+                "-docencoding ");
+
+        checkOutput("Sample.html", !withOption,
+                "<li><a href=\"help-doc.html\">Help</a></li>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHelpOption/test-help.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+Help, help.
+</body>
+</html>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHiddenMembers/TestHiddenMembers.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4492178
+ * @summary Test to make sure that hidden overriden members are not
+ * documented as inherited.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHiddenMembers
+ */
+
+public class TestHiddenMembers extends JavadocTester {
+
+    private static final String[][] NEGATED_TEST = {
+        { }
+        };
+    private static final String[] ARGS =
+        new String[] {
+
+        };
+
+    public static void main(String... args) throws Exception {
+        TestHiddenMembers tester = new TestHiddenMembers();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        // We should not inherit any members from BaseClass because they are all overriden and hidden
+        // (declared as private).
+        // TODO: check normal case of generated tags: upper case of lower case
+        checkOutput("pkg/SubClass.html", false,
+            "inherited from class pkg.<A HREF=\"../pkg/BaseClass.html\">BaseClass</A>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHiddenMembers/pkg/BaseClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class BaseClass {
+
+  public int pubField = 1;
+
+  public class pubInnerClass{}
+
+  public void pubMethod() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHiddenMembers/pkg/SubClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class SubClass extends BaseClass {
+
+  private int pubField = 1;
+
+  private class pubInnerClass{}
+
+  private void pubMethod() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHref/TestHref.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4663254 8016328 8025633 8026567 8081854
+ * @summary  Verify that spaces do not appear in hrefs and anchors.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestHref
+ */
+
+public class TestHref extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHref tester = new TestHref();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                "-sourcepath", testSrc,
+                "-linkoffline", "http://java.sun.com/j2se/1.4/docs/api/", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C1.html", true,
+                //External link.
+                "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"",
+                //Member summary table link.
+                "href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"",
+                //Anchor test.
+                "<a name=\"method-int-int-java.util.ArrayList-\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                //Backward compatibility anchor test."pkg/C1.html",
+                "<a name=\"method-int-int-java.util.ArrayList-\">\n"
+                + "<!--   -->\n"
+                + "</a>");
+
+        checkOutput("pkg/C2.html", true,
+                //{@link} test.
+                "Link: <a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">",
+                //@see test.
+                "See Also:</span></dt>\n"
+                + "<dd><a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">"
+        );
+
+        checkOutput("pkg/C4.html", true,
+                //Header does not link to the page itself.
+                "Class C4&lt;E extends C4&lt;E&gt;&gt;</h2>",
+                //Signature does not link to the page itself.
+                "public abstract class <span class=\"typeNameLabel\">C4&lt;E extends C4&lt;E&gt;&gt;</span>"
+        );
+
+        checkOutput(Output.OUT, false,
+                "<a> tag is malformed");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHref/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,1 @@
+java.lang
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHref/pkg/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+/**
+ * @see java.lang.Object#wait(long, int)
+ */
+public class C1 {
+
+    public <E> void method(int param1, int param2, ArrayList<E> param3) {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHref/pkg/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+/**
+ * Link: {@link pkg.C1#method(int, int, java.util.ArrayList)}
+ * @see  pkg.C1#method(int, int, java.util.ArrayList)
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHref/pkg/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 pkg;
+
+public abstract class C4<E extends C4<E>> {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHrefInDocComment/TestHrefInDocComment.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4638015
+ * @summary Determine if Hrefs are processed properly when they
+ * appear in doc comments.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHrefInDocComment
+ */
+
+public class TestHrefInDocComment extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHrefInDocComment tester = new TestHrefInDocComment();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc, "pkg");
+        checkExit(Exit.OK);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHrefInDocComment/pkg/I1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Here's the <a href="mailto:skeet@pobox.com">first</a>
+ * and here's the <a href="http://www.pobox.com">second</a>.
+ */
+public interface I1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHrefInDocComment/pkg/I2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+   /*****
+    * Just a dummy interface used to reproduce a bug.
+    */
+
+   public interface I2 {
+   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlComments/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlComments/TestHtmlComments.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4904038
+ * @summary  The field detail comment should not show up in the output if there
+ *           are no fields to document.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestHtmlComments
+ */
+
+public class TestHtmlComments extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHtmlComments tester = new TestHtmlComments();
+        tester.runTests();
+    }
+
+    @Test
+    void run() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", false,
+            "<!-- ============ FIELD DETAIL =========== -->");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,400 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6786690 6820360 8025633 8026567
+ * @summary This test verifies the nesting of definition list tags.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHtmlDefinitionListTag
+ */
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class TestHtmlDefinitionListTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHtmlDefinitionListTag tester = new TestHtmlDefinitionListTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test_Comment_Deprecated() {
+//        tester.run(ARGS1, TEST_ALL, NEGATED_TEST_NO_C5);
+//        tester.runTestsOnHTML(NO_TEST,  NEGATED_TEST_C5);
+//        tester.runTestsOnHTML(TEST_CMNT_DEPR, NO_TEST);
+        javadoc("-Xdoclint:none",
+                "-d", "out-1",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+        checkCommon(true);
+        checkCommentDeprecated(true);
+    }
+
+    @Test
+    void test_NoComment_Deprecated() {
+//        tester.run(ARGS2, TEST_ALL, NEGATED_TEST_NO_C5);
+//        tester.runTestsOnHTML(NO_TEST,  NEGATED_TEST_C5);
+//        tester.runTestsOnHTML(NO_TEST, TEST_CMNT_DEPR);
+        javadoc("-Xdoclint:none",
+                "-d", "out-2",
+                "-nocomment",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+        checkCommon(true);
+        checkCommentDeprecated(false); // ??
+    }
+
+    @Test
+    void test_Comment_NoDeprecated() {
+//        tester.run(ARGS3, TEST_ALL, NEGATED_TEST_NO_C5);
+//        tester.runTestsOnHTML(TEST_NODEPR, TEST_NOCMNT_NODEPR);
+        javadoc("-Xdoclint:none",
+                "-d", "out-3",
+                "-nodeprecated",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+        checkCommon(false);
+        checkNoDeprecated();
+        checkNoCommentNoDeprecated(false);
+    }
+
+    @Test
+    void testNoCommentNoDeprecated() {
+//        tester.run(ARGS4, TEST_ALL, NEGATED_TEST_NO_C5);
+//        tester.runTestsOnHTML(TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR);
+        javadoc("-Xdoclint:none",
+                "-d", "out-4",
+                "-nocomment",
+                "-nodeprecated",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+        checkCommon(false);
+        checkNoCommentNoDeprecated(true);
+        checkCommentDeprecated(false);
+    }
+
+    void checkCommon(boolean checkC5) {
+        // Test common to all runs of javadoc. The class signature should print
+        // properly enclosed definition list tags and the Annotation Type
+        // Optional Element should print properly nested definition list tags
+        // for default value.
+        checkOutput("pkg1/C1.html", true,
+                "<pre>public class <span class=\"typeNameLabel\">C1</span>\n" +
+                "extends java.lang.Object\n" +
+                "implements java.io.Serializable</pre>");
+        checkOutput("pkg1/C4.html", true,
+                "<dl>\n" +
+                "<dt>Default:</dt>\n" +
+                "<dd>true</dd>\n" +
+                "</dl>");
+
+        // Test for valid HTML generation which should not comprise of empty
+        // definition list tags.
+        List<String> files= new ArrayList<>(Arrays.asList(
+            "pkg1/package-summary.html",
+            "pkg1/C1.html",
+            "pkg1/C1.ModalExclusionType.html",
+            "pkg1/C2.html",
+            "pkg1/C2.ModalType.html",
+            "pkg1/C3.html",
+            "pkg1/C4.html",
+            "overview-tree.html",
+            "serialized-form.html"
+        ));
+
+        if (checkC5)
+            files.add("pkg1/C5.html");
+
+        for (String f: files) {
+            checkOutput(f, false,
+                    "<dl></dl>",
+                    "<dl>\n</dl>");
+        }
+    }
+
+    void checkCommentDeprecated(boolean expectFound) {
+        // Test for normal run of javadoc in which various ClassDocs and
+        // serialized form should have properly nested definition list tags
+        // enclosing comments, tags and deprecated information.
+        checkOutput("pkg1/package-summary.html", expectFound,
+                "<dl>\n" +
+                "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" +
+                "<dd>JDK1.0</dd>\n" +
+                "</dl>");
+
+        checkOutput("pkg1/C1.html", expectFound,
+                "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>JDK1.0</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>"
+                + "C2</code></a>, \n"
+                + "<a href=\"../serialized-form.html#pkg1.C1\">"
+                + "Serialized Form</a></dd>\n"
+                + "</dl>",
+                "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<dl>\n"
+                + "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
+                + "<dd><code>title</code> - the title</dd>\n"
+                + "<dd><code>test</code> - boolean value"
+                + "</dd>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+                + "<dd><code>java.lang.IllegalArgumentException</code> - if the "
+                + "<code>owner</code>'s\n"
+                + "     <code>GraphicsConfiguration</code> is not from a screen "
+                + "device</dd>\n"
+                + "<dd><code>HeadlessException</code></dd>\n"
+                + "</dl>",
+                "<dl>\n"
+                + "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n"
+                + "<dd><code>undecorated"
+                + "</code> - <code>true</code> if no decorations are\n"
+                + "         to be enabled;\n"
+                + "         <code>false</code> "
+                + "if decorations are to be enabled.</dd>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:"
+                + "</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd>"
+                + "<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()"
+                + "</code></a></dd>\n"
+                + "</dl>",
+                "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+                + "<dd><code>java.io.IOException</code></dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:"
+                + "</span></dt>\n"
+                + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg1/C2.html", expectFound,
+                "<dl>\n"
+                + "<dt><span class=\"paramLabel\">Parameters:"
+                + "</span></dt>\n"
+                + "<dd><code>set</code> - boolean</dd>\n"
+                + "<dt><span class=\"simpleTagLabel\">"
+                + "Since:</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "</dl>");
+
+        checkOutput("serialized-form.html", expectFound,
+                "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span>"
+                + "</dt>\n"
+                + "<dd><code>"
+                + "java.io.IOException</code></dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span>"
+                + "</dt>\n"
+                + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<div class=\"block\">This field indicates whether the C1 is "
+                + "undecorated.</div>\n"
+                + "&nbsp;\n"
+                + "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span>"
+                + "</dt>\n"
+                + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<div class=\"block\">Reads the object stream.</div>\n"
+                + "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:"
+                + "</span></dt>\n"
+                + "<dd><code>java.io.IOException</code></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;</div>\n"
+                + "<div class=\"block\">The name for this class.</div>");
+    }
+
+    void checkNoDeprecated() {
+        // Test with -nodeprecated option. The ClassDocs should have properly nested
+        // definition list tags enclosing comments and tags. The ClassDocs should not
+        // display definition list for deprecated information. The serialized form
+        // should display properly nested definition list tags for comments, tags
+        // and deprecated information.
+        checkOutput("pkg1/package-summary.html", true,
+                "<dl>\n" +
+                "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" +
+                "<dd>JDK1.0</dd>\n" +
+                "</dl>");
+
+        checkOutput("pkg1/C1.html", true,
+                "<dl>\n" +
+                "<dt><span class=\"simpleTagLabel\">Since:</span>" +
+                "</dt>\n" +
+                "<dd>JDK1.0</dd>\n" +
+                "<dt><span class=\"seeLabel\">See Also:" +
+                "</span></dt>\n" +
+                "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
+                "<code>C2</code></a>, \n" +
+                "<a href=\"../serialized-form.html#pkg1.C1\">" +
+                "Serialized Form</a></dd>\n" +
+                "</dl>");
+
+        checkOutput("pkg1/C1.html", true,
+                "<dl>\n"
+                + "<dt><span class=\"paramLabel\">Parameters:"
+                + "</span></dt>\n"
+                + "<dd><code>title</code> - the title</dd>\n"
+                + "<dd><code>"
+                + "test</code> - boolean value</dd>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:"
+                + "</span></dt>\n"
+                + "<dd><code>java.lang.IllegalArgumentException"
+                + "</code> - if the <code>owner</code>'s\n"
+                + "     <code>GraphicsConfiguration"
+                + "</code> is not from a screen device</dd>\n"
+                + "<dd><code>"
+                + "HeadlessException</code></dd>\n"
+                + "</dl>",
+                "<dl>\n"
+                + "<dt><span class=\"paramLabel\">Parameters:"
+                + "</span></dt>\n"
+                + "<dd><code>undecorated</code> - <code>true</code>"
+                + " if no decorations are\n"
+                + "         to be enabled;\n"
+                + "         <code>false</code> if decorations are to be enabled."
+                + "</dd>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><a href=\"../pkg1/C1.html#readObject--\">"
+                + "<code>readObject()</code></a></dd>\n"
+                + "</dl>",
+                "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span>"
+                + "</dt>\n"
+                + "<dd><code>java.io.IOException</code></dd>\n"
+                + "<dt>"
+                + "<span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>");
+
+        checkOutput("serialized-form.html", true,
+                "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span>"
+                + "</dt>\n"
+                + "<dd><code>"
+                + "java.io.IOException</code></dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span>"
+                + "</dt>\n"
+                + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<div class=\"block\">This field indicates whether the C1 is "
+                + "undecorated.</div>\n"
+                + "&nbsp;\n"
+                + "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span>"
+                + "</dt>\n"
+                + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<div class=\"block\">Reads the object stream.</div>\n"
+                + "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:"
+                + "</span></dt>\n"
+                + "<dd><code>java.io.IOException</code></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;</div>\n"
+                + "<div class=\"block\">"
+                + "The name for this class.</div>");
+    }
+
+    void checkNoCommentNoDeprecated(boolean expectFound) {
+        // Test with -nocomment and -nodeprecated options. The ClassDocs whould
+        // not display definition lists for any member details.
+        checkOutput("pkg1/C1.html", expectFound,
+                "<pre>public&nbsp;void&nbsp;readObject()\n" +
+                "                throws java.io.IOException</pre>\n" +
+                "</li>");
+
+        checkOutput("pkg1/C2.html", expectFound,
+                "<pre>public&nbsp;C2()</pre>\n" +
+                "</li>");
+
+        checkOutput("pkg1/C1.ModalExclusionType.html", expectFound,
+                "<pre>public " +
+                "static final&nbsp;<a href=\"../pkg1/C1.ModalExclusionType.html\" " +
+                "title=\"enum in pkg1\">C1.ModalExclusionType</a> " +
+                "APPLICATION_EXCLUDE</pre>\n" +
+                "</li>");
+
+        checkOutput("serialized-form.html", expectFound,
+                "<pre>boolean " +
+                "undecorated</pre>\n" +
+                "<div class=\"block\"><span class=\"deprecatedLabel\">" +
+                "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" +
+                " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
+                "setUndecorated(boolean)</code></a>.</span></div>\n" +
+                "</li>",
+                "<span class=\"deprecatedLabel\">" +
+                "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version" +
+                " 1.5, replaced by\n" +
+                " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
+                "<code>setUndecorated(boolean)</code></a>.</span></div>\n" +
+                "</li>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author      Bhavesh Patel
+ * @see C2
+ * @since       JDK1.0
+ */
+
+public class C1 implements Serializable {
+
+    /**
+     * This field indicates whether the C1 is undecorated.
+     *
+     * @see #setUndecorated(boolean)
+     * @since 1.4
+     * @serial
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+     @Deprecated
+    public boolean undecorated = false;
+
+    private String title;
+
+    /**
+     * This enum specifies the possible modal exclusion types.
+     *
+     * @since 1.6
+     */
+    public static enum ModalExclusionType {
+        /**
+         * No modal exclusion.
+         */
+        NO_EXCLUDE,
+        /**
+         * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window
+         * won't be blocked by any application-modal dialogs. Also, it isn't
+         * blocked by document-modal dialogs from outside of its child hierarchy.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * Constructor.
+     *
+     * @param title the title
+     * @param test boolean value
+     * @exception IllegalArgumentException if the <code>owner</code>'s
+     *     <code>GraphicsConfiguration</code> is not from a screen device
+     * @exception HeadlessException
+     */
+     public C1(String title, boolean test) {
+
+     }
+
+     public C1(String title) {
+
+     }
+
+    /**
+     * Method comments.
+     * @param  undecorated <code>true</code> if no decorations are
+     *         to be enabled;
+     *         <code>false</code> if decorations are to be enabled.
+     * @see    #readObject()
+     * @since 1.4
+     */
+    public void setUndecorated(boolean undecorated) {
+        /* Make sure we don't run in the middle of peer creation.*/
+    }
+
+    /**
+     * @see #setUndecorated(boolean)
+     */
+    public void readObject() throws IOException {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.io.ObjectInputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author      Bhavesh Patel
+ * @see C1
+ * @since       JDK1.0
+ */
+
+public class C2 implements Serializable {
+
+    /**
+     * This field indicates title.
+     */
+    String title;
+
+    public static enum ModalType {
+        NO_EXCLUDE
+    };
+
+    /**
+     * Constructor.
+     *
+     */
+     public C2() {
+
+     }
+
+     public C2(String title) {
+
+     }
+
+     /**
+     * Set visible.
+     *
+     * @param set boolean
+     * @since 1.4
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+     @Deprecated
+     public void setVisible(boolean set) {
+     }
+
+     /**
+     * Reads the object stream.
+     *
+     * @param s ObjectInputStream
+     * @throws IOException
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+     @Deprecated
+     public void readObject(ObjectInputStream s) throws IOException {
+     }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/pkg1/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * Test Annotation class.
+ *
+ * @author Bhavesh Patel
+ * @since 1.5
+ */
+@Retention(RetentionPolicy.SOURCE)
+public @interface C3 {
+    /**
+     * Comment.
+     */
+    String[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/pkg1/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/*
+ * The @Inherited annotation has no effect when applied to an interface.
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Inherited
+public @interface C4 {
+    boolean value() default true;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/pkg1/C5.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.io.Serializable;
+
+/**
+ * Test for Serializable
+ *
+ * @author Bhavesh Patel
+ * @deprecated This class is no longer used.
+ */
+@Deprecated
+public abstract class C5 implements Serializable {
+
+    /**
+     * The name for this class.
+     *
+     * @serial
+     */
+    private String name;
+
+    /**
+     * @serial
+     */
+    private int publicKey;
+
+    /**
+     * Constructor for serialization only.
+     */
+    protected C5() {
+
+    }
+
+    /**
+     * Prints general information.
+     *
+     */
+    public void printInfo() {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDefinitionListTag/pkg1/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Test package 1.
+ *
+ * @since JDK1.0
+ */
+package pkg1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDocument/TestHtmlDocument.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6851834
+ * @summary This test verifies the HTML document generation for javadoc output.
+ * @library ../lib
+ * @modules jdk.javadoc/com.sun.tools.doclets.formats.html.markup
+ *          jdk.javadoc/com.sun.tools.doclets.internal.toolkit
+ * @build JavadocTester
+ * @author Bhavesh Patel
+ * @run main TestHtmlDocument
+ */
+
+
+import jdk.javadoc.internal.doclets.formats.html.markup.*;
+
+import static jdk.javadoc.internal.doclets.toolkit.util.DocletConstants.NL;
+
+/**
+ * The class reads each file, complete with newlines, into a string to easily
+ * compare the existing markup with the generated markup.
+ */
+public class TestHtmlDocument extends JavadocTester {
+
+    // Entry point
+    public static void main(String... args) throws Exception {
+        TestHtmlDocument tester = new TestHtmlDocument();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        checking("markup");
+        // Check whether the generated markup is same as the existing markup.
+        String expected = readFile(testSrc, "testMarkup.html").replace("\n", NL);
+        String actual = generateHtmlTree();
+        if (actual.equals(expected)) {
+            passed("");
+        } else {
+            failed("expected content in " + testSrc("testMarkup.html") + "\n"
+                + "Actual output:\n"
+                + actual);
+        }
+    }
+
+    // Generate the HTML output using the HTML document generation within doclet.
+    public static String generateHtmlTree() {
+        // Document type for the HTML document
+        DocType htmlDocType = DocType.TRANSITIONAL;
+        HtmlTree html = new HtmlTree(HtmlTag.HTML);
+        HtmlTree head = new HtmlTree(HtmlTag.HEAD);
+        HtmlTree title = new HtmlTree(HtmlTag.TITLE);
+        // String content within the document
+        StringContent titleContent = new StringContent("Markup test");
+        title.addContent(titleContent);
+        head.addContent(title);
+        // Test META tag
+        HtmlTree meta = new HtmlTree(HtmlTag.META);
+        meta.addAttr(HtmlAttr.NAME, "keywords");
+        meta.addAttr(HtmlAttr.CONTENT, "testContent");
+        head.addContent(meta);
+        // Test invalid META tag
+        HtmlTree invmeta = new HtmlTree(HtmlTag.META);
+        head.addContent(invmeta);
+        // Test LINK tag
+        HtmlTree link = new HtmlTree(HtmlTag.LINK);
+        link.addAttr(HtmlAttr.REL, "testRel");
+        link.addAttr(HtmlAttr.HREF, "testLink.html");
+        head.addContent(link);
+        // Test invalid LINK tag
+        HtmlTree invlink = new HtmlTree(HtmlTag.LINK);
+        head.addContent(invlink);
+        html.addContent(head);
+        // Comment within the document
+        Comment bodyMarker = new Comment("======== START OF BODY ========");
+        html.addContent(bodyMarker);
+        HtmlTree body = new HtmlTree(HtmlTag.BODY);
+        Comment pMarker = new Comment("======== START OF PARAGRAPH ========");
+        body.addContent(pMarker);
+        HtmlTree p = new HtmlTree(HtmlTag.P);
+        StringContent bodyContent = new StringContent(
+                "This document is generated from sample source code and HTML " +
+                "files with examples of a wide variety of Java language constructs: packages, " +
+                "subclasses, subinterfaces, nested classes, nested interfaces," +
+                "inheriting from other packages, constructors, fields," +
+                "methods, and so forth. ");
+        p.addContent(bodyContent);
+        StringContent anchorContent = new StringContent("Click Here");
+        p.addContent(HtmlTree.A("testLink.html", anchorContent));
+        StringContent pContent = new StringContent(" to <test> out a link.");
+        p.addContent(pContent);
+        body.addContent(p);
+        HtmlTree p1 = new HtmlTree(HtmlTag.P);
+        // Test another version of A tag.
+        HtmlTree anchor = new HtmlTree(HtmlTag.A);
+        anchor.addAttr(HtmlAttr.HREF, "testLink.html");
+        anchor.addAttr(HtmlAttr.ID, "Another version of a tag");
+        p1.addContent(anchor);
+        body.addContent(p1);
+        // Test for empty tags.
+        HtmlTree dl = new HtmlTree(HtmlTag.DL);
+        html.addContent(dl);
+        // Test for empty nested tags.
+        HtmlTree dlTree = new HtmlTree(HtmlTag.DL);
+        dlTree.addContent(new HtmlTree(HtmlTag.DT));
+        dlTree.addContent(new HtmlTree (HtmlTag.DD));
+        html.addContent(dlTree);
+        HtmlTree dlDisplay = new HtmlTree(HtmlTag.DL);
+        dlDisplay.addContent(new HtmlTree(HtmlTag.DT));
+        HtmlTree dd = new HtmlTree (HtmlTag.DD);
+        StringContent ddContent = new StringContent("Test DD");
+        dd.addContent(ddContent);
+        dlDisplay.addContent(dd);
+        body.addContent(dlDisplay);
+        StringContent emptyString = new StringContent("");
+        body.addContent(emptyString);
+        Comment emptyComment = new Comment("");
+        body.addContent(emptyComment);
+        HtmlTree hr = new HtmlTree(HtmlTag.HR);
+        body.addContent(hr);
+        html.addContent(body);
+        HtmlDocument htmlDoc = new HtmlDocument(htmlDocType, html);
+        return htmlDoc.toString();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDocument/testLink.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>Markup test</title>
+</head>
+<body>
+This is a test for link.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlDocument/testMarkup.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,18 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<title>Markup test</title>
+<meta name="keywords" content="testContent">
+<link rel="testRel" href="testLink.html">
+</head>
+<!-- ======== START OF BODY ======== -->
+<body>
+<!-- ======== START OF PARAGRAPH ======== -->
+<p>This document is generated from sample source code and HTML files with examples of a wide variety of Java language constructs: packages, subclasses, subinterfaces, nested classes, nested interfaces,inheriting from other packages, constructors, fields,methods, and so forth. <a href="testLink.html">Click Here</a> to &lt;test&gt; out a link.</p>
+<p><a href="testLink.html" id="Another version of a tag"></a></p>
+<dl>
+<dd>Test DD</dd>
+</dl>
+<hr>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlStrongTag/TestHtmlStrongTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 1999, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6786028 8026567
+ * @summary This test verifies the use of <strong> HTML tag instead of <B> by Javadoc std doclet.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHtmlStrongTag
+ */
+
+public class TestHtmlStrongTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHtmlStrongTag tester = new TestHtmlStrongTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/C1.html", true,
+            "<span class=\"seeLabel\">See Also:</span>");
+
+        checkOutput("pkg1/C1.html", false,
+            "<STRONG>Method Summary</STRONG>",
+            "<B>");
+
+        checkOutput("pkg1/package-summary.html", false,
+            "<STRONG>Class Summary</STRONG>");
+    }
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2",
+                "-sourcepath", testSrc,
+                "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg2/C2.html", true,
+                "<B>Comments:</B>");
+
+        checkOutput("pkg2/C2.html", false,
+                "<STRONG>Method Summary</STRONG>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlStrongTag/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 1999, 2008, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * @see java.lang.Object#wait(long, int)
+ */
+public class C1 {
+
+    public void method(int param1, int param2) {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlStrongTag/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 1999, 2008, 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.
+ *
+ * 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 pkg2;
+
+/**
+ * <B>Comments:</B> Class 2
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableStyles/TestHtmlTableStyles.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8008164
+ * @summary Test styles on HTML tables generated by javadoc.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHtmlTableStyles
+ */
+
+public class TestHtmlTableStyles extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHtmlTableStyles tester = new TestHtmlTableStyles();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/TestTable.html", true,
+                "<table summary=\"Summary\" border cellpadding=3 cellspacing=1>",
+                "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, "
+                + "and an explanation\">",
+                "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing "
+                + "constructors, and an explanation\">",
+                "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, "
+                + "and an explanation\">");
+
+        checkOutput("pkg1/package-summary.html", true,
+                "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, "
+                + "and an explanation\">");
+
+        checkOutput("pkg1/class-use/TestTable.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
+
+        checkOutput("overview-summary.html", true,
+                "<table class=\"overviewSummary\" "
+                + "summary=\"Packages table, listing packages, and an explanation\">");
+
+        checkOutput("deprecated-list.html", true,
+            "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing " +
+            "deprecated methods, and an explanation\">");
+
+        checkOutput("constant-values.html", true,
+            "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing " +
+            "constant fields, and values\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableStyles/pkg1/TestTable.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Testing table in documentation comment. In the generated documentation, it
+ * should be displayed as a regular table and not have any styles that the javadoc
+ * generated tables have.
+ *
+ * <table summary="Summary" border cellpadding=3 cellspacing=1>
+ * <caption>Summary of test table</caption>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center colspan = 2> First Element (Head)</td>
+ *    <td align=center colspan = 2> Last Element (Tail)</td>
+ *  </tr>
+ *  <tr>
+ *    <td></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *    <td align=center><em>Throws exception</em></td>
+ *    <td align=center><em>Special value</em></td>
+ *  </tr>
+ *  <tr>
+ *    <td>Insert</td>
+ *    <td>addFirst(e)</td>
+ *    <td>offerFirst(e)</td>
+ *    <td>addLast(e)</td>
+ *    <td>offerLast(e)</td>
+ *  </tr>
+ *  <tr>
+ *    <td>Remove</td>
+ *    <td>removeFirst()</td>
+ *    <td>pollFirst()</td>
+ *    <td>removeLast()</td>
+ *    <td>pollLast()</td>
+ *  </tr>
+ * </table>
+ */
+public class TestTable
+{
+    /**
+     * Field in Class.
+     */
+    public String field;
+
+    /**
+     * Field constant in Class.
+     */
+    public static final int fieldCnst = 0;
+
+    /**
+     * Method in Class.
+     */
+    public void methodInClass(int i) {}
+
+    /**
+     * Deprecated method in Class.
+     * @deprecated Do not use it.
+     */
+    public void deprMethod() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableStyles/pkg2/TestUse.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+import pkg1.*;
+
+/**
+ * Testing use of TestTable.
+ */
+public class TestUse
+{
+    public TestTable tTable;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/TestHtmlTableTags.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      6786688 8008164
+ * @summary  HTML tables should have table summary, caption and table headers.
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestHtmlTableTags
+ */
+
+public class TestHtmlTableTags extends JavadocTester {
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+
+    };
+
+
+    public static void main(String... args) throws Exception {
+        TestHtmlTableTags tester = new TestHtmlTableTags();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        checkHtmlTableSummaries();
+        checkHtmlTableCaptions();
+        checkHtmlTableHeaders();
+    }
+
+    /*
+     * Tests for validating summary for HTML tables
+     */
+    void checkHtmlTableSummaries() {
+        //Package summary
+        checkOutput("pkg1/package-summary.html", true,
+                "<table class=\"typeSummary\" summary=\"Class Summary table, "
+                + "listing classes, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Interface Summary table, "
+                + "listing interfaces, and an explanation\">");
+
+        checkOutput("pkg2/package-summary.html", true,
+                "<table class=\"typeSummary\" summary=\"Enum Summary table, "
+                + "listing enums, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, "
+                + "listing annotation types, and an explanation\">");
+
+        // Class documentation
+        checkOutput("pkg1/C1.html", true,
+                "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, "
+                + "and an explanation\">",
+                "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, "
+                + "and an explanation\">");
+
+        checkOutput("pkg2/C2.html", true,
+                "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing "
+                + "nested classes, and an explanation\">",
+                "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing "
+                + "constructors, and an explanation\">");
+
+        checkOutput("pkg2/C2.ModalExclusionType.html", true,
+                "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing "
+                + "enum constants, and an explanation\">");
+
+        checkOutput("pkg2/C3.html", true,
+                "<table class=\"memberSummary\" summary=\"Required Element Summary table, "
+                + "listing required elements, and an explanation\">");
+
+        checkOutput("pkg2/C4.html", true,
+                "<table class=\"memberSummary\" summary=\"Optional Element Summary table, "
+                + "listing optional elements, and an explanation\">");
+
+        // Class use documentation
+        checkOutput("pkg1/class-use/I1.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
+
+        checkOutput("pkg1/class-use/C1.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">",
+                "<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
+
+        checkOutput("pkg2/class-use/C2.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">",
+                "<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
+
+        checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
+
+        checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing methods, and an explanation\">");
+
+        // Package use documentation
+        checkOutput("pkg1/package-use.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+                "<table class=\"useSummary\" summary=\"Use table, listing classes, and an explanation\">");
+
+        checkOutput("pkg2/package-use.html", true,
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+                "<table class=\"useSummary\" summary=\"Use table, listing classes, and an explanation\">");
+
+        // Deprecated
+        checkOutput("deprecated-list.html", true,
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, "
+                + "and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, "
+                + "and an explanation\">");
+
+        // Constant values
+        checkOutput("constant-values.html", true,
+                "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing "
+                + "constant fields, and values\">");
+
+        // Overview Summary
+        checkOutput("overview-summary.html", true,
+                "<table class=\"overviewSummary\" "
+                + "summary=\"Packages table, listing packages, and an explanation\">");
+    }
+
+    /*
+     * Tests for validating caption for HTML tables
+     */
+    void checkHtmlTableCaptions() {
+        //Package summary
+        checkOutput("pkg1/package-summary.html", true,
+                "<caption><span>Class Summary</span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Interface Summary</span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>");
+
+        checkOutput("pkg2/package-summary.html", true,
+                "<caption><span>Enum Summary</span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Annotation Types Summary</span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>");
+
+        // Class documentation
+        checkOutput("pkg1/C1.html", true,
+                "<caption><span>Fields</span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All "
+                + "Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">"
+                + "Instance Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">"
+                + "Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">"
+                + "Deprecated Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "</caption>");
+
+        checkOutput("pkg2/C2.html", true,
+                "<caption><span>Nested Classes</span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<caption><span>Constructors</span><span class=\"tabEnd\">&nbsp;</span></caption>");
+
+        checkOutput("pkg2/C2.ModalExclusionType.html", true,
+                "<caption><span>Enum Constants</span><span class=\"tabEnd\">&nbsp;</span></caption>");
+
+        checkOutput("pkg2/C3.html", true,
+                "<caption><span>Required Elements</span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>");
+
+        checkOutput("pkg2/C4.html", true,
+                "<caption><span>Optional Elements</span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>");
+
+        // Class use documentation
+        checkOutput("pkg1/class-use/I1.html", true,
+                "<caption><span>Packages that use <a href=\"../../pkg1/I1.html\" "
+                + "title=\"interface in pkg1\">I1</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>");
+
+        checkOutput("pkg1/class-use/C1.html", true,
+                "<caption><span>Fields in <a href=\"../../pkg2/package-summary.html\">"
+                + "pkg2</a> declared as <a href=\"../../pkg1/C1.html\" "
+                + "title=\"class in pkg1\">C1</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>",
+                "<caption><span>Methods in <a href=\"../../pkg2/package-summary.html\">"
+                + "pkg2</a> that return <a href=\"../../pkg1/C1.html\" "
+                + "title=\"class in pkg1\">C1</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>");
+
+        checkOutput("pkg2/class-use/C2.html", true,
+                "<caption><span>Fields in <a href=\"../../pkg1/package-summary.html\">"
+                + "pkg1</a> declared as <a href=\"../../pkg2/C2.html\" "
+                + "title=\"class in pkg2\">C2</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Methods in <a href=\"../../pkg1/package-summary.html\">"
+                + "pkg1</a> that return <a href=\"../../pkg2/C2.html\" "
+                + "title=\"class in pkg2\">C2</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>");
+
+        checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
+                "<caption><span>Methods in <a href=\"../../pkg2/package-summary.html\">"
+                + "pkg2</a> that return <a href=\"../../pkg2/C2.ModalExclusionType.html\" "
+                + "title=\"enum in pkg2\">C2.ModalExclusionType</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></caption>");
+
+        // Package use documentation
+        checkOutput("pkg1/package-use.html", true,
+                "<caption><span>Packages that use <a href=\"../pkg1/package-summary.html\">"
+                + "pkg1</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<caption><span>Classes in <a href=\"../pkg1/package-summary.html\">"
+                + "pkg1</a> used by <a href=\"../pkg1/package-summary.html\">pkg1</a>"
+                + "</span><span class=\"tabEnd\">&nbsp;</span></caption>");
+
+        checkOutput("pkg2/package-use.html", true,
+                "<caption><span>Packages that use <a href=\"../pkg2/package-summary.html\">"
+                + "pkg2</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<caption><span>Classes in <a href=\"../pkg2/package-summary.html\">"
+                + "pkg2</a> used by <a href=\"../pkg1/package-summary.html\">pkg1</a>"
+                + "</span><span class=\"tabEnd\">&nbsp;</span></caption>");
+
+        // Deprecated
+        checkOutput("deprecated-list.html", true,
+                "<caption><span>Deprecated Fields</span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Deprecated Methods</span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>");
+
+        // Constant values
+        checkOutput("constant-values.html", true,
+                "<caption><span>pkg1.<a href=\"pkg1/C1.html\" title=\"class in pkg1\">"
+                + "C1</a></span><span class=\"tabEnd\">&nbsp;</span></caption>");
+
+        // Overview Summary
+        checkOutput("overview-summary.html", true,
+                "<caption><span>Packages</span><span class=\"tabEnd\">&nbsp;</span></caption>");
+    }
+
+    /*
+     * Test for validating headers for HTML tables
+     */
+    void checkHtmlTableHeaders() {
+        //Package summary
+        checkOutput("pkg1/package-summary.html", true,
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Class</th>\n"
+                + "<th class=\"colLast\" scope=\"col\""
+                + ">Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Interface</th>\n"
+                + "<th class=\"colLast\" scope=\"col\""
+                + ">Description</th>");
+
+        checkOutput("pkg2/package-summary.html", true,
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Enum</th>\n"
+                + "<th class=\"colLast\" scope=\"col\""
+                + ">Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Annotation Type</th>\n"
+                + "<th class=\"colLast\""
+                + " scope=\"col\">Description</th>");
+
+        // Class documentation
+        checkOutput("pkg1/C1.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Field and Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Method and Description</th>");
+
+        checkOutput("pkg2/C2.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Class and Description</th>",
+                "<th class=\"colOne\" scope=\"col\">Constructor and Description</th>");
+
+        checkOutput("pkg2/C2.ModalExclusionType.html", true,
+                "<th class=\"colOne\" scope=\"col\">Enum Constant and Description</th>");
+
+        checkOutput("pkg2/C3.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Required Element and Description</th>");
+
+        checkOutput("pkg2/C4.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Optional Element and Description</th>");
+
+        // Class use documentation
+        checkOutput("pkg1/class-use/I1.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Description</th>");
+
+        checkOutput("pkg1/class-use/C1.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Field and Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Method and Description</th>");
+
+        checkOutput("pkg2/class-use/C2.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Field and Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Method and Description</th>");
+
+        checkOutput("pkg2/class-use/C2.ModalExclusionType.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Description</th>",
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Method and Description</th>");
+
+        // Package use documentation
+        checkOutput("pkg1/package-use.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Description</th>",
+                "<th class=\"colOne\" scope=\"col\">Class and Description</th>");
+
+        checkOutput("pkg2/package-use.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Description</th>",
+                "<th class=\"colOne\" scope=\"col\">Class and Description</th>");
+
+        // Deprecated
+        checkOutput("deprecated-list.html", true,
+                "<th class=\"colOne\" scope=\"col\">Field and Description</th>",
+                "<th class=\"colOne\" scope=\"col\">Method and Description</th>");
+
+        // Constant values
+        checkOutput("constant-values.html", true,
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Modifier and Type</th>\n"
+                + "<th"
+                + " scope=\"col\">Constant Field</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Value</th>");
+
+        // Overview Summary
+        checkOutput("overview-summary.html", true,
+                "<th class=\"colFirst\" scope=\"col\">"
+                + "Package</th>\n"
+                + "<th class=\"colLast\" scope=\"col\""
+                + ">Description</th>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import pkg2.*;
+
+/**
+ * A test class.
+ *
+ * @author Bhavesh Patel
+ */
+public class C1 implements I1 {
+
+    /**
+     * Test field for class.
+     */
+    public C2 field;
+
+    /**
+     * Constant value.
+     */
+    public static final String CONSTANT1 = "C1";
+
+    /**
+     * A test constructor.
+     */
+    C1() {
+    }
+
+    /**
+     * Method thats does some processing.
+     *
+     * @param param some parameter that is passed.
+     * @return a sample object.
+     */
+    public C2 method(C2 param) {
+        return param;
+    }
+
+    /**
+     * Method that is implemented.
+     *
+     * @param a some random value.
+     * @param b some random value.
+     */
+    public void method1(int a, int b) {
+    }
+
+    /**
+     * Another inherited method.
+     * @param c some value.
+     */
+    public void method2(int c) {
+    }
+
+    /**
+     * @deprecated don't use this anymore.
+     */
+    public void deprecatedMethod() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg1/I1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * A sample interface used to test table tags.
+ *
+ * @author Bhavesh Patel
+ */
+public interface I1 {
+
+    /**
+     * A test method.
+     *
+     * @param a blah.
+     * @param b blah.
+     */
+    void method1(int a, int b);
+
+    /**
+     * Another test method.
+     *
+     * @param c blah.
+     */
+    void method2(int c);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg1/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Test package 1 used to test table tags.
+ */
+package pkg1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg2;
+
+import pkg1.*;
+
+/**
+ * Another test class.
+ *
+ * @author Bhavesh Patel
+ */
+public class C2 {
+
+    /**
+     * A test field.
+     */
+    public C1 field;
+
+    /**
+     * @deprecated don't use this field anymore.
+     */
+    public C1 dep_field;
+
+    /**
+     * A sample enum.
+     */
+    public static enum ModalExclusionType {
+        /**
+         * Test comment.
+         */
+        NO_EXCLUDE,
+        /**
+         * Another comment.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * A string constant.
+     */
+    public static final String CONSTANT1 = "C2";
+
+    /**
+     * A sample method.
+     *
+     * @param param some parameter.
+     * @return a test object.
+     */
+    public C1 method(C1 param) {
+        return param;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg2/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg2;
+
+import java.lang.annotation.*;
+
+/**
+ * Test Annotation class.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface C3 {
+    /**
+     * Comment.
+     */
+    String[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg2/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg2;
+
+import java.lang.annotation.*;
+
+/*
+ * A sample interface.
+ */
+public @interface C4 {
+    boolean value() default true;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTableTags/pkg2/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Test package 2 used to test table tags.
+ */
+package pkg2;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTag/TestHtmlTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,194 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6786682
+ * @summary This test verifies the use of lang attribute by <HTML>.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHtmlTag
+ */
+
+import java.util.Locale;
+
+public class TestHtmlTag extends JavadocTester {
+    private static final String defaultLanguage = Locale.getDefault().getLanguage();
+    public static void main(String... args) throws Exception {
+        TestHtmlTag tester = new TestHtmlTag();
+        tester.runTests();
+    }
+    @Test
+    void test_default() {
+        javadoc("-locale", defaultLanguage,
+                "-d", "out-default",
+                "-sourcepath", testSrc,
+                "pkg1");
+
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/C1.html", true,
+            "<html lang=\"" + defaultLanguage + "\">");
+
+        checkOutput("pkg1/package-summary.html", true,
+            "<html lang=\"" + defaultLanguage + "\">");
+
+        checkOutput("pkg1/C1.html", false,
+                "<html>");
+    }
+
+    @Test
+    void test_ja() {
+        // TODO: why does this test need/use pkg2; why can't it use pkg1
+        // like the other two tests, so that we can share the check methods?
+        javadoc("-locale", "ja",
+                "-d", "out-ja",
+                "-sourcepath", testSrc,
+                "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg2/C2.html", true,
+                "<html lang=\"ja\">");
+
+        checkOutput("pkg2/package-summary.html", true,
+                "<html lang=\"ja\">");
+
+        checkOutput("pkg2/C2.html", false,
+                "<html>");
+    }
+
+    @Test
+    void test_en_US() {
+        javadoc("-locale", "en_US",
+                "-d", "out-en_US",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/C1.html", true,
+                "<html lang=\"en\">");
+
+        checkOutput("pkg1/package-summary.html", true,
+                "<html lang=\"en\">");
+
+        checkOutput("pkg1/C1.html", false,
+                "<html>");
+    }
+
+    @Test
+    void test_other() {
+        javadoc("-locale", "en_US",
+                "-d", "out-other",
+                "-sourcepath", testSrc,
+                "pkg3");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg3/package-summary.html", true,
+                "<h2 title=\"Package pkg3 Description\">Package pkg3 Description</h2>\n"
+                + "<div class=\"block\"><p>This is the first line."
+                + " Note the newlines before the &lt;p&gt; is relevant.</div>");
+
+        checkOutput("pkg3/A.DatatypeFactory.html", true,
+                "<div class=\"block\"><p>\n"
+                + " Factory that creates new <code>javax.xml.datatype</code>\n"
+                + " <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>\n"
+                + "\n"
+                + " <p>\n"
+                + " A new instance of the <code>DatatypeFactory</code> is created through the\n"
+                + " <a href=\"../pkg3/A.DatatypeFactory.html#newInstance--\"><code>newInstance()</code></a> method that uses the following implementation\n"
+                + " resolution mechanisms to determine an implementation:</p>\n"
+                + " <ol>\n"
+                + " <li>\n"
+                + " If the system property specified by <a href=\"../pkg3/A.DatatypeFactory.html#DATATYPEFACTORY_PROPERTY\"><code>DATATYPEFACTORY_PROPERTY</code></a>,\n"
+                + " \"<code>javax.xml.datatype.DatatypeFactory</code>\", exists, a class with\n"
+                + " the name of the property value is instantiated. Any Exception thrown\n"
+                + " during the instantiation process is wrapped as a\n"
+                + " <code>IllegalStateException</code>.\n"
+                + " </li>\n"
+                + " <li>\n"
+                + " If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a\n"
+                + " <code>Properties</code> <code>Object</code>. The\n"
+                + " <code>Properties</code> <code>Object </code> is then queried for the\n"
+                + " property as documented in the prior step and processed as documented in\n"
+                + " the prior step.\n"
+                + " </li>\n"
+                + " <li>\n"
+                + " Uses the service-provider loading facilities, defined by the\n"
+                + " <code>ServiceLoader</code> class, to attempt to locate and load an\n"
+                + " implementation of the service using the default loading mechanism:\n"
+                + " the service-provider loading facility will use the current thread's context class loader\n"
+                + " to attempt to load the service. If the context class loader is null, the system class loader will be used.\n"
+                + " <br>\n"
+                + " In case of <code>service configuration error</code> a\n"
+                + " <code>DatatypeConfigurationException</code> will be thrown.\n"
+                + " </li>\n"
+                + " <li>\n"
+                + " The final mechanism is to attempt to instantiate the <code>Class</code>\n"
+                + " specified by <a href=\"../pkg3/A.DatatypeFactory.html#DATATYPEFACTORY_IMPLEMENTATION_CLASS\">"
+                + "<code>DATATYPEFACTORY_IMPLEMENTATION_CLASS</code></a>. Any Exception\n"
+                + " thrown during the instantiation process is wrapped as a\n"
+                + " <code>IllegalStateException</code>.\n"
+                + " </li>\n"
+                + " </ol></div>");
+
+        checkOutput("pkg3/A.ActivationDesc.html", true,
+                "<pre>public class <span class=\"typeNameLabel\">A.ActivationDesc</span>\n"
+                + "extends java.lang.Object\n"
+                + "implements java.io.Serializable</pre>\n"
+                + "<div class=\"block\">An activation descriptor contains the information necessary to activate\n"
+                + " an object: <ul>\n"
+                + " <li> the object's group identifier,\n"
+                + " <li> the object's fully-qualified class name,\n"
+                + " <li> the object's code location (the location of the class), a codebase\n"
+                + " URL path,\n"
+                + " <li> the object's restart \"mode\", and,\n"
+                + " <li> a \"marshalled\" object that can contain object specific\n"
+                + " initialization data. </ul>\n"
+                + "\n"
+                + " <p>\n"
+                + " A descriptor registered with the activation system can be used to\n"
+                + " recreate/activate the object specified by the descriptor. The\n"
+                + " <code>MarshalledObject</code> in the object's descriptor is passed as the\n"
+                + " second argument to the remote object's constructor for object to use\n"
+                + " during reinitialization/activation.</div>");
+
+         checkOutput("pkg3/A.ActivationGroupID.html", true,
+                 "<pre>public class <span class=\"typeNameLabel\">A.ActivationGroupID</span>\n"
+                 + "extends java.lang.Object\n"
+                 + "implements java.io.Serializable</pre>\n"
+                 + "<div class=\"block\">The identifier for a registered activation group serves several purposes:\n"
+                 + " <ul>\n"
+                 + " <li>identifies the group uniquely within the activation system, and\n"
+                 + " <li>contains a reference to the group's activation system so that the\n"
+                 + " group can contact its activation system when necessary.</ul><p>\n"
+                 + "\n"
+                 + " The <code>ActivationGroupID</code> is returned from the call to\n"
+                 + " <code>ActivationSystem.registerGroup</code> and is used to identify the\n"
+                 + " group within the activation system. This group id is passed as one of the\n"
+                 + " arguments to the activation group's special constructor when an\n"
+                 + " activation group is created/recreated.</div>\n"
+                 + "<dl>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTag/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+public class C1 {
+
+    public void method(int param1, int param2) {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTag/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg2;
+
+/**
+ * <B>Comments:</B> Class 2
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTag/pkg3/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2015, 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 pkg3;
+
+import java.io.Serializable;
+
+public class A {
+   /**
+     * <p>
+     * Factory that creates new <code>javax.xml.datatype</code>
+     * <code>Object</code>s that map XML to/from Java <code>Object</code>s.</p>
+     *
+     * <p>
+     * A new instance of the <code>DatatypeFactory</code> is created through the
+     * {@link #newInstance()} method that uses the following implementation
+     * resolution mechanisms to determine an implementation:</p>
+     * <ol>
+     * <li>
+     * If the system property specified by {@link #DATATYPEFACTORY_PROPERTY},
+     * "<code>javax.xml.datatype.DatatypeFactory</code>", exists, a class with
+     * the name of the property value is instantiated. Any Exception thrown
+     * during the instantiation process is wrapped as a
+     * {@link IllegalStateException}.
+     * </li>
+     * <li>
+     * If the file ${JAVA_HOME}/lib/jaxp.properties exists, it is loaded in a
+     * {@link java.util.Properties} <code>Object</code>. The
+     * <code>Properties</code> <code>Object </code> is then queried for the
+     * property as documented in the prior step and processed as documented in
+     * the prior step.
+     * </li>
+     * <li>
+     * Uses the service-provider loading facilities, defined by the
+     * {@link java.util.ServiceLoader} class, to attempt to locate and load an
+     * implementation of the service using the {@linkplain
+     *     java.util.ServiceLoader#load(java.lang.Class) default loading mechanism}:
+     * the service-provider loading facility will use the {@linkplain
+     *     java.lang.Thread#getContextClassLoader() current thread's context class loader}
+     * to attempt to load the service. If the context class loader is null, the {@linkplain
+     *     ClassLoader#getSystemClassLoader() system class loader} will be used.
+     * <br>
+     * In case of {@link java.util.ServiceConfigurationError service configuration error} a
+     * {@link javax.xml.datatype.DatatypeConfigurationException} will be thrown.
+     * </li>
+     * <li>
+     * The final mechanism is to attempt to instantiate the <code>Class</code>
+     * specified by {@link #DATATYPEFACTORY_IMPLEMENTATION_CLASS}. Any Exception
+     * thrown during the instantiation process is wrapped as a
+     * {@link IllegalStateException}.
+     * </li>
+     * </ol>
+     */
+    public static class DatatypeFactory {
+        /**
+         * some def.
+         */
+        public static String DATATYPEFACTORY_IMPLEMENTATION_CLASS = "NOTHING";
+
+        /**
+         * some def.
+         */
+        public static String DATATYPEFACTORY_PROPERTY = "NOTHING";
+
+        /**
+         * <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
+         *
+         * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
+         * <code>Class</code>'s documentation.</p>
+         *
+         * @return New instance of a <code>DatatypeFactory</code>
+         *
+         * @throws Exception If the implementation is not
+         *   available or cannot be instantiated.
+         *
+         * @see #newInstance(String factoryClassName, ClassLoader classLoader)
+         */
+        public static DatatypeFactory newInstance() throws Exception {
+            return null;
+        }
+
+        /**
+         * <p>Obtain a new instance of a <code>DatatypeFactory</code>.</p>
+         *
+         * <p>The implementation resolution mechanisms are <a href="#DatatypeFactory.newInstance">defined</a> in this
+         * <code>Class</code>'s documentation.</p>
+         *
+         * @param factoryClassName fe
+         * @param classLoader fi
+         * @return fo
+         * @throws Exception If the implementation is not
+         *   available or cannot be instantiated.
+         */
+        public static DatatypeFactory newInstance(String factoryClassName, ClassLoader classLoader) throws Exception {
+            return null;
+        }
+    }
+
+    /**
+     * An activation descriptor contains the information necessary to activate
+     * an object: <ul>
+     * <li> the object's group identifier,
+     * <li> the object's fully-qualified class name,
+     * <li> the object's code location (the location of the class), a codebase
+     * URL path,
+     * <li> the object's restart "mode", and,
+     * <li> a "marshalled" object that can contain object specific
+     * initialization data. </ul>
+     *
+     * <p>
+     * A descriptor registered with the activation system can be used to
+     * recreate/activate the object specified by the descriptor. The
+     * <code>MarshalledObject</code> in the object's descriptor is passed as the
+     * second argument to the remote object's constructor for object to use
+     * during reinitialization/activation.
+     */
+    public class ActivationDesc implements Serializable {}
+
+    /**
+     * The identifier for a registered activation group serves several purposes:
+     * <ul>
+     * <li>identifies the group uniquely within the activation system, and
+     * <li>contains a reference to the group's activation system so that the
+     * group can contact its activation system when necessary.</ul><p>
+     *
+     * The <code>ActivationGroupID</code> is returned from the call to
+     * <code>ActivationSystem.registerGroup</code> and is used to identify the
+     * group within the activation system. This group id is passed as one of the
+     * arguments to the activation group's special constructor when an
+     * activation group is created/recreated.
+     */
+    public class ActivationGroupID implements java.io.Serializable {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlTag/pkg3/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+<!-- &lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"&gt; -->
+<!-- TODO: fix doclint to allow the header, before uncommenting -->
+<html>
+<head>
+<!--
+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.
+-->
+
+</head>
+<body bgcolor="white">
+
+<p>This is the first line. Note the newlines before the &lt;p&gt; is relevant. 
+</body>
+</html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,1899 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8072945 8081854 8141492
+ * @summary Test the version of HTML generated by the javadoc tool.
+ * @author bpatel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestHtmlVersion
+ */
+
+public class TestHtmlVersion extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestHtmlVersion tester = new TestHtmlVersion();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1", "-private", "-linksource", "-html5",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+
+        html5Output();
+        html5NegatedOutput();
+    }
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2", "-private", "-linksource", "-html4",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+
+        html4Output();
+        html4NegatedOutput();
+    }
+
+    @Test
+    void test3() {
+        javadoc("-d", "out-3", "-private", "-linksource",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+
+        html4Output();
+        html4NegatedOutput();
+    }
+
+    @Test
+    void test4() {
+        javadoc("-d", "out-4", "-private", "-linksource", "-html5",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg3");
+        checkExit(Exit.OK);
+    }
+
+    void html5Output() {
+        // Test for overview-frame page
+        checkOutput("overview-frame.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<nav role=\"navigation\" class=\"indexNav\">\n"
+                + "<ul>\n"
+                + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All&nbsp;Classes</a></li>",
+                "<main role=\"main\" class=\"indexContainer\">\n"
+                + "<h2 title=\"Packages\">Packages</h2>");
+
+        // Test for allclasses-frame page
+        checkOutput("allclasses-frame.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<main role=\"main\" class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Test for allclasses-noframe page
+        checkOutput("allclasses-noframe.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<main role=\"main\" class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Test for overview-summary page
+        checkOutput("overview-summary.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"overviewSummary\">\n"
+                + "<caption>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for package-frame page
+        checkOutput("pkg/package-frame.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<main role=\"main\">\n"
+                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Interfaces\">Interfaces</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Classes\">Classes</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Enums\">Enums</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Exceptions\">Exceptions</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Errors\">Errors</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Annotation Types\">Annotation Types</h2>");
+
+        // Test for package-summary page
+        checkOutput("pkg/package-summary.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"typeSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Package pkg Description\">Package pkg Description</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for package-tree page
+        checkOutput("pkg/package-tree.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<li class=\"circle\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for package-use page
+        checkOutput("pkg1/package-use.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"useSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for constant-values page
+        checkOutput("constant-values.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"constantsSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Contents\">Contents</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"pkg\">pkg.*</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for deprecated-list page
+        checkOutput("deprecated-list.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"deprecatedSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for serialized-form page
+        checkOutput("serialized-form.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Package\">Package&nbsp;pkg</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for overview-tree page
+        checkOutput("overview-tree.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<li class=\"circle\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for index-all page
+        checkOutput("index-all.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "</header>\n"
+                + "<main role=\"main\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for src-html page
+        checkOutput("src-html/pkg/AnotherClass.html", true,
+                "<!DOCTYPE HTML>",
+                "<main role=\"main\">\n"
+                + "<div class=\"sourceContainer\">");
+
+        // Test for help-doc page
+        checkOutput("help-doc.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2>Overview</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2>Package</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2>Class/Interface</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for a regular class page and members (nested class, field, constructore and method)
+        checkOutput("pkg/AnotherClass.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Nested Class Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"field.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"field.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Detail</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for enum page
+        checkOutput("pkg/AnotherClass.ModalExclusionType.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Detail</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for interface page
+        checkOutput("pkg2/Interface.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for error page
+        checkOutput("pkg/TestError.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for exception page
+        checkOutput("pkg/TestException.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for annotation page
+        checkOutput("pkg2/TestAnnotationType.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Required Element Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Optional Element Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Element Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for class use page
+        checkOutput("pkg1/class-use/RegClass.html", true,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<table class=\"useSummary\">",
+                "<section role=\"region\"><a id=\"pkg\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<table class=\"useSummary\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Test for main index page
+        checkOutput("index.html", true,
+                "<!DOCTYPE HTML>",
+                "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">",
+                "<body>\n"
+                + "<main role=\"main\">\n"
+                + "<div class=\"mainContainer\">\n"
+                + "<div class=\"leftContainer\">\n"
+                + "<div class=\"leftTop\">\n"
+                + "<iframe src=\"overview-frame.html\" name=\"packageListFrame\" title=\"All Packages\"></iframe>\n"
+                + "</div>");
+    }
+
+    void html5NegatedOutput() {
+        // Negated test for overview-frame page
+        checkOutput("overview-frame.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<div class=\"indexNav\">\n"
+                + "<ul>\n"
+                + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All&nbsp;Classes</a></li>",
+                "<div class=\"indexContainer\">\n"
+                + "<h2 title=\"Packages\">Packages</h2>");
+
+        // Negated test for allclasses-frame page
+        checkOutput("allclasses-frame.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<div class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Negated test for allclasses-noframe page
+        checkOutput("allclasses-noframe.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<div class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Negated test for overview-summary page
+        checkOutput("overview-summary.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+                + "<caption>",
+                "</noscript>\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->");
+
+        // Negated test for package-frame page
+        checkOutput("pkg/package-frame.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<body>\n"
+                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+
+        // Negated test for package-summary page
+        checkOutput("pkg/package-summary.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+        // Negated test for package-tree page
+        checkOutput("pkg/package-tree.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>");
+
+        // Negated test for package-use page
+        checkOutput("pkg1/package-use.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
+
+        // Negated test for constant-values page
+        checkOutput("constant-values.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
+
+        // Negated test for deprecated-list page
+        checkOutput("deprecated-list.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">\n"
+                + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
+                + "<h2 title=\"Contents\">Contents</h2>",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Exceptions table, listing deprecated exceptions, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Errors table, listing deprecated errors, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Types table, listing deprecated annotation types, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Constructors table, listing deprecated constructors, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Enum Constants table, listing deprecated enum constants, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Type Elements table, listing deprecated annotation type elements, and an explanation\">");
+
+        // Negated test for serialized-form page
+        checkOutput("serialized-form.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<li class=\"blockList\">\n"
+                + "<h2 title=\"Package\">Package&nbsp;pkg</h2>");
+
+        // Negated test for overview-tree page
+        checkOutput("overview-tree.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<div class=\"contentContainer\">\n"
+                + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+                "</ul>\n"
+                + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+                "</ul>\n"
+                + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>");
+
+        // Negated test for index-all page
+        checkOutput("index-all.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"contentContainer\">");
+
+        // Negated test for src-html page
+        checkOutput("src-html/pkg/AnotherClass.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<body>\n"
+                + "<div class=\"sourceContainer\">");
+
+        // Negated test for help-doc page
+        checkOutput("help-doc.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\">\n"
+                + "<h2>Overview</h2>",
+                "<li class=\"blockList\">\n"
+                + "<h2>Package</h2>",
+                "<li class=\"blockList\">\n"
+                + "<h2>Class/Interface</h2>");
+
+        // Negated test for a regular class page and members (nested class, field, constructore and method)
+        checkOutput("pkg/AnotherClass.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ======== NESTED CLASS SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Nested Class Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing nested classes, and an explanation\">",
+                "<!-- =========== FIELD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"field.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, and an explanation\">",
+                "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing constructors, and an explanation\">",
+                "<!-- ========== METHOD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+                "<!-- ============ FIELD DETAIL =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"field.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Detail</h3>",
+                "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<!-- ============ METHOD DETAIL ========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>");
+
+        // Negated test for enum page
+        checkOutput("pkg/AnotherClass.ModalExclusionType.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- =========== ENUM CONSTANT SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing enum constants, and an explanation\">",
+                "<!-- ========== METHOD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+                "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Detail</h3>",
+                "<!-- ============ METHOD DETAIL ========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>");
+
+        // Negated test for interface page
+        checkOutput("pkg2/Interface.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ========== METHOD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+                "<!-- ============ METHOD DETAIL ========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>");
+
+        // Negated test for error page
+        checkOutput("pkg/TestError.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>");
+
+        // Negated test for exception page
+        checkOutput("pkg/TestException.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>");
+
+        // Negated test for annotation page
+        checkOutput("pkg2/TestAnnotationType.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Required Element Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Required Element Summary table, listing required elements, and an explanation\">",
+                "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Optional Element Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Optional Element Summary table, listing optional elements, and an explanation\">",
+                "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Element Detail</h3>");
+
+        // Negated test for class use page
+        checkOutput("pkg1/class-use/RegClass.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+                "<li class=\"blockList\"><a name=\"pkg\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
+
+        // Negated test for main index page
+        checkOutput("index.html", false,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<body>\n"
+                + "<div class=\"mainContainer\">\n");
+    }
+
+    void html4Output() {
+        // Test for overview-frame page
+        checkOutput("overview-frame.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<div class=\"indexNav\">\n"
+                + "<ul>\n"
+                + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All&nbsp;Classes</a></li>",
+                "<div class=\"indexContainer\">\n"
+                + "<h2 title=\"Packages\">Packages</h2>");
+
+        // Test for allclasses-frame page
+        checkOutput("allclasses-frame.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<div class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Test for allclasses-noframe page
+        checkOutput("allclasses-noframe.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<div class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Test for overview-summary page
+        checkOutput("overview-summary.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+                + "<caption>",
+                "</noscript>\n"
+                + "<div class=\"fixedNav\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->");
+
+        // Test for package-frame page
+        checkOutput("pkg/package-frame.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<body>\n"
+                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>");
+
+        // Test for package-summary page
+        checkOutput("pkg/package-summary.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"typeSummary\" summary=\"Interface Summary table, listing interfaces, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Class Summary table, listing classes, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Enum Summary table, listing enums, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Exception Summary table, listing exceptions, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Error Summary table, listing errors, and an explanation\">",
+                "<table class=\"typeSummary\" summary=\"Annotation Types Summary table, listing annotation types, and an explanation\">");
+
+        // Test for package-tree page
+        checkOutput("pkg/package-tree.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<li class=\"circle\">");
+
+        // Test for package-use page
+        checkOutput("pkg1/package-use.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">");
+
+        // Test for constant-values page
+        checkOutput("constant-values.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
+
+        // Test for deprecated-list page
+        checkOutput("deprecated-list.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">\n"
+                + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
+                + "<h2 title=\"Contents\">Contents</h2>",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Exceptions table, listing deprecated exceptions, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Errors table, listing deprecated errors, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Types table, listing deprecated annotation types, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Fields table, listing deprecated fields, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Methods table, listing deprecated methods, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Constructors table, listing deprecated constructors, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Enum Constants table, listing deprecated enum constants, and an explanation\">",
+                "<table class=\"deprecatedSummary\" summary=\"Deprecated Annotation Type Elements table, listing deprecated annotation type elements, and an explanation\">");
+
+        // Test for serialized-form page
+        checkOutput("serialized-form.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<li class=\"blockList\">\n"
+                + "<h2 title=\"Package\">Package&nbsp;pkg</h2>");
+
+        // Test for overview-tree page
+        checkOutput("overview-tree.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<li class=\"circle\">",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<h1 class=\"title\">Hierarchy For All Packages</h1>\n"
+                + "<span class=\"packageHierarchyLabel\">Package Hierarchies:</span>",
+                "<div class=\"contentContainer\">\n"
+                + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+                "</ul>\n"
+                + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+                "</ul>\n"
+                + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>");
+
+        // Test for index-all page
+        checkOutput("index-all.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"contentContainer\">");
+
+        // Test for src-html page
+        checkOutput("src-html/pkg/AnotherClass.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<body>\n"
+                + "<div class=\"sourceContainer\">");
+
+        // Test for help-doc page
+        checkOutput("help-doc.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\">\n"
+                + "<h2>Overview</h2>",
+                "<li class=\"blockList\">\n"
+                + "<h2>Package</h2>",
+                "<li class=\"blockList\">\n"
+                + "<h2>Class/Interface</h2>");
+
+        // Test for a regular class page and members (nested class, field, constructore and method)
+        checkOutput("pkg/AnotherClass.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ======== NESTED CLASS SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"nested.class.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Nested Class Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Nested Class Summary table, listing nested classes, and an explanation\">",
+                "<!-- =========== FIELD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"field.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Field Summary table, listing fields, and an explanation\">",
+                "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Constructor Summary table, listing constructors, and an explanation\">",
+                "<!-- ========== METHOD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+                "<!-- ============ FIELD DETAIL =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"field.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Detail</h3>",
+                "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<!-- ============ METHOD DETAIL ========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>");
+
+        // Test for enum page
+        checkOutput("pkg/AnotherClass.ModalExclusionType.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- =========== ENUM CONSTANT SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"enum.constant.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Enum Constant Summary table, listing enum constants, and an explanation\">",
+                "<!-- ========== METHOD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+                "<!-- ============ ENUM CONSTANT DETAIL =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"enum.constant.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Detail</h3>",
+                "<!-- ============ METHOD DETAIL ========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>");
+
+        // Test for interface page
+        checkOutput("pkg2/Interface.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ========== METHOD SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Method Summary table, listing methods, and an explanation\">",
+                "<!-- ============ METHOD DETAIL ========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>");
+
+        // Test for error page
+        checkOutput("pkg/TestError.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>");
+
+        // Test for exception page
+        checkOutput("pkg/TestException.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<!-- ========= CONSTRUCTOR DETAIL ======== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>");
+
+        // Test for annotation page
+        checkOutput("pkg2/TestAnnotationType.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ======== START OF CLASS DATA ======== -->\n"
+                + "<div class=\"header\">",
+                "<!-- =========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.required.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Required Element Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Required Element Summary table, listing required elements, and an explanation\">",
+                "<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.optional.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Optional Element Summary</h3>\n"
+                + "<table class=\"memberSummary\" summary=\"Optional Element Summary table, listing optional elements, and an explanation\">",
+                "<!-- ============ ANNOTATION TYPE MEMBER DETAIL =========== -->\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a name=\"annotation.type.element.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Element Detail</h3>");
+
+        // Test for class use page
+        checkOutput("pkg1/class-use/RegClass.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<meta name=\"date\"",
+                "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+                + "</div>\n"
+                + "<div class=\"header\">",
+                "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
+                "<li class=\"blockList\"><a name=\"pkg\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "<table class=\"useSummary\" summary=\"Use table, listing fields, and an explanation\">");
+
+        // Test for main index page
+        checkOutput("index.html", true,
+                "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
+                "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">",
+                "<body>\n"
+                + "<div class=\"mainContainer\">\n"
+                + "<div class=\"leftContainer\">\n"
+                + "<div class=\"leftTop\">\n"
+                + "<iframe src=\"overview-frame.html\" name=\"packageListFrame\" title=\"All Packages\"></iframe>\n"
+                + "</div>");
+    }
+
+    void html4NegatedOutput() {
+        // Negated test for overview-frame page
+        checkOutput("overview-frame.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<nav role=\"navigation\" class=\"indexNav\">\n"
+                + "<ul>\n"
+                + "<li><a href=\"allclasses-frame.html\" target=\"packageFrame\">All&nbsp;Classes</a></li>",
+                "<main role=\"main\" class=\"indexContainer\">\n"
+                + "<h2 title=\"Packages\">Packages</h2>");
+
+        // Negated test for allclasses-frame page
+        checkOutput("allclasses-frame.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<main role=\"main\" class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Negated test for allclasses-noframe page
+        checkOutput("allclasses-noframe.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<main role=\"main\" class=\"indexContainer\">\n"
+                + "<ul>\n"
+                + "<li>");
+
+        // Negated test for overview-summary page
+        checkOutput("overview-summary.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"overviewSummary\">\n"
+                + "<caption>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->");
+
+        // Negated test for package-frame page
+        checkOutput("pkg/package-frame.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<main role=\"main\">\n"
+                + "<h1 class=\"bar\"><a href=\"../pkg/package-summary.html\" target=\"classFrame\">pkg</a></h1>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Interfaces\">Interfaces</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Classes\">Classes</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Enums\">Enums</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Exceptions\">Exceptions</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Errors\">Errors</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Annotation Types\">Annotation Types</h2>");
+
+        // Negated test for package-summary page
+        checkOutput("pkg/package-summary.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"typeSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Package pkg Description\">Package pkg Description</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for package-tree page
+        checkOutput("pkg/package-tree.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for package-use page
+        checkOutput("pkg1/package-use.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"useSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for constant-values page
+        checkOutput("constant-values.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"constantsSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Contents\">Contents</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"pkg\">pkg.*</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for deprecated-list page
+        checkOutput("deprecated-list.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<table class=\"deprecatedSummary\">",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for serialized-form page
+        checkOutput("serialized-form.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Package\">Package&nbsp;pkg</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for overview-tree page
+        checkOutput("overview-tree.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Annotation Type Hierarchy\">Annotation Type Hierarchy</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2 title=\"Enum Hierarchy\">Enum Hierarchy</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for index-all page
+        checkOutput("index-all.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "</header>\n"
+                + "<main role=\"main\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for src-html page
+        checkOutput("src-html/pkg/AnotherClass.html", false,
+                "<!DOCTYPE HTML>",
+                "<main role=\"main\">\n"
+                + "<div class=\"sourceContainer\">");
+
+        // Negated test for help-doc page
+        checkOutput("help-doc.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<h2>Overview</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2>Package</h2>\n",
+                "<section role=\"region\">\n"
+                + "<h2>Class/Interface</h2>\n",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for a regular class page and members (nested class, field, constructore and method)
+        checkOutput("pkg/AnotherClass.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"nested.class.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Nested Class Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"field.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"field.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Field Detail</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for enum page
+        checkOutput("pkg/AnotherClass.ModalExclusionType.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"enum.constant.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"enum.constant.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Enum Constant Detail</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for interface page
+        checkOutput("pkg2/Interface.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"method.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Method Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for error page
+        checkOutput("pkg/TestError.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for exception page
+        checkOutput("pkg/TestException.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Summary</h3>",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"constructor.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Constructor Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for annotation page
+        checkOutput("pkg2/TestAnnotationType.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.required.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Required Element Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.optional.element.summary\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Optional Element Summary</h3>\n"
+                + "<table class=\"memberSummary\">",
+                "<section role=\"region\">\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\"><a id=\"annotation.type.element.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Element Detail</h3>",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for class use page
+        checkOutput("pkg1/class-use/RegClass.html", false,
+                "<!DOCTYPE HTML>",
+                "<meta name=\"dc.created\"",
+                "<a id=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>",
+                "<header role=\"banner\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ========= START OF TOP NAVBAR ======= -->",
+                "<main role=\"main\">\n"
+                + "<div class=\"header\">",
+                "<table class=\"useSummary\">",
+                "<section role=\"region\"><a id=\"pkg\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Uses of <a href=\"../../pkg1/RegClass.html\" title=\"class in pkg1\">RegClass</a> in <a href=\"../../pkg/package-summary.html\">pkg</a></h3>\n"
+                + "\n"
+                + "<table class=\"useSummary\">",
+                "<footer role=\"contentinfo\">\n"
+                + "<nav role=\"navigation\">\n"
+                + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
+
+        // Negated test for main index page
+        checkOutput("index.html", false,
+                "<!DOCTYPE HTML>",
+                "<body>\n"
+                + "<main role=\"main\">\n"
+                + "<div class=\"mainContainer\">\n");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is a test annotation type.
+ *
+ * @author Bhavesh Patel.
+ * @since 9
+ */
+@Documented public @interface AnnotationType {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg/AnotherClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+import pkg1.*;
+
+/**
+ * Another test class.
+ *
+ * @author Bhavesh Patel
+ */
+public class AnotherClass {
+
+    /**
+     * A test field.
+     */
+    public RegClass field;
+
+    /**
+     * Constant field.
+     */
+    public static final String CONSTANT_FIELD_3 = "constant";
+
+    /**
+     * @deprecated don't use this field anymore.
+     */
+    public RegClass dep_field;
+
+    /**
+     * A sample enum.
+     */
+    public static enum ModalExclusionType {
+        /**
+         * Test comment.
+         */
+        NO_EXCLUDE,
+        /**
+         * Another comment.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * A string constant.
+     */
+    public static final String CONSTANT1 = "C2";
+
+    /**
+     * A sample method.
+     *
+     * @param param some parameter.
+     * @return a test object.
+     */
+    public Class method(pkg1.RegClass param) {
+        return param;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg/TestError.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Error class.
+ */
+public class TestError extends Error {
+
+    /**
+     * Constructs a test error.
+     */
+    public TestError() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg/TestException.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Thrown when a TestException occurs.
+ */
+public class TestException extends Exception {
+
+    /**
+     * Constructs a {@code TestException} with no detail message.
+     */
+    public TestException() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a description for an Interface.
+ */
+
+public interface TestInterface {
+
+    public void method();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/**
+ * Test package.
+ */
+package pkg;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg1/NestedInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and the inner class is private
+ * and a nested inner class is protected.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class NestedInnerClass {
+
+    private static class InnerClass {
+
+        protected static class ProNestedInnerClass implements java.io.Serializable {
+
+            public final int SERIALIZABLE_CONSTANT2 = 1;
+
+            /**
+             * @param s ObjectInputStream.
+             * @throws IOException when there is an I/O error.
+             * @serial
+             */
+            private void readObject(ObjectInputStream s) throws IOException {
+            }
+
+            /**
+             * @param s ObjectOutputStream.
+             * @throws IOException when there is an I/O error.
+             * @serial
+             */
+            private void writeObject(ObjectOutputStream s) throws IOException {
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg1/PrivateIncludeInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is private which is included using the tag.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class PrivateIncludeInnerClass {
+
+    /**
+     * @serial include
+     */
+    private static class PriInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg1/ProtectedInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where outer class is package private and the inner class is
+ * protected.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class ProtectedInnerClass {
+
+    protected static class ProInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT1 = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg1/PublicExcludeInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is public which is excluded using the tag.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class PublicExcludeInnerClass {
+
+    /**
+     * @serial exclude
+     */
+    public static class PubInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT3 = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg1/RegClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+/**
+ *This is a description for Class.
+ */
+
+public class RegClass {
+
+    /**
+     * Constant field.
+     */
+    public static final String CONSTANT_FIELD_1 = "constant";
+
+    /**
+     * Another constant field.
+     */
+    public static final int CONSTANT_FIELD_2 = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/DeprecatedClassByAnnotation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+@Deprecated()
+public class DeprecatedClassByAnnotation {
+
+    @Deprecated()
+    public int field;
+
+    @Deprecated()
+    public DeprecatedClassByAnnotation() {}
+
+    @Deprecated()
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * This is a description for an Interface.
+ */
+
+public interface Interface {
+
+    public void method1();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/TestAnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+import java.lang.annotation.*;
+
+/**
+ * @deprecated annotation_test1 passes.
+ */
+@Documented public @interface TestAnnotationType {
+
+    /**
+     * @deprecated annotation_test2 passes.
+     */
+    String optional() default "unknown";
+
+   /**
+     * @deprecated annotation_test3 passes.
+     */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/TestClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated class_test1 passes.
+ */
+public class TestClass {
+
+    /**
+     * @deprecated class_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated constant field.
+     */
+    public static final int CONSTANT_FIELD = 2;
+
+    /**
+     * @deprecated class_test3 passes.
+     */
+    public TestClass() {}
+
+    /**
+     * @deprecated class_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/TestEnum.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated enum_test1 passes.
+ */
+public enum TestEnum {
+
+    /**
+     * @deprecated enum_test2 passes.
+     */
+    ONE, TWO, THREE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/TestError.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated error_test1 passes.
+ */
+public class TestError extends Error {
+
+    /**
+     * @deprecated error_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated error_test3 passes.
+     */
+    public TestError() {}
+
+    /**
+     * @deprecated error_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/TestException.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated exception_test1 passes.
+ */
+public class TestException extends Exception {
+
+    /**
+     * @deprecated exception_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated exception_test3 passes.
+     */
+    public TestException() {}
+
+    /**
+     * @deprecated exception_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg2/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated interface_test1 passes.
+ */
+public class TestInterface {
+
+    /**
+     * @deprecated interface_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated interface_test3 passes.
+     */
+    public TestInterface() {}
+
+    /**
+     * @deprecated interface_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testHtmlVersion/pkg3/ClassNoConstants.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ *
+ * 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 pkg3;
+
+/**
+ * This is an empty class specifically testing for no Constant value.
+ */
+
+public class ClassNoConstants {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndentation/TestIndentation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8011288 8062647
+ * @summary  Erratic/inconsistent indentation of signatures
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestIndentation
+ */
+
+public class TestIndentation extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestIndentation tester = new TestIndentation();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "p");
+        checkExit(Exit.OK);
+
+        checkOutput("p/Indent.html", true,
+                "<pre>public&nbsp;&lt;T&gt;&nbsp;void&nbsp;m(T&nbsp;t1,",
+                "\n"
+                + "                  T&nbsp;t2)",
+                "\n"
+                + "           throws java.lang.Exception");
+
+        // Test indentation of annotations and annotated method arguments
+        checkOutput("p/IndentAnnot.html", false,
+                " @Deprecated",
+                "                int&nbsp;b)",
+                "                java.lang.Object...&nbsp;b)");
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndentation/p/Indent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ *
+ * 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 p;
+
+public class Indent {
+    public <T> void m(T t1, T t2) throws Exception { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndex/NoPackage.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+public class NoPackage {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndex/TestIndex.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4852280 4517115 4973608 4994589 8026567
+ * @summary  Perform tests on index.html file.
+ *           Also test that index-all.html has the appropriate output.
+ *           Test for unnamed package in index.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestIndex
+ */
+
+public class TestIndex extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestIndex tester = new TestIndex();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg", testSrc("NoPackage.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("index.html", true,
+                "<iframe src=\"overview-summary.html\" name=\"classFrame\" title=\""
+                + "Package, class and interface descriptions\" class=\"rightIframe\">");
+
+        //Test index-all.html
+        checkOutput("index-all.html", true,
+                "<a href=\"pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">C</span></a>"
+                + " - Class in <a href=\"pkg/package-summary.html\">pkg</a>",
+                "<a href=\"pkg/Interface.html\" title=\"interface in pkg\">"
+                + "<span class=\"typeNameLink\">Interface</span></a> - Interface in "
+                + "<a href=\"pkg/package-summary.html\">pkg</a>",
+                "<a href=\"pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+                + "<span class=\"typeNameLink\">AnnotationType</span></a> - Annotation Type in "
+                + "<a href=\"pkg/package-summary.html\">pkg</a>",
+                "<a href=\"pkg/Coin.html\" title=\"enum in pkg\">"
+                + "<span class=\"typeNameLink\">Coin</span></a> - Enum in "
+                + "<a href=\"pkg/package-summary.html\">pkg</a>",
+                "Class in <a href=\"package-summary.html\">&lt;Unnamed&gt;</a>",
+                "<dl>\n"
+                + "<dt><span class=\"memberNameLink\"><a href=\"pkg/C.html#Java\">"
+                + "Java</a></span> - Static variable in class pkg.<a href=\"pkg/C.html\" "
+                + "title=\"class in pkg\">C</a></dt>\n"
+                + "<dd>&nbsp;</dd>\n"
+                + "<dt><span class=\"memberNameLink\"><a href=\"pkg/C.html#JDK\">JDK</a></span> "
+                + "- Static variable in class pkg.<a href=\"pkg/C.html\" title=\"class in pkg\">"
+                + "C</a></dt>\n"
+                + "<dd>&nbsp;</dd>\n"
+                + "</dl>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndex/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test annotation type.
+ *
+ * @author Jamie Ho.
+ * @since 1.5
+ */
+@Documented public @interface AnnotationType {
+
+    /**
+     * The copyright holder.
+     */
+    String optional() default "unknown";
+
+   /**
+    * The year of the copyright.
+    */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndex/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class C {
+
+    //Test that Java appears before JDK in the index.  The fact
+    //that 'D' is uppercase and 'a' is lowercase should make no difference
+    //in ordering.
+    public static final String JDK = "1.5";
+    public static final String Java = "1.5";
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndex/pkg/Coin.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a sample Enum.
+ *
+ * @author Jamie Ho
+ */
+public enum Coin {
+
+  Penny, Nickel, Dime;
+
+public Coin(int i) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testIndex/pkg/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public interface Interface {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInlineLinkLabel/TestInlineLinkLabel.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4524136
+ * @summary Test to make sure label is used for inline links.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestInlineLinkLabel
+ */
+
+public class TestInlineLinkLabel extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestInlineLinkLabel tester = new TestInlineLinkLabel();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C1.html", true,
+                //Search for the label to the package link.
+                "<a href=\"../pkg/package-summary.html\"><code>Here is a link to a package</code></a>",
+                //Search for the label to the class link
+                "<a href=\"../pkg/C2.html\" title=\"class in pkg\"><code>Here is a link to a class</code></a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInlineLinkLabel/pkg/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+/**
+ * {@link pkg Here is a link to a package}.<br>
+ * {@link pkg.C2 Here is a link to a class}.
+ */
+public class C1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInlineLinkLabel/pkg/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a comment.
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInlineLinkLabel/pkg/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<html>
+<body>
+  This is a comment.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4682448 4947464 5029946 8025633 8026567 8035473
+ * @summary  Verify that the public modifier does not show up in the
+ *           documentation for public methods, as recommended by the JLS.
+ *           If A implements I and B extends A, B should be in the list of
+ *           implementing classes in the documentation for I.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestInterface
+ */
+
+/*
+ * TODO: make it Inteferface<PE> ie. fix all ParameterTypes, likely should get
+ * fixed when Doc is replace by j.l.m, but meanwhile this test has been adjusted
+ * take the current format this is better than @ignore because we can follow the
+ * differences as the work progress.
+ *
+ * The consensus is that we should have something as follows:
+ * In Child.html
+ *  Specified by:  method in interface<IE>
+ *  Overrides:     method in class Parent<PE>
+ * In otherwords the TypeParameter in scope should be used ex: Interface<IE>, Parent<PE>
+   and Child<CE>
+ */
+
+public class TestInterface extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestInterface tester = new TestInterface();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/Interface.html", true,
+                "<pre>int&nbsp;method()</pre>",
+                "<pre>static final&nbsp;int field</pre>",
+                // Make sure known implementing class list is correct and omits type parameters.
+                "<dl>\n"
+                + "<dt>All Known Implementing Classes:</dt>\n"
+                + "<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child"
+                + "</a>, <a href=\"../pkg/Parent.html\" title=\"class in pkg\">Parent"
+                + "</a></dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/Child.html", true,
+                // Make sure "All Implemented Interfaces": has substituted type parameters
+                "<dl>\n"
+                + "<dt>All Implemented Interfaces:</dt>\n"
+                + "<dd><a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"
+                + "Interface</a>&lt;CE&gt;</dd>\n"
+                + "</dl>",
+                //Make sure Class Tree has substituted type parameters.
+                "<ul class=\"inheritance\">\n"
+                + "<li>java.lang.Object</li>\n"
+                + "<li>\n"
+                + "<ul class=\"inheritance\">\n"
+                + "<li><a href=\"../pkg/Parent.html\" title=\"class in pkg\">"
+                + "pkg.Parent</a>&lt;CE&gt;</li>\n"
+                + "<li>\n"
+                + "<ul class=\"inheritance\">\n"
+                + "<li>pkg.Child&lt;CE&gt;</li>\n"
+                + "</ul>\n"
+                + "</li>\n"
+                + "</ul>\n"
+                + "</li>\n"
+                + "</ul>",
+                //Make sure "Specified By" has substituted type parameters.
+                "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>"
+                + "</code>&nbsp;in interface&nbsp;<code>"
+                + "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">"
+                + "Interface</a>&lt;<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">"
+                + "CE</a>&gt;</code></dd>",
+                //Make sure "Overrides" has substituted type parameters.
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>"
+                + "</code>&nbsp;in class&nbsp;<code><a href=\"../pkg/Parent.html\" "
+                + "title=\"class in pkg\">Parent</a>&lt;<a href=\"../pkg/Child.html\" "
+                + "title=\"type parameter in Child\">CE</a>&gt;</code></dd>");
+
+        checkOutput("pkg/Parent.html", true,
+                //Make sure "Direct Know Subclasses" omits type parameters
+                "<dl>\n"
+                + "<dt>Direct Known Subclasses:</dt>\n"
+                + "<dd><a href=\"../pkg/Child.html\" title=\"class in pkg\">Child"
+                + "</a></dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/Interface.html", false,
+                "public int&nbsp;method()",
+                "public static final&nbsp;int field");
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/Child.html", true,
+            // Ensure the correct Overrides in the inheritance hierarchy is reported
+            "<span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+            "<dd><code><a href=\"../pkg1/GrandParent.html#method1--\">method1</a></code>" +
+            "&nbsp;in class&nbsp;" +
+            "<code><a href=\"../pkg1/GrandParent.html\" title=\"class in pkg1\">GrandParent</a>" +
+            "&lt;<a href=\"../pkg1/Child.html\" title=\"type parameter in Child\">CE</a>&gt;</code>");
+    }
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2",
+                "-sourcepath", testSrc,
+                "pkg2");
+
+        checkExit(Exit.OK);
+
+        checkOutput("pkg2/Spliterator.OfDouble.html", true,
+            // Ensure the correct type parameters are displayed correctly
+            "<h3>Nested classes/interfaces inherited from interface&nbsp;pkg2."
+            + "<a href=\"../pkg2/Spliterator.html\" title=\"interface in pkg2\">Spliterator</a></h3>\n" +
+            "<code><a href=\"../pkg2/Spliterator.OfDouble.html\" title=\"interface in pkg2\">"
+            + "Spliterator.OfDouble</a>, <a href=\"../pkg2/Spliterator.OfInt.html\" "
+            + "title=\"interface in pkg2\">Spliterator.OfInt</a>&lt;"
+            + "<a href=\"../pkg2/Spliterator.OfInt.html\" title=\"type parameter in Spliterator.OfInt\">"
+            + "Integer</a>&gt;, <a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
+            + "Spliterator.OfPrimitive</a>&lt;<a href=\"../pkg2/Spliterator.OfPrimitive.html\" "
+            + "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,<a href=\"../pkg2/Spliterator.OfPrimitive.html\" "
+            + "title=\"type parameter in Spliterator.OfPrimitive\">T_CONS</a>,"
+            + "<a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+            + "T_SPLITR</a> extends <a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"interface in pkg2\">"
+            + "Spliterator.OfPrimitive</a>&lt;<a href=\"../pkg2/Spliterator.OfPrimitive.html\" "
+            + "title=\"type parameter in Spliterator.OfPrimitive\">T</a>,"
+            + "<a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+            + "T_CONS</a>,<a href=\"../pkg2/Spliterator.OfPrimitive.html\" title=\"type parameter in Spliterator.OfPrimitive\">"
+            + "T_SPLITR</a>&gt;&gt;</code>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg/Child.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+public class Child<CE> extends Parent<CE> {
+
+    public int method() {
+        return 1;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+public interface Interface<IE> {
+
+    /**
+     * The public modifier of this interface field should not show up
+     * in the documentation.
+     */
+    public final int field = 1;
+
+    /**
+     * The public modifier of this interface method should not show up in the
+     * documentation.
+     *
+     * @return some dummy integer.
+     */
+    public int method();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg/Parent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+public class Parent<PE> implements Interface<PE> {
+
+    public int method() {
+        return 1;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg1/Child.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+public class Child<CE> extends Parent<CE> {
+
+    public int method1() {
+        return 1;
+    }
+
+    public int method2() {
+        return 1;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg1/GrandParent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+public class GrandParent<GPE> implements Interface<GPE> {
+    public int method1() {
+        return 1;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg1/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+public interface Interface<IE> {
+
+    /**
+     * A method which returns an int
+     *
+     * @return some dummy integer.
+     */
+    public int method1();
+
+    /**
+     * Another method which returns an int
+     *
+     * @return some dummy integer.
+     */
+    public int method2();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg1/Parent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+public class Parent<PE> extends GrandParent<PE> {
+    public int method2() {
+        return 2;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg2/Abstract.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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 pkg2;
+
+public class Abstract implements Spliterator.OfDouble {
+    static class AbstractV1<Double> implements Spliterator.OfDouble {}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testInterface/pkg2/Spliterator.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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 pkg2;
+
+public interface Spliterator<T> {
+    public interface OfDouble extends OfPrimitive<Double, Object, OfDouble>{}
+
+    public static interface OfInt<Integer> extends Spliterator {}
+
+    public interface OfPrimitive<T, T_CONS, T_SPLITR extends Spliterator.OfPrimitive<T, T_CONS, T_SPLITR>> extends Spliterator<T> {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,184 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 7112427 8012295 8025633 8026567 8061305 8081854
+ * @summary Test of the JavaFX doclet features.
+ * @author jvalenta
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestJavaFX
+ */
+
+public class TestJavaFX extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestJavaFX tester = new TestJavaFX();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out1",
+                "-sourcepath", testSrc,
+                "-javafx",
+                "-package",
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/C.html", true,
+                "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                    + "<dd><a href=\"../pkg1/C.html#getRate--\"><code>getRate()</code></a>, \n"
+                    + "<a href=\"../pkg1/C.html#setRate-double-\">"
+                    + "<code>setRate(double)</code></a></dd>",
+                "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>\n"
+                    + "<div class=\"block\">Sets the value of the property rate.</div>\n"
+                    + "<dl>\n"
+                    + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
+                "<pre>public final&nbsp;double&nbsp;getRate()</pre>\n"
+                    + "<div class=\"block\">Gets the value of the property rate.</div>\n"
+                    + "<dl>\n"
+                    + "<dt><span class=\"simpleTagLabel\">Property description:</span></dt>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                    + "<a href=\"../pkg1/C.html#rateProperty\">rate</a></span></code>\n"
+                    + "<div class=\"block\">Defines the direction/speed at which the "
+                    + "<code>Timeline</code> is expected to",
+                "<span class=\"simpleTagLabel\">Default value:</span>",
+                "<span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                    + "<dd>JavaFX 8.0</dd>",
+                "<p>Sets the value of the property <code>Property</code>",
+                "<p>Gets the value of the property <code>Property</code>",
+                "<span class=\"simpleTagLabel\">Property description:</span>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                    + "<a href=\"../pkg1/C.html#setTestMethodProperty--\">"
+                    + "setTestMethodProperty</a></span>()</code>&nbsp;</td>",
+                "<h4>isPaused</h4>\n"
+                    + "<pre>public final&nbsp;double&nbsp;isPaused()</pre>\n"
+                    + "<div class=\"block\">Gets the value of the property paused.</div>");
+
+        checkOutput("pkg1/C.html", false,
+                "A()");
+
+        checkOutput("pkg1/D.html", true,
+                "<h3>Properties inherited from class&nbsp;pkg1."
+                    + "<a href=\"../pkg1/C.html\" title=\"class in pkg1\">C</a></h3>\n"
+                    + "<code><a href=\"../pkg1/C.html#pausedProperty\">"
+                    + "paused</a>, <a href=\"../pkg1/C.html#rateProperty\">rate</a></code></li>");
+
+        checkOutput("pkg1/D.html", false, "shouldNotAppear");
+    }
+    /*
+     * Test with -javafx option enabled, to ensure property getters and setters
+     * are treated correctly.
+     */
+    @Test
+    void test2() {
+        javadoc("-d", "out2a",
+                "-sourcepath", testSrc,
+                "-javafx",
+                "-package",
+                "pkg2");
+        checkExit(Exit.OK);
+        checkOutput("pkg2/Test.html", true,
+                "<li class=\"blockList\"><a name=\"property.detail\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<h3>Property Detail</h3>\n"
+                + "<a name=\"betaProperty\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\">\n"
+                + "<h4>beta</h4>\n"
+                + "<pre>public&nbsp;java.lang.Object betaProperty</pre>\n"
+                + "</li>\n"
+                + "</ul>\n"
+                + "<a name=\"deltaProperty\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<ul class=\"blockList\">\n"
+                + "<li class=\"blockList\">\n"
+                + "<h4>delta</h4>\n"
+                + "<pre>public final&nbsp;java.util.List&lt;"
+                + "java.util.Set&lt;? super java.lang.Object&gt;&gt; deltaProperty</pre>\n"
+                + "</li>\n"
+                + "</ul>\n"
+                + "<a name=\"gammaProperty\">\n"
+                + "<!--   -->\n"
+                + "</a>\n"
+                + "<ul class=\"blockListLast\">\n"
+                + "<li class=\"blockList\">\n"
+                + "<h4>gamma</h4>\n"
+                + "<pre>public final&nbsp;java.util.List&lt;"
+                + "java.lang.String&gt; gammaProperty</pre>\n"
+                + "</li>\n"
+                + "</ul>\n"
+                + "</li>");
+    }
+    /*
+     * Test without -javafx option, to ensure property getters and setters
+     * are treated just like any other java method.
+     */
+    @Test
+    void test3() {
+        javadoc("-d", "out2b",
+                "-sourcepath", testSrc,
+                "-package",
+                "pkg2");
+        checkExit(Exit.OK);
+        checkOutput("pkg2/Test.html", false, "<h3>Property Summary</h3>");
+        checkOutput("pkg2/Test.html", true,
+                "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Method and Description</th>\n"
+                + "</tr>\n"
+                + "<tr id=\"i0\" class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code>&lt;T&gt;&nbsp;java.lang.Object</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg2/Test.html#alphaProperty-java.util.List-\">"
+                + "alphaProperty</a></span>(java.util.List&lt;T&gt;&nbsp;foo)</code>&nbsp;</td>\n"
+                + "</tr>\n"
+                + "<tr id=\"i1\" class=\"rowColor\">\n"
+                + "<td class=\"colFirst\"><code>java.lang.Object</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg2/Test.html#betaProperty--\">betaProperty</a></span>()</code>"
+                + "&nbsp;</td>\n"
+                + "</tr>\n"
+                + "<tr id=\"i2\" class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code>"
+                + "java.util.List&lt;java.util.Set&lt;? super java.lang.Object&gt;&gt;"
+                + "</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg2/Test.html#deltaProperty--\">"
+                + "deltaProperty</a></span>()</code>&nbsp;</td>\n"
+                + "</tr>\n"
+                + "<tr id=\"i3\" class=\"rowColor\">\n"
+                + "<td class=\"colFirst\"><code>java.util.List&lt;java.lang.String&gt;"
+                + "</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg2/Test.html#gammaProperty--\">gammaProperty</a>"
+                + "</span>()</code>&nbsp;</td>"
+        );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testJavaFX/pkg1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+public class C {
+
+    /**
+     * @propertySetter Property
+     * @propertyDescription PropertyDescription
+     */
+    public void CC() {}
+
+    /**
+     * @propertyGetter Property
+     *
+     */
+    public void B() {}
+
+    /**
+     * Method A documentation
+     * @treatAsPrivate
+     */
+    public void A() {}
+
+    /**
+     * Field i
+     * @defaultValue 1.0
+     */
+    public int i;
+
+
+    /**
+     * Defines the direction/speed at which the {@code Timeline} is expected to
+     * be played.
+     * @defaultValue 11
+     * @since JavaFX 8.0
+     */
+    private DoubleProperty rate;
+
+    public final void setRate(double value) {}
+
+    public final double getRate() {}
+
+    public final DoubleProperty rateProperty() {}
+
+    private BooleanProperty paused;
+
+    public final void setPaused(boolean value) {}
+
+    public final double isPaused() {}
+
+    /**
+     * Defines if paused
+     * @defaultValue false
+     */
+    public final BooleanProperty pausedProperty() {}
+
+    class DoubleProperty {}
+
+    class BooleanProperty {}
+
+    public final BooleanProperty setTestMethodProperty() {}
+
+    private class Inner {
+        private BooleanProperty testMethodProperty() {}
+
+        /**
+         * Defines the direction/speed at which the {@code Timeline} is expected to
+         * be played.
+         * @defaultValue 11
+         */
+        private DoubleProperty rate;
+
+        public final void setRate(double value) {}
+
+        public final double getRate() {}
+
+        public final DoubleProperty rateProperty() {}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testJavaFX/pkg1/D.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+public class D extends C {
+    /**
+     * @treatAsPrivate
+     */
+    public void shouldNotAppear(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testJavaFX/pkg2/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg2;
+
+import java.util.List;
+import java.util.Set;
+
+
+public class Test {
+    public <T> Object alphaProperty(List<T> foo) { return null; }
+    public Object betaProperty() { return null; }
+    public final  List<String> gammaProperty()  {return null;}
+    public final List<Set<? super Object>> deltaProperty() {return null;}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testJavascript/TestJavascript.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,115 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4665566 4855876 7025314 8012375 8015997 8016328 8024756
+ * @summary  Verify that the output has the right javascript.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestJavascript
+ */
+
+public class TestJavascript extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestJavascript tester = new TestJavascript();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg", testSrc("TestJavascript.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C.html", true,
+                "<a href=\"../index.html?pkg/C.html\" target=\"_top\">Frames</a>");
+
+        checkOutput("TestJavascript.html", true,
+                "<a href=\"index.html?TestJavascript.html\" target=\"_top\">Frames</a>");
+
+        checkOutput("index.html", true,
+                "<script type=\"text/javascript\">\n"
+                + "    targetPage = \"\" + window.location.search;\n"
+                + "    if (targetPage != \"\" && targetPage != \"undefined\")\n"
+                + "        targetPage = targetPage.substring(1);\n"
+                + "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))\n"
+                + "        targetPage = \"undefined\";\n"
+                + "    function validURL(url) {\n"
+                + "        try {\n"
+                + "            url = decodeURIComponent(url);\n"
+                + "        }\n"
+                + "        catch (error) {\n"
+                + "            return false;\n"
+                + "        }\n"
+                + "        var pos = url.indexOf(\".html\");\n"
+                + "        if (pos == -1 || pos != url.length - 5)\n"
+                + "            return false;\n"
+                + "        var allowNumber = false;\n"
+                + "        var allowSep = false;\n"
+                + "        var seenDot = false;\n"
+                + "        for (var i = 0; i < url.length - 5; i++) {\n"
+                + "            var ch = url.charAt(i);\n"
+                + "            if ('a' <= ch && ch <= 'z' ||\n"
+                + "                    'A' <= ch && ch <= 'Z' ||\n"
+                + "                    ch == '$' ||\n"
+                + "                    ch == '_' ||\n"
+                + "                    ch.charCodeAt(0) > 127) {\n"
+                + "                allowNumber = true;\n"
+                + "                allowSep = true;\n"
+                + "            } else if ('0' <= ch && ch <= '9'\n"
+                + "                    || ch == '-') {\n"
+                + "                if (!allowNumber)\n"
+                + "                     return false;\n"
+                + "            } else if (ch == '/' || ch == '.') {\n"
+                + "                if (!allowSep)\n"
+                + "                    return false;\n"
+                + "                allowNumber = false;\n"
+                + "                allowSep = false;\n"
+                + "                if (ch == '.')\n"
+                + "                     seenDot = true;\n"
+                + "                if (ch == '/' && seenDot)\n"
+                + "                     return false;\n"
+                + "            } else {\n"
+                + "                return false;\n"
+                + "            }\n"
+                + "        }\n"
+                + "        return true;\n"
+                + "    }\n"
+                + "</script>");
+
+        //Make sure title javascript only runs if is-external is not true
+        checkOutput("pkg/C.html", true,
+                "    try {\n"
+                + "        if (location.href.indexOf('is-external=true') == -1) {\n"
+                + "            parent.document.title=\"C\";\n"
+                + "        }\n"
+                + "    }\n"
+                + "    catch(err) {\n"
+                + "    }");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testJavascript/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLambdaFeature/TestLambdaFeature.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8004893 8022738 8029143
+ * @summary  Make sure that the lambda feature changes work fine in
+ *           javadoc.
+ * @author   bpatel
+ * @library  ../lib/
+ * @modules jdk.javadoc
+ * @build    JavadocTester TestLambdaFeature
+ * @run main TestLambdaFeature
+ */
+
+/*
+ * NOTE : This test should be elided when version 1.7 support is removed from the JDK
+ *              or the negative part of the test showing 1.7's non-support should be
+ *              removed [ 8022738 ]
+ */
+
+public class TestLambdaFeature extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestLambdaFeature tester = new TestLambdaFeature();
+        tester.runTests();
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                "-sourcepath", testSrc,
+                "pkg", "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/A.html", true,
+                "<td class=\"colFirst\"><code>default void</code></td>",
+                "<pre>default&nbsp;void&nbsp;defaultMethod()</pre>",
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>"
+                + "All Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(2);\">Instance Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span><span id=\"t3\" "
+                + "class=\"tableTab\"><span><a href=\"javascript:show(4);\">"
+                + "Abstract Methods</a></span><span class=\"tabEnd\">&nbsp;</span>"
+                + "</span><span id=\"t5\" class=\"tableTab\"><span>"
+                + "<a href=\"javascript:show(16);\">Default Methods</a></span>"
+                + "<span class=\"tabEnd\">&nbsp;</span></span></caption>",
+                "<dl>\n"
+                + "<dt>Functional Interface:</dt>\n"
+                + "<dd>This is a functional interface and can therefore be used as "
+                + "the assignment target for a lambda expression or method "
+                + "reference.</dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg1/FuncInf.html", true,
+                "<dl>\n"
+                + "<dt>Functional Interface:</dt>\n"
+                + "<dd>This is a functional interface and can therefore be used as "
+                + "the assignment target for a lambda expression or method "
+                + "reference.</dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/A.html", false,
+                "<td class=\"colFirst\"><code>default default void</code></td>",
+                "<pre>default&nbsp;default&nbsp;void&nbsp;defaultMethod()</pre>");
+
+        checkOutput("pkg/B.html", false,
+                "<td class=\"colFirst\"><code>default void</code></td>",
+                "<dl>\n"
+                + "<dt>Functional Interface:</dt>");
+
+        checkOutput("pkg1/NotAFuncInf.html", false,
+                "<dl>\n"
+                + "<dt>Functional Interface:</dt>\n"
+                + "<dd>This is a functional interface and can therefore be used as "
+                + "the assignment target for a lambda expression or method "
+                + "reference.</dd>\n"
+                + "</dl>");
+    }
+
+    @Test
+    void testSource7() {
+        javadoc("-d", "out-7",
+                "-sourcepath", testSrc,
+                "-source", "1.7",
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/FuncInf.html", false,
+                "<dl>\n"
+                + "<dt>Functional Interface:</dt>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLambdaFeature/pkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+@FunctionalInterface
+public interface A {
+
+    public void method1();
+
+    public default void defaultMethod() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLambdaFeature/pkg/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+public abstract class B {
+
+    public abstract void method1();
+
+    public void method2() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLambdaFeature/pkg1/FuncInf.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+@FunctionalInterface
+public interface FuncInf<V> {
+
+    V call() throws Exception;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLambdaFeature/pkg1/NotAFuncInf.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+public interface NotAFuncInf<V> {
+
+    V call() throws Exception;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLeadingSpaces/LeadingSpaces.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4232882 8014636
+ * @summary Javadoc strips all of the leading spaces when the comment
+ *    does not begin with a star.  This RFE allows users to
+ *    begin their comment without a leading star without leading
+ *    spaces stripped
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main LeadingSpaces
+ */
+
+public class LeadingSpaces extends JavadocTester {
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     * @throws Exception if the test fails
+     */
+    public static void main(String... args) throws Exception {
+        LeadingSpaces tester = new LeadingSpaces();
+        tester.runTests();
+    }
+
+    @Test
+    void testLeadingSpaces() {
+        javadoc("-d", "out", "-sourcepath", testSrc,
+                testSrc("LeadingSpaces.java"));
+        checkExit(Exit.OK);
+        checkOutput("LeadingSpaces.html", true,
+                  "        1\n"
+                + "          2\n"
+                + "            3\n"
+                + "              4\n"
+                + "                5\n"
+                + "                  6\n"
+                + "                    7");
+    }
+
+    /**
+       This leading spaces in the &lt;pre&gt; block below should be
+       preserved.
+       <pre>
+        1
+          2
+            3
+              4
+                5
+                  6
+                    7
+       </pre>
+     */
+    public void method(){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLegacyTaglet/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/**
+ * This is an {@underline underline}.
+ * @todo Finish this class.
+ * @check Check this.
+ */
+public class C {
+
+    /**
+     * @todo Tag in Method.
+     */
+    public void mtd() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLegacyTaglet/Check.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.doclet.taglet.Taglet;
+
+public class Check implements Taglet {
+
+    private static final String TAG_NAME = "check";
+    private static final String TAG_HEADER = "Check:";
+
+    private final EnumSet<Location> allowedSet = EnumSet.allOf(Location.class);
+
+    @Override
+    public Set<Taglet.Location> getAllowedLocations() {
+        return allowedSet;
+    }
+
+    /**
+     * Return false since the tag is not an inline tag.
+     *
+     * @return false since the tag is not an inline tag.
+     */
+    public boolean isInlineTag() {
+        return false;
+    }
+
+    /**
+     * Return the name of this custom tag.
+     *
+     * @return the name of this tag.
+     */
+    public String getName() {
+        return TAG_NAME;
+    }
+
+    /**
+     * Given the DocTree representation of this custom tag, return its string
+     * representation.
+     *
+     * @param tag the DocTree representing this custom tag.
+     */
+    public String toString(DocTree tag) {
+        return "<dt><span class=\"simpleTagLabel\">" + TAG_HEADER + ":</span></dt><dd>" +
+                tag.toString() + "</dd>\n";
+    }
+
+    /**
+     * Given an array of DocTrees representing this custom tag, return its string
+     * representation.
+     *
+     * @param tags the array of tags representing this custom tag.
+     * @return null to test if the javadoc throws an exception or not.
+     */
+    public String toString(List<? extends DocTree> tags) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLegacyTaglet/TestLegacyTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,62 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4638723 8015882
+ * @summary Test to ensure that the refactored version of the standard
+ * doclet still works with Taglets that implement the 1.4.0 interface.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester ToDoTaglet UnderlineTaglet Check
+ * @run main TestLegacyTaglet
+ */
+
+public class TestLegacyTaglet extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestLegacyTaglet tester = new TestLegacyTaglet();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-tagletpath", System.getProperty("test.classes", "."),
+                "-taglet", "ToDoTaglet",
+                "-taglet", "Check",
+                "-taglet", "UnderlineTaglet",
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+        checkOutput("C.html", true,
+                "This is an <u>underline</u>",
+                "<DT><B>To Do:</B><DD><table summary=\"Summary\" cellpadding=2 cellspacing=0><tr>" +
+                "<td bgcolor=\"yellow\">Finish this class.</td></tr></table></DD>",
+                "<DT><B>To Do:</B><DD><table summary=\"Summary\" cellpadding=2 cellspacing=0><tr>" +
+                "<td bgcolor=\"yellow\">Tag in Method.</td></tr></table></DD>");
+        checkOutput(Output.STDERR, false,
+                "NullPointerException");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLegacyTaglet/ToDoTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,150 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Map;
+
+import java.util.Set;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.TextTree;
+import com.sun.source.doctree.UnknownBlockTagTree;
+import com.sun.source.doctree.UnknownInlineTagTree;
+import com.sun.source.util.SimpleDocTreeVisitor;
+import jdk.javadoc.doclet.taglet.Taglet;
+import jdk.javadoc.doclet.taglet.Taglet.Location;
+import static jdk.javadoc.doclet.taglet.Taglet.Location.*;
+
+
+/**
+ * A sample Taglet representing @todo. This tag can be used in any kind of
+ * {@link javax.lang.model.Element}.  It is not an inline tag. The text is displayed
+ * in yellow to remind the developer to perform a task.  For
+ * example, "@todo Fix this!" would be shown as:
+ * <DL>
+ * <DT>
+ * <B>To Do:</B>
+ * <DD><table summary="Summary" cellpadding=2 cellspacing=0><tr><td bgcolor="yellow">Fix this!
+ * </td></tr></table></DD>
+ * </DL>
+ *
+ * @author Jamie Ho
+ * @since 1.4
+ */
+
+public class ToDoTaglet implements Taglet {
+
+    private static final String NAME = "todo";
+    private static final String HEADER = "To Do:";
+
+    /**
+     * Return the name of this custom tag.
+     */
+    public String getName() {
+        return NAME;
+    }
+
+    private final EnumSet<Location> allowedSet = EnumSet.allOf(Location.class);
+
+    @Override
+    public Set<Taglet.Location> getAllowedLocations() {
+        return allowedSet;
+    }
+
+    /**
+     * Will return false since <code>@todo</code>
+     * is not an inline tag.
+     * @return false since <code>@todo</code>
+     * is not an inline tag.
+     */
+
+    public boolean isInlineTag() {
+        return false;
+    }
+
+    /**
+     * Given the <code>DocTree</code> representation of this custom
+     * tag, return its string representation.
+     * @param tag   the <code>DocTree</code> representing this custom tag.
+     */
+    public String toString(DocTree tag) {
+
+        return "<DT><B>" + HEADER + "</B><DD>"
+               + "<table summary=\"Summary\" cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">"
+               + getText(tag)
+               + "</td></tr></table></DD>\n";
+    }
+
+    /**
+     * Given an array of <code>Tag</code>s representing this custom
+     * tag, return its string representation.
+     * @param tags  the array of <code>DocTree</code>s representing this custom tag.
+     */
+    @Override
+    public String toString(List<? extends DocTree> tags) {
+        if (tags.isEmpty()) {
+            return null;
+        }
+        String result = "\n<DT><B>" + HEADER + "</B><DD>";
+        result += "<table summary=\"Summary\" cellpadding=2 cellspacing=0><tr><td bgcolor=\"yellow\">";
+        for (int i = 0; i < tags.size(); i++) {
+            if (i > 0) {
+                result += ", ";
+            }
+            result += getText(tags.get(i));
+        }
+        return result + "</td></tr></table></DD>\n";
+    }
+
+    static String getText(DocTree dt) {
+        return new SimpleDocTreeVisitor<String, Void>() {
+            @Override
+            public String visitUnknownBlockTag(UnknownBlockTagTree node, Void p) {
+                for (DocTree dt : node.getContent()) {
+                    return dt.accept(this, null);
+                }
+                return "";
+            }
+
+            @Override
+            public String visitUnknownInlineTag(UnknownInlineTagTree node, Void p) {
+                for (DocTree dt : node.getContent()) {
+                    return dt.accept(this, null);
+                }
+                return "";
+            }
+
+            @Override
+            public String visitText(TextTree node, Void p) {
+                return node.getBody();
+            }
+
+            @Override
+            protected String defaultAction(DocTree node, Void p) {
+                return "";
+            }
+
+        }.visit(dt, null);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLegacyTaglet/UnderlineTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,88 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+
+import com.sun.source.doctree.DocTree;
+import jdk.javadoc.doclet.taglet.Taglet;
+import static jdk.javadoc.doclet.taglet.Taglet.Location.*;
+
+/**
+ * A sample Inline Taglet representing {@underline ...}.  The text
+ * is simple underlined.  For example, "@underline UNDERLINE ME" would
+ * be shown as: <u>UNDERLINE ME</u>.
+ *
+ * @author Jamie Ho
+ * @since 1.4
+ */
+
+public class UnderlineTaglet implements Taglet {
+
+    private final String NAME = "underline";
+
+    /**
+     * Return the name of this custom tag.
+     */
+    @Override
+    public String getName() {
+        return NAME;
+    }
+    private final EnumSet<Location> allowedSet = EnumSet.of(CONSTRUCTOR);
+
+    @Override
+    public Set<Taglet.Location> getAllowedLocations() {
+        return allowedSet;
+    }
+
+    /**
+     * Will return true since this is an inline tag.
+     * @return true since this is an inline tag.
+     */
+
+    @Override
+    public boolean isInlineTag() {
+        return true;
+    }
+
+    /**
+     * Given the <code>DocTree</code> representation of this custom
+     * tag, return its string representation.
+     * @param tag he <code>DocTree</code> representation of this custom tag.
+     */
+    @Override
+    public String toString(DocTree tag) {
+        return "<u>" + ToDoTaglet.getText(tag) + "</u>";
+    }
+
+    /**
+     * This method should not be called since arrays of inline tags do not
+     * exist.  Method {@link #tostring(DocTree)} should be used to convert this
+     * inline tag to a string.
+     */
+    @Override
+    public String toString(List<? extends DocTree> tags) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/TestBadLinkOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4625883
+ * @summary Make sure that bad -link arguments trigger warnings.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestBadLinkOption
+ */
+
+public class TestBadLinkOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestBadLinkOption tester = new TestBadLinkOption();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        String out = "out";
+        javadoc("-d", out,
+                "-sourcepath", testSrc,
+                "-link", out,
+                "pkg");
+        checkExit(Exit.OK);
+
+        // TODO: the file it is trying to read, out/out/package-list, warrants investigation
+        checkOutput(Output.OUT, true,
+                "Error reading file:");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/TestLinkOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4720957 5020118 8026567 8038976
+ * @summary Test to make sure that -link and -linkoffline link to
+ * right files, and URLs with and without trailing slash are accepted.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestLinkOption
+ */
+
+import java.io.File;
+
+public class TestLinkOption extends JavadocTester {
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String... args) throws Exception {
+        TestLinkOption tester = new TestLinkOption();
+        tester.runTests();
+    }
+
+    // The following test runs javadoc multiple times; it is important that the
+    // first one is run first, since the subsequent runs refer to the output
+    // it generates. Therefore we run everything serially in a single @Test
+    // method and not in independent @Test methods.
+    @Test
+    void test() {
+        // Generate the documentation using -linkoffline and a URL as the first parameter.
+        String out1 = "out1";
+        String url = "http://java.sun.com/j2se/1.4/docs/api/";
+        javadoc("-d", out1,
+                "-sourcepath", testSrc,
+                "-linkoffline", url, testSrc,
+                "-package",
+                "pkg", "java.lang");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C.html", true,
+                "<a href=\"" + url + "java/lang/String.html?is-external=true\" "
+                + "title=\"class or interface in java.lang\"><code>Link to String Class</code></a>",
+                //Make sure the parameters are indented properly when the -link option is used.
+                "(int&nbsp;p1,\n"
+                + "      int&nbsp;p2,\n"
+                + "      int&nbsp;p3)",
+                "(int&nbsp;p1,\n"
+                + "      int&nbsp;p2,\n"
+                + "      <a href=\"" + url + "java/lang/Object.html?is-external=true\" title=\"class or interface in java.lang\">"
+                + "Object</a>&nbsp;p3)");
+
+        checkOutput("pkg/B.html", true,
+                "<div class=\"block\">A method with html tag the method "
+                + "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html?is-external=true#getSystemClassLoader--\""
+                + " title=\"class or interface in java.lang\"><code><tt>getSystemClassLoader()</tt>"
+                + "</code></a> as the parent class loader.</div>",
+                "<div class=\"block\">is equivalent to invoking <code>"
+                + "<a href=\"../pkg/B.html#createTempFile-java.lang.String-java.lang.String-java.io.File-\">"
+                + "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code></a></code>.</div>",
+                "<a href=\"" + url + "java/lang/String.html?is-external=true\" "
+                + "title=\"class or interface in java.lang\">Link-Plain to String Class</a>",
+                "<code><tt>getSystemClassLoader()</tt></code>",
+                "<code>createTempFile(prefix,&nbsp;suffix,&nbsp;null)</code>",
+                "<dd><a href=\"http://www.ietf.org/rfc/rfc2279.txt\"><i>RFC&nbsp;2279: UTF-8, a\n" +
+                " transformation format of ISO 10646</i></a>, <br><a " +
+                "href=\"http://www.ietf.org/rfc/rfc2373.txt\"><i>RFC&nbsp;2373: IPv6 Addressing\n" +
+                " Architecture</i></a>, <br><a href=\"http://www.ietf.org/rfc/rfc2396.txt\">" +
+                "<i>RFC&nbsp;2396: Uniform\n" +
+                " Resource Identifiers (URI): Generic Syntax</i></a>, " +
+                "<br><a href=\"http://www.ietf.org/rfc/rfc2732.txt\"><i>RFC&nbsp;2732: Format for\n" +
+                " Literal IPv6 Addresses in URLs</i></a>, <br><a href=\"URISyntaxException.html\">" +
+                "URISyntaxException</a></dd>\n" +
+                "</dl>");
+
+        checkOutput("java/lang/StringBuilderChild.html", true,
+                "<pre>public abstract class <span class=\"typeNameLabel\">StringBuilderChild</span>\n"
+                + "extends <a href=\"" + url + "java/lang/Object.html?is-external=true\" "
+                + "title=\"class or interface in java.lang\">Object</a></pre>"
+        );
+
+        // Generate the documentation using -linkoffline and a relative path as the first parameter.
+        // We will try linking to the docs generated in test 1 with a relative path.
+        String out2 = "out2";
+        javadoc("-d", out2,
+                "-sourcepath", testSrc,
+                "-linkoffline", "../" + out1, out1,
+                "-package",
+                "pkg2");
+        checkExit(Exit.OK);
+        checkOutput("pkg2/C2.html", true,
+            "This is a link to <a href=\"../../" + out1 + "/pkg/C.html?is-external=true\" " +
+            "title=\"class or interface in pkg\"><code>Class C</code></a>."
+        );
+
+        String out3 = "out3";
+        javadoc(createArguments(out3, out1, true));  // with trailing slash
+        checkExit(Exit.OK);
+
+        String out4 = "out4";
+        javadoc(createArguments(out4, out1, false)); // without trailing slash
+        checkExit(Exit.OK);
+        // Note: the following test is very weak, and will fail if ever the test
+        // of the message is changed. We should have a separate test to verify
+        // this is the text that is given when there is a problem with a URL
+        checkOutput(Output.OUT, false,
+                "warning - Error fetching URL");
+    }
+
+    /*
+     * Create the documentation using the -link option, vary the behavior with
+     * both trailing and no trailing slash. We are only interested in ensuring
+     * that the command executes with no errors or related warnings.
+     */
+    static String[] createArguments(String outDir, String packageDir, boolean withTrailingSlash) {
+        String packagePath = new File(packageDir).getAbsolutePath();
+        if (withTrailingSlash) {
+            // add the trailing slash, if it is not present!
+            if (!packagePath.endsWith(FS)) {
+                packagePath = packagePath + FS;
+            }
+        } else {
+            // remove the trailing slash, if it is present!
+            if (packagePath.endsWith(FS)) {
+                packagePath = packagePath.substring(0, packagePath.length() - 1);
+            }
+        }
+        String args[] = {
+            "-d", outDir,
+            "-sourcepath", testSrc,
+            "-link", "file:///" + packagePath,
+            "-package",
+            "pkg2"
+        };
+        System.out.println("packagePath: " + packagePath);
+        return args;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/TestNewLineInLink.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4739870
+ * @summary Make sure that a new line may act as a separator between
+ * link and label.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestNewLineInLink
+ */
+
+public class TestNewLineInLink extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestNewLineInLink tester = new TestNewLineInLink();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-linkoffline", "http://www.java.sun.com/j2se/1.4/docs/api", testSrc,
+                "testNewLineInLink");
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, false,
+                "illegal character");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/java/lang/StringBuilderChild.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 java.lang;
+
+/**
+ * @author Jamie Ho
+ */
+public abstract class StringBuilderChild extends AbstractStringBuilder {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,135 @@
+java.applet
+java.awt
+java.awt.color
+java.awt.datatransfer
+java.awt.dnd
+java.awt.event
+java.awt.font
+java.awt.geom
+java.awt.im
+java.awt.im.spi
+java.awt.image
+java.awt.image.renderable
+java.awt.print
+java.beans
+java.beans.beancontext
+java.io
+java.lang
+java.lang.ref
+java.lang.reflect
+java.math
+java.net
+java.nio
+java.nio.channels
+java.nio.channels.spi
+java.nio.charset
+java.nio.charset.spi
+java.rmi
+java.rmi.activation
+java.rmi.dgc
+java.rmi.registry
+java.rmi.server
+java.security
+java.security.acl
+java.security.cert
+java.security.interfaces
+java.security.spec
+java.sql
+java.text
+java.util
+java.util.jar
+java.util.logging
+java.util.prefs
+java.util.regex
+java.util.zip
+javax.accessibility
+javax.crypto
+javax.crypto.interfaces
+javax.crypto.spec
+javax.imageio
+javax.imageio.event
+javax.imageio.metadata
+javax.imageio.plugins.jpeg
+javax.imageio.spi
+javax.imageio.stream
+javax.naming
+javax.naming.directory
+javax.naming.event
+javax.naming.ldap
+javax.naming.spi
+javax.net
+javax.net.ssl
+javax.print
+javax.print.attribute
+javax.print.attribute.standard
+javax.print.event
+javax.rmi
+javax.rmi.CORBA
+javax.security.auth
+javax.security.auth.callback
+javax.security.auth.kerberos
+javax.security.auth.login
+javax.security.auth.spi
+javax.security.auth.x500
+javax.security.cert
+javax.sound.midi
+javax.sound.midi.spi
+javax.sound.sampled
+javax.sound.sampled.spi
+javax.sql
+javax.swing
+javax.swing.border
+javax.swing.colorchooser
+javax.swing.event
+javax.swing.filechooser
+javax.swing.plaf
+javax.swing.plaf.basic
+javax.swing.plaf.metal
+javax.swing.plaf.multi
+javax.swing.table
+javax.swing.text
+javax.swing.text.html
+javax.swing.text.html.parser
+javax.swing.text.rtf
+javax.swing.tree
+javax.swing.undo
+javax.transaction
+javax.transaction.xa
+javax.xml.parsers
+javax.xml.transform
+javax.xml.transform.dom
+javax.xml.transform.sax
+javax.xml.transform.stream
+org.ietf.jgss
+org.omg.CORBA
+org.omg.CORBA.DynAnyPackage
+org.omg.CORBA.ORBPackage
+org.omg.CORBA.TypeCodePackage
+org.omg.CORBA.portable
+org.omg.CORBA_2_3
+org.omg.CORBA_2_3.portable
+org.omg.CosNaming
+org.omg.CosNaming.NamingContextExtPackage
+org.omg.CosNaming.NamingContextPackage
+org.omg.Dynamic
+org.omg.DynamicAny
+org.omg.DynamicAny.DynAnyFactoryPackage
+org.omg.DynamicAny.DynAnyPackage
+org.omg.IOP
+org.omg.IOP.CodecFactoryPackage
+org.omg.IOP.CodecPackage
+org.omg.Messaging
+org.omg.PortableInterceptor
+org.omg.PortableInterceptor.ORBInitInfoPackage
+org.omg.PortableServer
+org.omg.PortableServer.CurrentPackage
+org.omg.PortableServer.POAManagerPackage
+org.omg.PortableServer.POAPackage
+org.omg.PortableServer.ServantLocatorPackage
+org.omg.PortableServer.portable
+org.omg.SendingContext
+org.omg.stub.java.rmi
+org.w3c.dom
+org.xml.sax
+org.xml.sax.ext
+org.xml.sax.helpers
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/pkg/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+import java.io.File;
+
+/*****************************************************
+ * {@linkplain java.lang.String Link-Plain to String Class}.
+ ****************************************************/
+public class B {
+    /**
+     * A method with html tag the method {@link ClassLoader#getSystemClassLoader()
+     * <tt>getSystemClassLoader()</tt>} as the parent class loader.
+     */
+    public void  method1() {}
+
+    /**
+     * is equivalent to invoking <code>{@link #createTempFile(java.lang.String,
+     * java.lang.String, java.io.File)
+     * createTempFile(prefix,&nbsp;suffix,&nbsp;null)}</code>.
+     * */
+    public void method2() {}
+
+    /**
+     * A required method to satisfy other tests.
+     * @param s1 parameter
+     * @param s2 parameter
+     * @param f  parameter
+     */
+    public void createTempFile(String s1, String s2, File f){}
+
+   /**
+    * A external links, complicated by whitespace
+    * @see <a href="http://www.ietf.org/rfc/rfc2279.txt"><i>RFC&nbsp;2279: UTF-8, a
+    * transformation format of ISO 10646</i></a>, <br><a
+    * href="http://www.ietf.org/rfc/rfc2373.txt"><i>RFC&nbsp;2373: IPv6 Addressing
+    * Architecture</i></a>, <br><a
+    * href="http://www.ietf.org/rfc/rfc2396.txt"><i>RFC&nbsp;2396: Uniform
+    * Resource Identifiers (URI): Generic Syntax</i></a>, <br><a
+    * href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC&nbsp;2732: Format for
+    * Literal IPv6 Addresses in URLs</i></a>, <br><a
+    * href="URISyntaxException.html">URISyntaxException</a>
+    */
+   public void externalLink() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2002, 2003, 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.
+ *
+ * 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 pkg;
+
+/*****************************************************
+ * {@link java.lang.String Link to String Class}.
+ ****************************************************/
+public class C {
+
+public Object method(int p1, int p2, int p3) {
+    return null;
+}
+
+public Object method(int p1, int p2, Object p3) {
+    return p3;
+}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/pkg2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg2;
+
+/*******************************************
+ * This is a link to {@link pkg.C Class C}.
+ *******************************************/
+
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/testNewLineInLink/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 testNewLineInLink;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkOption/testNewLineInLink/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,6 @@
+<html>
+<body>
+{@link java.awt.Color#getAlpha()
+getAlpha}
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkTaglet/TestLinkTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4732864 6280605 7064544 8014636 8016328 8025633
+ * @summary  Make sure that you can link from one member to another using
+ *           non-qualified name, furthermore, ensure the right one is linked.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestLinkTaglet
+ */
+
+public class TestLinkTaglet extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestLinkTaglet tester = new TestLinkTaglet();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                "-sourcepath", testSrc,
+                "pkg", testSrc("checkPkg/B.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C.html", true,
+                "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+                + " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+                + " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n"
+                + " Qualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n"
+                + " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n"
+                + " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>");
+
+        checkOutput("pkg/C.InnerC.html", true,
+                "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n"
+                + " Link to member in inner class: <a href=\"../pkg/C.InnerC2.html#MEMBER2\"><code>C.InnerC2.MEMBER2</code></a> <br/>\n"
+                + " Link to another inner class: <a href=\"../pkg/C.InnerC2.html\" title=\"class in pkg\"><code>C.InnerC2</code></a>");
+
+        checkOutput("pkg/C.InnerC2.html", true,
+                "<dl>\n"
+                + "<dt>Enclosing class:</dt>\n"
+                + "<dd><a href=\"../pkg/C.html\" title=\"class in pkg\">C</a></dd>\n"
+                + "</dl>");
+
+        checkOutput(Output.OUT, false,
+                "Tag @see: reference not found: A");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkTaglet/checkPkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 checkPkg;
+
+/**
+ * 6280605
+ */
+public class A {
+        public void m(){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkTaglet/checkPkg/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 checkPkg;
+
+/**6280605
+ * @see A
+ */
+public class B {
+
+        /**
+     * @see A#m()
+     */
+        public void m2();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkTaglet/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 2004, 2011, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Qualified Link: {@link pkg.C.InnerC}.<br/>
+ * Unqualified Link1: {@link C.InnerC}.<br/>
+ * Unqualified Link2: {@link InnerC}.<br/>
+ * Qualified Link: {@link #method(pkg.C.InnerC, pkg.C.InnerC2)}.<br/>
+ * Unqualified Link: {@link #method(C.InnerC, C.InnerC2)}.<br/>
+ * Unqualified Link: {@link #method(InnerC, InnerC2)}.<br/>
+ */
+public class C {
+
+    public InnerC MEMBER = new InnerC();
+    /**
+     *  A red herring inner class to confuse the matching, thus to
+     *  ensure the right one is linked.
+     */
+    public class RedHerringInnerC {}
+
+    /**
+     * Link to member in outer class: {@link #MEMBER} <br/>
+     * Link to member in inner class: {@link InnerC2#MEMBER2} <br/>
+     * Link to another inner class: {@link InnerC2}
+     */
+    public class InnerC {}
+
+    /**
+     * Link to conflicting member in inner class: {@link #MEMBER} <br/>
+     */
+    public class InnerC2 {
+        public static final int MEMBER = 1;
+        public static final int MEMBER2 = 1;
+    }
+
+    public void method(InnerC p1, InnerC2 p2){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkToSerialForm/TestLinkToSerialForm.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4521661 8081854
+ * @summary Test to make sure that there is a link with a proper anchor
+ * from a serializable class to serialized-form.html.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestLinkToSerialForm
+ */
+
+public class TestLinkToSerialForm extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestLinkToSerialForm tester = new TestLinkToSerialForm();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("serialized-form.html", true,
+                "<a name=\"pkg.C\">");
+        checkOutput("pkg/C.html", true,
+                "<a href=\"../serialized-form.html#pkg.C\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLinkToSerialForm/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class C implements java.io.Serializable {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLiteralCodeInPre/TestLiteralCodeInPre.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8002387 8014636 8078320
+ * @summary  Improve rendered HTML formatting for {@code}
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestLiteralCodeInPre
+ */
+
+public class TestLiteralCodeInPre extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestLiteralCodeInPre tester = new TestLiteralCodeInPre();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-Xdoclint:none",
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/Test.html", true,
+                "no_pre()</pre>\n"
+                + "<div class=\"block\">abc<code>def</code>ghi</div>",
+                "no_pre_extra_whitespace()</pre>\n"
+                + "<div class=\"block\">abc<code> def  </code>ghi</div>",
+                "in_pre()</pre>\n"
+                + "<div class=\"block\"><pre> abc<code> def  </code>ghi</pre></div>",
+                "pre_after_text()</pre>\n"
+                + "<div class=\"block\">xyz <pre> abc<code> def  </code>ghi</pre></div>",
+                "after_pre()</pre>\n"
+                + "<div class=\"block\">xyz <pre> pqr </pre> abc<code> def  </code>ghi</div>",
+                "back_in_pre()</pre>\n"
+                + "<div class=\"block\">xyz <pre> pqr </pre> mno <pre> abc<code> def  </code>ghi</pre></div>",
+                "typical_usage_code()</pre>\n"
+                + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
+                + " Example:  <pre><code>\n"
+                + "   line 0 @Override\n"
+                + "   line 1 &lt;T&gt; void m(T t) {\n"
+                + "   line 2     // do something with T\n"
+                + "   line 3 }\n"
+                + " </code></pre>\n"
+                + " and so it goes.</div>",
+                "typical_usage_literal()</pre>\n"
+                + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
+                + " Example:  <pre>\n"
+                + "   line 0 @Override\n"
+                + "   line 1 &lt;T&gt; void m(T t) {\n"
+                + "   line 2     // do something with T\n"
+                + "   line 3 }\n"
+                + " </pre>\n"
+                + " and so it goes.</div>",
+                "recommended_usage_literal()</pre>\n"
+                + "<div class=\"block\">Lorem ipsum dolor sit amet, consectetur adipiscing elit.\n"
+                + " Example:  <pre>\n"
+                + "   line 0 @Override\n"
+                + "   line 1 &lt;T&gt; void m(T t) {\n"
+                + "   line 2     // do something with T\n"
+                + "   line 3 } </pre>\n"
+                + " and so it goes.</div>",
+                "<div class=\"block\">Test for html in pre, note the spaces\n"
+                + " <PRE>\n"
+                + " <b>id           </b>\n"
+                + " </PRE></div>",
+                "<pre>public&nbsp;void&nbsp;htmlAttrInPre1()</pre>\n"
+                + "<div class=\"block\">More html tag outliers.\n"
+                + " <pre>\n"
+                + " @Override\n"
+                + " <code> some.function() </code>\n"
+                + " </pre></div>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testLiteralCodeInPre/pkg/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,121 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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 pkg;
+
+/** */
+public class Test {
+    /**
+     * abc{@code def}ghi
+     */
+    public void no_pre() { }
+
+    /**
+     * abc{@code  def  }ghi
+     */
+    public void no_pre_extra_whitespace() { }
+
+    /**
+     * <pre> abc{@code  def  }ghi</pre>
+     */
+    public void in_pre() { }
+
+    /**
+     * xyz <pre> abc{@code  def  }ghi</pre>
+     */
+    public void pre_after_text() { }
+
+    /**
+     * xyz <pre> pqr </pre> abc{@code  def  }ghi
+     */
+    public void after_pre() { }
+
+    /**
+     * xyz <pre> pqr </pre> mno <pre> abc{@code  def  }ghi</pre>
+     */
+    public void back_in_pre() { }
+
+    /**
+     * Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+     * Example:  <pre>{@code
+     *   line 0 @Override
+     *   line 1 <T> void m(T t) {
+     *   line 2     // do something with T
+     *   line 3 }
+     * }</pre>
+     * and so it goes.
+     */
+    public void typical_usage_code() { }
+
+    /**
+     * Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+     * Example:  <pre>{@literal
+     *   line 0 @Override
+     *   line 1 <T> void m(T t) {
+     *   line 2     // do something with T
+     *   line 3 }
+     * }</pre>
+     * and so it goes.
+     */
+    public void typical_usage_literal() { }
+
+    /**
+     * Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+     * Example:  <pre>{@literal
+     *   line 0 @Override
+     *   line 1 <T> void m(T t) {
+     *   line 2     // do something with T
+     *   line 3 } }</pre>
+     * and so it goes.
+     */
+    public void recommended_usage_literal() { }
+
+    /**
+     * abc {@code
+     */
+    public void bad_code_no_content() { }
+
+    /**
+     * abc {@code abc
+     */
+    public void bad_code_content() { }
+
+    /**
+     * Test for html in pre, note the spaces
+     * <PRE>
+     * <b   >id           </b   >
+     * </PRE>
+     */
+    public void htmlAttrInPre() {}
+
+    /**
+     * More html tag outliers.
+     * <pre>
+     * {@literal @}Override
+     * <code> some.function() </code>
+     * </pre>
+     *
+     *
+     */
+    public void htmlAttrInPre1() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/TestMemberInheritence.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4638588 4635809 6256068 6270645 8025633 8026567
+ * @summary Test to make sure that members are inherited properly in the Javadoc.
+ *          Verify that inheritence labels are correct.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestMemberInheritence
+ */
+
+public class TestMemberInheritence extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestMemberInheritence tester = new TestMemberInheritence();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg", "diamond", "inheritDist", "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/SubClass.html", true,
+                // Public field should be inherited
+                "<a href=\"../pkg/BaseClass.html#pubField\">",
+                // Public method should be inherited
+                "<a href=\"../pkg/BaseClass.html#pubMethod--\">",
+                // Public inner class should be inherited.
+                "<a href=\"../pkg/BaseClass.pubInnerClass.html\" title=\"class in pkg\">",
+                // Protected field should be inherited
+                "<a href=\"../pkg/BaseClass.html#proField\">",
+                // Protected method should be inherited
+                "<a href=\"../pkg/BaseClass.html#proMethod--\">",
+                // Protected inner class should be inherited.
+                "<a href=\"../pkg/BaseClass.proInnerClass.html\" title=\"class in pkg\">",
+                // New labels as of 1.5.0
+                "Nested classes/interfaces inherited from class&nbsp;pkg."
+                + "<a href=\"../pkg/BaseClass.html\" title=\"class in pkg\">BaseClass</a>",
+                "Nested classes/interfaces inherited from interface&nbsp;pkg."
+                + "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">BaseInterface</a>");
+
+        checkOutput("pkg/BaseClass.html", true,
+                // Test overriding/implementing methods with generic parameters.
+                "<dl>\n"
+                + "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation-java.lang.Class-\">"
+                + "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>"
+                + "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">"
+                + "BaseInterface</a></code></dd>\n"
+                + "</dl>");
+
+        checkOutput("diamond/Z.html", true,
+                // Test diamond inheritence member summary (6256068)
+                "<code><a href=\"../diamond/A.html#aMethod--\">aMethod</a></code>");
+
+        checkOutput("inheritDist/C.html", true,
+                // Test that doc is inherited from closed parent (6270645)
+                "<div class=\"block\">m1-B</div>");
+
+        checkOutput("pkg/SubClass.html", false,
+                "<a href=\"../pkg/BaseClass.html#staticMethod--\">staticMethod</a></code>");
+
+        checkOutput("pkg1/Implementer.html", true,
+                // ensure the method makes it
+                "<td class=\"colFirst\"><code>static java.time.Period</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg1/Implementer.html#between-java.time.LocalDate-java.time.LocalDate-\">"
+                + "between</a></span>(java.time.LocalDate&nbsp;startDateInclusive,\n"
+                + "       java.time.LocalDate&nbsp;endDateExclusive)</code>&nbsp;</td>",
+                // check the inherited from interfaces
+                "<h3>Methods inherited from interface&nbsp;pkg1.<a href=\"../pkg1/Interface.html\""
+                + " title=\"interface in pkg1\">Interface</a></h3>\n"
+                + "<code><a href=\"../pkg1/Interface.html#between-java.time.chrono.ChronoLocalDate"
+                + "-java.time.chrono.ChronoLocalDate-\">between</a></code>"
+        );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/diamond/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 diamond;
+
+//6256068
+public interface A {
+    /**
+     * aDoc.
+     */
+    void aMethod();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/diamond/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 diamond;
+
+public interface B extends A {
+    /**
+     * bDoc.
+     */
+    void bMethod();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/diamond/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 diamond;
+
+public interface C extends B {
+    /**
+     * cDoc.
+     */
+    void cMethod();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/diamond/X.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 diamond;
+
+public interface X extends A {
+    /**
+     * xDoc.
+     */
+    void xMethod();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/diamond/Z.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 diamond;
+
+public interface Z extends X, C {
+    /**
+     * zDoc.
+     */
+    void zMethod();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/inheritDist/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 inheritDist;
+
+//6270645
+public interface A {
+    /**
+     * m1-A
+     */
+    void m1();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/inheritDist/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 inheritDist;
+
+public interface B extends A {
+    /**
+     * m1-B
+     */
+    void m1();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/inheritDist/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 inheritDist;
+
+public class C implements B {
+    public void m1() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/pkg/BaseClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2002, 2004, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+public class BaseClass implements BaseInterface {
+
+  public int pubField = 1;
+
+  public class pubInnerClass{}
+
+  public void pubMethod() {}
+
+  protected int proField = 1;
+
+  protected class proInnerClass{}
+
+  protected void proMethod() {}
+
+  public <B extends Annotation> B getAnnotation(Class<B> annotationClass) {
+      return null;
+  }
+
+  public static void staticMethod(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/pkg/BaseInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+public interface BaseInterface {
+
+    public class NestedClassFromInterface{}
+
+    public <A extends Annotation> A getAnnotation(Class<A> annotationClass);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/pkg/SubClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2002, 2004, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+public class SubClass extends BaseClass {
+
+    public <C extends Annotation> C getAnnotation(Class<C> annotationClass) {
+        return null;
+    }
+
+    public static void staticMethod(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/pkg1/Implementer.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+import java.time.LocalDate;
+import java.time.Period;
+
+public class Implementer implements Interface {
+     public static Period between(LocalDate startDateInclusive, LocalDate endDateExclusive) {
+         return null;
+     }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberInheritence/pkg1/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+import java.time.chrono.ChronoLocalDate;
+import java.time.chrono.ChronoPeriod;
+
+public interface Interface {
+    public static ChronoPeriod between(ChronoLocalDate startDateInclusive, ChronoLocalDate endDateExclusive) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberSummary/TestMemberSummary.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4951228 6290760 8025633 8026567 8081854
+ * @summary  Test the case where the overriden method returns a different
+ *           type than the method in the child class.  Make sure the
+ *           documentation is inherited but the return type isn't.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestMemberSummary
+ */
+
+public class TestMemberSummary extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestMemberSummary tester = new TestMemberSummary();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg","pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/PublicChild.html", true,
+                // Check return type in member summary.
+                "<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../pkg/PublicChild.html#returnTypeTest--\">"
+                + "returnTypeTest</a></span>()</code>",
+                // Check return type in member detail.
+                "<pre>public&nbsp;<a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">"
+                + "PublicChild</a>&nbsp;returnTypeTest()</pre>");
+
+        // Legacy anchor dimensions (6290760)
+        checkOutput("pkg2/A.html", true,
+                "<a name=\"f-java.lang.Object:A-\">\n"
+                + "<!--   -->\n"
+                + "</a><a name=\"f-T:A-\">\n"
+                + "<!--   -->\n"
+                + "</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberSummary/pkg/PrivateParent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+class PrivateParent {
+
+    /**
+     * Test to make sure the member summary inherits documentation
+     * properly.
+     */
+    public PrivateParent returnTypeTest() {
+        return this;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberSummary/pkg/PublicChild.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class PublicChild extends PrivateParent {
+
+    public PublicChild returnTypeTest() {
+        return this;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMemberSummary/pkg2/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 pkg2;
+
+public interface A {
+    void f(Object x);
+    <T> void f(T[] x);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMethodTypes/TestMethodTypes.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8002304 8024096
+ * @summary  Test for various method types in the method summary table
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestMethodTypes
+ */
+
+public class TestMethodTypes extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestMethodTypes tester = new TestMethodTypes();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/A.html", true,
+                "var methods = {",
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All "
+                + "Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:show(1);\">"
+                + "Static Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">"
+                + "Instance Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">"
+                + "Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">"
+                + "Deprecated Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "</caption>",
+                "<tr id=\"i0\" class=\"altColor\">");
+
+        checkOutput("pkg1/B.html", true,
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All "
+                + "Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">"
+                + "Instance Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">"
+                + "Abstract Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "</caption>");
+
+        checkOutput("pkg1/D.html", true,
+                "var methods = {",
+                "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All "
+                + "Methods</span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">"
+                + "Instance Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">"
+                + "Abstract Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">"
+                + "Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">"
+                + "Deprecated Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
+                + "</caption>",
+                "<tr id=\"i0\" class=\"altColor\">");
+
+        checkOutput("pkg1/A.html", false,
+                "<caption><span>Methods</span><span class=\"tabEnd\">&nbsp;</span>"
+                + "</caption>");
+
+        checkOutput("pkg1/B.html", false,
+                "<caption><span>Methods</span><span class=\"tabEnd\">&nbsp;</span>"
+                + "</caption>");
+
+        checkOutput("pkg1/D.html", false,
+                "<caption><span>Methods</span><span class=\"tabEnd\">&nbsp;</span>"
+                + "</caption>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMethodTypes/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * This class has a mixture of different types of methods. The methods summary
+ * table should appear with "All Methods", "Static Methods", "Instance Methods",
+ * "Concrete Methods" and "Deprecated Methods".
+ */
+public class A {
+
+    /**
+     * This is the first concrete instance method.
+     */
+    public void readObject() {
+    }
+
+    /**
+     * This is the second concrete instance method.
+     */
+    public final void setStub() {
+    }
+
+    /**
+     * This is the third concrete instance method.
+     */
+    public String getParameter() {
+         return "test";
+     }
+
+    /**
+     * This is the first concrete instance deprecated method.
+     * @deprecated This is a deprecated method that should appear in the tab.
+     */
+    public void resize() {
+    }
+
+    /**
+     * This is the fourth concrete instance method.
+     */
+    public void showStatus() {
+    }
+
+    /**
+     * This is the first concrete static method.
+     */
+    public final static void staticMethod() {
+    }
+
+    /**
+     * This is the second concrete instance deprecated method.
+     */
+    @Deprecated
+    public void init() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMethodTypes/pkg1/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * This interface has different types of methods such as "Instance Methods" and
+ * "Abstract Methods". All the tabs will display same list of methods.
+ */
+public interface B {
+
+    /**
+     * This is the first abstract instance method.
+     */
+    public void setName();
+
+    /**
+     * This is the second abstract instance method.
+     */
+    public String getName();
+
+    /**
+     * This is the third abstract instance method.
+     */
+    public boolean addEntry();
+
+    /**
+     * This is the fourth abstract instance method.
+     */
+    public boolean removeEntry();
+
+    /**
+     * This is the fifth abstract instance method.
+     */
+    public String getPermissions();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testMethodTypes/pkg1/D.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * This class is marked as deprecated and has a mixture of different types of
+ * methods such as "Instance Methods", "Abstract Methods" and "Concrete
+ * Methods". None of the methods are marked as deprecated but since the class is
+ * deprecated, the methods will also be deprecated and "Deprecated Methods" tab
+ * will also be shown with all the methods.
+ */
+@Deprecated
+public abstract class D {
+
+    /**
+     * This is the first abstract instance method.
+     */
+    public abstract void readObject();
+
+    /**
+     * This is the first concrete instance method.
+     */
+    public final void setStub() {
+    }
+
+    /**
+     * This is the second concrete instance method.
+     */
+    public String getParameter() {
+         return "test";
+     }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testModifierEx/TestModifierEx.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @summary Ensure the modifiers are correct
+ * @library ../lib
+ * @build JavadocTester
+ * @run main TestModifierEx
+ */
+
+public class TestModifierEx extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestModifierEx tester = new TestModifierEx();
+        tester.runTests();
+    }
+
+    @Test
+    void test1(){
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "-package", "pkg1");
+        checkExit(Exit.OK);
+        checkOutput("pkg1/Abstract.html", true,
+                "<pre>public abstract class <span class=\"typeNameLabel\">Abstract</span>");
+        checkOutput("pkg1/Interface.html", true,
+                "<pre>interface <span class=\"typeNameLabel\">Interface</span></pre>");
+        checkOutput("pkg1/Interface.Kind.html", true,
+                "<pre>public static interface <span class=\"typeNameLabel\">Interface.Kind</span></pre>");
+        checkOutput("pkg1/Enum.html", true,
+                "<pre>public enum <span class=\"typeNameLabel\">Enum</span>");
+        checkOutput("pkg1/Klass.StaticEnum.html", true,
+                "<pre>public static enum <span class=\"typeNameLabel\">Klass.StaticEnum</span>");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testModifierEx/pkg1/Abstract.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+public abstract class Abstract {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testModifierEx/pkg1/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+@Documented public @interface AnnotationType {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testModifierEx/pkg1/Enum.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+public enum Enum {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testModifierEx/pkg1/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+interface Interface {
+    public static interface Kind {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testModifierEx/pkg1/Klass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+public class Klass {
+    public static enum StaticEnum {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNavigation/TestNavigation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854
+ * @summary  Make sure the Next/Prev Class links iterate through all types.
+ *           Make sure the navagation is 2 columns, not 3.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestNavigation
+ */
+
+public class TestNavigation extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestNavigation tester = new TestNavigation();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/A.html", true,
+                "<li>Prev&nbsp;Class</li>",
+                "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>");
+
+        checkOutput("pkg/C.html", true,
+                "<a href=\"../pkg/A.html\" title=\"annotation in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
+                "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>");
+
+        checkOutput("pkg/E.html", true,
+                "<a href=\"../pkg/C.html\" title=\"class in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
+                "<a href=\"../pkg/I.html\" title=\"interface in pkg\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a>");
+
+        checkOutput("pkg/I.html", true,
+                "<a href=\"../pkg/E.html\" title=\"enum in pkg\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a>",
+                "<li>Next&nbsp;Class</li>",
+                // Test for 4664607
+                "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+                + "<a name=\"navbar.top.firstrow\">\n"
+                + "<!--   -->\n"
+                + "</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNavigation/pkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Sample Annotation Type.
+ */
+public @interface A {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNavigation/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Sample Class.
+ */
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNavigation/pkg/E.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Sample Enum.
+ */
+public enum E {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNavigation/pkg/I.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Sample Interface.
+ */
+public interface I {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNestedGenerics/TestNestedGenerics.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      6758050 8025633
+ * @summary  Test HTML output for nested generic types.
+ * @author   bpatel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestNestedGenerics
+ */
+
+public class TestNestedGenerics extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestNestedGenerics tester = new TestNestedGenerics();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/NestedGenerics.html", true,
+            "<div class=\"block\">Contains <a " +
+            "href=\"../pkg/NestedGenerics.html#foo-java.util.Map-\"><code>foo" +
+            "(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNestedGenerics/pkg/NestedGenerics.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg;
+
+import java.util.Map;
+
+/** Contains {@link #foo} */
+public class NestedGenerics {
+  public static <A> void foo(Map<A, Map<A, A>> map) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,680 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 8026567
+ * @summary  Run Javadoc on a set of source files that demonstrate new
+ *           language features.  Check the output to ensure that the new
+ *           language features are properly documented.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestNewLanguageFeatures
+ */
+
+public class TestNewLanguageFeatures extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestNewLanguageFeatures tester = new TestNewLanguageFeatures();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                "-use", "-sourcepath",
+                testSrc,
+                "pkg", "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        checkEnums();
+        checkTypeParameters();
+        checkVarArgs();
+        checkAnnotationTypeUsage();
+    }
+
+    //=================================
+    // ENUM TESTING
+    //=================================
+    void checkEnums() {
+       checkOutput("pkg/Coin.html", true,
+                // Make sure enum header is correct.
+                "Enum Coin</h2>",
+                // Make sure enum signature is correct.
+                "<pre>public enum "
+                + "<span class=\"typeNameLabel\">Coin</span>\n"
+                + "extends java.lang.Enum&lt;<a href=\"../pkg/Coin.html\" "
+                + "title=\"enum in pkg\">Coin</a>&gt;</pre>",
+                // Check for enum constant section
+                "<caption><span>Enum Constants"
+                + "</span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                // Detail for enum constant
+                "<span class=\"memberNameLink\"><a href=\"../pkg/Coin.html#Dime\">Dime</a></span>",
+                // Automatically insert documentation for values() and valueOf().
+                "Returns an array containing the constants of this enum type,",
+                "Returns the enum constant of this type with the specified name",
+                "for (Coin c : Coin.values())",
+                "Overloaded valueOf() method has correct documentation.",
+                "Overloaded values method  has correct documentation.",
+                "<pre>public static&nbsp;<a href=\"../pkg/Coin.html\" title=\"enum in pkg\">Coin</a>" +
+                "&nbsp;valueOf(java.lang.String&nbsp;name)</pre>\n" +
+                "<div class=\"block\">Returns the enum constant of this type with the specified name.\n" +
+                "The string must match <i>exactly</i> an identifier used to declare an\n" +
+                "enum constant in this type.  (Extraneous whitespace characters are \n" +
+                "not permitted.)</div>\n" +
+                "<dl>\n" +
+                "<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" +
+                "<dd><code>name</code> - the name of the enum constant to be returned.</dd>\n" +
+                "<dt><span class=\"returnLabel\">Returns:</span></dt>\n" +
+                "<dd>the enum constant with the specified name</dd>\n" +
+                "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n" +
+                "<dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no " +
+                "constant with the specified name</dd>\n" +
+                "<dd><code>java.lang.NullPointerException</code> - if the argument is null</dd>");
+
+        // NO constructor section
+        checkOutput("pkg/Coin.html", false,
+                "<h3>Constructor Summary</h3>");
+    }
+
+    //=================================
+    // TYPE PARAMETER TESTING
+    //=================================
+
+    void checkTypeParameters() {
+        checkOutput("pkg/TypeParameters.html", true,
+                // Make sure the header is correct.
+                "Class TypeParameters&lt;E&gt;</h2>",
+                // Check class type parameters section.
+                "<dt><span class=\"paramLabel\">Type Parameters:</span></dt>\n"
+                + "<dd><code>E</code> - "
+                + "the type parameter for this class.",
+                // Type parameters in @see/@link
+                "<dl>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+                + "<dd>"
+                + "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "<code>TypeParameters</code></a></dd>\n"
+                + "</dl>",
+                // Method that uses class type parameter.
+                "(<a href=\"../pkg/TypeParameters.html\" title=\"type "
+                + "parameter in TypeParameters\">E</a>&nbsp;param)",
+                // Method type parameter section.
+                "<span class=\"paramLabel\">Type Parameters:</span></dt>\n"
+                + "<dd><code>T</code> - This is the first "
+                + "type parameter.</dd>\n"
+                + "<dd><code>V</code> - This is the second type "
+                + "parameter.",
+                // Signature of method with type parameters
+                "public&nbsp;&lt;T extends java.util.List,V&gt;&nbsp;"
+                + "java.lang.String[]&nbsp;methodThatHasTypeParameters",
+                // Method that returns TypeParameters
+                "<td class=\"colFirst\"><code><a href=\"../pkg/TypeParameters.html\" "
+                + "title=\"type parameter in TypeParameters\">E</a>[]</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg/TypeParameters.html#methodThatReturnsTypeParameterA-E:A-\">"
+                + "methodThatReturnsTypeParameterA</a></span>(<a href=\"../pkg/TypeParameters.html\" "
+                + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</code>",
+                "<pre>public&nbsp;<a href=\"../pkg/TypeParameters.html\" "
+                + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;"
+                + "methodThatReturnsTypeParameterA(<a href=\"../pkg/TypeParameters.html\" "
+                + "title=\"type parameter in TypeParameters\">E</a>[]&nbsp;e)</pre>\n",
+                "<td class=\"colFirst\"><code>&lt;T extends java.lang.Object &amp; java.lang.Comparable&lt;? super T&gt;&gt;"
+                + "<br>T</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg/TypeParameters.html#methodtThatReturnsTypeParametersB-java.util.Collection-\">"
+                + "methodtThatReturnsTypeParametersB</a></span>(java.util.Collection&lt;? extends T&gt;&nbsp;coll)</code>\n"
+                + "<div class=\"block\">Returns TypeParameters</div>\n",
+                // Method takes a TypeVariable
+                "<td class=\"colFirst\"><code>&lt;X extends java.lang.Throwable&gt;<br>"
+                + "<a href=\"../pkg/TypeParameters.html\" title=\"type parameter in TypeParameters\">E</a>"
+                + "</code></td>\n"
+                + "<td class=\"colLast\"><code><span class=\"memberNameLink\">"
+                + "<a href=\"../pkg/TypeParameters.html#orElseThrow-java.util.function.Supplier-\">"
+                + "orElseThrow</a></span>(java.util.function.Supplier&lt;? extends X&gt;&nbsp;exceptionSupplier)</code>"
+                );
+
+        checkOutput("pkg/Wildcards.html", true,
+                // Wildcard testing.
+                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "TypeParameters</a>&lt;? super java.lang.String&gt;&nbsp;a",
+                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "TypeParameters</a>&lt;? extends java.lang.StringBuffer&gt;&nbsp;b",
+                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "TypeParameters</a>&nbsp;c");
+
+        checkOutput(Output.OUT, true,
+                // Bad type parameter warnings.
+                "warning - @param argument "
+                + "\"<BadClassTypeParam>\" is not a type parameter name.",
+                "warning - @param argument "
+                + "\"<BadMethodTypeParam>\" is not a type parameter name.");
+
+        // Signature of subclass that has type parameters.
+        checkOutput("pkg/TypeParameterSubClass.html", true,
+                "<pre>public class <span class=\"typeNameLabel\">TypeParameterSubClass&lt;T extends "
+                + "java.lang.String&gt;</span>\n"
+                + "extends "
+                + "<a href=\"../pkg/TypeParameterSuperClass.html\" title=\"class in pkg\">"
+                + "TypeParameterSuperClass</a>&lt;T&gt;</pre>");
+
+        // Interface generic parameter substitution
+        // Signature of subclass that has type parameters.
+        checkOutput("pkg/TypeParameters.html", true,
+                "<dl>\n"
+                + "<dt>All Implemented Interfaces:</dt>\n"
+                + "<dd><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">"
+                + "SubInterface</a>&lt;E&gt;, <a href=\"../pkg/SuperInterface.html\" "
+                + "title=\"interface in pkg\">SuperInterface</a>&lt;E&gt;</dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/SuperInterface.html", true,
+                "<dl>\n"
+                + "<dt>All Known Subinterfaces:</dt>\n"
+                + "<dd><a href=\"../pkg/SubInterface.html\" title=\"interface in pkg\">"
+                + "SubInterface</a>&lt;V&gt;</dd>\n"
+                + "</dl>");
+        checkOutput("pkg/SubInterface.html", true,
+                "<dl>\n"
+                + "<dt>All Superinterfaces:</dt>\n"
+                + "<dd><a href=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">"
+                + "SuperInterface</a>&lt;V&gt;</dd>\n"
+                + "</dl>");
+
+        //==============================================================
+        // Handle multiple bounds.
+        //==============================================================
+        checkOutput("pkg/MultiTypeParameters.html", true,
+                "public&nbsp;&lt;T extends java.lang.Number &amp; java.lang.Runnable&gt;&nbsp;T&nbsp;foo(T&nbsp;t)");
+
+        //==============================================================
+        // Test Class-Use Documentation for Type Parameters.
+        //==============================================================
+        // ClassUseTest1: <T extends Foo & Foo2>
+        checkOutput("pkg2/class-use/Foo.html", true,
+                "<caption><span>Classes in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">"
+                + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" "
+                + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
+                + "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo"
+                + "</a> &amp; <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">"
+                + "Foo2</a>&gt;</span></code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo.html\" title=\"class in "
+                + "pkg2\">Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest1."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/"
+                + "ClassUseTest1.html#method-T-\">method</a></span>"
+                + "(T&nbsp;t)</code>&nbsp;</td>",
+                "<caption><span>Fields in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">"
+                + "Foo</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "td class=\"colFirst\"><code><a href=\"../../pkg2/"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
+                + "&lt;<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\""
+                + ">Foo</a>&gt;</code></td>"
+        );
+
+        checkOutput("pkg2/class-use/ParamTest.html", true,
+                "<caption><span>Fields in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> declared as <a href=\"../"
+                + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest"
+                + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colFirst\"><code><a href=\"../../pkg2/"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;<a "
+                + "href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo</a"
+                + ">&gt;</code></td>"
+        );
+
+        checkOutput("pkg2/class-use/Foo2.html", true,
+                "<caption><span>Classes in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo2.html\" title=\"interface "
+                + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest1.html\" "
+                + "title=\"class in pkg2\">ClassUseTest1</a>&lt;T extends "
+                + "<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">Foo"
+                + "</a> &amp; <a href=\"../../pkg2/Foo2.html\" title=\"interface in pkg2\">"
+                + "Foo2</a>&gt;</span></code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo2.html\" title=\"interface "
+                + "in pkg2\">Foo2</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>",
+                "<td class=\"colLast\"><span class=\"typeNameLabel\">"
+                + "ClassUseTest1.</span><code><span class=\"memberNameLink\"><a href=\"../../"
+                + "pkg2/ClassUseTest1.html#method-T-\">method</a></span>"
+                + "(T&nbsp;t)</code>&nbsp;</td>"
+        );
+
+        // ClassUseTest2: <T extends ParamTest<Foo3>>
+        checkOutput("pkg2/class-use/ParamTest.html", true,
+                "<caption><span>Classes in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class "
+                + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" "
+                + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
+                + "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">"
+                + "ParamTest</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">"
+                + "Foo3</a>&gt;&gt;</span></code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class "
+                + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/"
+                + "ClassUseTest2.html#method-T-\">method</a></span>"
+                + "(T&nbsp;t)</code>&nbsp;</td>",
+                "<caption><span>Fields in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> declared as <a href=\"../"
+                + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest"
+                + "</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colFirst\"><code><a href=\"../../pkg2/"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
+                + "&lt;<a href=\"../../pkg2/Foo.html\" title=\"class in pkg2\">"
+                + "Foo</a>&gt;</code></td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/ParamTest.html\" title=\"class "
+                + "in pkg2\">ParamTest</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
+                + "../pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest"
+                + "</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in "
+                + "pkg2\">Foo3</a>&gt;&gt;<br><a href=\"../../pkg2/"
+                + "ParamTest.html\" title=\"class in pkg2\">ParamTest</a>"
+                + "&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in "
+                + "pkg2\">Foo3</a>&gt;</code></td>"
+        );
+
+        checkOutput("pkg2/class-use/Foo3.html", true,
+                "<caption><span>Classes in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">"
+                + "Foo3</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest2.html\" "
+                + "title=\"class in pkg2\">ClassUseTest2</a>&lt;T extends "
+                + "<a href=\"../../pkg2/ParamTest.html\" title=\"class in pkg2\">"
+                + "ParamTest</a>&lt;<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">"
+                + "Foo3</a>&gt;&gt;</span></code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo3.html\" title=\"class in "
+                + "pkg2\">Foo3</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>",
+                "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest2."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/"
+                + "ClassUseTest2.html#method-T-\">method</a></span>"
+                + "(T&nbsp;t)</code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> that return types with "
+                + "arguments of type <a href=\"../../pkg2/Foo3.html\" title"
+                + "=\"class in pkg2\">Foo3</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../../"
+                + "pkg2/ParamTest.html\" title=\"class in pkg2\">ParamTest</a>&lt;"
+                + "<a href=\"../../pkg2/Foo3.html\" title=\"class in pkg2\">Foo3"
+                + "</a>&gt;&gt;<br><a href=\"../../pkg2/ParamTest.html\" "
+                + "title=\"class in pkg2\">ParamTest</a>&lt;<a href=\"../../pkg2/"
+                + "Foo3.html\" title=\"class in pkg2\">Foo3</a>&gt;</code></td>"
+        );
+
+        // ClassUseTest3: <T extends ParamTest2<List<? extends Foo4>>>
+        checkOutput("pkg2/class-use/ParamTest2.html", true,
+                "<caption><span>Classes in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class "
+                + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" "
+                + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
+                + "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "ParamTest2</a>&lt;java.util.List&lt;? extends "
+                + "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">"
+                + "Foo4</a>&gt;&gt;&gt;</span></code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/ParamTest2.html\" title=\"class "
+                + "in pkg2\">ParamTest2</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3"
+                + ".</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3."
+                + "html#method-T-\">method</a></span>(T&nbsp;t)</code>&nbsp;</td>",
+                "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
+                + "../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
+                + "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
+                + "&gt;&gt;<br><a href=\"../../pkg2/ParamTest2.html\" "
+                + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
+                + "&lt;? extends <a href=\"../../pkg2/Foo4.html\" title=\""
+                + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
+        );
+
+        checkOutput("pkg2/class-use/Foo4.html", true,
+                "<caption><span>Classes in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>",
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3.html\" "
+                + "title=\"class in pkg2\">ClassUseTest3</a>&lt;T extends "
+                + "<a href=\"../../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "ParamTest2</a>&lt;java.util.List&lt;? extends "
+                + "<a href=\"../../pkg2/Foo4.html\" title=\"class in pkg2\">"
+                + "Foo4</a>&gt;&gt;&gt;</span></code>&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type parameters of "
+                + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3."
+                + "html#method-T-\">method</a></span>(T&nbsp;t)</code>"
+                + "&nbsp;</td>",
+                "<caption><span>Methods in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> that return types with "
+                + "arguments of type <a href=\"../../pkg2/Foo4.html\" "
+                + "title=\"class in pkg2\">Foo4</a></span><span class=\""
+                + "tabEnd\">&nbsp;</span></caption>",
+                "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../"
+                + "../pkg2/ParamTest2.html\" title=\"class in pkg2\">"
+                + "ParamTest2</a>&lt;java.util.List&lt;? extends <a href=\".."
+                + "/../pkg2/Foo4.html\" title=\"class in pkg2\">Foo4</a>&gt;"
+                + "&gt;&gt;<br><a href=\"../../pkg2/ParamTest2.html\" "
+                + "title=\"class in pkg2\">ParamTest2</a>&lt;java.util.List"
+                + "&lt;? extends <a href=\"../../pkg2/Foo4.html\" title=\""
+                + "class in pkg2\">Foo4</a>&gt;&gt;</code></td>"
+        );
+
+        // Type parameters in constructor and method args
+        checkOutput("pkg2/class-use/Foo4.html", true,
+                "<caption><span>Method parameters in <a href=\"../../pkg2/"
+                + "package-summary.html\">pkg2</a> with type arguments of "
+                + "type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>\n"
+                + "<tr>\n"
+                + "<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n"
+                + "<th class=\"colLast\" scope=\"col\">Method and Description</th>\n"
+                + "</tr>\n"
+                + "<tbody>\n"
+                + "<tr class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code>void</code></td>\n"
+                + "<td class=\"colLast\"><span class=\"typeNameLabel\">ClassUseTest3."
+                + "</span><code><span class=\"memberNameLink\"><a href=\"../../pkg2/ClassUseTest3."
+                + "html#method-java.util.Set-\">method</a></span>(java."
+                + "util.Set&lt;<a href=\"../../pkg2/Foo4.html\" title=\""
+                + "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code>&nbsp;</td>\n"
+                + "</tr>\n"
+                + "</tbody>",
+                "<caption><span>Constructor parameters in <a href=\"../../"
+                + "pkg2/package-summary.html\">pkg2</a> with type arguments "
+                + "of type <a href=\"../../pkg2/Foo4.html\" title=\"class in "
+                + "pkg2\">Foo4</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>"
+        );
+
+        //=================================
+        // TYPE PARAMETER IN INDEX
+        //=================================
+        checkOutput("index-all.html", true,
+                "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">"
+                + "method(Vector&lt;Object&gt;)</a></span>"
+        );
+
+        // TODO: duplicate of previous case; left in delibarately for now to simplify comparison testing
+        //=================================
+        // TYPE PARAMETER IN INDEX
+        //=================================
+        checkOutput("index-all.html", true,
+                "<span class=\"memberNameLink\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">"
+                + "method(Vector&lt;Object&gt;)</a></span>"
+        );
+
+        // No type parameters in class frame.
+        checkOutput("allclasses-frame.html", false,
+                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "TypeParameters</a>&lt;<a href=\"../pkg/TypeParameters.html\" "
+                + "title=\"type parameter in TypeParameters\">E</a>&gt;"
+        );
+
+    }
+
+    //=================================
+    // VAR ARG TESTING
+    //=================================
+    void checkVarArgs() {
+        checkOutput("pkg/VarArgs.html", true,
+                "(int...&nbsp;i)",
+                "(int[][]...&nbsp;i)",
+                "-int:A...-",
+                "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">"
+                + "TypeParameters</a>...&nbsp;t");
+    }
+
+    //=================================
+    // ANNOTATION TYPE TESTING
+    //=================================
+    void checkAnnotationTypes() {
+        checkOutput("pkg/AnnotationType.html", true,
+                // Make sure the summary links are correct.
+                "<li>Summary:&nbsp;</li>\n"
+                + "<li>Field&nbsp;|&nbsp;</li>\n"
+                + "<li><a href=\"#annotation.type.required.element.summary\">"
+                + "Required</a>&nbsp;|&nbsp;</li>\n"
+                + "<li>"
+                + "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>",
+                // Make sure the detail links are correct.
+                "<li>Detail:&nbsp;</li>\n"
+                + "<li>Field&nbsp;|&nbsp;</li>\n"
+                + "<li><a href=\"#annotation.type.element.detail\">Element</a></li>",
+                // Make sure the heading is correct.
+                "Annotation Type AnnotationType</h2>",
+                // Make sure the signature is correct.
+                "public @interface <span class=\"memberNameLabel\">AnnotationType</span>",
+                // Make sure member summary headings are correct.
+                "<h3>Required Element Summary</h3>",
+                "<h3>Optional Element Summary</h3>",
+                // Make sure element detail heading is correct
+                "Element Detail",
+                // Make sure default annotation type value is printed when necessary.
+                "<dl>\n"
+                + "<dt>Default:</dt>\n"
+                + "<dd>\"unknown\"</dd>\n"
+                + "</dl>");
+    }
+
+    //=================================
+    // ANNOTATION TYPE USAGE TESTING
+    //=================================
+    void checkAnnotationTypeUsage() {
+        checkOutput("pkg/package-summary.html", true,
+                // PACKAGE
+                "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)");
+
+        checkOutput("pkg/AnnotationTypeUsage.html", true,
+                // CLASS
+                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                + "title=\"annotation in pkg\">@AnnotationType</a>("
+                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "=\"Class Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "required</a>=1994)\n"
+                + "public class <span class=\"typeNameLabel\">"
+                + "AnnotationTypeUsage</span>\n"
+                + "extends java.lang.Object</pre>",
+                // FIELD
+                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                + "title=\"annotation in pkg\">@AnnotationType</a>("
+                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "=\"Field Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "required</a>=1994)\n"
+                + "public&nbsp;int field</pre>",
+                // CONSTRUCTOR
+                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                + "title=\"annotation in pkg\">@AnnotationType</a>("
+                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "=\"Constructor Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "required</a>=1994)\n"
+                + "public&nbsp;AnnotationTypeUsage()</pre>",
+                // METHOD
+                "<pre><a href=\"../pkg/AnnotationType.html\" "
+                + "title=\"annotation in pkg\">@AnnotationType</a>("
+                + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>"
+                + "=\"Method Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required--\">"
+                + "required</a>=1994)\n"
+                + "public&nbsp;void&nbsp;method()</pre>",
+                // METHOD PARAMS
+                "<pre>public&nbsp;void&nbsp;methodWithParams("
+                + "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+                + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">"
+                + "optional</a>=\"Parameter Annotation\",<a "
+                + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n"
+                + "                             int&nbsp;documented,\n"
+                + "                             int&nbsp;undocmented)</pre>",
+                // CONSTRUCTOR PARAMS
+                "<pre>public&nbsp;AnnotationTypeUsage(<a "
+                + "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+                + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">"
+                + "optional</a>=\"Constructor Param Annotation\",<a "
+                + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)\n"
+                + "                           int&nbsp;documented,\n"
+                + "                           int&nbsp;undocmented)</pre>");
+
+        //=================================
+        // Annotatation Type Usage
+        //=================================
+        checkOutput("pkg/class-use/AnnotationType.html", true,
+                "<caption><span>Packages with annotations of type <a href=\""
+                + "../../pkg/AnnotationType.html\" title=\"annotation in pkg\">"
+                + "AnnotationType</a></span><span class=\"tabEnd\">&nbsp;"
+                + "</span></caption>",
+                "<caption><span>Classes in <a href=\"../../pkg/"
+                + "package-summary.html\">pkg</a> with annotations of type "
+                + "<a href=\"../../pkg/AnnotationType.html\" title=\""
+                + "annotation in pkg\">AnnotationType</a></span><span class"
+                + "=\"tabEnd\">&nbsp;</span></caption>",
+                "<caption><span>Fields in <a href=\"../../pkg/"
+                + "package-summary.html\">pkg</a> with annotations of type "
+                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Methods in <a href=\"../../pkg/"
+                + "package-summary.html\">pkg</a> with annotations of type "
+                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Method parameters in <a href=\"../../pkg/"
+                + "package-summary.html\">pkg</a> with annotations of type "
+                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Constructors in <a href=\"../../pkg/"
+                + "package-summary.html\">pkg</a> with annotations of type "
+                + "<a href=\"../../pkg/AnnotationType.html\" title=\"annotation "
+                + "in pkg\">AnnotationType</a></span><span class=\"tabEnd\">"
+                + "&nbsp;</span></caption>",
+                "<caption><span>Constructor parameters in <a href=\"../../"
+                + "pkg/package-summary.html\">pkg</a> with annotations of "
+                + "type <a href=\"../../pkg/AnnotationType.html\" title=\""
+                + "annotation in pkg\">AnnotationType</a></span><span class=\""
+                + "tabEnd\">&nbsp;</span></caption>"
+        );
+
+        //==============================================================
+        // ANNOTATION TYPE USAGE TESTING (When @Documented is omitted)
+        //===============================================================
+        checkOutput("pkg/AnnotationTypeUsage.html", false,
+                // CLASS
+                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Class Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                + "public class <span class=\"typeNameLabel\">AnnotationTypeUsage</span></dt><dt>extends java.lang.Object</dt>",
+                // FIELD
+                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Field Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                + "public int <span class=\"memberNameLabel\">field</span>",
+                // CONSTRUCTOR
+                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Constructor Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                + "public <span class=\"typeNameLabel\">AnnotationTypeUsage</span>()",
+                // METHOD
+                "<a href=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</a>(<a href=\"../pkg/AnnotationType.html#optional\">optional</a>=\"Method Annotation\",\n"
+                + "                <a href=\"../pkg/AnnotationType.html#required\">required</a>=1994)\n"
+                + "public void <span class=\"memberNameLabel\">method</span>()");
+
+        //=================================
+        // Make sure annotation types do not
+        // trigger this warning.
+        //=================================
+        checkOutput(Output.OUT, false,
+                "Internal error: package sets don't match: [] with: null");
+
+        //=================================
+        // ANNOTATION TYPE USAGE TESTING (All Different Types).
+        //=================================
+        checkOutput("pkg1/B.html", true,
+                // Integer
+                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,",
+                // Double
+                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,",
+                // Boolean
+                "<a href=\"../pkg1/A.html#b--\">b</a>=true,",
+                // String
+                "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\",",
+                // Class
+                "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,",
+                // Bounded Class
+                "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,",
+                // Enum
+                "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,",
+                // Annotation Type
+                "<a href=\"../pkg1/A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),",
+                // String Array
+                "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},",
+                // Primitive
+                "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,");
+
+        // XXX:  Add array test case after this if fixed:
+        //5020899: Incorrect internal representation of class-valued annotation elements
+        // Make sure that annotations are surrounded by <pre> and </pre>
+        checkOutput("pkg1/B.html", true,
+                "<pre><a href=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</a>",
+                "public interface <span class=\"typeNameLabel\">B</span></pre>");
+
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test annotation type.
+ *
+ * @author Jamie Ho.
+ * @since 1.5
+ */
+@Documented public @interface AnnotationType {
+
+    /**
+     * The copyright holder.
+     */
+    String optional() default "unknown";
+
+   /**
+    * The year of the copyright.
+    */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/AnnotationTypeUndocumented.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is just a test annotation type this is not documented because it
+ * is missing the @Documented tag.
+ *
+ * @author Jamie Ho.
+ * @since 1.5
+ */
+public @interface AnnotationTypeUndocumented {
+
+    /**
+     * The copyright holder.
+     */
+    String optional() default "unknown";
+
+   /**
+    * The year of the copyright.
+    */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/AnnotationTypeUsage.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Demonstrate annotation type usage.
+ */
+
+@AnnotationType(optional="Class Annotation", required=1994)
+@AnnotationTypeUndocumented(optional="Class Annotation", required=1994)
+public class AnnotationTypeUsage {
+
+    @AnnotationType(optional="Field Annotation", required=1994)
+    @AnnotationTypeUndocumented(optional="Field Annotation", required=1994)
+    public int field;
+
+    @AnnotationType(optional="Constructor Annotation", required=1994)
+    @AnnotationTypeUndocumented(optional="Constructor Annotation", required=1994)
+    public AnnotationTypeUsage() {}
+
+    public AnnotationTypeUsage(
+        @AnnotationType(optional="Constructor Param Annotation", required=1994) int documented,
+        @AnnotationTypeUndocumented(optional="Constructor Param Annotation", required=1994) int undocmented) {}
+
+    @AnnotationType(optional="Method Annotation", required=1994)
+    @AnnotationTypeUndocumented(optional="Method Annotation", required=1994)
+    public void method() {}
+
+    public void methodWithParams(
+        @AnnotationType(optional="Parameter Annotation", required=1994) int documented,
+        @AnnotationTypeUndocumented(optional="Parameter Annotation", required=1994) int undocmented) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/Coin.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a sample Enum.
+ *
+ * @author Jamie Ho
+ */
+public enum Coin {
+
+  Penny, Nickel, Dime;
+
+  /**
+   * Overloaded valueOf() method has correct documentation.
+   */
+  public static Coin valueOf(int foo) {
+      return null;
+  }
+
+  /**
+   * Overloaded values method  has correct documentation.
+   */
+  public static final Coin[] values(int foo) {
+      return null;
+  }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/MultiTypeParameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+public class MultiTypeParameters {
+
+    public <T extends Number & Runnable> T foo(T t) {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/SubInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public interface SubInterface<V> extends SuperInterface<V> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/SuperInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public interface SuperInterface<U> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/TypeParameterSubClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class TypeParameterSubClass<T extends String> extends TypeParameterSuperClass<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/TypeParameterSuperClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class TypeParameterSuperClass<E extends String> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/TypeParameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+import java.util.function.Supplier;
+
+/**
+ * Just a sample class with type parameters.  This is a link to myself:
+ * {@link TypeParameters}
+ *
+ * @param <E> the type parameter for this class.
+ * @param <BadClassTypeParam> this should cause a warning.
+ * @see TypeParameters
+ */
+
+public class TypeParameters<E> implements SubInterface<E> {
+
+    /**
+     * This method uses the type parameter of this class.
+     * @param param an object that is of type E.
+     * @return the parameter itself.
+     */
+    public E methodThatUsesTypeParameter(E param) {
+        return param;
+    }
+
+    /**
+     * This method has type parameters.  The list of type parameters is long
+     * so there should be a line break in the member summary table.
+     *
+     * @param <T> This is the first type parameter.
+     * @param <V> This is the second type parameter.
+     * @param <BadMethodTypeParam> this should cause a warning.
+     * @param param1 just a parameter.
+     * @param param2 just another parameter.
+     *
+     */
+    public <T extends List, V> String[] methodThatHasTypeParameters(T param1,
+        V param2) { return null;}
+
+    /**
+     * This method has type parameters.  The list of type parameters is short
+     * so there should not be a line break in the member summary table.
+     * @author Owner
+     *
+     * @param <A> This is the first type parameter.
+     */
+    public <A> void methodThatHasTypeParmaters(A... a) {}
+
+    /**
+     * This method returns a TypeParameter array and takes in a TypeParameter array
+     * @param e an array of TypeParameters
+     * @return an array of TypeParameters
+     */
+    public E[] methodThatReturnsTypeParameterA(E[] e) { return null;}
+
+    /**
+     * Returns TypeParameters
+     * @param <T> a typeParameters
+     * @param coll a collection
+     * @return typeParameters
+     */
+    public <T extends Object & Comparable<? super T>> T
+        methodtThatReturnsTypeParametersB(Collection<? extends T> coll) {
+        return null;
+    }
+
+    /**
+     * Return the contained value, if present, otherwise throw an exception
+     * to be created by the provided supplier.
+     *
+     * @param <X> Type of the exception to be thrown
+     * @param exceptionSupplier The supplier which will return the exception to
+     * be thrown
+     * @return the present value
+     * @throws X if there is no value present
+     * @throws NullPointerException if no value is present and
+     * {@code exceptionSupplier} is null
+     */
+    public <X extends Throwable> E orElseThrow(Supplier<? extends X> exceptionSupplier) throws X {
+        return null;
+    }}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/VarArgs.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Test var args.
+ */
+public class VarArgs {
+
+    /**
+     * @param i a param with var args.
+     */
+    public void methodWithVarArgs(int... i) {}
+
+    /**
+     * @param i a regular parameter.
+     * @param t a param with var args.
+     */
+    public void methodWithParamAndVarArgs(int i, TypeParameters... t) {}
+
+    /**
+     * @param i a param with var args.
+     */
+    public void singleArrayVarArg(int[]... i) {}
+
+    /**
+     * @param i a param with var args.
+     */
+    public void doubleArrayVarArgs(int[][]... i) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/Wildcards.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Wild card testing.
+ */
+public class Wildcards {
+
+    /**
+     * Sample method with wildcards.
+     * @param a this is the first param.
+     * @param b this is the second param.
+     * @param c this is the third param.
+     */
+    public void methodWithWildCardParam(TypeParameters<? super String> a,
+        TypeParameters<? extends StringBuffer> b, TypeParameters c) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+@AnnotationType(optional="Package Annotation", required=1994)
+package pkg;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+import pkg.Coin;
+import pkg.*;
+import java.lang.annotation.*;
+
+@Documented public @interface A {
+    int i();
+    double d();
+    boolean b();
+    String s();
+    Class c();
+    Class<? extends TypeParameterSuperClass> w();
+    Coin[] e();
+    AnnotationType a();
+    String[] sa();
+    Class primitiveClassTest();
+    Class arrayClassTest();
+    Class arrayPrimitiveTest();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg1/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+import pkg.*;
+import pkg2.*;
+
+@A(i = 1+1,
+   d = 3.14,
+   b = true,
+   s = "sigh",
+   c = Foo.class,
+   w = TypeParameterSubClass.class,
+   e = Coin.Penny,
+   a = @AnnotationType(optional="foo",required=1994),
+   sa = {"up", "down"},
+   primitiveClassTest = boolean.class,
+   arrayClassTest = String[].class,
+   arrayPrimitiveTest = boolean[].class)
+public interface B {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/ClassUseTest1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public class ClassUseTest1 <T extends Foo & Foo2> {
+
+    public ParamTest<Foo> field;
+
+    public <T extends Foo & Foo2> T method(T t) {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/ClassUseTest2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+import pkg.*;
+
+public class ClassUseTest2 <T extends ParamTest<Foo3>> {
+
+    public <T extends ParamTest<Foo3>> ParamTest<Foo3> method (T t) {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/ClassUseTest3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+import pkg.*;
+import java.util.*;
+
+public class ClassUseTest3 <T extends ParamTest2<List<? extends Foo4>>> {
+
+    public ClassUseTest3(Set<Foo4> p) {}
+
+    public <T extends ParamTest2<List<? extends Foo4>>> ParamTest2<List<? extends Foo4>> method(T t) {
+        return null;
+    }
+
+    public void method(Set<Foo4> p) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg2;
+
+import java.util.*;
+
+public class Foo {
+
+    public void method(Vector<Object> o){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/Foo2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public interface Foo2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/Foo3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public class Foo3 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/Foo4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public class Foo4 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/ParamTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public class ParamTest<E> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNewLanguageFeatures/pkg2/ParamTest2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public class ParamTest2<E> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNoPackagesFile/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNoPackagesFile/TestNoPackagesFile.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4475679
+ * @summary  Verify that packages.html is no longer generated since it is no
+ *           longer used.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestNoPackagesFile
+ */
+
+public class TestNoPackagesFile extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestNoPackagesFile tester = new TestNoPackagesFile();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        // packages.html file should not be generated anymore.
+        checkFiles(false, "packages.html");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNotifications/TestNotifications.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,71 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4657239 4775743
+ * @summary  Make sure a notification is printed when an output directory must
+ *           be created.
+ *           Make sure classname is not include in javadoc usage message.
+ * @author   jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestNotifications
+ */
+
+public class TestNotifications extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestNotifications tester = new TestNotifications();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        String outDir = "out";
+
+        // Notify that the destination directory must be created.
+        javadoc("-d", outDir, "-sourcepath", testSrc, "pkg");
+        checkExit(Exit.OK);
+        checkOutput(Output.OUT, true,
+                "Creating destination directory: \"" + outDir);
+
+        // No need to notify that the destination must be created because
+        // it already exists.
+        setOutputDirectoryCheck(DirectoryCheck.NONE);
+        javadoc("-d", outDir, "-sourcepath", testSrc, "pkg");
+        checkExit(Exit.OK);
+        checkOutput(Output.OUT, false,
+                "Creating destination directory: \"" + outDir);
+    }
+
+    @Test
+    void test() {
+        //Make sure classname is not include in javadoc usage message.
+        setOutputDirectoryCheck(DirectoryCheck.NO_HTML_FILES);
+        javadoc("-help");
+        checkOutput(Output.OUT, false,
+                "[classnames]");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testNotifications/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOptions/TestOptions.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4749567
+ * @summary  Test the output for -header and -footer options.
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestOptions
+ */
+
+public class TestOptions extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestOptions tester = new TestOptions();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-header", "Test header",
+                "-footer", "Test footer",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/package-summary.html", true,
+                "<div class=\"aboutLanguage\">Test header</div>",
+                "<div class=\"aboutLanguage\">Test footer</div>");
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOptions/pkg/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+public class Foo {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/**
+ * Class in an unnamed package.
+ */
+
+public class C {
+    /**
+     * A ctor
+     * @param c a param
+     */
+    public C(UsedInC c){}
+
+    /**
+     * another ctor
+     * @param c  a param
+     * @param s  a param
+     */
+    public C(UsedInC c, String s) {}
+
+    /**
+     * yet another ctor
+     * @param c  a param
+     * @param i  a param
+     */
+    public C(UsedInC c, int i) {}
+
+    /**
+     * Field in C.
+     */
+    public UsedInC fieldInC;
+
+    /**
+     * Method in C.
+     * @param p  a param
+     * @return UsedInC
+     */
+    public UsedInC methodInC(UsedInC p) { return p;}
+
+    /**
+     * A static method
+     * @param s  a param
+     * @return UsedInC
+     */
+    public static UsedInC ymethod(String s) {return null;}
+
+    /**
+     * Another static method variant
+     * @param value  a param
+     * @return UsedInC
+     */
+    public static UsedInC ymethod(int value) {return -1;}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/TestOrdering.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,489 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8039410 8042601 8042829 8049393 8050031
+ * @summary test to determine if members are ordered correctly
+ * @author ksrini
+ * @library ../lib/
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestOrdering
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+
+import static java.nio.file.StandardOpenOption.*;
+
+public class TestOrdering extends JavadocTester {
+
+    public static void main(String[] args) throws Exception {
+        TestOrdering tester = new TestOrdering();
+        tester.runTests();
+    }
+
+    @Test
+    void testUnnamedPackagesForClassUse() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-use",
+                testSrc("C.java"), testSrc("UsedInC.java"));
+        checkExit(Exit.OK);
+        checkExecutableMemberOrdering("class-use/UsedInC.html");
+    }
+
+    @Test
+    void testNamedPackagesForClassUse() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg1");
+        checkExit(Exit.OK);
+        checkClassUseOrdering("pkg1/class-use/UsedClass.html");
+        checkOrder("pkg1/class-use/UsedClass.html", expectedClassUseMethodOrdering);
+        checkOrder("pkg1/class-use/UsedClass.html", expectedClassUseWithTypeParams);
+        checkOrder("pkg1/class-use/UsedClass.html", expectedInnerClassContructors);
+        checkOrder("pkg1/ImplementsOrdering.html", expectedImplementsOrdering);
+        checkOrder("pkg1/OverrideOrdering.html", expectedOverrideOrdering);
+    }
+
+    enum ListOrder { NONE, REVERSE, SHUFFLE };
+    /*
+     * By default we do not shuffle the input list, in order to keep the list deterministic,
+     * and the test predictable. However, we can turn on the stress mode, by setting the following
+     * property if required.
+     */
+    static final ListOrder STRESS_MODE = Boolean.getBoolean("TestOrder.STRESS")
+            ? ListOrder.SHUFFLE
+            : ListOrder.REVERSE;
+
+    /*
+     * Controls the number of sibling packages,  pkg0, pkg1, pkg2, .....
+     */
+    static final int MAX_PACKAGES = 4;
+
+    /*
+     * Controls the number of children packages, pkg0, pkg0.pkg, pkg0.pkg.pkg, .....
+     * Note: having too long a depth (> 256 chars on Windows), will likely lead to
+     * cause problems with automated build and test systems.
+     */
+    static final int MAX_SUBPACKAGES_DEPTH = 4;
+    @Test
+    void testIndexOrdering() throws IOException {
+        final String clsname = "Add";
+        List<String> cmdArgs = new ArrayList();
+        cmdArgs.add("-d");
+        cmdArgs.add("out-2");
+        cmdArgs.add("-sourcepath");
+        cmdArgs.add("src");
+        cmdArgs.add("-package");
+        System.out.println("STRESS_MODE: " + STRESS_MODE);
+        emitFile(null, clsname, STRESS_MODE);
+        for (int width = 0 ; width < MAX_PACKAGES ; width++) {
+            String wpkgname = "add" + width;
+            String dpkgname = wpkgname;
+            emitFile(wpkgname, clsname, ListOrder.NONE); // list as-is
+            cmdArgs.add(wpkgname);
+            for (int depth = 1 ; depth < MAX_SUBPACKAGES_DEPTH ; depth++) {
+                dpkgname = dpkgname + ".add";
+                emitFile(dpkgname, clsname, STRESS_MODE);
+                cmdArgs.add(dpkgname);
+            }
+        }
+        File srcDir = new File(new File("."), "src");
+        cmdArgs.add(new File(srcDir, clsname + ".java").getPath());
+        javadoc(cmdArgs.toArray(new String[cmdArgs.size()]));
+        checkExit(Exit.OK);
+        checkOrder("index-all.html", composeTestVectors());
+        checkOrder("add0/add/package-tree.html", expectedPackageTreeOrdering);
+        checkOrder("overview-tree.html", expectedOverviewOrdering);
+        checkOrder("overview-frame.html", expectedOverviewFrameOrdering);
+    }
+
+    @Test
+    void testIndexTypeClustering() {
+        javadoc("-d", "out-3",
+                "-sourcepath", testSrc("src-2"),
+                "-use",
+                "a",
+                "b",
+                "e",
+                "something");
+        checkOrder("index-all.html", typeTestVectors);
+        checkExit(Exit.OK);
+    }
+
+    @Test
+    void testMethodDetailOrdering() {
+        javadoc("-d", "out-4",
+                "-sourcepath", testSrc(new File(".").getPath()),
+                "order"
+        );
+        checkOrder("order/MethodOrder.html", methodSourceOrderVectors);
+        checkExit(Exit.OK);
+    }
+
+    String[] methodSourceOrderVectors = {
+        "<pre>public&nbsp;void&nbsp;d()</pre>\n" +
+        "<div class=\"block\">Method d.\n" +
+        " Second line.</div>",
+        "<pre>public&nbsp;void&nbsp;b()</pre>\n" +
+        "<div class=\"block\">Method b.\n" +
+        " Second line.</div>",
+        "<pre>public&nbsp;void&nbsp;c()</pre>\n" +
+        "<div class=\"block\">Method c.\n" +
+        " Second line.</div>",
+        "<pre>public&nbsp;void&nbsp;a()</pre>\n" +
+        "<div class=\"block\">Method a.\n" +
+        " Second line.</div>"
+    };
+
+    String[] typeTestVectors = {
+        "something</a> - package something</dt>",
+        "something</span></a> - Class in",
+        "something</span></a> - Enum in",
+        "something</span></a> - Interface in",
+        "something</span></a> - Annotation Type in",
+        "something</a></span> - Variable in class",
+        "something()</a></span> - Constructor",
+        "something()</a></span> - Method in class a.<a href=\"a/A.html\"",
+        "something()</a></span> - Method in class a.<a href=\"a/something.html\"",
+        "something()</a></span> - Method in class something.<a href=\"something/J.html\""
+    };
+    String[] composeTestVectors() {
+        List<String> testList = new ArrayList<>();
+        for (String x : expectedEnumOrdering) {
+            testList.add(x.replace("REPLACE_ME", "&lt;Unnamed&gt;"));
+            for (int i = 0; i < MAX_PACKAGES; i++) {
+                String wpkg = "add" + i;
+                testList.add(wpkg + "/" + x.replace("REPLACE_ME", wpkg));
+                String dpkg = wpkg;
+                for (int j = 1; j < MAX_SUBPACKAGES_DEPTH; j++) {
+                    dpkg = dpkg + "/" + "add";
+                    testList.add(dpkg + "/" + x.replace("REPLACE_ME", pathToPackage(dpkg)));
+                }
+            }
+        }
+
+        testList.addAll(Arrays.asList(expectedFieldOrdering));
+
+        for (String x : expectedMethodOrdering) {
+            testList.add(x);
+            for (int i = 0; i < MAX_PACKAGES; i++) {
+                String wpkg = "add" + i;
+                testList.add(wpkg + "/" + x);
+                String dpkg = wpkg;
+                for (int j = 1; j < MAX_SUBPACKAGES_DEPTH; j++) {
+                    dpkg = dpkg + "/" + "add";
+                    testList.add(dpkg + "/" + x);
+                }
+            }
+        }
+        return testList.toArray(new String[testList.size()]);
+    }
+    void checkExecutableMemberOrdering(String usePage) {
+        String contents = readFile(usePage);
+        // check constructors
+        checking("constructors");
+        int idx1 = contents.indexOf("C.html#C-UsedInC");
+        int idx2 = contents.indexOf("C.html#C-UsedInC-int");
+        int idx3 = contents.indexOf("C.html#C-UsedInC-java.lang.String");
+        if (idx1 == -1 || idx2 == -1 || idx3 == -1) {
+            failed("ctor strings not found");
+        } else if (idx1 > idx2 || idx2 > idx3 || idx1 > idx3) {
+            failed("ctor strings are out of order");
+        } else
+            passed("ctor strings are in order");
+
+        // check methods
+        checking("methods");
+        idx1 = contents.indexOf("C.html#ymethod-int");
+        idx2 = contents.indexOf("C.html#ymethod-java.lang.String");
+        if (idx1 == -1 || idx2 == -1) {
+            failed("#ymethod strings not found");
+        } else if (idx1 > idx2) {
+            failed("#ymethod strings are out of order");
+        } else
+            passed("Executable Member Ordering: OK");
+    }
+
+    void checkClassUseOrdering(String usePage) {
+        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#zfield");
+        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#fieldInC#ITERATION#");
+        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#zmethod-pkg1.UsedClass");
+        checkClassUseOrdering(usePage, "pkg1/C#ITERATION#.html#methodInC#ITERATION#");
+    }
+
+    void checkClassUseOrdering(String usePage, String searchString) {
+        String contents = readFile(usePage);
+        int lastidx = 0;
+        System.out.println("testing for " + searchString);
+        for (int i = 1; i < 5; i++) {
+            String s = searchString.replaceAll("#ITERATION#", Integer.toString(i));
+            checking(s);
+            int idx = contents.indexOf(s);
+            if (idx < lastidx) {
+                failed(s + ", member ordering error, last:" + lastidx + ", got:" + idx);
+            } else {
+                passed("\tlast: " + lastidx + " got:" + idx);
+            }
+            lastidx = idx;
+        }
+    }
+
+    static String[] contents = {
+        "public add ADDADD;",
+        "public add AddAdd;",
+        "public add addadd;",
+        "public enum add {add, ADD, addd, ADDD};",
+        "public enum ADD {ADD, add, addd, ADDD};",
+        "public void   add(){}",
+        "public void   add(double d){}",
+        "public void   add(int i, float f){}",
+        "public void   add(float f, int i){}",
+        "public void   add(double d, byte b){}",
+        "public Double add(Double d) {return (double) 22/7;}",
+        "public double add(double d1, double d2) {return d1 + d2;}",
+        "public double add(double d1, Double  d2) {return d1 + d2;}",
+        "public Float  add(float f) {return (float) 22/7;}",
+        "public void   add(int i){}",
+        "public int    add(Integer i) {return 0;}"
+    };
+
+    void emitFile(String pkgname, String clsname, ListOrder order) throws IOException {
+        File srcDir = new File("src");
+        File outDir = pkgname == null
+            ? srcDir
+            : new File(srcDir, pkgname.replace(".", File.separator));
+        File outFile = new File(outDir, clsname + ".java");
+        outDir.mkdirs();
+        List<String> scratch = new ArrayList<>(Arrays.asList(contents));
+        switch (order) {
+            case SHUFFLE:
+                Collections.shuffle(scratch);
+                break;
+            case REVERSE:
+                Collections.reverse(scratch);
+                break;
+            default:
+                // leave list as-is
+        }
+        // insert the header
+        scratch.add(0, "public class " + clsname + " {");
+        if (pkgname != null) {
+            scratch.add(0, "package " + pkgname + ";");
+        }
+        // append the footer
+        scratch.add("}");
+        Files.write(outFile.toPath(), scratch, CREATE, TRUNCATE_EXISTING);
+    }
+
+    String pathToPackage(String in) {
+        return in.replace("/", ".");
+    }
+
+    final String expectedInnerClassContructors[] = {
+        "../../pkg1/A.html#A-pkg1.UsedClass-",
+        "../../pkg1/B.A.html#A-pkg1.UsedClass-",
+        "../../pkg1/B.html#B-pkg1.UsedClass-",
+        "../../pkg1/A.C.html#C-pkg1.UsedClass-java.lang.Object:A-",
+        "../../pkg1/A.C.html#C-pkg1.UsedClass-java.util.Collection-",
+        "../../pkg1/A.C.html#C-pkg1.UsedClass-java.util.List-"
+    };
+
+    final String expectedClassUseMethodOrdering[] = {
+        "../../pkg1/MethodOrder.html#m--",
+        "../../pkg1/MethodOrder.html#m-byte:A-",
+        "../../pkg1/MethodOrder.html#m-double-",
+        "../../pkg1/MethodOrder.html#m-double-double-",
+        "../../pkg1/MethodOrder.html#m-double-java.lang.Double-",
+        "../../pkg1/MethodOrder.html#m-int-",
+        "../../pkg1/MethodOrder.html#m-int-int-",
+        "../../pkg1/MethodOrder.html#m-int-java.lang.Integer-",
+        "../../pkg1/MethodOrder.html#m-long-",
+        "../../pkg1/MethodOrder.html#m-long-long-",
+        "../../pkg1/MethodOrder.html#m-long-java.lang.Long-",
+        "../../pkg1/MethodOrder.html#m-long-java.lang.Long...-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Double-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Double-double-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Double-java.lang.Double-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Integer-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Integer-int-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Integer-java.lang.Integer-",
+        "../../pkg1/MethodOrder.html#m-java.lang.Object:A-",
+        "../../pkg1/MethodOrder.html#m-java.util.ArrayList-",
+        "../../pkg1/MethodOrder.html#m-java.util.Collection-",
+        "../../pkg1/MethodOrder.html#m-java.util.List-"
+    };
+    final String expectedClassUseWithTypeParams[] = {
+        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-",
+        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass-",
+        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-pkg1.UsedClass:A-",
+        "../../pkg1/MethodOrder.html#tpm-pkg1.UsedClass-java.lang.String-"
+    };
+    final String expectedMethodOrdering[] = {
+        "Add.html#add--",
+        "Add.html#add-double-",
+        "Add.html#add-double-byte-",
+        "Add.html#add-double-double-",
+        "Add.html#add-double-java.lang.Double-",
+        "Add.html#add-float-",
+        "Add.html#add-float-int-",
+        "Add.html#add-int-",
+        "Add.html#add-int-float-",
+        "Add.html#add-java.lang.Double-",
+        "Add.html#add-java.lang.Integer-"
+    };
+    final String expectedEnumOrdering[] = {
+        "Add.add.html\" title=\"enum in REPLACE_ME\"",
+        "Add.ADD.html\" title=\"enum in REPLACE_ME\""
+    };
+    final String expectedFieldOrdering[] = {
+        "Add.html#addadd\"",
+        "add0/add/add/add/Add.html#addadd\"",
+        "add0/add/add/Add.html#addadd\"",
+        "add0/add/Add.html#addadd\"",
+        "add0/Add.html#addadd\"",
+        "add1/add/add/add/Add.html#addadd\"",
+        "add1/add/add/Add.html#addadd\"",
+        "add1/add/Add.html#addadd\"",
+        "add1/Add.html#addadd\"",
+        "add2/add/add/add/Add.html#addadd\"",
+        "add2/add/add/Add.html#addadd\"",
+        "add2/add/Add.html#addadd\"",
+        "add2/Add.html#addadd\"",
+        "add3/add/add/add/Add.html#addadd\"",
+        "add3/add/add/Add.html#addadd\"",
+        "add3/add/Add.html#addadd\"",
+        "add3/Add.html#addadd\"",
+        "Add.html#AddAdd\"",
+        "add0/add/add/add/Add.html#AddAdd\"",
+        "add0/add/add/Add.html#AddAdd\"",
+        "add0/add/Add.html#AddAdd\"",
+        "add0/Add.html#AddAdd\"",
+        "add1/add/add/add/Add.html#AddAdd\"",
+        "add1/add/add/Add.html#AddAdd\"",
+        "add1/add/Add.html#AddAdd\"",
+        "add1/Add.html#AddAdd\"",
+        "add2/add/add/add/Add.html#AddAdd\"",
+        "add2/add/add/Add.html#AddAdd\"",
+        "add2/add/Add.html#AddAdd\"",
+        "add2/Add.html#AddAdd\"",
+        "add3/add/add/add/Add.html#AddAdd\"",
+        "add3/add/add/Add.html#AddAdd\"",
+        "add3/add/Add.html#AddAdd\"",
+        "add3/Add.html#AddAdd\"",
+        "Add.html#ADDADD\"",
+        "add0/add/add/add/Add.html#ADDADD\"",
+        "add0/add/add/Add.html#ADDADD\"",
+        "add0/add/Add.html#ADDADD\"",
+        "add0/Add.html#ADDADD\"",
+        "add1/add/add/add/Add.html#ADDADD\"",
+        "add1/add/add/Add.html#ADDADD\"",
+        "add1/add/Add.html#ADDADD\"",
+        "add1/Add.html#ADDADD\"",
+        "add2/add/add/add/Add.html#ADDADD\"",
+        "add2/add/add/Add.html#ADDADD\"",
+        "add2/add/Add.html#ADDADD\"",
+        "add2/Add.html#ADDADD\"",
+        "add3/add/add/add/Add.html#ADDADD\"",
+        "add3/add/add/Add.html#ADDADD\"",
+        "add3/add/Add.html#ADDADD\"",
+        "add3/Add.html#ADDADD\""
+    };
+    final String expectedPackageTreeOrdering[] = {
+        "<a href=\"../../add0/add/Add.add.html\" title=\"enum in add0.add\">",
+        "<a href=\"../../add0/add/Add.ADD.html\" title=\"enum in add0.add\">"
+    };
+    final String expectedOverviewOrdering[] = {
+        "<a href=\"Add.add.html\" title=\"enum in &lt;Unnamed&gt;\">",
+        "<a href=\"add0/Add.add.html\" title=\"enum in add0\">",
+        "<a href=\"add0/add/Add.add.html\" title=\"enum in add0.add\">",
+        "<a href=\"add0/add/add/Add.add.html\" title=\"enum in add0.add.add\">",
+        "<a href=\"add0/add/add/add/Add.add.html\" title=\"enum in add0.add.add.add\">",
+        "<a href=\"add1/Add.add.html\" title=\"enum in add1\">",
+        "<a href=\"add1/add/Add.add.html\" title=\"enum in add1.add\">",
+        "<a href=\"add1/add/add/Add.add.html\" title=\"enum in add1.add.add\">",
+        "<a href=\"add1/add/add/add/Add.add.html\" title=\"enum in add1.add.add.add\">",
+        "<a href=\"add2/Add.add.html\" title=\"enum in add2\">",
+        "<a href=\"add2/add/Add.add.html\" title=\"enum in add2.add\">",
+        "<a href=\"add2/add/add/Add.add.html\" title=\"enum in add2.add.add\">",
+        "<a href=\"add2/add/add/add/Add.add.html\" title=\"enum in add2.add.add.add\">",
+        "<a href=\"add3/Add.add.html\" title=\"enum in add3\">",
+        "<a href=\"add3/add/Add.add.html\" title=\"enum in add3.add\">",
+        "<a href=\"add3/add/add/Add.add.html\" title=\"enum in add3.add.add\">",
+        "<a href=\"add3/add/add/add/Add.add.html\" title=\"enum in add3.add.add.add\">",
+        "<a href=\"Add.ADD.html\" title=\"enum in &lt;Unnamed&gt;\">",
+        "<a href=\"add0/Add.ADD.html\" title=\"enum in add0\">",
+        "<a href=\"add0/add/Add.ADD.html\" title=\"enum in add0.add\">",
+        "<a href=\"add0/add/add/Add.ADD.html\" title=\"enum in add0.add.add\">",
+        "<a href=\"add0/add/add/add/Add.ADD.html\" title=\"enum in add0.add.add.add\">",
+        "<a href=\"add1/Add.ADD.html\" title=\"enum in add1\">",
+        "<a href=\"add1/add/Add.ADD.html\" title=\"enum in add1.add\">",
+        "<a href=\"add1/add/add/Add.ADD.html\" title=\"enum in add1.add.add\">",
+        "<a href=\"add1/add/add/add/Add.ADD.html\" title=\"enum in add1.add.add.add\">",
+        "<a href=\"add2/Add.ADD.html\" title=\"enum in add2\">",
+        "<a href=\"add2/add/Add.ADD.html\" title=\"enum in add2.add\">",
+        "<a href=\"add2/add/add/Add.ADD.html\" title=\"enum in add2.add.add\">",
+        "<a href=\"add2/add/add/add/Add.ADD.html\" title=\"enum in add2.add.add.add\">",
+        "<a href=\"add3/Add.ADD.html\" title=\"enum in add3\">",
+        "<a href=\"add3/add/Add.ADD.html\" title=\"enum in add3.add\">",
+        "<a href=\"add3/add/add/Add.ADD.html\" title=\"enum in add3.add.add\">",
+        "<a href=\"add3/add/add/add/Add.ADD.html\" title=\"enum in add3.add.add.add\">",
+    };
+    final static String expectedOverviewFrameOrdering[] = {
+        "<a href=\"package-frame.html\" target=\"packageFrame\">&lt;unnamed package&gt;</a>",
+        "<a href=\"add0/package-frame.html\" target=\"packageFrame\">add0</a>",
+        "<a href=\"add0/add/package-frame.html\" target=\"packageFrame\">add0.add</a>",
+        "<a href=\"add0/add/add/package-frame.html\" target=\"packageFrame\">add0.add.add</a>",
+        "<a href=\"add0/add/add/add/package-frame.html\" target=\"packageFrame\">add0.add.add.add</a>",
+        "<a href=\"add1/package-frame.html\" target=\"packageFrame\">add1</a>",
+        "<a href=\"add1/add/package-frame.html\" target=\"packageFrame\">add1.add</a>",
+        "<a href=\"add1/add/add/package-frame.html\" target=\"packageFrame\">add1.add.add</a>",
+        "<a href=\"add1/add/add/add/package-frame.html\" target=\"packageFrame\">add1.add.add.add</a>",
+        "<a href=\"add2/package-frame.html\" target=\"packageFrame\">add2</a>",
+        "<a href=\"add2/add/package-frame.html\" target=\"packageFrame\">add2.add</a>",
+        "<a href=\"add2/add/add/package-frame.html\" target=\"packageFrame\">add2.add.add</a>",
+        "<a href=\"add2/add/add/add/package-frame.html\" target=\"packageFrame\">add2.add.add.add</a>",
+        "<a href=\"add3/package-frame.html\" target=\"packageFrame\">add3</a>",
+        "<a href=\"add3/add/package-frame.html\" target=\"packageFrame\">add3.add</a>",
+        "<a href=\"add3/add/add/package-frame.html\" target=\"packageFrame\">add3.add.add</a>",
+        "<a href=\"add3/add/add/add/package-frame.html\" target=\"packageFrame\">add3.add.add.add</a></li>"
+    };
+    final static String expectedImplementsOrdering[] = {
+        "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.lang.AutoCloseable</code></dd>",
+        "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.nio.channels.Channel</code></dd>",
+        "<dd><code>close</code>&nbsp;in interface&nbsp;<code>java.io.Closeable</code></dd>"
+    };
+    final static String expectedOverrideOrdering[] = {
+        "<dd><code>iterator</code>&nbsp;in interface&nbsp;<code>java.util.Collection&lt;",
+        "<dd><code>iterator</code>&nbsp;in interface&nbsp;<code>java.lang.Iterable&lt;"
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/UsedInC.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/**
+ * An empty class
+ */
+public class UsedInC {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/order/MethodOrder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 order;
+
+/**
+ * This class ensures the method detail section contains the methods
+ * in the order as it appears in the source.
+ * @author kumasrin
+ */
+public class MethodOrder {
+    /**
+     * Method d.
+     * Second line.
+     */
+    public void d(){}
+    /**
+     * Method b.
+     * Second line.
+     */
+    public void b() {}
+    /**
+     * Method c.
+     * Second line.
+     */
+    public void c() {}
+    /**
+     * Method a.
+     * Second line.
+     */
+    public void a() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+import java.util.Collection;
+import java.util.List;
+public class A {
+
+    /**
+     * Constructor
+     * @param a class
+     */
+    public A(UsedClass a) {}
+
+    /**
+     * test inner classes
+     */
+    public static class C {
+
+        /**
+         * inner classes constructor
+         * @param u a param
+         * @param array a param
+         */
+        public C(UsedClass u, Object[] array){}
+
+        /**
+         * inner classes constructor
+         * @param u a param
+         * @param collection a param
+         */
+        public C(UsedClass u, Collection collection){}
+
+        /**
+         * inner classes constructor
+         * @param u a param
+         * @param list a param
+         */
+        public C(UsedClass u, List list){}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+public class B {
+
+    /**
+     * constructor
+     * @param a param
+     */
+    public B(UsedClass a) {}
+
+    /**
+     * Inner class
+     */
+    static public class A {
+
+        /**
+         * constructor
+         * @param b param
+         */
+        public A(UsedClass b){}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+/**
+ * C1
+ */
+
+public class C1 {
+
+    /**
+     * Field in C1.
+     */
+    public UsedClass fieldInC1;
+
+    /**
+     * A duplicated field
+     */
+    public UsedClass zfield;
+
+    /**
+     * Method in C1.
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass methodInC1(UsedClass p) {return p;}
+
+    /**
+     * A duplicated method to test ordering
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass zmethod(UsedClass p) {return p;}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+public class C2 {
+
+    /**
+     * Field in C2.
+     */
+    public UsedClass fieldInC2;
+
+    /**
+     * another field
+     */
+    public C1 field = null;
+
+    /**
+     * A duplicated field
+     */
+    public UsedClass zfield;
+
+    /**
+     * Method in C2.
+     * @return C1
+     */
+    public C1 methodInC2() {return null;}
+
+    /**
+     * @param c1 a param
+     */
+    public void method(pkg1.C1 c1) {}
+
+    /**
+     * Method in C2.
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass methodInC2(UsedClass p) {return p;}
+
+    /**
+     * A duplicated method to test ordering
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass zmethod(UsedClass p) {
+        return p;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+public class C3 {
+    /**
+     * Field in C3.
+     */
+    public UsedClass fieldInC3;
+
+    /**
+     * A duplicated field
+     */
+    public UsedClass zfield;
+
+    /**
+     * Method in C3.
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass methodInC3(UsedClass p) {return p;}
+
+    /**
+     * A duplicated method to test ordering
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass zmethod(UsedClass p) {return p;}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+public class C4 {
+    /**
+     * Field in C4.
+     */
+    public UsedClass fieldInC4;
+
+    /**
+     * A duplicated field
+     */
+    public UsedClass zfield;
+
+    /**
+     * Method in C4.
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass methodInC4(UsedClass p) {return p;}
+
+    /**
+     * A duplicated method to test ordering
+     * @param p a param
+     * @return UsedClass
+     */
+    public UsedClass zmethod(UsedClass p) {return p;}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/ImplementsOrdering.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+import java.io.IOException;
+import java.nio.channels.Channel;
+
+public interface ImplementsOrdering extends Channel {
+    /**
+     * This is the end my friend, this is the end.
+     * @throws IOException
+     */
+    @Override
+    void close() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/MethodOrder.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class MethodOrder {
+    /**
+     * method test for ordering parameters
+     * @return UsedClass something
+     */
+    public UsedClass m(){return null;}
+    /**
+     * method test for ordering parameters
+     * @param i a param
+     * @return UsedClass something
+     */
+    public UsedClass m(int i) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(int i1, int i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param array a param
+     * @return something
+     */
+    public UsedClass m(byte[] array) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param in a param
+     * @return something
+     */
+    public UsedClass m(Integer in) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(Integer i1, Integer i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(int i1, Integer i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(Integer i1, int i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param d a param
+     * @return something
+     */
+    public UsedClass m(double d) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(double i1, double i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param in a param
+     * @return something
+     */
+    public UsedClass m(Double in) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(Double i1, Double i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(double i1, Double i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param l1 param
+     * @param xenon param
+     * @return something
+     */
+    public UsedClass m(long l1, Long... xenon) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param l1 param
+     * @return something
+     */
+    public UsedClass m(long l1) {return null;}
+
+    /**
+     *  method test for ordering parameters
+     * @param l1 param
+     * @param l2 param
+     * @return something
+     */
+    public UsedClass m(long l1, Long l2) {return null;}
+
+    /**
+     *  method test for ordering parameters
+     * @param l1 param
+     * @param l2 param
+     * @return something
+     */
+    public UsedClass m(long l1, long l2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param array a param
+     * @return something
+     */
+    public UsedClass m(Object[] array);
+
+    /**
+     * method test for ordering parameters
+     * @param arrayarray two dimensional array
+     * @return something
+     */
+    public UsedClass m(Object[][] arrayarray);
+
+    /**
+     * method test for ordering parameters
+     * @param i1 a param
+     * @param i2 a param
+     * @return something
+     */
+    public UsedClass m(Double i1, double i2) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param collection a param
+     * @return something
+     */
+    public UsedClass m(Collection collection) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param list a param
+     * @return something
+     */
+    public UsedClass m(List list) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param collection a param
+     * @return something
+     */
+    public UsedClass m(ArrayList<UsedClass> collection) {return null;}
+
+    /**
+     * method test for ordering parameters
+     * @param u use a type param
+     */
+    public void tpm(UsedClass<?> u) {}
+
+    /**
+     * method test for ordering parameters
+     * @param u1 use a type param
+     * @param u2 use a type param
+     */
+    public void tpm(UsedClass<?> u1, UsedClass<?> u2) {}
+
+    /**
+     * method test for ordering parameters
+     * @param u use a type param
+     * @param array use a type param and an array
+     */
+    public void tpm(UsedClass<?> u, UsedClass<?>[] array) {}
+
+    /**
+     * method test for ordering parameters
+     * @param u use type param with extends
+     * @param a some string
+     */
+    public void tpm(UsedClass<? extends UsedClass> u, String a) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/OverrideOrdering.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg1;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+
+public abstract class OverrideOrdering<T> implements Collection<T>, Iterable<T> {
+    @Override
+    public Iterator<T> iterator() {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/pkg1/UsedClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+/**
+ * For class-use testing
+ */
+public class UsedClass<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/a/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 a;
+/**
+ * A class
+ */
+public class A {
+   /**
+    * a method
+    */
+   public void something() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/a/something.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 a;
+/**
+ * A class
+ */
+public class something {
+    /**
+     * A constructor
+     */
+    public something() {}
+    /**
+     * a method
+     */
+    public void something() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/b/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 b;
+/**
+ * Another class
+ */
+public class B {
+   /**
+    *  a field
+    */
+   public Object something;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/b/something.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 b;
+/**
+ * an annotation
+ */
+public @interface something{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/e/something.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 e;
+/**
+ * An enum
+ */
+public enum something {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/something/J.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 something;
+public class J {
+   /**
+    * a method
+    */
+  public void something(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/something/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/**
+ * A  package
+ */
+package something;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOrdering/src-2/something/something.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 something;
+/**
+ * An interface
+ */
+public interface something {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/TestMultiInheritence.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4933335
+ * @summary  Make sure that all inherited methods from multiple extended
+ *           interfaces are documented
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestMultiInheritence
+ */
+
+// TODO: should be TestMultiInheritance
+public class TestMultiInheritence extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestMultiInheritence tester = new TestMultiInheritence();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg3");
+        checkExit(Exit.OK);
+
+        // Method foo() is inherited from BOTH I2 and I3
+
+        checkOutput("pkg3/I1.html", true,
+                "Methods inherited from interface&nbsp;pkg3."
+                + "<a href=\"../pkg3/I2.html\" title=\"interface in pkg3\">"
+                + "I2</a>",
+                "Methods inherited from interface&nbsp;pkg3."
+                + "<a href=\"../pkg3/I3.html\" title=\"interface in pkg3\">"
+                + "I3</a>");
+
+        checkOutput("pkg3/I0.html", true,
+                "Methods inherited from interface&nbsp;pkg3."
+                + "<a href=\"../pkg3/I2.html\" title=\"interface in pkg3\">"
+                + "I2</a>",
+                "Methods inherited from interface&nbsp;pkg3."
+                + "<a href=\"../pkg3/I3.html\" title=\"interface in pkg3\">"
+                + "I3</a>");
+
+        // Method foo() is NOT inherited from I4 because it is overriden by I3.
+
+        checkOutput("pkg3/I1.html", false,
+                "Methods inherited from interface&nbsp;pkg3."
+                + "<a href=\"../pkg3/I4.html\" title=\"interface in pkg3\">"
+                + "I4</a>");
+
+        checkOutput("pkg3/I0.html", false,
+                "Methods inherited from interface&nbsp;pkg3."
+                + "<a href=\"../pkg3/I4.html\" title=\"interface in pkg3\">"
+                + "I4</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/TestOverridenMethodDocCopy.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4368820 8025633 8026567
+ * @summary  Inherited comment should link directly to member, not just
+ *           class
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestOverridenMethodDocCopy
+ */
+
+public class TestOverridenMethodDocCopy extends JavadocTester {
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String... args) throws Exception {
+        TestOverridenMethodDocCopy tester = new TestOverridenMethodDocCopy();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/SubClass.html", true,
+                "<span class=\"descfrmTypeLabel\">Description copied from class:&nbsp;<code>"
+                + "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy--\">"
+                + "BaseClass</a></code></span>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/TestOverridenPrivateMethods.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4634891 8026567
+ * @summary Determine if overriden methods are properly documented when
+ * -protected (default) visibility flag is used.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestOverridenPrivateMethods
+ */
+
+public class TestOverridenPrivateMethods extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestOverridenPrivateMethods tester = new TestOverridenPrivateMethods();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        // The public method should be overridden
+        checkOutput("pkg1/SubClass.html", true,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
+
+        // The public method in different package should be overridden
+        checkOutput("pkg2/SubClass.html", true,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
+
+        checkOutput("pkg1/SubClass.html", false,
+                //The package private method should be overridden since the base and sub class are in the same
+                //package.  However, the link should not show up because the package private methods are not documented.
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod",
+                //The private method in should not be overridden
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
+
+        checkOutput("pkg2/SubClass.html", false,
+                //The private method in different package should not be overridden
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod",
+                //The package private method should not be overridden since the base and sub class are in
+                //different packages.
+                "Overrides:</span></dt><dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4634891 8025633 8026567
+ * @summary Determine if overridden methods are properly documented when
+ * -protected (default) visibility flag is used.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestOverridenPrivateMethodsWithPackageFlag
+ */
+
+public class TestOverridenPrivateMethodsWithPackageFlag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestOverridenPrivateMethodsWithPackageFlag tester = new TestOverridenPrivateMethodsWithPackageFlag();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-package",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        // The public method should be overridden
+        checkOutput("pkg1/SubClass.html", true,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">"
+                + "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
+                + "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+
+        // The public method in different package should be overridden
+        checkOutput("pkg2/SubClass.html", true,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">"
+                + "publicMethod</a></code>&nbsp;in class&nbsp;<code>"
+                + "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+
+        // The package private method should be overridden since the base and sub class are in the same
+        // package.
+        checkOutput("pkg1/SubClass.html", true,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">"
+                + "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>"
+                + "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>");
+
+        // The private method in should not be overridden
+        checkOutput("pkg1/SubClass.html", false,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">");
+
+        // The private method in different package should not be overridden
+        checkOutput("pkg2/SubClass.html", false,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod()\">");
+
+        // The package private method should not be overridden since the base and sub class are in
+        // different packages.
+        checkOutput("pkg2/SubClass.html", false,
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4634891 8026567
+ * @summary Determine if overridden methods are properly documented when
+ * -protected (default) visibility flag is used.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestOverridenPrivateMethodsWithPrivateFlag
+ */
+
+public class TestOverridenPrivateMethodsWithPrivateFlag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestOverridenPrivateMethodsWithPrivateFlag tester = new TestOverridenPrivateMethodsWithPrivateFlag();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-private",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        // The public method should be overridden
+        checkOutput("pkg1/SubClass.html", true,
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
+
+        // The package private method should be overridden since the base and sub class are in the same
+        // package.
+        checkOutput("pkg1/SubClass.html", true,
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
+
+        // The public method in different package should be overridden
+        checkOutput("pkg2/SubClass.html", true,
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod");
+
+        // The private method in should not be overridden
+        checkOutput("pkg1/SubClass.html", false,
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
+
+        // The private method in different package should not be overridden
+        checkOutput("pkg2/SubClass.html", false,
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#privateMethod");
+
+        // The package private method should not be overridden since the base and sub class are in
+        // different packages.
+        checkOutput("pkg2/SubClass.html", false,
+         "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg1/BaseClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002, 2003, 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.
+ *
+ * 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 pkg1;
+
+public class BaseClass {
+
+  /*************************************************
+   * A public method that can be overriden.
+   *
+   */
+  public void publicMethod() {}
+
+
+  /*************************************************
+   * A package private method that can only
+   * be overriden by sub classes in the same package.
+   *
+   */
+  void packagePrivateMethod() {}
+
+  /*************************************************
+   * A private that cannot be overriden.
+   *
+   */
+  private void privateMethod() {}
+
+  /**
+   * These comments will be copied to the overriden method.
+   */
+  public void overridenMethodWithDocsToCopy() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg1/SubClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2002, 2003, 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.
+ *
+ * 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 pkg1;
+
+public class SubClass extends BaseClass {
+
+  /*************************************************
+   * This method should override the same public
+   * method in the base class.
+   *
+   */
+  public void publicMethod() {}
+
+
+  /*************************************************
+   * This method should override the same package
+   * private method in the base class because they
+   * are in the same package.
+   */
+  public void packagePrivateMethod() {}
+
+  /*************************************************
+   * This method should not override anything because
+   * the same method in the base class is private.
+   *
+   */
+  public void privateMethod() {}
+
+  public void overridenMethodWithDocsToCopy() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg2/SubClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg2;
+
+import pkg1.*;
+
+public class SubClass extends BaseClass {
+
+  /*************************************************
+   * This method should override the same public
+   * method in the base class.
+   *
+   */
+  public void publicMethod() {}
+
+
+  /*************************************************
+   * This method should not override the same package
+   * private method in the base class because they
+   * are in different packages.
+   */
+  public void packagePrivateMethod() {}
+
+  /*************************************************
+   * This method should not override anything because
+   * the same method in the base class is private.
+   *
+   */
+  public void privateMethod() {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg3/I0.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg3;
+
+public interface I0 extends I2, I3, I4 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg3/I1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg3;
+
+public interface I1 extends I2, I4, I3 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg3/I2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg3;
+
+public interface I2 {
+
+        public void foo();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg3/I3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg3;
+
+public interface I3 extends I4 {
+
+        public void foo();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testOverridenMethods/pkg3/I4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg3;
+
+public interface I4 {
+
+        public void foo();
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Another test class.
+ *
+ * @author Bhavesh Patel
+ */
+public class C2 {
+
+    public static enum ModalExclusionType {
+        /**
+         * Test comment.
+         */
+        NO_EXCLUDE,
+        /**
+         * Another comment.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * A string constant.
+     */
+    public static final String CONSTANT1 = "C2";
+
+    /**
+     * A sample method.
+     *
+     * @param param some parameter.
+     */
+    public void method(String param) {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/FooDepr.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+import java.util.*;
+
+/**
+* Test Deprecated class
+* @deprecated This class is Deprecated.
+*/
+public class FooDepr {
+
+    public void method(Vector<Object> o){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/TestPackageDeprecation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      6492694 8026567 8048351
+ * @summary  Test package deprecation.
+ * @author   bpatel
+ * @library  ../lib/
+ * @modules jdk.javadoc
+ * @build    JavadocTester TestPackageDeprecation
+ * @run main TestPackageDeprecation
+ */
+
+public class TestPackageDeprecation extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestPackageDeprecation tester = new TestPackageDeprecation();
+        tester.runTests();
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg", "pkg1", testSrc("C2.java"), testSrc("FooDepr.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/package-summary.html", true,
+            "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>\n" +
+            "<div class=\"block\"><span class=\"deprecationComment\">This package is Deprecated." +
+            "</span></div>"
+        );
+
+        checkOutput("deprecated-list.html", true,
+            "<li><a href=\"#package\">Deprecated Packages</a></li>"
+        );
+    }
+
+    @Test
+    void testNoDeprecated() {
+        javadoc("-d", "out-nodepr",
+                "-sourcepath", testSrc,
+                "-use",
+                "-nodeprecated",
+                "pkg", "pkg1", testSrc("C2.java"), testSrc("FooDepr.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", false,
+                "pkg1");
+        checkOutput("allclasses-frame.html", false,
+                "FooDepr");
+        checkOutput("class-use/C2.ModalExclusionType.html", true,
+                "<td class=\"colFirst\"><a href=\"#unnamed.package\">&lt;Unnamed&gt;</a></td>");
+
+        checkFiles(false,
+                "pkg1/package-summary.html",
+                "FooDepr.html");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/pkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg;
+
+public class A {
+   /** Test constant. */
+   public static final String DEMO= "y";
+   public static final String THIS_IS_OK= "(x)";
+
+   public String DEMO_STRING = "<Hello World>";
+
+   public A() {
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/pkg1/ClassUseTest1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg1;
+
+public class ClassUseTest1 <T extends Foo & Foo2> {
+
+    public <T extends Foo & Foo2> T method(T t) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/pkg1/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg1;
+
+import java.util.*;
+
+/**
+* Test Deprecated class
+* @deprecated This class is Deprecated.
+*/
+public class Foo {
+
+    public void method(Vector<Object> o){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/pkg1/Foo2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg1;
+
+public interface Foo2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackageDeprecation/pkg1/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Test pkg1 used.
+ * @deprecated This package is Deprecated.
+ */
+package pkg1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackagePage/TestPackagePage.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4492643 4689286
+ * @summary Test that a package page is properly generated when a .java file
+ * passed to Javadoc.  Also test that the proper package links are generated
+ * when single or multiple packages are documented.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestPackagePage
+ */
+
+public class TestPackagePage extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestPackagePage tester = new TestPackagePage();
+        tester.runTests();
+    }
+
+    @Test
+    void testSinglePackage() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                testSrc("com/pkg/C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("com/pkg/package-summary.html", true,
+            "This is a package page.");
+
+        // With just one package, all general pages link to the single package page.
+        checkOutput("com/pkg/C.html", true,
+            "<a href=\"../../com/pkg/package-summary.html\">Package</a>");
+        checkOutput("com/pkg/package-tree.html", true,
+            "<li><a href=\"../../com/pkg/package-summary.html\">Package</a></li>");
+        checkOutput("deprecated-list.html", true,
+            "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>");
+        checkOutput("index-all.html", true,
+            "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>");
+        checkOutput("help-doc.html", true,
+            "<li><a href=\"com/pkg/package-summary.html\">Package</a></li>");
+    }
+
+    private static final String[][] TEST1 = {
+    };
+
+
+    @Test
+    void testMultiplePackages() {
+        javadoc("-d", "out-2",
+                "-sourcepath", testSrc,
+                "com.pkg", "pkg2");
+        checkExit(Exit.OK);
+
+        //With multiple packages, there is no package link in general pages.
+        checkOutput("deprecated-list.html", true,
+            "<li>Package</li>");
+        checkOutput("index-all.html", true,
+            "<li>Package</li>");
+        checkOutput("help-doc.html", true,
+            "<li>Package</li>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackagePage/com/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.pkg;
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackagePage/com/pkg/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<html>
+    <body>
+        This is a package page.
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPackagePage/pkg2/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg2;
+
+/**
+ * Just a dummy class in a dummy package.
+ */
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testParamTaglet/TestParamTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4802275 4967243 8026567
+ * @summary  Make sure param tags are still printed even though they do not
+ *           match up with a real parameters.
+ *           Make sure inheritDoc cannot be used in an invalid param tag.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestParamTaglet
+ */
+
+public class TestParamTaglet extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestParamTaglet tester = new TestParamTaglet();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.FAILED);
+
+        checkOutput("pkg/C.html", true,
+                //Regular param tags.
+                "<span class=\"paramLabel\">Parameters:</span></dt>\n"
+                + "<dd><code>param1</code> - testing 1 2 3.</dd>\n"
+                + "<dd><code>param2</code> - testing 1 2 3.",
+                //Param tags that don't match with any real parameters.
+                "<span class=\"paramLabel\">Parameters:</span></dt>\n"
+                + "<dd><code>p1</code> - testing 1 2 3.</dd>\n"
+                + "<dd><code>p2</code> - testing 1 2 3.",
+                //{@inherit} doc misuse does not cause doclet to throw exception.
+                // Param is printed with nothing inherited.
+                //XXX: in the future when Configuration is available during doc inheritence,
+                //print a warning for this mistake.
+                "<code>inheritBug</code> -");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testParamTaglet/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,41 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+public class C extends Parent {
+
+    /**
+     * @param param1 testing 1 2 3.
+     * @param param2 testing 1 2 3.
+     */
+    public void regularParams(int param1, int param2) {}
+
+    /**
+     * @param p1 testing 1 2 3.
+     * @param p2 testing 1 2 3.
+     * @param inheritBug {@inheritDoc}
+     */
+    public void nonMatchingParams(int param1, int param2) {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testParamTaglet/pkg/Parent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class Parent {
+
+    /**
+     * Just a dummy method that is here for inheritDoc testing purposes.
+     */
+    public void nonMatchingParams(int param1, int param2) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/TestPrivateClasses.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,235 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4780441 4874845 4978816 8014017 8016328 8025633 8026567
+ * @summary  Make sure that when the -private flag is not used, members
+ *           inherited from package private class are documented in the child.
+ *
+ *           Make sure that when a method inherits documentation from a method
+ *           in a non-public class/interface, the non-public class/interface
+ *           is not mentioned anywhere (not even in the signature or tree).
+ *
+ *           Make sure that when a private interface method with generic parameters
+ *           is implemented, the comments can be inherited properly.
+ *
+ *           Make sure when no modifier appear in the class signature, the
+ *           signature is displayed correctly without extra space at the beginning.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestPrivateClasses
+ */
+
+public class TestPrivateClasses extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestPrivateClasses tester = new TestPrivateClasses();
+        tester.runTests();
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                "-sourcepath", testSrc,
+                "pkg", "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/PublicChild.html", true,
+                // Field inheritence from non-public superclass.
+                "<a href=\"../pkg/PublicChild.html#fieldInheritedFromParent\">"
+                + "fieldInheritedFromParent</a>",
+                // Method inheritance from non-public superclass.
+                "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">"
+                + "methodInheritedFromParent</a>",
+                // private class does not show up in tree
+                "<ul class=\"inheritance\">\n"
+                + "<li>java.lang.Object</li>\n"
+                + "<li>\n"
+                + "<ul class=\"inheritance\">\n"
+                + "<li>pkg.PublicChild</li>\n"
+                + "</ul>\n"
+                + "</li>\n"
+                + "</ul>",
+                // Method is documented as though it is declared in the inheriting method.
+                "<pre>public&nbsp;void&nbsp;methodInheritedFromParent(int&nbsp;p1)",
+                "<dl>\n"
+                + "<dt>All Implemented Interfaces:</dt>\n"
+                + "<dd><a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">"
+                + "PublicInterface</a></dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/PublicChild.html", false,
+                // Should not document that a method overrides method from private class.
+                "<span class=\"overrideSpecifyLabel\">Overrides:</span>",
+                // Should not document that a method specified by private interface.
+                "<span class=\"overrideSpecifyLabel\">Specified by:</span>",
+                // Should not mention that any documentation was copied.
+                "Description copied from",
+                // Don't extend private classes or interfaces
+                "PrivateParent",
+                "PrivateInterface");
+
+        checkOutput("pkg/PublicChild.html", false,
+                // Should not document comments from private inherited interfaces
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
+                "<a href=\"../pkg/PublicChild.html#methodInterface-int-\">" +
+                "methodInterface</a></span>(int&nbsp;p1)</code>\n" +
+                "<div class=\"block\">Comment from interface.</div>\n</td>",
+                // and similarly one more
+                "<td class=\"colLast\"><code><span class=\"memberNameLink\">" +
+                "<a href=\"../pkg/PublicChild.html#methodInterface2-int-\">" +
+                "methodInterface2</a></span>(int&nbsp;p1)</code>\n" +
+                "<div class=\"block\">Comment from interface.</div>\n</td>"
+        );
+
+        checkOutput("pkg/PublicInterface.html", true,
+                // Field inheritance from non-public superinterface.
+                "<a href=\"../pkg/PublicInterface.html#fieldInheritedFromInterface\">"
+                + "fieldInheritedFromInterface</a>",
+                // Method inheritance from non-public superinterface.
+                "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">"
+                + "methodInterface</a>",
+                //Make sure implemented interfaces from private superclass are inherited
+                "<dl>\n"
+                + "<dt>All Known Implementing Classes:</dt>\n"
+                + "<dd><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">"
+                + "PublicChild</a></dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/PublicInterface.html", false,
+                "<span class=\"overrideSpecifyLabel\">Specified by:</span>",
+                "Description copied from",
+                "PrivateInterface",
+                "All Superinterfaces");
+
+        checkOutput("pkg2/C.html", false,
+                //Generic interface method test.
+                "This comment should get copied to the implementing class");
+
+        checkOutput("pkg2/C.html", false,
+                //Do not inherit private interface method with generic parameters.
+                //This method has been implemented.
+                "<span class=\"memberNameLink\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>");
+
+        checkOutput("constant-values.html", false,
+                // Make inherited constant are documented correctly.
+                "PrivateInterface");
+    }
+
+    @Test
+    void testPrivate() {
+        javadoc("-d", "out-private",
+                "-sourcepath", testSrc,
+                "-private",
+                "pkg", "pkg2");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/PublicChild.html", true,
+                // Field inheritence from non-public superclass.
+                "Fields inherited from class&nbsp;pkg."
+                + "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "PrivateParent</a>",
+                "<a href=\"../pkg/PrivateParent.html#fieldInheritedFromParent\">"
+                + "fieldInheritedFromParent</a>",
+                // Method inheritence from non-public superclass.
+                "Methods inherited from class&nbsp;pkg."
+                + "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "PrivateParent</a>",
+                "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">"
+                + "methodInheritedFromParent</a>",
+                // Should document that a method overrides method from private class.
+                "<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">"
+                + "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>"
+                + "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "PrivateParent</a></code></dd>",
+                // Should document that a method is specified by private interface.
+                "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">"
+                + "methodInterface</a></code>&nbsp;in interface&nbsp;<code>"
+                + "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "PrivateInterface</a></code></dd>",
+                // Should mention that any documentation was copied.
+                "Description copied from",
+                // Extend documented private classes or interfaces
+                "extends",
+                "<dl>\n"
+                + "<dt>All Implemented Interfaces:</dt>\n"
+                + "<dd><a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "PrivateInterface</a>, "
+                + "<a href=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">"
+                + "PublicInterface</a></dd>\n"
+                + "</dl>",
+                "<pre>public class <span class=\"typeNameLabel\">PublicChild</span>");
+
+        checkOutput("pkg/PublicInterface.html", true,
+                // Field inheritence from non-public superinterface.
+                "Fields inherited from interface&nbsp;pkg."
+                + "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "PrivateInterface</a>",
+                "<a href=\"../pkg/PrivateInterface.html#fieldInheritedFromInterface\">"
+                + "fieldInheritedFromInterface</a>",
+                // Method inheritance from non-public superinterface.
+                "Methods inherited from interface&nbsp;pkg."
+                + "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">"
+                + "PrivateInterface</a>",
+                // Extend documented private classes or interfaces
+                "extends",
+                "All Superinterfaces",
+                //Make sure implemented interfaces from private superclass are inherited
+                "<dl>\n"
+                + "<dt>All Known Implementing Classes:</dt>\n"
+                + "<dd><a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">"
+                + "PrivateParent</a>, "
+                + "<a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild"
+                + "</a></dd>\n"
+                + "</dl>");
+
+        checkOutput("pkg/PrivateInterface.html", true,
+                "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">"
+                + "methodInterface</a>"
+        );
+
+        checkOutput("pkg2/C.html", true,
+                //Since private flag is used, we can document that private interface method
+                //with generic parameters has been implemented.
+                "<span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code>"
+                + "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>",
+                "<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n"
+                + "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>"
+                + "&nbsp;in interface&nbsp;<code>"
+                + "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>"
+                + "&lt;java.lang.String&gt;</code></dd>");
+
+        checkOutput("pkg/PrivateParent.html", true,
+                //Make sure when no modifier appear in the class signature, the
+                //signature is displayed correctly without extra space at the beginning.
+                "<pre>class <span class=\"typeNameLabel\">PrivateParent</span>");
+
+        checkOutput("pkg/PrivateParent.html", false,
+                "<pre> class <span class=\"typeNameLabel\">PrivateParent</span>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/pkg/PrivateInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+interface PrivateInterface {
+
+    /**
+     * Comment from parent.
+     */
+    public static final int fieldInheritedFromInterface = 0;
+
+    /**
+     * Comment from interface.
+     * This is a link to myself: {@link #fieldInheritedFromInterface}
+     *
+     * @param p1 param from interface.
+     * @throws Exception exception from interface.
+     *
+     * @see #fieldInheritedFromInterface
+     */
+    public void methodInterface(int p1) throws Exception;
+
+    /**
+     * Comment from interface.
+     *
+     * @param p1 param from interface.
+     * @throws Exception exception from interface.
+     */
+    public void methodInterface2(int p1) throws Exception;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/pkg/PrivateParent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+class PrivateParent implements PublicInterface {
+
+    /**
+     * Comment from parent.
+     */
+    public int fieldInheritedFromParent;
+
+    /**
+     * Comment from parent.
+     *
+     * @param p1 param from parent.
+     * @throws Exception exception from parent.
+     */
+    public void methodInheritedFromParent(int p1) throws Exception {
+    }
+
+    /**
+     * Comment from parent.
+     *
+     * @param p1 param from parent.
+     * @param p2 param from parent.
+     * @throws Exception exception from parent.
+     */
+    public <T extends List, V> PrivateParent methodOverridenFromParent(
+            char[] p1, int p2, T p3, V p4, List<String> p5)
+    throws Exception {
+        return this;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/pkg/PublicChild.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+public class PublicChild extends PrivateParent
+    implements PrivateInterface {
+
+    public <T extends List, V> PublicChild methodOverridenFromParent(
+            char[] p1, int p2, T p3, V p4, List<String> p5)
+    throws Exception {
+        return this;
+    }
+
+    /**
+     * {@inheritDoc}
+     *
+     * @param p1 {@inheritDoc}
+     * @throws Exception {@inheritDoc}
+     */
+    public void methodInterface(int p1) throws Exception {
+    }
+
+    public void methodInterface2(int p1) throws Exception {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/pkg/PublicInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg;
+
+public interface PublicInterface extends PrivateInterface {
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/pkg2/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+public class C implements I<String> {
+        public void hello(String param) { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testPrivateClasses/pkg2/I.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg2;
+
+interface I<T> {
+        /**
+         * This comment should get copied to the implementing class
+         */
+        void hello(T param);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/TestRecurseSubPackages.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4074234
+ * @summary Make Javadoc capable of traversing/recursing all of given subpackages.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestRecurseSubPackages
+ */
+
+public class TestRecurseSubPackages extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestRecurseSubPackages tester = new TestRecurseSubPackages();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-subpackages", "pkg1",
+                "-exclude", "pkg1.pkg2.packageToExclude");
+        checkExit(Exit.OK);
+
+        for (int i = 1; i <= 6; i++) {
+            checkOutput("allclasses-frame.html", true,
+                    "C" + i + ".html");
+        }
+
+        checkOutput("allclasses-frame.html", false,
+                "DummyClass.html");
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1;
+
+public class C1{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1;
+
+public class C2{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/pkg2/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1.pkg2;
+
+public class C3{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/pkg2/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1.pkg2;
+
+public class C4{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/pkg2/packageToExclude/DummyClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1.pkg2.packageToExclude;
+
+public class DummyClass {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/pkg2/pkg3/C5.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1.pkg2.pkg3;
+
+public class C5{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRecurseSubPackages/pkg1/pkg2/pkg3/C6.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1.pkg2.pkg3;
+
+public class C6{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRelativeLinks/TestRelativeLinks.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,89 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4460354 8014636 8043186
+ * @summary  Test to make sure that relative paths are redirected in the
+ *           output so that they are not broken.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestRelativeLinks
+ */
+
+public class TestRelativeLinks extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestRelativeLinks tester = new TestRelativeLinks();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-use",
+                "-sourcepath", testSrc,
+                "pkg", "pkg2");
+        checkExit(Exit.OK);
+
+        // These relative paths should stay relative because they appear
+        // in the right places.
+        checkOutput("pkg/C.html", true,
+            "<a href=\"relative-class-link.html\">relative class link</a>",
+            "<a href=\"relative-field-link.html\">relative field link</a>",
+            "<a href=\"relative-method-link.html\">relative method link</a>",
+            " <a href=\"relative-multi-line-link.html\">relative-multi-line-link</a>.");
+        checkOutput("pkg/package-summary.html", true,
+            "<a href=\"relative-package-link.html\">relative package link</a>");
+
+        // These relative paths should be redirected because they are in different
+        // places.
+
+        // INDEX PAGE
+        checkOutput("index-all.html", true,
+            "<a href=\"./pkg/relative-class-link.html\">relative class link</a>",
+            "<a href=\"./pkg/relative-field-link.html\">relative field link</a>",
+            "<a href=\"./pkg/relative-method-link.html\">relative method link</a>",
+            "<a href=\"./pkg/relative-package-link.html\">relative package link</a>",
+            " <a href=\"./pkg/relative-multi-line-link.html\">relative-multi-line-link</a>.",
+            "<div class=\"block\"><a name=\"./pkg/masters\"></a>");
+
+        // PACKAGE USE
+        checkOutput("pkg/package-use.html", true,
+            "<a href=\"../pkg/relative-package-link.html\">relative package link</a>.",
+            "<a href=\"../pkg/relative-class-link.html\">relative class link</a>");
+
+        // CLASS_USE
+        checkOutput("pkg/class-use/C.html", true,
+            "<a href=\"../../pkg/relative-field-link.html\">relative field link</a>",
+            "<a href=\"../../pkg/relative-method-link.html\">relative method link</a>",
+            "<a href=\"../../pkg/relative-package-link.html\">relative package link</a>",
+            " <a href=\"../../pkg/relative-multi-line-link.html\">relative-multi-line-link</a>.");
+
+        // PACKAGE OVERVIEW
+        checkOutput("overview-summary.html", true,
+            "<a href=\"./pkg/relative-package-link.html\">relative package link</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRelativeLinks/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Here is a relative link in a class:
+ * <a href="relative-class-link.html">relative class link</a>.
+ */
+public class C {
+
+    /**
+     * Here is a relative link in a field:\u0130
+     * <a href="relative-field-link.html">relative field link</a>.
+     */
+    public C field = null;
+
+    /**
+     * Here is a relative link in a method:
+     * <a href="relative-method-link.html">relative method link</a>.
+     */
+    public C method() { return null;}
+
+    /**
+     * Here is a relative link in a method:
+     * <a
+     * href="relative-multi-line-link.html">relative-multi-line-link</a>.
+     */
+    public C multipleLineTest() { return null;}
+
+    /**
+     * <a name="masters"></a>
+     * Something that goes holy cow. Second line.
+     */
+    public static class WithAnAnchor{}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRelativeLinks/pkg/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,7 @@
+<html>
+	<body>
+		Here is a relative link in a package: 
+       <a href="relative-package-link.html">relative package link</a>.
+	</body>
+</html>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRelativeLinks/pkg2/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg2;
+
+/**
+ * Just a dummy class to force the overview page to generate.
+ */
+public class Foo {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/TestRepeatedAnnotations.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,151 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8005092
+ * @summary  Test repeated annotations output.
+ * @author   bpatel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestRepeatedAnnotations
+ */
+
+public class TestRepeatedAnnotations extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestRepeatedAnnotations tester = new TestRepeatedAnnotations();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg", "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C.html", true,
+                "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+                + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
+                "<a href=\"../pkg/ContaineeRegDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeRegDoc</a> "
+                + "<a href=\"../pkg/ContaineeRegDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeRegDoc</a>",
+                "<a href=\"../pkg/RegContainerDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContainerDoc</a>"
+                + "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={"
+                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
+                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})",
+                "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+                + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+                + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>",
+                "<a href=\"../pkg/ContainerSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContainerSynthDoc</a>("
+                + "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>="
+                + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)",
+                "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a> "
+                + "<a href=\"../pkg/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg\">@ContaineeSynthDoc</a>");
+
+        checkOutput("pkg/D.html", true,
+                "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>"
+                + "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)",
+                "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+                + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)",
+                "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>"
+                + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})",
+                "<a href=\"../pkg/NonSynthDocContainer.html\" "
+                + "title=\"annotation in pkg\">@NonSynthDocContainer</a>"
+                + "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>="
+                + "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)");
+
+        checkOutput("pkg1/C.html", true,
+                "<a href=\"../pkg1/RegContainerValDoc.html\" "
+                + "title=\"annotation in pkg1\">@RegContainerValDoc</a>"
+                + "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={"
+                + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>,"
+                + "<a href=\"../pkg1/RegContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>},"
+                + "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)",
+                "<a href=\"../pkg1/ContainerValDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContainerValDoc</a>"
+                + "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={"
+                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
+                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
+                + "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)");
+
+        checkOutput("pkg/C.html", false,
+                "<a href=\"../pkg/RegContaineeDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContaineeDoc</a> "
+                + "<a href=\"../pkg/RegContaineeDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContaineeDoc</a>",
+                "<a href=\"../pkg/RegContainerNotDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContainerNotDoc</a>"
+                + "(<a href=\"../pkg/RegContainerNotDoc.html#value--\">value</a>={"
+                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>,"
+                + "<a href=\"../pkg/RegContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg\">@RegContaineeNotDoc</a>})");
+
+        checkOutput("pkg1/C.html", false,
+                "<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a> "
+                + "<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>",
+                "<a href=\"../pkg1/RegContainerValNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>"
+                + "(<a href=\"../pkg1/RegContainerValNotDoc.html#value--\">value</a>={"
+                + "<a href=\"../pkg1/RegContaineeDoc.html\" "
+                + "title=\"annotation in pkg1\">@RegContaineeDoc</a>,"
+                + "<a href=\"../pkg1/RegContaineeDoc.html\" "
+                + "title=\"annotation in pkg1\">@RegContaineeDoc</a>},"
+                + "<a href=\"../pkg1/RegContainerValNotDoc.html#y--\">y</a>=4)",
+                "<a href=\"../pkg1/ContainerValNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContainerValNotDoc</a>"
+                + "(<a href=\"../pkg1/ContainerValNotDoc.html#value--\">value</a>={"
+                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>,"
+                + "<a href=\"../pkg1/ContaineeNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeNotDoc</a>},"
+                + "<a href=\"../pkg1/ContainerValNotDoc.html#x--\">x</a>=2)",
+                "<a href=\"../pkg1/ContainerSynthNotDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>("
+                + "<a href=\"../pkg1/ContainerSynthNotDoc.html#value--\">value</a>="
+                + "<a href=\"../pkg1/ContaineeSynthDoc.html\" "
+                + "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+@ContainerSynthDoc(value={@ContaineeSynthDoc,@ContaineeSynthDoc})
+@ContainerRegDoc(value={@ContaineeRegDoc,@ContaineeRegDoc})
+@RegContainerDoc(value={@RegContaineeNotDoc,@RegContaineeNotDoc})
+@ContainerRegNotDoc(value={@RegContaineeDoc,@RegContaineeDoc})
+@RegContainerNotDoc(value={@RegContaineeNotDoc,@RegContaineeNotDoc})
+@ContaineeSynthDoc @ContaineeSynthDoc @ContaineeSynthDoc
+public class C {
+
+    @ContainerSynthDoc(value={@ContaineeSynthDoc})
+    public void test1() {}
+
+    @ContaineeSynthDoc @ContaineeSynthDoc
+    public void test2() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/ContaineeRegDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation contained by ContainerRegDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface ContaineeRegDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/ContaineeSynthDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented synthesized annotation contained by ContainerSynthDoc.
+ * It will be used to annotate Class C and a method in the class using a synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+@Repeatable(ContainerSynthDoc.class)
+public @interface ContaineeSynthDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/ContainerRegDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation container for ContaineeRegDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface ContainerRegDoc {
+
+    ContaineeRegDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/ContainerRegNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation container for RegContaineeDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface ContainerRegNotDoc {
+
+    RegContaineeDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/ContainerSynthDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented synthesized annotation container for ContaineeSynthDoc.
+ * It will be used to annotate Class C and a method in the class using a synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface ContainerSynthDoc {
+
+    ContaineeSynthDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/D.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+@RegDoc(x=1)
+public class D {
+
+    @RegArryDoc(y={1})
+    public void test1() {}
+
+    @RegArryDoc(y={1,2})
+    public void test2() {}
+
+    @NonSynthDocContainer(value={@RegArryDoc})
+    public void test3() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/NonSynthDocContainer.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation.
+ * It will be used to annotate methods in class D.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface NonSynthDocContainer {
+
+    RegArryDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/RegArryDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation.
+ * It will be used to annotate methods in Class D.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface RegArryDoc {
+
+    int[] y();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/RegContaineeDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation contained by ContainerRegNotDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface RegContaineeDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/RegContaineeNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation contained by RegContainerNotDoc
+ * and RegContainerDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface RegContaineeNotDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/RegContainerDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation container for RegContainerDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface RegContainerDoc {
+
+    RegContaineeNotDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/RegContainerNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation container for RegContaineeNotDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface RegContainerNotDoc {
+
+    RegContaineeNotDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg/RegDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation.
+ * It will be used to annotate Class D.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface RegDoc {
+
+    int x();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+@ContainerSynthNotDoc(value={@ContaineeSynthDoc,@ContaineeSynthDoc})
+@RegContainerValDoc(value={@RegContaineeNotDoc,@RegContaineeNotDoc},y=3)
+@ContainerValDoc(value={@ContaineeNotDoc,@ContaineeNotDoc},x=1)
+@RegContainerValNotDoc(value={@RegContaineeDoc,@RegContaineeDoc},y=4)
+@ContainerValNotDoc(value={@ContaineeNotDoc,@ContaineeNotDoc},x=2)
+public class C {
+
+    @ContainerSynthNotDoc(value={@ContaineeSynthDoc})
+    public void test1() {}
+
+    @ContaineeSynthDoc @ContaineeSynthDoc
+    public void test2() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/ContaineeNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation contained by ContainerValNotDoc
+ * and ContainerValDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface ContaineeNotDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/ContaineeSynthDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented synthesized annotation contained by ContainerSynthNotDoc.
+ * It will be used to annotate Class C and methods in the class using a synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+@Repeatable(ContainerSynthNotDoc.class)
+public @interface ContaineeSynthDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/ContainerSynthNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented synthesized annotation container for ContaineeSynthDoc.
+ * It will be used to annotate Class C and methods in the class using a synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface ContainerSynthNotDoc {
+
+    ContaineeSynthDoc[] value();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/ContainerValDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation container for ContaineeNotDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface ContainerValDoc {
+
+    ContaineeNotDoc[] value();
+
+    int x();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/ContainerValNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation container for ContaineeNotDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface ContainerValNotDoc {
+
+    ContaineeNotDoc[] value();
+
+    int x();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/RegContaineeDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation contained by RegContainerValNotDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface RegContaineeDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/RegContaineeNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation contained by RegContainerValDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface RegContaineeNotDoc {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/RegContainerValDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a documented annotation container for RegContaineeNotDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+@Documented
+public @interface RegContainerValDoc {
+
+    RegContaineeNotDoc[] value();
+
+    int y();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testRepeatedAnnotations/pkg1/RegContainerValNotDoc.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * This annotation is a non-documented annotation container for RegContaineeDoc.
+ * It will be used to annotate Class C using a non-synthesized form.
+ *
+ * @author Bhavesh Patel
+ */
+public @interface RegContainerValNotDoc {
+
+    RegContaineeDoc[] value();
+
+    int y();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testReturnTag/TestReturnTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4490068
+ * @summary  Warn when a return tag is used on a method without a return type.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestReturnTag
+ */
+
+public class TestReturnTag extends JavadocTester {
+
+    /**
+     * Trigger warning message when return tag is used on a void method.
+     *
+     * @return I really don't return anything.
+     */
+    public void method() {}
+
+    public static void main(String... args) throws Exception {
+        TestReturnTag tester = new TestReturnTag();
+        tester.runTests();
+    }
+
+    @Test
+    void tests() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("TestReturnTag.java"));
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true,
+            "warning - @return tag cannot be used in method with void return type.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/TestSearch.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,404 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8141492
+ * @summary Test the search feature of javadoc.
+ * @author bpatel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSearch
+ */
+
+public class TestSearch extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSearch tester = new TestSearch();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1", "-sourcepath", "-use", testSrc("UnnamedPkgClass.java"));
+        checkExit(Exit.OK);
+        checkSearchOutput("UnnamedPkgClass.html", true);
+        checkJqueryAndImageFiles(true);
+        checkFiles(false,
+                "package-search-index.zip",
+                "tag-search-index.zip");
+        checkFiles(true,
+                "member-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkInvalidUsageIndexTag();
+        checkSearchOutput(true);
+        checkSingleIndex(true);
+        checkJqueryAndImageFiles(true);
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test2a() {
+        javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.FAILED);
+        checkDocLintErrors();
+        checkSearchOutput(true);
+        checkSingleIndex(true);
+        checkJqueryAndImageFiles(true);
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test3() {
+        javadoc("-d", "out-3", "-noindex", "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchOutput(false);
+        checkJqueryAndImageFiles(false);
+        checkFiles(false,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip",
+                "index-all.html");
+    }
+
+    @Test
+    void test4() {
+        javadoc("-d", "out-4", "-html5", "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchOutput(true);
+        checkSingleIndex(true);
+        checkJqueryAndImageFiles(true);
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test5() {
+        javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchOutput(false);
+        checkJqueryAndImageFiles(false);
+        checkFiles(false,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip",
+                "index-all.html");
+    }
+
+    @Test
+    void test6() {
+        javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchOutput(true);
+        checkIndexNoComment();
+        checkJqueryAndImageFiles(true);
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test7() {
+        javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none",
+                "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchOutput(true);
+        checkIndexNoDeprecated();
+        checkJqueryAndImageFiles(true);
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test8() {
+        javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc,
+                "-use", "pkg", "pkg1", "pkg2", "pkg3");
+        checkExit(Exit.OK);
+        checkInvalidUsageIndexTag();
+        checkSearchOutput(true);
+        checkSplitIndex();
+        checkJqueryAndImageFiles(true);
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "tag-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    @Test
+    void test9() {
+        javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package",
+                "-use", "pkgfx", "pkg3");
+        checkExit(Exit.OK);
+        checkSearchOutput(true);
+        checkJavaFXOutput();
+        checkJqueryAndImageFiles(true);
+        checkFiles(false,
+                "tag-search-index.zip");
+        checkFiles(true,
+                "member-search-index.zip",
+                "package-search-index.zip",
+                "type-search-index.zip");
+    }
+
+    void checkDocLintErrors() {
+        checkOutput(Output.OUT, true,
+                "A sample method. Testing search tag for {@index \"unclosed quote}.",
+                "Another test class. Testing empty {@index }.",
+                "Constant field. Testing no text in index tag {@index}.",
+                "A test field. Testing only white-spaces in index tag text {@index       }.");
+    }
+
+    void checkSearchOutput(boolean expectedOutput) {
+        checkSearchOutput("overview-summary.html", expectedOutput);
+    }
+
+    void checkSearchOutput(String fileName, boolean expectedOutput) {
+        // Test for search related markup
+        checkOutput(fileName, expectedOutput,
+                "<link rel=\"stylesheet\" type=\"text/css\" href=\"jquery/jquery-ui.css\" title=\"Style\">\n",
+                "<script type=\"text/javascript\" src=\"jquery/jszip/dist/jszip.min.js\"></script>\n",
+                "<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils.min.js\"></script>\n",
+                "<!--[if IE]>\n",
+                "<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils-ie.min.js\"></script>\n",
+                "<![endif]-->\n",
+                "<script type=\"text/javascript\" src=\"jquery/jquery-1.10.2.js\"></script>\n",
+                "<script type=\"text/javascript\" src=\"jquery/jquery-ui.js\"></script>",
+                "var pathtoroot = \"./\";loadScripts(document, 'script');",
+                "<ul class=\"navListSearch\">\n",
+                "<li><span>SEARCH:&nbsp;</span>\n",
+                "<input type=\"text\" id=\"search\" value=\" \" disabled=\"disabled\">\n",
+                "<input type=\"reset\" id=\"reset\" value=\" \" disabled=\"disabled\">\n");
+        checkOutput(fileName, true,
+                "<div class=\"fixedNav\">");
+    }
+
+    void checkSingleIndex(boolean expectedOutput) {
+        // Test for search tags markup in index file.
+        checkOutput("index-all.html", expectedOutput,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
+                        + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
+                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
+                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
+                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
+                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
+                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
+                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
+                        + "SingleWord</a></span> - Search tag in pkg</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
+                        + "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
+                        + "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
+                        + "#html-span-see-/span-\">html &lt;span&gt; see &lt;/span&gt;</a></span> - Search "
+                        + "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.html#quoted\">quoted</a>"
+                        + "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>");
+        checkOutput("index-all.html", true,
+                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
+                        + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
+                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
+                        + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
+    }
+
+    void checkSplitIndex() {
+        // Test for search tags markup in split index file.
+        checkOutput("index-files/index-12.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">"
+                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">"
+                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
+                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">"
+                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
+                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
+                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">"
+                        + "SingleWord</a></span> - Search tag in pkg</dt>");
+        checkOutput("index-files/index-9.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">"
+                        + "phrase with spaces</a></span> - Search tag in pkg</dt>");
+        checkOutput("index-files/index-8.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
+                        + "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
+                        + "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>");
+        checkOutput("index-files/index-5.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
+                        + "#html-span-see-/span-\">html &lt;span&gt; see &lt;/span&gt;</a></span> - Search "
+                        + "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>");
+        checkOutput("index-files/index-10.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>"
+                        + "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>");
+    }
+
+    void checkIndexNoComment() {
+        // Test for search tags markup in index file when javadoc is executed with -nocomment.
+        checkOutput("index-all.html", false,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
+                        + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
+                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
+                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
+                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
+                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
+                        + "SingleWord</a></span> - Search tag in pkg</dt>",
+                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
+                        + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
+                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
+                        + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
+        checkOutput("index-all.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
+                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>");
+    }
+
+    void checkIndexNoDeprecated() {
+        // Test for search tags markup in index file when javadoc is executed using -nodeprecated.
+        checkOutput("index-all.html", true,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
+                        + "phrase with spaces</a></span> - Search tag in pkg</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
+                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
+                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
+                        + "SingleWord</a></span> - Search tag in pkg</dt>");
+        checkOutput("index-all.html", false,
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
+                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
+                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
+                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
+                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
+                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
+                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
+                        + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
+                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
+                        + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
+    }
+
+    void checkJavaFXOutput() {
+        checkOutput("index-all.html", false, "test treat as private");
+    }
+
+    void checkInvalidUsageIndexTag() {
+        checkOutput(Output.OUT, true,
+                "AnotherClass.java:29: warning - invalid usage of tag {@index",
+                "AnotherClass.java:41: warning - invalid usage of tag {@index",
+                "AnotherClass.java:36: warning - invalid usage of tag {@index",
+                "AnotherClass.java:70: warning - invalid usage of tag {@index");
+    }
+
+    void checkJqueryAndImageFiles(boolean expectedOutput) {
+        checkFiles(expectedOutput,
+                "search.js",
+                "jquery/jquery-1.10.2.js",
+                "jquery/jquery-ui.js",
+                "jquery/jquery-ui.css",
+                "jquery/jquery-ui.min.js",
+                "jquery/jquery-ui.min.css",
+                "jquery/jquery-ui.structure.min.css",
+                "jquery/jquery-ui.structure.css",
+                "jquery/external/jquery/jquery.js",
+                "jquery/jszip/dist/jszip.js",
+                "jquery/jszip/dist/jszip.min.js",
+                "jquery/jszip-utils/dist/jszip-utils.js",
+                "jquery/jszip-utils/dist/jszip-utils.min.js",
+                "jquery/jszip-utils/dist/jszip-utils-ie.js",
+                "jquery/jszip-utils/dist/jszip-utils-ie.min.js",
+                "jquery/images/ui-bg_flat_0_aaaaaa_40x100.png",
+                "jquery/images/ui-icons_454545_256x240.png",
+                "jquery/images/ui-bg_glass_95_fef1ec_1x400.png",
+                "jquery/images/ui-bg_glass_75_dadada_1x400.png",
+                "jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
+                "jquery/images/ui-icons_888888_256x240.png",
+                "jquery/images/ui-icons_2e83ff_256x240.png",
+                "jquery/images/ui-bg_glass_65_ffffff_1x400.png",
+                "jquery/images/ui-icons_cd0a0a_256x240.png",
+                "jquery/images/ui-bg_glass_55_fbf9ee_1x400.png",
+                "jquery/images/ui-icons_222222_256x240.png",
+                "jquery/images/ui-bg_glass_75_e6e6e6_1x400.png",
+                "jquery/images/ui-bg_flat_75_ffffff_40x100.png",
+                "resources/x.png",
+                "resources/glass.png");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/UnnamedPkgClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/**
+ * This is a class in unnamed package.
+ */
+
+public class UnnamedPkgClass {
+    public void testMethod(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+/**
+ * This is a test annotation type.
+ *
+ * @author Bhavesh Patel.
+ * @since 9
+ */
+@Documented public @interface AnnotationType {
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg/AnotherClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+import pkg1.*;
+
+/**
+ * Another test class. Testing empty {@index }.
+ *
+ * @author Bhavesh Patel
+ */
+public class AnotherClass {
+
+    /**
+     * A test field. Testing only white-spaces in index tag text {@index       }.
+     */
+    public RegClass field;
+
+    /**
+     * Constant field. Testing no text in index tag {@index}.
+     */
+    public static final String CONSTANT_FIELD_3 = "constant";
+
+    /**
+     * @deprecated don't use this field anymore.
+     */
+    public RegClass dep_field;
+
+    /**
+     * A sample enum.
+     */
+    public static enum ModalExclusionType {
+        /**
+         * Test comment. Testing inline tag inside index tag {@index "nested {@index nested_tag_test}"}
+         */
+        NO_EXCLUDE,
+        /**
+         * Another comment. Testing HTML inside index tag {@index "html <span> see </span>"}
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * A string constant. Testing {@index "quoted"no-space}.
+     */
+    public static final String CONSTANT1 = "C2";
+
+    /**
+     * A sample method. Testing search tag for {@index "unclosed quote}.
+     *
+     * @param param some parameter.
+     * @return a test object.
+     */
+    public Class method(pkg1.RegClass param) {
+        return param;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg/TestError.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Error class.
+ */
+public class TestError extends Error {
+
+    /**
+     * Constructs a test error.
+     */
+    public TestError() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg/TestException.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * Thrown when a TestException occurs.
+ */
+public class TestException extends Exception {
+
+    /**
+     * Constructs a {@code TestException} with no detail message.
+     */
+    public TestException() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ *
+ * 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 pkg;
+
+/**
+ * This is a description for an Interface.
+ * Test for {@index                                   "search term with spaces"       description }.
+ */
+
+public interface TestInterface {
+
+    public void method();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg/package-info.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/**
+ * Test package. Testing search tag for package. Single {@index SingleWord} search tag.
+ * Search {@index "phrase with spaces"}.
+ */
+package pkg;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg1/NestedInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and the inner class is private
+ * and a nested inner class is protected.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class NestedInnerClass {
+
+    private static class InnerClass {
+
+        protected static class ProNestedInnerClass implements java.io.Serializable {
+
+            public final int SERIALIZABLE_CONSTANT2 = 1;
+
+            /**
+             * @param s ObjectInputStream.
+             * @throws IOException when there is an I/O error.
+             * @serial
+             */
+            private void readObject(ObjectInputStream s) throws IOException {
+            }
+
+            /**
+             * @param s ObjectOutputStream.
+             * @throws IOException when there is an I/O error.
+             * @serial
+             */
+            private void writeObject(ObjectOutputStream s) throws IOException {
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg1/PrivateIncludeInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is private which is included using the tag.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class PrivateIncludeInnerClass {
+
+    /**
+     * @serial include
+     */
+    private static class PriInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg1/ProtectedInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where outer class is package private and the inner class is
+ * protected.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class ProtectedInnerClass {
+
+    protected static class ProInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT1 = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg1/PublicExcludeInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is public which is excluded using the tag.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class PublicExcludeInnerClass {
+
+    /**
+     * @serial exclude
+     */
+    public static class PubInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT3 = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg1/RegClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,42 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+/**
+ * This is a description for Class. Search phrase {@index "search phrase" with description}.
+ */
+
+public class RegClass {
+
+    /**
+     * Constant field. Search word {@index SearchWordWithDescription search word with desc}.
+     */
+    public static final String CONSTANT_FIELD_1 = "constant";
+
+    /**
+     * Another constant field.
+     */
+    public static final int CONSTANT_FIELD_2 = 1;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/DeprecatedClassByAnnotation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+@Deprecated()
+public class DeprecatedClassByAnnotation {
+
+    @Deprecated()
+    public int field;
+
+    @Deprecated()
+    public DeprecatedClassByAnnotation() {}
+
+    @Deprecated()
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * This is a description for an Interface.
+ */
+
+public interface Interface {
+
+    public void method1();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/TestAnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+import java.lang.annotation.*;
+
+/**
+ * @deprecated annotation_test1 passes. Search phrase with desc
+ * {@index "search phrase with desc deprecated" description for phrase deprecated}
+ */
+@Documented public @interface TestAnnotationType {
+
+    /**
+     * @deprecated annotation_test2 passes.
+     */
+    String optional() default "unknown";
+
+   /**
+     * @deprecated annotation_test3 passes.
+     */
+    int required();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/TestClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated class_test1 passes. Search tag {@index SearchTagDeprecatedClass}
+ */
+public class TestClass {
+
+    /**
+     * @deprecated class_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated constant field.
+     */
+    public static final int CONSTANT_FIELD = 2;
+
+    /**
+     * @deprecated class_test3 passes.
+     */
+    public TestClass() {}
+
+    /**
+     * @deprecated class_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/TestEnum.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated enum_test1 passes.
+ */
+public enum TestEnum {
+
+    /**
+     * @deprecated enum_test2 passes. Search phrase {@index "search phrase deprecated"}
+     */
+    ONE, TWO, THREE;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/TestError.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,46 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated error_test1 passes.
+ */
+public class TestError extends Error {
+
+    /**
+     * @deprecated error_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated error_test3 passes. Search tag for
+     * method {@index SearchTagDeprecatedMethod with description}
+     */
+    public TestError() {}
+
+    /**
+     * @deprecated error_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/TestException.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated exception_test1 passes.
+ */
+public class TestException extends Exception {
+
+    /**
+     * @deprecated exception_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated exception_test3 passes.
+     */
+    public TestException() {}
+
+    /**
+     * @deprecated exception_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg2/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 pkg2;
+
+/**
+ * @deprecated interface_test1 passes.
+ */
+public class TestInterface {
+
+    /**
+     * @deprecated interface_test2 passes.
+     */
+    public int field;
+
+    /**
+     * @deprecated interface_test3 passes.
+     */
+    public TestInterface() {}
+
+    /**
+     * @deprecated interface_test4 passes.
+     */
+    public void method() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkg3/ClassNoConstants.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * 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.
+ *
+ * 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 pkg3;
+
+/**
+ * This is an empty class specifically testing for no Constant value.
+ */
+
+public class ClassNoConstants {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSearch/pkgfx/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,95 @@
+/*
+ * 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.
+ *
+ * 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 pkgfx;
+
+public class C {
+
+    /**
+     * @propertySetter Property
+     * @propertyDescription PropertyDescription
+     */
+    public void CC() {}
+
+    /**
+     * @propertyGetter Property
+     *
+     */
+    public void B() {}
+
+    /**
+     * Method A documentation. Test index tag {@index "test treat as private"}.
+     * @treatAsPrivate
+     */
+    public void A() {}
+
+    /**
+     * Field i
+     * @defaultValue 1.0
+     */
+    public int i;
+
+
+    /**
+     * Defines the direction/speed at which the {@code Timeline} is expected to
+     * be played.
+     * @defaultValue 11
+     * @since JavaFX 8.0
+     */
+    private DoubleProperty rate;
+
+    public final void setRate(double value) {}
+
+    public final double getRate() {}
+
+    public final DoubleProperty rateProperty() {}
+
+    private BooleanProperty paused;
+
+    public final void setPaused(boolean value) {}
+
+    public final double isPaused() {}
+
+    class DoubleProperty {}
+
+    class BooleanProperty {}
+
+    public final BooleanProperty setTestMethodProperty() {}
+
+    private class Inner {
+        private BooleanProperty testMethodProperty() {}
+
+        /**
+         * Defines the direction/speed at which the {@code Timeline} is expected to
+         * be played.
+         * @defaultValue 11
+         */
+        private DoubleProperty rate;
+
+        public final void setRate(double value) {}
+
+        public final double getRate() {}
+
+        public final DoubleProperty rateProperty() {}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSeeTag/TestSeeTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8017191
+ * @summary  Javadoc is confused by at-link to imported classes outside of the set of generated packages
+ * @author   jjg
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestSeeTag
+ */
+
+public class TestSeeTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSeeTag tester = new TestSeeTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/Test.html", true,
+            "<code>List</code>",
+            "<dl>\n"
+            + "<dt><span class=\"seeLabel\">See Also:</span></dt>\n"
+            + "<dd><a href=\"../pkg/Test.InnerOne.html#foo--\"><code>Test.InnerOne.foo()</code></a>, \n"
+            + "<a href=\"../pkg/Test.InnerOne.html#bar-java.lang.Object-\"><code>Test.InnerOne.bar(Object)</code></a>, \n"
+            + "<a href=\"http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see\">Javadoc</a>, \n"
+            + "<a href=\"../pkg/Test.InnerOne.html#baz-float-\"><code>something</code></a></dd>\n"
+            + "</dl>");
+
+        checkOutput("pkg/Test.html", false,
+          "&lt;code&gt;List&lt;/code&gt;");
+
+        checkOutput("pkg/Test2.html", true,
+           "<code>Serializable</code>");
+
+        checkOutput("pkg/Test2.html", false,
+           ">Serialized Form<");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSeeTag/pkg/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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 pkg;
+import java.util.List;
+
+/** @see List */
+public class Test {
+
+   /**
+    * Testing different combos of see tags.
+    * @see InnerOne#foo()
+    * @see InnerOne#bar(Object)
+    * @see <a href="http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javadoc.html#see">Javadoc</a>
+    * @see InnerOne#baz(float priority) something
+    */
+    public void foo() {}
+
+    public static class InnerOne {
+        /**
+         * The rains come down in africa.
+         */
+        public void foo() {}
+
+        /**
+         * Killimanjaro.
+         * @param o
+         * @see baz
+         */
+        public void bar(Object o) {}
+
+        /**
+         * Of course the serengeti.
+         * @param GravitationalConstant
+         */
+        public void baz(float GravitationalConstant) {}
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSeeTag/pkg/Test2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg;
+
+import java.io.Serializable;
+
+/**
+ * @see java.io.Serializable
+ */
+public interface Test2 extends Serializable {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerialVersionUID/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+public class C implements java.io.Serializable {
+    /** use serialVersionUID from JDK 1.0.2 for interoperability */
+    private static final long serialVersionUID = -111111111111111L;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerialVersionUID/TestSerialVersionUID.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4525039
+ * @summary  Test to make sure that the serialVersionUID is properly
+ * documented in the serialized form.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestSerialVersionUID
+ */
+
+public class TestSerialVersionUID extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSerialVersionUID tester = new TestSerialVersionUID();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("serialized-form.html", true,
+                "-111111111111111L");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedForm/TestSerializedForm.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,161 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4341304 4485668 4966728 8032066
+ * @summary Test that methods readResolve and writeReplace show
+ * up in serialized-form.html the same way that readObject and writeObject do.
+ * If the doclet includes readResolve and writeReplace in the serialized-form
+ * documentation that same way the it includes readObject and writeObject, the
+ * test passes.  This also tests that throws tag information is correctly shown
+ * in the serialized form page.
+ * Make sure see tags work in serialized form.
+ * @author jamieh
+ * @library ../lib/
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @build TestSerializedForm
+ * @run main TestSerializedForm
+ */
+
+import java.io.*;
+
+public class TestSerializedForm extends JavadocTester implements Serializable {
+    public static void main(String... args) throws Exception {
+        TestSerializedForm tester = new TestSerializedForm();
+        tester.runTests();
+//        tester.run(ARGS, TEST, NEGATED_TEST);
+//        tester.run(ARGS_PRIVATE, TEST_PRIVATE, NEGATED_TEST_PRIVATE);
+//        tester.printSummary();
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                "-sourcepath", testSrc,
+                testSrc("TestSerializedForm.java"), "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("serialized-form.html", true,
+                "protected&nbsp;java.lang.Object&nbsp;readResolve()",
+                "protected&nbsp;java.lang.Object&nbsp;writeReplace()",
+                "protected&nbsp;java.lang.Object&nbsp;readObjectNoData()",
+                "See Also",
+                "<h3>Class pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass "
+                + "extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class pkg1.PrivateIncludeInnerClass.PriInnerClass extends "
+                + "java.lang.Object implements Serializable</h3>",
+                "<h3>Class pkg1.ProtectedInnerClass.ProInnerClass extends "
+                + "java.lang.Object implements Serializable</h3>");
+
+        checkOutput("serialized-form.html", false,
+                "<h3>Class <a href=\"pkg1/NestedInnerClass.InnerClass.ProNestedInnerClass.html\" "
+                + "title=\"class in pkg1\">pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass</a> "
+                + "extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class <a href=\"pkg1/PrivateInnerClass.PriInnerClass.html\" title=\"class in pkg1\">"
+                + "pkg1.PrivateInnerClass.PriInnerClass</a> extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class <a href=\"pkg1/ProtectedInnerClass.ProInnerClass.html\" title=\"class in pkg1\">"
+                + "pkg1.ProtectedInnerClass.ProInnerClass</a> extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class pkg1.PublicExcludeInnerClass.PubInnerClass extends java.lang.Object implements "
+                + "Serializable</h3>");
+    }
+
+    @Test
+    void testPrivate() {
+        javadoc("-private",
+                "-d", "out-private",
+                "-sourcepath", testSrc,
+                testSrc("TestSerializedForm.java"), "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("serialized-form.html", true,
+                "<h3>Class <a href=\"pkg1/NestedInnerClass.InnerClass.ProNestedInnerClass.html\" "
+                + "title=\"class in pkg1\">pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass</a> "
+                + "extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class <a href=\"pkg1/PrivateIncludeInnerClass.PriInnerClass.html\" title=\"class in pkg1\">"
+                + "pkg1.PrivateIncludeInnerClass.PriInnerClass</a> extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class <a href=\"pkg1/ProtectedInnerClass.ProInnerClass.html\" title=\"class in pkg1\">"
+                + "pkg1.ProtectedInnerClass.ProInnerClass</a> extends java.lang.Object implements Serializable</h3>");
+
+        checkOutput("serialized-form.html", false,
+                "<h3>Class pkg1.NestedInnerClass.InnerClass.ProNestedInnerClass "
+                + "extends java.lang.Object implements Serializable</h3>",
+                "<h3>Class pkg1.PrivateInnerClass.PriInnerClass extends "
+                + "java.lang.Object implements Serializable</h3>",
+                "<h3>Class pkg1.ProtectedInnerClass.ProInnerClass extends "
+                + "java.lang.Object implements Serializable</h3>",
+                "<h3>Class <a href=\"pkg1/PublicExcludeInnerClass.PubInnerClass.html\" "
+                + "title=\"class in pkg1\">pkg1.PublicExcludeInnerClass.PubInnerClass</a> "
+                + "extends java.lang.Object implements Serializable</h3>");
+    }
+
+    /**
+     * @serial
+     * @see TestSerializedForm
+     */
+    public final int SERIALIZABLE_CONSTANT = 1;
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+
+    /**
+     * @param s ObjectInputStream.
+     * @throws IOException when there is an I/O error.
+     * @serial
+     */
+    private void readObject(ObjectInputStream s) throws IOException {}
+
+    /**
+     * @param s ObjectOutputStream.
+     * @throws IOException when there is an I/O error.
+     * @serial
+     */
+    private void writeObject(ObjectOutputStream s) throws IOException {}
+
+    /**
+     * @throws IOException when there is an I/O error.
+     * @serialData This is a serial data comment.
+     * @return an object.
+     */
+    protected Object readResolve() throws IOException {return null;}
+
+    /**
+     * @throws IOException when there is an I/O error.
+     * @serialData This is a serial data comment.
+     * @return an object.
+     */
+    protected Object writeReplace() throws IOException {return null;}
+
+    /**
+     * @throws IOException when there is an I/O error.
+     * @serialData This is a serial data comment.
+     * @return an object.
+     */
+    protected Object readObjectNoData() throws IOException {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedForm/pkg1/NestedInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and the inner class is private
+ * and a nested inner class is protected.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class NestedInnerClass {
+
+    private static class InnerClass {
+
+        protected static class ProNestedInnerClass implements java.io.Serializable {
+
+            public final int SERIALIZABLE_CONSTANT = 1;
+
+            /**
+             * @param s ObjectInputStream.
+             * @throws IOException when there is an I/O error.
+             * @serial
+             */
+            private void readObject(ObjectInputStream s) throws IOException {
+            }
+
+            /**
+             * @param s ObjectOutputStream.
+             * @throws IOException when there is an I/O error.
+             * @serial
+             */
+            private void writeObject(ObjectOutputStream s) throws IOException {
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedForm/pkg1/PrivateIncludeInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is private which is included using the tag.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class PrivateIncludeInnerClass {
+
+    /**
+     * @serial include
+     */
+    private static class PriInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedForm/pkg1/ProtectedInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where outer class is package private and the inner class is
+ * protected.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class ProtectedInnerClass {
+
+    protected static class ProInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedForm/pkg1/PublicExcludeInnerClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+import java.io.*;
+
+/**
+ * A test class where the outer class is package private and inner class
+ * is public which is excluded using the tag.
+ *
+ * @author      Bhavesh Patel
+ */
+
+class PublicExcludeInnerClass {
+
+    /**
+     * @serial exclude
+     */
+    public static class PubInnerClass implements java.io.Serializable {
+
+        public final int SERIALIZABLE_CONSTANT = 1;
+
+        /**
+         * @param s ObjectInputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void readObject(ObjectInputStream s) throws IOException {
+        }
+
+        /**
+         * @param s ObjectOutputStream.
+         * @throws IOException when there is an I/O error.
+         * @serial
+         */
+        private void writeObject(ObjectOutputStream s) throws IOException {
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,166 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6802694 8025633 8026567
+ * @summary This test verifies deprecation info in serialized-form.html.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSerializedFormDeprecationInfo
+ */
+
+public class TestSerializedFormDeprecationInfo extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSerializedFormDeprecationInfo tester = new TestSerializedFormDeprecationInfo();
+        tester.runTests();
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.FAILED); // TODO: should be OK
+
+        checkCommentDeprecated(true);
+        checkNoComment(false);
+    }
+
+    @Test
+    void testNoComment() {
+        javadoc("-d", "out-nocmnt",
+                "-nocomment",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.FAILED); // TODO: should be OK
+
+        checkNoComment(true);
+        checkCommentDeprecated(false);
+    }
+
+    @Test
+    void testNoDeprecated() {
+        javadoc("-d", "out-nodepr",
+                "-nodeprecated",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.FAILED); // TODO: should be OK
+
+        checkNoDeprecated(true);
+        checkNoCommentNoDeprecated(false);
+    }
+
+    @Test
+    void testNoCommentNoDeprecated() {
+        javadoc("-d", "out-nocmnt-nodepr",
+                "-nocomment",
+                "-nodeprecated",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.FAILED); // TODO: should be OK
+        checkNoCommentNoDeprecated(true);
+        checkNoDeprecated(false);
+    }
+
+    // Test for normal run of javadoc. The serialized-form.html should
+    // display the inline comments, tags and deprecation information if any.
+    void checkCommentDeprecated(boolean expectFound) {
+        checkOutput("serialized-form.html", expectFound,
+                "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+                + "<dd><code>"
+                + "java.io.IOException</code></dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span>"
+                + "</dt>\n"
+                + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<div class=\"block\">This field indicates whether the C1 "
+                + "is undecorated.</div>\n"
+                + "&nbsp;\n"
+                + "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>1.4</dd>\n"
+                + "<dt><span class=\"seeLabel\">See Also:</span>"
+                + "</dt>\n"
+                + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>C1.setUndecorated(boolean)</code></a></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;<span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "<div class=\"block\">Reads the object stream.</div>\n"
+                + "<dl>\n"
+                + "<dt><span class=\"throwsLabel\">Throws:</span></dt>\n"
+                + "<dd><code>java.io.IOException</code></dd>\n"
+                + "</dl>",
+                "<span class=\"deprecatedLabel\">Deprecated.</span>"
+                + "&nbsp;</div>\n"
+                + "<div class=\"block\">"
+                + "The name for this class.</div>");
+    }
+
+    // Test with -nocomment option. The serialized-form.html should
+    // not display the inline comments and tags but should display deprecation
+    // information if any.
+    void checkNoComment(boolean expectFound) {
+        checkOutput("serialized-form.html", expectFound,
+                "<pre>boolean undecorated</pre>\n"
+                + "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;<span class=\"deprecationComment\">"
+                + "As of JDK version 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>"
+                + "setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "</li>",
+                "<span class=\"deprecatedLabel\">"
+                + "Deprecated.</span>&nbsp;<span class=\"deprecationComment\">As of JDK version"
+                + " 1.5, replaced by\n"
+                + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">"
+                + "<code>setUndecorated(boolean)</code></a>.</span></div>\n"
+                + "</li>");
+    }
+
+    // Test with -nodeprecated option. The serialized-form.html should
+    // ignore the -nodeprecated tag and display the deprecation info. This
+    // test is similar to the normal run of javadoc in which inline comment, tags
+    // and deprecation information will be displayed.
+    void checkNoDeprecated(boolean expectFound) {
+        checkCommentDeprecated(expectFound);
+    }
+
+    // Test with -nodeprecated and -nocomment options. The serialized-form.html should
+    // ignore the -nodeprecated tag and display the deprecation info but should not
+    // display the inline comments and tags. This test is similar to the test with
+    // -nocomment option.
+    void checkNoCommentNoDeprecated(boolean expectFound) {
+        checkNoComment(expectFound);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author      Bhavesh Patel
+ * @see C2
+ * @since       JDK1.0
+ */
+
+public class C1 implements Serializable {
+
+    /**
+     * This field indicates whether the C1 is undecorated.
+     *
+     * @see #setUndecorated(boolean)
+     * @since 1.4
+     * @serial
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+     @Deprecated
+    public boolean undecorated = false;
+
+    private String title;
+
+    /**
+     * This enum specifies the possible modal exclusion types.
+     *
+     * @since 1.6
+     */
+    public static enum ModalExclusionType {
+        /**
+         * No modal exclusion.
+         */
+        NO_EXCLUDE,
+        /**
+         * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window
+         * won't be blocked by any application-modal dialogs. Also, it isn't
+         * blocked by document-modal dialogs from outside of its child hierarchy.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * Constructor.
+     *
+     * @param title the title
+     * @param test boolean value
+     * @exception IllegalArgumentException if the <code>owner</code>'s
+     *     <code>GraphicsConfiguration</code> is not from a screen device
+     * @exception HeadlessException
+     */
+     public C1(String title, boolean test) {
+
+     }
+
+     public C1(String title) {
+
+     }
+
+    /**
+     * Method comments.
+     * @param  undecorated <code>true</code> if no decorations are
+     *         to be enabled;
+     *         <code>false</code> if decorations are to be enabled.
+     * @see    #readObject()
+     * @since 1.4
+     */
+    public void setUndecorated(boolean undecorated) {
+        /* Make sure we don't run in the middle of peer creation.*/
+    }
+
+    /**
+     * @see #setUndecorated(boolean)
+     */
+    public void readObject() throws IOException {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.io.ObjectInputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author      Bhavesh Patel
+ * @see C1
+ * @since       JDK1.0
+ */
+
+public class C2 implements Serializable {
+
+    /**
+     * This field indicates title.
+     */
+    String title;
+
+    public static enum ModalType {
+        NO_EXCLUDE
+    };
+
+    /**
+     * Constructor.
+     *
+     */
+     public C2() {
+
+     }
+
+     public C2(String title) {
+
+     }
+
+     /**
+     * Set visible.
+     *
+     * @param set boolean
+     * @since 1.4
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+     @Deprecated
+     public void setVisible(boolean set) {
+     }
+
+     /**
+     * Reads the object stream.
+     *
+     * @param s ObjectInputStream
+     * @throws IOException
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+     @Deprecated
+     public void readObject(ObjectInputStream s) throws IOException {
+     }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSerializedFormDeprecationInfo/pkg1/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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 pkg1;
+
+import java.io.Serializable;
+
+/**
+ * Test for Serializable
+ *
+ * @author Bhavesh Patel
+ * @deprecated This class is no longer used.
+ */
+@Deprecated
+public abstract class C3 implements Serializable {
+
+    /**
+     * The name for this class.
+     *
+     * @serial
+     */
+    private String name;
+
+    /**
+     * @serial
+     */
+    private int publicKey;
+
+    /**
+     * Constructor for serialization only.
+     */
+    protected C3() {
+
+    }
+
+    /**
+     * Prints general information.
+     *
+     */
+    public void printInfo() {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTag/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @todo This is a comment.
+ * @ejb:bean This is a bean.
+ * @regular Just a regular simple tag.
+ * @tag-with-hyphens a tag that contains hyphens.
+ */
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTag/TestSimpleTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4695326 4750173 4920381 8078320
+ * @summary Test the declaration of simple tags using -tag. Verify that
+ * "-tag name" is a shortcut for "-tag name:a:Name:".  Also verity that
+ * you can escape the ":" character with a back slash so that it is not
+ * considered a separator when parsing the simple tag argument.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSimpleTag
+ */
+
+public class TestSimpleTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSimpleTag tester = new TestSimpleTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-tag", "todo",
+                "-tag", "ejb\\:bean:a:EJB Beans:",
+                "-tag", "regular:a:Regular Tag:",
+                "-tag", "tag-with-hyphens:a:Tag-With-Hyphens:",
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", true,
+                "<span class=\"simpleTagLabel\">Todo:</span>",
+                "<span class=\"simpleTagLabel\">EJB Beans:</span>",
+                "<span class=\"simpleTagLabel\">Regular Tag:</span>",
+                "<span class=\"simpleTagLabel\">Tag-With-Hyphens:</span>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTagExclude/DummyClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/******************************
+ * @todo Remember to implement
+ * this class.
+ ******************************/
+public class DummyClass {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTagExclude/TestSimpleTagExclude.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4628181
+ * @summary Test the parsing of the -tag option.  The user should be able to
+ * exclude a simple tag by using -tag tagname:X
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSimpleTagExclude
+ */
+
+public class TestSimpleTagExclude extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSimpleTagExclude tester = new TestSimpleTagExclude();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-tag", "todo:X",
+                testSrc("DummyClass.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("DummyClass.html", false,
+                "todo");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTagInherit/TestSimpleTagInherit.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8008768 8026567
+ * @summary  Using {@inheritDoc} in simple tag defined via -tag fails
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestSimpleTagInherit
+ */
+
+public class TestSimpleTagInherit extends JavadocTester {
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+
+    };
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+        {  }
+    };
+
+    public static void main(String... args) throws Exception {
+        TestSimpleTagInherit tester = new TestSimpleTagInherit();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-tag", "custom:optcm:<em>Custom:</em>",
+                "p");
+        checkExit(Exit.OK);
+
+        checkOutput("p/TestClass.html", true,
+                "<dt><span class=\"simpleTagLabel\"><em>Custom:</em></span></dt>\n"
+                + "<dd>doc for BaseClass class</dd>",
+                "<dt><span class=\"simpleTagLabel\"><em>Custom:</em></span></dt>\n"
+                + "<dd>doc for BaseClass method</dd>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTagInherit/p/BaseClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ *
+ * 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 p;
+
+/**
+ * @custom doc for BaseClass class
+ */
+public class BaseClass {
+    /**
+     * @custom doc for BaseClass method
+     */
+    public void m() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSimpleTagInherit/p/TestClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ *
+ * 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 p;
+
+/**
+ * @custom {@inheritDoc}
+ */
+public class TestClass extends BaseClass {
+    /**
+     * @custom {@inheritDoc}
+     */
+    public void m() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSinceTag/TestSinceTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      7180906 8026567
+ * @summary  Test to make sure that the since tag works correctly
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestSinceTag
+ */
+
+public class TestSinceTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSinceTag tester = new TestSinceTag();
+        tester.runTests();
+        tester.printSummary();
+    }
+
+    @Test
+    void testSince() {
+        javadoc("-d", "out-since",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.FAILED); // TODO: investigate
+
+        checkSince(true);
+    }
+
+    @Test
+    void testNoSince() {
+        javadoc("-d", "out-nosince",
+                "-sourcepath", testSrc,
+                "-nosince",
+                "pkg1");
+        checkExit(Exit.FAILED); // TODO: investigate
+
+        checkSince(false);
+    }
+
+    void checkSince(boolean on) {
+        checkOutput("pkg1/C1.html", on,
+                "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>JDK1.0</dd>");
+
+        checkOutput("serialized-form.html", on,
+                "<dl>\n"
+                + "<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n"
+                + "<dd>1.4</dd>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSinceTag/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,100 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg1;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author      Bhavesh Patel
+ * @since       JDK1.0
+ */
+public class C1 implements Serializable {
+
+    /**
+     * This field indicates whether the C1 is undecorated.
+     *
+     * @see #setUndecorated(boolean)
+     * @since 1.4
+     * @serial
+     * @deprecated As of JDK version 1.5, replaced by
+     * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+     */
+    @Deprecated
+    public boolean undecorated = false;
+
+    /**
+     * This enum specifies the possible modal exclusion types.
+     *
+     * @since 1.6
+     */
+    public static enum ModalExclusionType {
+
+        /**
+         * No modal exclusion.
+         */
+        NO_EXCLUDE,
+        /**
+         * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window
+         * won't be blocked by any application-modal dialogs. Also, it isn't
+         * blocked by document-modal dialogs from outside of its child hierarchy.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * Constructor.
+     *
+     * @param title the title
+     * @param test boolean value
+     * @exception IllegalArgumentException if the <code>owner</code>'s
+     *     <code>GraphicsConfiguration</code> is not from a screen device
+     * @exception HeadlessException
+     */
+    public C1(String title, boolean test) {
+    }
+
+    public C1(String title) {
+    }
+
+    /**
+     * Method comments.
+     * @param  undecorated <code>true</code> if no decorations are
+     *         to be enabled;
+     *         <code>false</code> if decorations are to be enabled.
+     * @see    #readObject()
+     * @since 1.4
+     */
+    public void setUndecorated(boolean undecorated) {
+        /* Make sure we don't run in the middle of peer creation.*/
+    }
+
+    /**
+     * @see #setUndecorated(boolean)
+     */
+    public void readObject() throws IOException {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSingleQuotedLink/TestSingleQuotedLink.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6457406
+ * @summary Verify that a link in single quotes copied to the class-use page as is.
+ * @author Yuri Nesterenko
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSingleQuotedLink
+ */
+public class TestSingleQuotedLink extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSingleQuotedLink tester = new TestSingleQuotedLink();
+        tester.runTests();
+    }
+
+    @Test
+    void run() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg1");
+        checkExit(Exit.OK);
+
+        // We are testing the redirection algorithm with a known scenario when a
+        // writer is not forced to ignore it: "-use".
+
+        checkOutput("pkg1/class-use/C1.html", true,
+            "<a href=\'http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html\'>");
+
+        checkOutput("pkg1/class-use/C1.html", false,
+            "pkg1/\'http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html\'>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSingleQuotedLink/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Class 1. This is a test.
+ */
+public class C1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSingleQuotedLink/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Class 2 refers to <a href='http://download.oracle.com/javase/8/docs/technotes/guides/indexC2.html'>Here</a>.
+ * This is a single quoted link.
+ */
+public class C2 extends C1 {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSingleQuotedLink/pkg1/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,14 @@
+<html>
+<head>
+<title>javax.management package</title>
+</head>
+<body bgcolor="white">
+    This is a test.
+    <p id="spec">
+        <a href='http://download.oracle.com/javase/8/docs/technotes/guides/indexdocument.html'>
+            Another Test document 2.</a> Single quotes also but as of now, package-summary writer excluded from redirection algorithm.
+
+        @since 1.5
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSourceTab/DoubleTab/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2002, 2004, 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.
+ *
+ * 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.
+ */
+
+/**
+ * <pre>
+ * \t\tThis source
+ * \t\tis indented
+ * \t\twith tabs.
+ * </pre>
+ */
+public class C {
+
+\t\t//This source
+\t\t//is indented
+\t\t//with tabs.
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSourceTab/SingleTab/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2002, 2004, 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.
+ *
+ * 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.
+ */
+
+/**
+ * <pre>
+ *\tThis source
+ * \tis indented
+ * \twith tabs.
+ * </pre>
+ */
+public class C {
+
+\t//This source
+\t//is indented
+\t//with tabs.
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSourceTab/TestSourceTab.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4510979
+ * @summary Test to make sure that the source documentation is indented properly
+ * when -linksourcetab is used.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSourceTab
+ */
+
+import java.io.*;
+
+public class TestSourceTab extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSourceTab tester = new TestSourceTab();
+        tester.runTests();
+    }
+
+    @Test
+    void test() throws Exception {
+        String tmpSrcDir = "tmpSrc";
+        String outdir1 = "out-tabLengthEight";
+        String outdir2 = "out-tabLengthFour";
+        initTabs(new File(testSrc), new File(tmpSrcDir));
+
+        // Run Javadoc on a source file with that is indented with a single tab per line
+        javadoc("-d", outdir1,
+                "-sourcepath", tmpSrcDir,
+                "-notimestamp",
+                "-linksource",
+                tmpSrcDir + "/SingleTab/C.java");
+        checkExit(Exit.OK);
+
+        // Run Javadoc on a source file with that is indented with a two tab per line
+        // If we double the tabs and decrease the tab length by a half, the output should
+        // be the same as the one generated above.
+        javadoc("-d", outdir2,
+                "-sourcepath", tmpSrcDir,
+                "-notimestamp",
+                "-sourcetab", "4",
+                tmpSrcDir + "/DoubleTab/C.java");
+        checkExit(Exit.OK);
+
+        diff(outdir1, outdir2,
+                "src-html/C.html",
+                "C.html");
+    }
+
+    void initTabs(File from, File to) throws IOException {
+        for (File f: from.listFiles()) {
+            File t = new File(to, f.getName());
+            if (f.isDirectory()) {
+                initTabs(f, t);
+            } else if (f.getName().endsWith(".java")) {
+                write(t, read(f).replace("\\t", "\t"));
+            }
+        }
+    }
+
+    String read(File f) throws IOException {
+        StringBuilder sb = new StringBuilder();
+        try (BufferedReader in = new BufferedReader(new FileReader(f))) {
+            String line;
+            while ((line = in.readLine()) != null) {
+                sb.append(line);
+                sb.append(NL);
+            }
+        }
+        return sb.toString();
+    }
+
+    void write(File f, String s) throws IOException {
+        f.getParentFile().mkdirs();
+        try (Writer out = new FileWriter(f)) {
+            out.write(s);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testStylesheet/TestStylesheet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,173 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4494033 7028815 7052425 8007338 8023608 8008164 8016549 8072461
+ * @summary  Run tests on doclet stylesheet.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestStylesheet
+ */
+
+public class TestStylesheet extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestStylesheet tester = new TestStylesheet();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        // TODO: most of this test seems a bit silly, since javadoc is simply
+        // copying in the stylesheet from the source directory
+        checkOutput("stylesheet.css", true,
+                "/* Javadoc style sheet */",
+                "/*\n"
+                + "Overall document style\n"
+                + "*/",
+                "/*\n"
+                + "Heading styles\n"
+                + "*/",
+                "/*\n"
+                + "Navigation bar styles\n"
+                + "*/",
+                "body {\n"
+                + "    background-color:#ffffff;\n"
+                + "    color:#353833;\n"
+                + "    font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;\n"
+                + "    font-size:14px;\n"
+                + "    margin:0;\n"
+                + "    padding:0;\n"
+                + "    height:100%;\n"
+                + "    width:100%;\n"
+                + "}",
+                "iframe {\n"
+                + "    margin:0;\n"
+                + "    padding:0;\n"
+                + "    height:100%;\n"
+                + "    width:100%;\n"
+                + "    overflow-y:scroll;\n"
+                + "    border:none;\n"
+                + "}",
+                "ul {\n"
+                + "    list-style-type:disc;\n"
+                + "}",
+                ".overviewSummary caption, .memberSummary caption, .typeSummary caption,\n"
+                + ".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {\n"
+                + "    position:relative;\n"
+                + "    text-align:left;\n"
+                + "    background-repeat:no-repeat;\n"
+                + "    color:#253441;\n"
+                + "    font-weight:bold;\n"
+                + "    clear:none;\n"
+                + "    overflow:hidden;\n"
+                + "    padding:0px;\n"
+                + "    padding-top:10px;\n"
+                + "    padding-left:1px;\n"
+                + "    margin:0px;\n"
+                + "    white-space:pre;\n"
+                + "}",
+                ".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,\n"
+                + ".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {\n"
+                + "    white-space:nowrap;\n"
+                + "    padding-top:5px;\n"
+                + "    padding-left:12px;\n"
+                + "    padding-right:12px;\n"
+                + "    padding-bottom:7px;\n"
+                + "    display:inline-block;\n"
+                + "    float:left;\n"
+                + "    background-color:#F8981D;\n"
+                + "    border: none;\n"
+                + "    height:16px;\n"
+                + "}",
+                ".memberSummary caption span.activeTableTab span {\n"
+                + "    white-space:nowrap;\n"
+                + "    padding-top:5px;\n"
+                + "    padding-left:12px;\n"
+                + "    padding-right:12px;\n"
+                + "    margin-right:3px;\n"
+                + "    display:inline-block;\n"
+                + "    float:left;\n"
+                + "    background-color:#F8981D;\n"
+                + "    height:16px;\n"
+                + "}",
+                ".memberSummary caption span.tableTab span {\n"
+                + "    white-space:nowrap;\n"
+                + "    padding-top:5px;\n"
+                + "    padding-left:12px;\n"
+                + "    padding-right:12px;\n"
+                + "    margin-right:3px;\n"
+                + "    display:inline-block;\n"
+                + "    float:left;\n"
+                + "    background-color:#4D7A97;\n"
+                + "    height:16px;\n"
+                + "}",
+                // Test the formatting styles for proper content display in use and constant values pages.
+                ".overviewSummary td.colFirst, .overviewSummary th.colFirst,\n"
+                + ".useSummary td.colFirst, .useSummary th.colFirst,\n"
+                + ".overviewSummary td.colOne, .overviewSummary th.colOne,\n"
+                + ".memberSummary td.colFirst, .memberSummary th.colFirst,\n"
+                + ".memberSummary td.colOne, .memberSummary th.colOne,\n"
+                + ".typeSummary td.colFirst{\n"
+                + "    width:25%;\n"
+                + "    vertical-align:top;\n"
+                + "}",
+                ".overviewSummary td, .memberSummary td, .typeSummary td,\n"
+                + ".useSummary td, .constantsSummary td, .deprecatedSummary td {\n"
+                + "    text-align:left;\n"
+                + "    padding:0px 0px 12px 10px;\n"
+                + "}",
+                ".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {\n"
+                + "    padding-top:0px;\n"
+                + "    padding-left:0px;\n"
+                + "    padding-right:0px;\n"
+                + "    background-image:none;\n"
+                + "    float:none;\n"
+                + "    display:inline;\n"
+                + "}",
+                "@import url('resources/fonts/dejavu.css');");
+
+        // Test whether a link to the stylesheet file is inserted properly
+        // in the class documentation.
+        checkOutput("pkg/A.html", true,
+                "<link rel=\"stylesheet\" type=\"text/css\" "
+                + "href=\"../stylesheet.css\" title=\"Style\">");
+
+        checkOutput("index.html", true,
+                "<link rel=\"stylesheet\" type=\"text/css\" href=\"stylesheet.css\" title=\"Style\">");
+
+        checkOutput("stylesheet.css", false,
+                "* {\n"
+                + "    margin:0;\n"
+                + "    padding:0;\n"
+                + "}");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testStylesheet/pkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 pkg;
+
+public class A {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSubTitle/TestSubTitle.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 7010342
+ * @summary Test for correct sub title generation.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSubTitle
+ */
+
+public class TestSubTitle extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSubTitle tester = new TestSubTitle();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/package-summary.html", true,
+            "<div class=\"block\">This is the description of package pkg.</div>");
+
+        checkOutput("pkg/C.html", true,
+            "<div class=\"subTitle\">pkg</div>");
+
+        checkOutput("pkg/package-summary.html", false,
+            "<p class=\"subTitle\">\n" +
+            "<div class=\"block\">This is the " +
+            "description of package pkg.</div>\n" +
+            "</p>");
+
+        checkOutput("pkg/C.html", false,
+            "<p class=\"subTitle\">pkg</p>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSubTitle/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg;
+
+/**
+ * Source file for C
+ */
+public class C {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSubTitle/pkg/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,8 @@
+<html lang="en">
+<head>
+    <title>Package Summary</title>
+</head>
+<body>
+This is the description of package pkg.
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSummaryHeading/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSummaryHeading/TestSummaryHeading.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4904036
+ * @summary  Document a class that does not have any methods to document.  The
+ *           "Method Summary" heading should still show up since the class
+ *           inherits methods.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestSummaryHeading
+ */
+
+public class TestSummaryHeading extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSummaryHeading tester = new TestSummaryHeading();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", true,
+                "<h3>Method Summary</h3>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSuperclassInSerialForm/TestSuperClassInSerialForm.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4671694
+ * @summary Test to make sure link to superclass is generated for
+ * each class in serialized form page.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSuperClassInSerialForm
+ */
+
+public class TestSuperClassInSerialForm extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSuperClassInSerialForm tester = new TestSuperClassInSerialForm();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("serialized-form.html", true,
+                "<a href=\"pkg/SubClass.html\" title=\"class in pkg\">pkg.SubClass</a>"
+                + " extends <a href=\"pkg/SuperClass.html\" title=\"class in pkg\">SuperClass</a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSuperclassInSerialForm/pkg/SubClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class SubClass extends SuperClass implements java.io.Serializable {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSuperclassInSerialForm/pkg/SuperClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class SuperClass implements java.io.Serializable {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSupplementary/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/* /nodynamiccopyright/ */
+
+public class C
+{
+    // U+10400 (\ud801\udc00): DESERET CAPITAL LETTER LONG I (can be start or part)
+    // U+1D17B (\ud834\udd7b): MUSICAL SYMBOL COMBINING ACCENT (can only be part)
+    // U+1D100 (\ud834\udd00): MUSICAL SYMBOL SINGLE BARLINE (can be none of start nor part)
+
+    // valid tags
+
+    /**
+     * @see C#\ud801\udc00method()
+     */
+    public void \ud801\udc00method() {};
+
+    /**
+     * @see C#method\ud801\udc00()
+     */
+    public void method\ud801\udc00() {};
+
+    /**
+     * @see C#method\ud834\udd7b()
+     */
+    public void method\ud834\udd7b() {};
+
+    /**
+     * @serialField \ud801\udc00field int
+     * @serialField field\ud801\udc00 int
+     * @serialField field\ud834\udd7b int
+     */
+    public void method1() {};
+
+    // invalid tags - should generate warnings
+
+    /**
+     * @see C#method\ud834\udd00()
+     */
+    public void method2() {};
+
+    /**
+     * @serialField field\ud801\ud801 int
+     * @serialField \ud834\udd7bfield int
+     */
+    public void method3() {};
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testSupplementary/TestSupplementary.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4914724
+ * @summary Test to make sure that "see" tag and "serialField" tag handle supplementary
+ *    characters correctly.  This test case needs to be run in en_US locale.
+ * @author Naoto Sato
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestSupplementary
+ */
+
+import java.util.Locale;
+
+public class TestSupplementary extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        Locale saveLocale = Locale.getDefault();
+        try {
+            TestSupplementary tester = new TestSupplementary();
+            tester.runTests();
+        } finally {
+            Locale.setDefault(saveLocale);
+        }
+    }
+
+    @Test
+    void test() {
+        javadoc("-locale", "en_US",
+                "-d", "out",
+                testSrc("C.java"));
+        checkExit(Exit.FAILED);
+
+        checkOutput(Output.OUT, true,
+            "C.java:36: error: unexpected text",
+            "C.java:41: error: unexpected text",
+            "C.java:42: error: identifier expected");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/TestTagInheritence.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,70 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug     4496223 4496270 4618686 4720974 4812240 6253614 6253604
+ * @summary <DESC>
+ * @author  jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestTagInheritence
+ */
+
+// TODO: Inheritence should be Inheritance!   fix separately as noreg-trivial
+public class TestTagInheritence extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestTagInheritence tester = new TestTagInheritence();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                "-sourcepath", testSrc,
+                "pkg", "firstSentence", "firstSentence2");
+        checkExit(Exit.OK);
+
+        //Test bad inheritDoc tag warning.
+        checkOutput(Output.OUT, true,
+                "warning - @inheritDoc used but testBadInheritDocTag() "
+                + "does not override or implement any method.");
+
+        //Test valid usage of inheritDoc tag.
+        for (int i = 1; i < 40; i++) {
+            checkOutput("pkg/TestTagInheritence.html", true,
+                    "Test " + i + " passes");
+        }
+
+        //First sentence test (6253614)
+        checkOutput("firstSentence/B.html", true,
+                "<div class=\"block\">First sentence.</div>");
+
+        //Another first sentence test (6253604)
+        checkOutput("firstSentence2/C.html", true,
+                "<div class=\"block\">First sentence.</div>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/firstSentence/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 firstSentence;
+
+public class A {
+    /**
+     * First sentence.  Second sentence.
+     */
+    public void m() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/firstSentence/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 firstSentence;
+
+public class B extends A {
+    /**
+     * {@inheritDoc} Third sentence.  Fourth sentence.
+     */
+    public void m() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/firstSentence2/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 firstSentence2;
+
+public class A {
+    /**
+     * First sentence.  Second sentence.
+     */
+    public void m() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/firstSentence2/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 firstSentence2 ;
+
+public class B extends A {
+    /**
+     * {@inheritDoc}
+     *
+     * <p>Third sentence.  Fourth sentence.
+     */
+    public void m() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/firstSentence2/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 firstSentence2;
+
+public class C extends B {
+    /**
+     * {@inheritDoc}
+     *
+     * <p>Fifth sentence.  Sixth sentence.
+     */
+    public void m() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/pkg/TestAbstractClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2001, 2003, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+import java.lang.*;
+import java.io.*;
+import java.util.zip.*;
+
+public abstract class TestAbstractClass extends TestSuperSuperClass
+    implements TestInterfaceForAbstractClass {
+
+  /**
+   * Test 1 passes.
+   * @param p1 Test 2 passes.
+   * @param p2 Test 3 passes.
+   * @return a string.
+   * @throws java.io.IOException Test 4 passes.
+   * @throws java.lang.NullPointerException Test 5 passes.
+   * @see java.lang.String
+   * @see java.util.Vector
+   */
+  public String testAbstractClass_method1(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException {
+      return null;
+  }
+
+  /**
+   * Test 6 passes.
+   * @param p1 Test 7 passes.
+   * @param p2 Test 8 passes.
+   * @return a string.
+   * @throws java.io.IOException Test 9 passes.
+   * @throws java.lang.NullPointerException Test 10 passes
+   * @see java.lang.String
+   * @see java.util.Vector
+   */
+  public String testAbstractClass_method2(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException {
+      return null;
+  }
+
+    /**
+     * Test 31 passes.
+     * @param <Q> Test 33 passes.
+     * @param x2 Test 35 passes.
+     * @throws java.io.IOException Test 37 passes.
+     * @throws java.util.zip.ZipException Test 39 passes.
+     */
+    public <P,Q> String testSuperSuperMethod2(int x1, int x2) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/pkg/TestInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2001, 2002, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+import java.lang.*;
+import java.io.*;
+
+public interface TestInterface {
+
+  /**
+   * Test 11 passes.
+   * @param p1 Test 12 passes.
+   * @param p2 Test 13 passes.
+   * @return a string.
+   * @throws java.io.IOException Test 14 passes.
+   * @throws java.lang.NullPointerException Test 15 passes.
+   * @see java.lang.String
+   * @see java.util.Vector
+   */
+  public String testInterface_method1(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException;
+
+  /**
+   * Test 16 passes.
+   * @param p1 Test 17 passes.
+   * @param p2 Test 18 passes.
+   * @return a string.
+   * @throws java.io.IOException Test 19 passes.
+   * @throws java.lang.NullPointerException Test 20 passes.
+   * @see java.lang.String
+   * @see java.util.Vector
+   */
+  public String testInterface_method2(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/pkg/TestInterfaceForAbstractClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002, 2003, 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.
+ *
+ * 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 pkg;
+
+public interface TestInterfaceForAbstractClass extends TestSuperSuperInterface {
+    /**
+     * Test 21 passes.
+     */
+    public void methodInTestInterfaceForAbstractClass();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/pkg/TestSuperSuperClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class TestSuperSuperClass {
+
+    /**
+     * Test 23 passes.
+     * @param <P> Test 24 passes.
+     * @param <Q> Test 25 passes.
+     * @param x1 Test 26 passes.
+     * @param x2 Test 27 passes.
+     * @return Test 28 passes.
+     * @throws java.io.IOException Test 29 passes.
+     * @throws java.lang.NullPointerException Test 30 passes.
+     */
+    public <P,Q> String testSuperSuperMethod(int x1, int x2) {
+        return null;
+    }
+
+    /**
+     * @param <P> Test 32 passes.
+     * @param x1 Test 34 passes.
+     * @return Test 36 passes.
+     * @throws java.lang.NullPointerException Test 38 passes.
+     */
+    public <P,Q> String testSuperSuperMethod2(int x1, int x2) {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/pkg/TestSuperSuperInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public interface TestSuperSuperInterface {
+
+    /**
+     * Test 22 passes.
+     */
+    public void testSuperSuperMethod();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagInheritence/pkg/TestTagInheritence.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2001, 2003, 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.
+ *
+ * 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 pkg;
+
+import java.lang.*;
+import java.io.*;
+
+public class TestTagInheritence extends TestAbstractClass implements TestInterface{
+
+  //This method below tests tag inheritence from a class.
+
+
+  public String testAbstractClass_method1(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException {
+      return null;
+  }
+
+  /**
+   * This method tests @inheritDoc with a class.  Here is the inherited comment:<br>
+   * {@inheritDoc}
+   * @param p1 {@inheritDoc}
+   * @param p2 {@inheritDoc}
+   * @return {@inheritDoc}
+   * @throws java.io.IOException {@inheritDoc}
+   * @throws java.lang.NullPointerException {@inheritDoc}
+   */
+  public String testAbstractClass_method2(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException {
+      return null;
+  }
+
+  public String testInterface_method1(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException
+  {
+      return null;
+  }
+
+  /**
+   * This method tests @inheritDoc with an inteface.  Here is the inherited comment:<br>
+   * {@inheritDoc}
+   * @param p1 {@inheritDoc}
+   * @param p2 {@inheritDoc}
+   * @return {@inheritDoc}
+   * @throws java.io.IOException {@inheritDoc}
+   * @throws java.lang.NullPointerException {@inheritDoc}
+   */
+  public String testInterface_method2(int p1, int p2) throws java.io.IOException,
+java.lang.NullPointerException {
+      return null;
+  }
+
+    /**
+     * Here is the documentation that I should inherit from
+     * the interface implemented by my superclass.
+     * {@inheritDoc}
+     */
+    public void methodInTestInterfaceForAbstractClass() {}
+
+    /**
+     * {@inheritDoc}
+     */
+    public void testSuperSuperMethod() {}
+
+    /**
+     * Test inheritDoc warning message:
+     * {@inheritDoc}
+     */
+    public void testBadInheritDocTag () {}
+
+    /**
+     * {@inheritDoc}
+     * @param <X> {@inheritDoc}
+     * @param <Y> {@inheritDoc}
+     * @param p1 {@inheritDoc}
+     * @param p2 {@inheritDoc}
+     * @return {@inheritDoc}
+     * @throws java.io.IOException {@inheritDoc}
+     * @throws java.lang.NullPointerException {@inheritDoc}
+     */
+    public <X,Y> String testSuperSuperMethod(int p1, int p2) {
+        return null;
+    }
+
+    public <X,Y> String testSuperSuperMethod2(int p1, int p2)
+    throws java.io.IOException, java.lang.NullPointerException {
+        return null;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagMisuse/TestTagMisuse.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,79 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @summary Determine if proper warning messages are printed.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @build TestTagMisuse
+ * @run main TestTagMisuse
+ */
+public class TestTagMisuse extends JavadocTester {
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     * @throws Exception if the test fails
+     */
+    public static void main(String... args) throws Exception {
+        TestTagMisuse tester = new TestTagMisuse();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                testSrc("TestTagMisuse.java"));
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true,
+                "warning - Tag @param cannot be used in field documentation.",
+                "warning - Tag @throws cannot be used in field documentation.",
+                "warning - Tag @return cannot be used in constructor documentation."
+                /* DCerroneous, "warning - Tag @throws cannot be used in inline documentation."*/);
+        checkOutput(Output.OUT, false, "DocletAbortException");
+    }
+
+    /**
+     * {@throws blah}
+     * Here is a bad field tag:
+     * @throws foo
+     * @param foo.
+     */
+    public int field;
+
+    /**
+     * Here is a bad constructor tag:
+     * @return blah
+     */
+    public TestTagMisuse(){}
+
+    /**
+     * for @see and {@link}), and ThrowsTag (for @throws).
+     */
+    public void thisShouldNotCrash() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagOutput/TestTagOutput.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8026370 8026567
+ * @summary This test checks the generated tag output.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestTagOutput
+ */
+
+public class TestTagOutput extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestTagOutput tester = new TestTagOutput();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg1");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg1/DeprecatedTag.html", true,
+            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;</div>",
+            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated.</span>&nbsp;" +
+            "<span class=\"deprecationComment\">Do not use this.</span></div>");
+
+        checkOutput("pkg1/DeprecatedTag.html", false,
+            "<div class=\"block\"><span class=\"deprecatedLabel\">Deprecated." +
+            "</span>&nbsp;<span class=\"deprecationComment\"></span></div>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTagOutput/pkg1/DeprecatedTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,44 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+public class DeprecatedTag {
+
+    /**
+     * This method is deprecated.
+     *
+     * @deprecated
+     */
+    public void deprecatedMethod() {
+    }
+
+    /**
+     * This method is also deprecated.
+     *
+     * @deprecated Do not use this.
+     */
+    public void deprecatedMethodWithDesc() {
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsHead/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+public class C {
+    public void method() throws IllegalArgumentException {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsHead/TestThrowsHead.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4530727 8026567
+ * @summary When an exception is declared in the method signature but
+ * not documented with a throws tag, we generate a link to it in the
+ * throws section.  Make sure that the link is below a Throws heading.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestThrowsHead
+ */
+
+public class TestThrowsHead extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestThrowsHead tester = new TestThrowsHead();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("C.html", true,
+                "<dt><span class=\"throwsLabel\">Throws:</span>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+public class C implements I {
+
+    /**
+     * @throws NullPointerException Test 1 passes.
+     */
+    public void method() throws NullPointerException {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/Foo.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+import java.io.*;
+
+public class Foo implements Iface {
+    /**
+     * Foo doc.
+     *
+     * @throws EOFException {@inheritDoc}
+     */
+    public void foo() throws IOException {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/I.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+public interface I {
+    /**
+     * @throws java.lang.NullPointerException Test 1 fails
+     */
+    public void method() throws NullPointerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/Iface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+import java.io.IOException;
+
+public interface Iface {
+    /**
+     * Iface doc.
+     *
+     * @throws java.io.EOFException Test 1 passes.
+     * @throws IOException if I/O exception occurs
+     */
+    void foo() throws IOException;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/TestThrowsTagInheritence.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4684827 4633969
+ * @summary This test verifies that throws tags in implementing class
+ * override the throws tags in interface. This test also verifies that throws tags are inherited properly
+ * the case where the name of one exception is not fully qualified.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestThrowsTagInheritence
+ */
+
+// TODO: should be TestThrowsInheritance!
+public class TestThrowsTagInheritence extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestThrowsTagInheritence tester = new TestThrowsTagInheritence();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("C.java"),
+                testSrc("I.java"),
+                testSrc("Foo.java"),
+                testSrc("Iface.java"));
+        checkExit(Exit.OK);
+
+        // The class should not inherit the tag from the interface.
+        checkOutput("Foo.html", true,
+                "Test 1 passes.");
+
+        //The class should not inherit the tag from the interface.
+        checkOutput("C.html", false,
+                "Test 1 fails.");
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "-package", "pkg");
+        checkExit(Exit.OK);
+
+        // The method should not inherit the IOOBE throws tag from the abstract class,
+        // for now keep keep this bug compatible, should fix this correctly in
+        // the future.
+        checkOutput("pkg/Extender.html", false, "java.lang.IndexOutOfBoundsException");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/pkg/Abstract.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg;
+public abstract class Abstract {
+    /**
+     * @throws java.lang.NullPointerException this should appear
+     * @throws java.lang.IndexOutOfBoundsException this <em>should not for bug-compatibility</em>
+     */
+    abstract void method() throws NullPointerException;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsInheritence/pkg/Extender.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2014, 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.
+ *
+ * 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 pkg;
+public class Extender extends Abstract {
+    public void method() throws NullPointerException {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/TestThrowsTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4985072
+ * @summary  Test to make sure that exceptions always show up in the
+ *           correct order.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestThrowsTag
+ */
+
+public class TestThrowsTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestThrowsTag tester = new TestThrowsTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.FAILED);  // TODO: investigate why failed
+
+        checkOutput("pkg/C.html", true,
+            "<dd><code><a href=\"../pkg/T1.html\" title=\"class in pkg\">T1</a></code> - the first throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T2.html\" title=\"class in pkg\">T2</a></code> - the second throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T3.html\" title=\"class in pkg\">T3</a></code> - the third throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T4.html\" title=\"class in pkg\">T4</a></code> - the fourth throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T5.html\" title=\"class in pkg\">T5</a></code> - the first inherited throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T6.html\" title=\"class in pkg\">T6</a></code> - the second inherited throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T7.html\" title=\"class in pkg\">T7</a></code> - the third inherited throws tag.</dd>\n" +
+            "<dd><code><a href=\"../pkg/T8.html\" title=\"class in pkg\">T8</a></code> - the fourth inherited throws tag.</dd>"
+        );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class C extends P {
+
+    /**
+     * @throws T1 the first throws tag.
+     * @throws T2 the second throws tag.
+     * @throws T3 the third throws tag.
+     * @throws T4 the fourth throws tag.
+     */
+    public void method() throws T5, T6, T7, T8 {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/P.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class P {
+
+    /**
+     * @throws T5 the first inherited throws tag.
+     * @throws T6 the second inherited throws tag.
+     * @throws T7 the third inherited throws tag.
+     * @throws T8 the fourth inherited throws tag.
+     */
+    public void method() throws T5, T6, T7, T8 {}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T1 extends Exception {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T2 extends Exception {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T3 extends Exception {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T4 extends Exception {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T5.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T5 extends Exception
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T6.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T6 extends Exception
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T7.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T7 extends Exception
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testThrowsTag/pkg/T8.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg;
+
+public class T8 extends Exception
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTitleInHref/TestTitleInHref.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4714257
+ * @summary Test to make sure that the title attribute shows up in links.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestTitleInHref
+ */
+
+public class TestTitleInHref extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestTitleInHref tester = new TestTitleInHref();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        String uri = "http://java.sun.com/j2se/1.4/docs/api";
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-linkoffline", uri, testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/Links.html", true,
+                //Test to make sure that the title shows up in a class link.
+                "<a href=\"../pkg/Class.html\" title=\"class in pkg\">",
+                //Test to make sure that the title shows up in an interface link.
+                "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">",
+                //Test to make sure that the title shows up in cross link shows up
+                "<a href=\"" + uri + "/java/io/File.html?is-external=true\" "
+                + "title=\"class or interface in java.io\">"
+                + "<code>This is a cross link to class File</code></a>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTitleInHref/package-list	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,1 @@
+java.io
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTitleInHref/pkg/Class.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class Class {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTitleInHref/pkg/Interface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public interface Interface {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTitleInHref/pkg/Links.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+/**
+ * {@link Class This is a link to a class}.<br>
+ * {@link Interface This is a link to an interface}.
+ * {@link java.io.File This is a cross link to class File}.
+ */
+
+public class Links{}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTopOption/TestTopOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,93 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      6227616 8043186
+ * @summary  Test the new -top option.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestTopOption
+ */
+
+public class TestTopOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestTopOption tester = new TestTopOption();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-overview", testSrc("overview.html"),
+                "-use",
+                "-top", "TOP TEXT",
+                "-d", "out-1",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkTopText(
+                "pkg/AnnotationType.html",
+                "pkg/class-use/AnnotationType.html",
+                "pkg/Cl.html",
+                "pkg/class-use/Cl.html",
+                "pkg/package-summary.html",
+                "pkg/package-use.html",
+                "overview-summary.html",
+                "overview-tree.html",
+                "constant-values.html",
+                "help-doc.html");
+    }
+
+    @Test
+    void testDocRootRewrite() {
+        javadoc("-overview", testSrc("overview.html"),
+                "-use",
+                "-top", "\u0130{@docroot}TOP TEXT",
+                "-d", "out-2",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkTopText(
+                "pkg/AnnotationType.html",
+                "pkg/class-use/AnnotationType.html",
+                "pkg/Cl.html",
+                "pkg/class-use/Cl.html",
+                "pkg/package-summary.html",
+                "pkg/package-use.html",
+                "overview-summary.html",
+                "overview-tree.html",
+                "constant-values.html",
+                "help-doc.html");
+    }
+
+    void checkTopText(String... files) {
+        for (String file : files) {
+            checkOutput(file, true, "TOP TEXT");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTopOption/overview.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<HTML>
+  <BODY>
+    This is a sample overview.
+  </BODY>
+<HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTopOption/pkg/AnnotationType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+
+@Documented public @interface AnnotationType {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTopOption/pkg/Cl.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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 pkg;
+
+
+public class Cl {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/TestTypeAnnotations.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,359 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8005091 8009686 8025633 8026567
+ * @summary  Make sure that type annotations are displayed correctly
+ * @author   Bhavesh Patel
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestTypeAnnotations
+ */
+
+public class TestTypeAnnotations extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestTypeAnnotations tester = new TestTypeAnnotations();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                "-private",
+                "typeannos");
+        checkExit(Exit.OK);
+
+        // Test for type annotations on Class Extends (ClassExtends.java).
+        checkOutput("typeannos/MyClass.html", true,
+                "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation "
+                + "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedClass.html\" "
+                + "title=\"class in typeannos\">ParameterizedClass</a>&lt;<a href=\""
+                + "../typeannos/ClassExtB.html\" title=\"annotation in typeannos\">"
+                + "@ClassExtB</a> java.lang.String&gt;",
+
+                "implements <a href=\"../typeannos/ClassExtB.html\" title=\""
+                + "annotation in typeannos\">@ClassExtB</a> java.lang.CharSequence, "
+                + "<a href=\"../typeannos/ClassExtA.html\" title=\"annotation in "
+                + "typeannos\">@ClassExtA</a> <a href=\"../typeannos/ParameterizedInterface.html\" "
+                + "title=\"interface in typeannos\">ParameterizedInterface</a>&lt;"
+                + "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in "
+                + "typeannos\">@ClassExtB</a> java.lang.String&gt;</pre>");
+
+        checkOutput("typeannos/MyInterface.html", true,
+                "extends <a href=\"../typeannos/ClassExtA.html\" title=\"annotation "
+                + "in typeannos\">@ClassExtA</a> <a href=\"../typeannos/"
+                + "ParameterizedInterface.html\" title=\"interface in typeannos\">"
+                + "ParameterizedInterface</a>&lt;<a href=\"../typeannos/ClassExtA.html\" "
+                + "title=\"annotation in typeannos\">@ClassExtA</a> java.lang.String&gt;, "
+                + "<a href=\"../typeannos/ClassExtB.html\" title=\"annotation in "
+                + "typeannos\">@ClassExtB</a> java.lang.CharSequence</pre>");
+
+        // Test for type annotations on Class Parameters (ClassParameters.java).
+        checkOutput("typeannos/ExtendsBound.html", true,
+                "class <span class=\"typeNameLabel\">ExtendsBound&lt;K extends <a "
+                + "href=\"../typeannos/ClassParamA.html\" title=\"annotation in "
+                + "typeannos\">@ClassParamA</a> java.lang.String&gt;</span>");
+
+        checkOutput("typeannos/ExtendsGeneric.html", true,
+                "<pre>class <span class=\"typeNameLabel\">ExtendsGeneric&lt;K extends "
+                + "<a href=\"../typeannos/ClassParamA.html\" title=\"annotation in "
+                + "typeannos\">@ClassParamA</a> <a href=\"../typeannos/Unannotated.html\" "
+                + "title=\"class in typeannos\">Unannotated</a>&lt;<a href=\""
+                + "../typeannos/ClassParamB.html\" title=\"annotation in typeannos\">"
+                + "@ClassParamB</a> java.lang.String&gt;&gt;</span>");
+
+        checkOutput("typeannos/TwoBounds.html", true,
+                "<pre>class <span class=\"typeNameLabel\">TwoBounds&lt;K extends <a href=\""
+                + "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\">"
+                + "@ClassParamA</a> java.lang.String,V extends <a href=\"../typeannos/"
+                + "ClassParamB.html\" title=\"annotation in typeannos\">@ClassParamB"
+                + "</a> java.lang.String&gt;</span>");
+
+        checkOutput("typeannos/Complex1.html", true,
+                "class <span class=\"typeNameLabel\">Complex1&lt;K extends <a href=\"../"
+                + "typeannos/ClassParamA.html\" title=\"annotation in typeannos\">"
+                + "@ClassParamA</a> java.lang.String &amp; java.lang.Runnable&gt;</span>");
+
+        checkOutput("typeannos/Complex2.html", true,
+                "class <span class=\"typeNameLabel\">Complex2&lt;K extends java.lang."
+                + "String &amp; <a href=\"../typeannos/ClassParamB.html\" title=\""
+                + "annotation in typeannos\">@ClassParamB</a> java.lang.Runnable&gt;</span>");
+
+        checkOutput("typeannos/ComplexBoth.html", true,
+                "class <span class=\"typeNameLabel\">ComplexBoth&lt;K extends <a href=\""
+                + "../typeannos/ClassParamA.html\" title=\"annotation in typeannos\""
+                + ">@ClassParamA</a> java.lang.String &amp; <a href=\"../typeannos/"
+                + "ClassParamA.html\" title=\"annotation in typeannos\">@ClassParamA"
+                + "</a> java.lang.Runnable&gt;</span>");
+
+        // Test for type annotations on fields (Fields.java).
+        checkOutput("typeannos/DefaultScope.html", true,
+                "<pre><a href=\"../typeannos/Parameterized.html\" title=\"class in "
+                + "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" "
+                + "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a "
+                + "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">"
+                + "@FldB</a> java.lang.String&gt; bothTypeArgs</pre>",
+
+                "<pre><a href=\"../typeannos/FldA.html\" title=\"annotation in "
+                + "typeannos\">@FldA</a> java.lang.String <a href=\"../typeannos/"
+                + "FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] "
+                + "array1Deep</pre>",
+
+                "<pre>java.lang.String <a href=\"../typeannos/FldB.html\" "
+                + "title=\"annotation in typeannos\">@FldB</a> [][] array2SecondOld</pre>",
+
+                // When JDK-8068737, we should change the order
+                "<pre><a href=\"../typeannos/FldD.html\" title=\"annotation in typeannos\">"
+                + "@FldD</a> java.lang.String "
+                + "<a href=\"../typeannos/FldC.html\" title=\"annotation in typeannos\">@FldC</a> "
+                + "<a href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">@FldB</a> [] "
+                + "<a href=\"../typeannos/FldC.html\" title=\"annotation in typeannos\">@FldC</a> "
+                + "<a href=\"../typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> [] "
+                + "array2Deep</pre>");
+
+        checkOutput("typeannos/ModifiedScoped.html", true,
+                "<pre>public final&nbsp;<a href=\"../typeannos/Parameterized.html\" "
+                + "title=\"class in typeannos\">Parameterized</a>&lt;<a href=\"../"
+                + "typeannos/FldA.html\" title=\"annotation in typeannos\">@FldA</a> "
+                + "<a href=\"../typeannos/Parameterized.html\" title=\"class in "
+                + "typeannos\">Parameterized</a>&lt;<a href=\"../typeannos/FldA.html\" "
+                + "title=\"annotation in typeannos\">@FldA</a> java.lang.String,<a "
+                + "href=\"../typeannos/FldB.html\" title=\"annotation in typeannos\">"
+                + "@FldB</a> java.lang.String&gt;,<a href=\"../typeannos/FldB.html\" "
+                + "title=\"annotation in typeannos\">@FldB</a> java.lang.String&gt; "
+                + "nestedParameterized</pre>",
+
+                "<pre>public final&nbsp;<a href=\"../typeannos/FldA.html\" "
+                + "title=\"annotation in typeannos\">@FldA</a> java.lang.String[][] "
+                + "array2</pre>");
+
+        // Test for type annotations on method return types (MethodReturnType.java).
+        checkOutput("typeannos/MtdDefaultScope.html", true,
+                "<pre>public&nbsp;&lt;T&gt;&nbsp;<a href=\"../typeannos/MRtnA.html\" "
+                + "title=\"annotation in typeannos\">@MRtnA</a> java.lang.String"
+                + "&nbsp;method()</pre>",
+
+                // When JDK-8068737 is fixed, we should change the order
+                "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in typeannos\">"
+                + "@MRtnA</a> java.lang.String "
+                + "<a href=\"../typeannos/MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> [] "
+                + "<a href=\"../typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> []"
+                + "&nbsp;array2Deep()</pre>",
+
+                "<pre><a href=\"../typeannos/MRtnA.html\" title=\"annotation in "
+                + "typeannos\">@MRtnA</a> java.lang.String[][]&nbsp;array2()</pre>");
+
+        checkOutput("typeannos/MtdModifiedScoped.html", true,
+                "<pre>public final&nbsp;<a href=\"../typeannos/MtdParameterized.html\" "
+                + "title=\"class in typeannos\">MtdParameterized</a>&lt;<a href=\"../"
+                + "typeannos/MRtnA.html\" title=\"annotation in typeannos\">@MRtnA</a> "
+                + "<a href=\"../typeannos/MtdParameterized.html\" title=\"class in "
+                + "typeannos\">MtdParameterized</a>&lt;<a href=\"../typeannos/MRtnA."
+                + "html\" title=\"annotation in typeannos\">@MRtnA</a> java.lang."
+                + "String,<a href=\"../typeannos/MRtnB.html\" title=\"annotation in "
+                + "typeannos\">@MRtnB</a> java.lang.String&gt;,<a href=\"../typeannos/"
+                + "MRtnB.html\" title=\"annotation in typeannos\">@MRtnB</a> java."
+                + "lang.String&gt;&nbsp;nestedMtdParameterized()</pre>");
+
+        // Test for type annotations on method type parameters (MethodTypeParameters.java).
+        checkOutput("typeannos/UnscopedUnmodified.html", true,
+                "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\""
+                + "annotation in typeannos\">@MTyParamA</a> java.lang.String&gt;"
+                + "&nbsp;void&nbsp;methodExtends()</pre>",
+
+                "<pre>&lt;K extends <a href=\"../typeannos/MTyParamA.html\" title=\""
+                + "annotation in typeannos\">@MTyParamA</a> <a href=\"../typeannos/"
+                + "MtdTyParameterized.html\" title=\"class in typeannos\">"
+                + "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" "
+                + "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String"
+                + "&gt;&gt;&nbsp;void&nbsp;nestedExtends()</pre>");
+
+        checkOutput("typeannos/PublicModifiedMethods.html", true,
+                "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/"
+                + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
+                + "java.lang.String&gt;&nbsp;void&nbsp;methodExtends()</pre>",
+
+                "<pre>public final&nbsp;&lt;K extends <a href=\"../typeannos/"
+                + "MTyParamA.html\" title=\"annotation in typeannos\">@MTyParamA</a> "
+                + "java.lang.String,V extends <a href=\"../typeannos/MTyParamA.html\" "
+                + "title=\"annotation in typeannos\">@MTyParamA</a> <a href=\"../"
+                + "typeannos/MtdTyParameterized.html\" title=\"class in typeannos\">"
+                + "MtdTyParameterized</a>&lt;<a href=\"../typeannos/MTyParamB.html\" "
+                + "title=\"annotation in typeannos\">@MTyParamB</a> java.lang.String"
+                + "&gt;&gt;&nbsp;void&nbsp;dual()</pre>");
+
+        // Test for type annotations on parameters (Parameters.java).
+        checkOutput("typeannos/Parameters.html", true,
+                "<pre>void&nbsp;unannotated(<a href=\"../typeannos/"
+                + "ParaParameterized.html\" title=\"class in typeannos\">"
+                + "ParaParameterized</a>&lt;java.lang.String,java.lang.String&gt;"
+                + "&nbsp;a)</pre>",
+
+                "<pre>void&nbsp;nestedParaParameterized(<a href=\"../typeannos/"
+                + "ParaParameterized.html\" title=\"class in typeannos\">"
+                + "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" "
+                + "title=\"annotation in typeannos\">@ParamA</a> <a href=\"../"
+                + "typeannos/ParaParameterized.html\" title=\"class in typeannos\">"
+                + "ParaParameterized</a>&lt;<a href=\"../typeannos/ParamA.html\" "
+                + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String,"
+                + "<a href=\"../typeannos/ParamB.html\" title=\"annotation in "
+                + "typeannos\">@ParamB</a> java.lang.String&gt;,<a href=\"../"
+                + "typeannos/ParamB.html\" title=\"annotation in typeannos\">@ParamB"
+                + "</a> java.lang.String&gt;&nbsp;a)</pre>",
+
+                // When JDK-8068737 is fixed, we should change the order
+                "<pre>void&nbsp;array2Deep(<a href=\"../typeannos/ParamA.html\" "
+                + "title=\"annotation in typeannos\">@ParamA</a> java.lang.String "
+                + "<a href=\"../typeannos/ParamB.html\" title=\"annotation in typeannos\">"
+                + "@ParamB</a> [] "
+                + "<a href=\"../typeannos/ParamA.html\" title=\"annotation in typeannos\">"
+                + "@ParamA</a> []"
+                + "&nbsp;a)</pre>");
+
+        // Test for type annotations on throws (Throws.java).
+        checkOutput("typeannos/ThrDefaultUnmodified.html", true,
+                "<pre>void&nbsp;oneException()\n"
+                + "           throws <a href=\"../typeannos/ThrA.html\" title=\""
+                + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
+
+                "<pre>void&nbsp;twoExceptions()\n"
+                + "            throws <a href=\"../typeannos/ThrA.html\" title=\""
+                + "annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
+                + "                   <a href=\"../typeannos/ThrA.html\" title=\""
+                + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
+
+        checkOutput("typeannos/ThrPublicModified.html", true,
+                "<pre>public final&nbsp;void&nbsp;oneException(java.lang.String&nbsp;a)\n"
+                + "                        throws <a href=\"../typeannos/ThrA.html\" "
+                + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>",
+
+                "<pre>public final&nbsp;void&nbsp;twoExceptions(java.lang.String&nbsp;a)\n"
+                + "                         throws <a href=\"../typeannos/ThrA.html\" "
+                + "title=\"annotation in typeannos\">@ThrA</a> java.lang.RuntimeException,\n"
+                + "                                <a href=\"../typeannos/ThrA.html\" "
+                + "title=\"annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
+
+        checkOutput("typeannos/ThrWithValue.html", true,
+                "<pre>void&nbsp;oneException()\n"
+                + "           throws <a href=\"../typeannos/ThrB.html\" title=\""
+                + "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/"
+                + "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>",
+
+                "<pre>void&nbsp;twoExceptions()\n"
+                + "            throws <a href=\"../typeannos/ThrB.html\" title=\""
+                + "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/"
+                + "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException,\n"
+                + "                   <a href=\"../typeannos/ThrA.html\" title=\""
+                + "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>");
+
+        // Test for type annotations on type parameters (TypeParameters.java).
+        checkOutput("typeannos/TestMethods.html", true,
+                "<pre>&lt;K,<a href=\"../typeannos/TyParaA.html\" title=\"annotation in typeannos\">"
+                + "@TyParaA</a> V extends <a href=\"../typeannos/TyParaA.html\" "
+                + "title=\"annotation in typeannos\">@TyParaA</a> "
+                + "java.lang.String&gt;&nbsp;void&nbsp;secondAnnotated()</pre>"
+        );
+
+        // Test for type annotations on wildcard type (Wildcards.java).
+        checkOutput("typeannos/BoundTest.html", true,
+                "<pre>void&nbsp;wcExtends(<a href=\"../typeannos/MyList.html\" "
+                + "title=\"class in typeannos\">MyList</a>&lt;? extends <a href=\""
+                + "../typeannos/WldA.html\" title=\"annotation in typeannos\">@WldA"
+                + "</a> java.lang.String&gt;&nbsp;l)</pre>",
+
+                "<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
+                + "typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/WldA.html\" "
+                + "title=\"annotation in typeannos\">@WldA</a> java.lang.String&gt;"
+                + "&nbsp;returnWcSuper()</pre>");
+
+        checkOutput("typeannos/BoundWithValue.html", true,
+                "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\""
+                + "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/"
+                + "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\""
+                + "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang."
+                + "String&gt;&nbsp;l)</pre>",
+
+                "<pre><a href=\"../typeannos/MyList.html\" title=\"class in "
+                + "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB."
+                + "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../"
+                + "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String"
+                + "&gt;&nbsp;returnWcExtends()</pre>");
+
+        // Test for receiver annotations (Receivers.java).
+        checkOutput("typeannos/DefaultUnmodified.html", true,
+                "<pre>void&nbsp;withException(<a href=\"../typeannos/RcvrA.html\" "
+                + "title=\"annotation in typeannos\">@RcvrA</a>&nbsp;"
+                + "DefaultUnmodified&nbsp;this)\n"
+                + "            throws java."
+                + "lang.Exception</pre>",
+
+                "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA."
+                + "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../"
+                + "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB"
+                + "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")"
+                + "&nbsp;DefaultUnmodified&nbsp;this)</pre>",
+
+                "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
+                + "<a href=\"../typeannos/RcvrA.html\" title=\"annotation in "
+                + "typeannos\">@RcvrA</a>&nbsp;DefaultUnmodified&nbsp;this,\n"
+                + "                                           T&nbsp;r)\n"
+                + "                                    throws java.lang.Exception</pre>");
+
+        checkOutput("typeannos/PublicModified.html", true,
+                "<pre>public final&nbsp;java.lang.String&nbsp;nonVoid(<a href=\""
+                + "../typeannos/RcvrA.html\" title=\"annotation in typeannos\">"
+                + "@RcvrA</a>&nbsp;PublicModified&nbsp;this)</pre>",
+
+                "<pre>public final&nbsp;&lt;T extends java.lang.Runnable&gt;&nbsp;"
+                + "void&nbsp;accept(<a href=\"../typeannos/RcvrA.html\" title=\""
+                + "annotation in typeannos\">@RcvrA</a>&nbsp;PublicModified&nbsp;this,\n"
+                + "                                                        T&nbsp;r)\n"
+                + "                                                 throws java.lang.Exception</pre>");
+
+        checkOutput("typeannos/WithValue.html", true,
+                "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept("
+                + "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in "
+                + "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">"
+                + "value</a>=\"m\")&nbsp;WithValue&nbsp;this,\n"
+                + "                                           T&nbsp;r)\n"
+                + "                                    throws java.lang.Exception</pre>");
+
+        checkOutput("typeannos/WithFinal.html", true,
+                "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrB."
+                + "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../"
+                + "typeannos/RcvrB.html#value--\">value</a>=\"m\")&nbsp;WithFinal"
+                + "&nbsp;this)</pre>");
+
+        checkOutput("typeannos/WithBody.html", true,
+                "<pre>void&nbsp;field(<a href=\"../typeannos/RcvrA.html\" title=\""
+                + "annotation in typeannos\">@RcvrA</a>&nbsp;WithBody&nbsp;this)</pre>");
+
+        checkOutput("typeannos/Generic2.html", true,
+                "<pre>void&nbsp;test2(<a href=\"../typeannos/RcvrA.html\" title=\""
+                + "annotation in typeannos\">@RcvrA</a>&nbsp;Generic2&lt;X&gt;&nbsp;this)</pre>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/ClassExtends.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+abstract class MyClass extends @ClassExtA ParameterizedClass<@ClassExtB String>
+  implements @ClassExtB CharSequence, @ClassExtA ParameterizedInterface<@ClassExtB String> { }
+
+interface MyInterface extends @ClassExtA ParameterizedInterface<@ClassExtA String>,
+                              @ClassExtB CharSequence { }
+
+class ParameterizedClass<K> {}
+interface ParameterizedInterface<K> {}
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ClassExtA {}
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ClassExtB {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/ClassParameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class Unannotated<K> { }
+
+class ExtendsBound<K extends @ClassParamA String> { }
+class ExtendsGeneric<K extends @ClassParamA Unannotated<@ClassParamB String>> { }
+class TwoBounds<K extends @ClassParamA String, V extends @ClassParamB String> { }
+
+class Complex1<K extends @ClassParamA String&Runnable> { }
+class Complex2<K extends String & @ClassParamB Runnable> { }
+class ComplexBoth<K extends @ClassParamA String & @ClassParamA Runnable> { }
+
+class ClassParamOuter {
+    void inner() {
+        class LUnannotated<K> { }
+
+        class LExtendsBound<K extends @ClassParamA String> { }
+        class LExtendsGeneric<K extends @ClassParamA LUnannotated<@ClassParamB String>> { }
+        class LTwoBounds<K extends @ClassParamA String, V extends @ClassParamB String> { }
+
+        class LComplex1<K extends @ClassParamA String&Runnable> { }
+        class LComplex2<K extends String & @ClassParamB Runnable> { }
+        class LComplexBoth<K extends @ClassParamA String & @ClassParamA Runnable> { }
+    }
+}
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ClassParamA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ClassParamB { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Fields.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,82 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class DefaultScope {
+    Parameterized<String, String> unannotated;
+    Parameterized<@FldA String, String> firstTypeArg;
+    Parameterized<String, @FldA String> secondTypeArg;
+    Parameterized<@FldA String, @FldB String> bothTypeArgs;
+
+    Parameterized<@FldA Parameterized<@FldA String, @FldB String>, @FldB String>
+    nestedParameterized;
+
+    @FldA String [] array1;
+    @FldA String @FldB [] array1Deep;
+    @FldA String [] [] array2;
+    @FldD String @FldC @FldA [] @FldC @FldB [] array2Deep;
+    String @FldA [] [] array2First;
+    String [] @FldB [] array2Second;
+
+    // Old-style array syntax
+    String array2FirstOld @FldA [];
+    String array2SecondOld [] @FldB [];
+}
+
+class ModifiedScoped {
+    public final Parameterized<String, String> unannotated = null;
+    public final Parameterized<@FldA String, String> firstTypeArg = null;
+    public final Parameterized<String, @FldA String> secondTypeArg = null;
+    public final Parameterized<@FldA String, @FldB String> bothTypeArgs = null;
+
+    public final Parameterized<@FldA Parameterized<@FldA String, @FldB String>, @FldB String>
+    nestedParameterized = null;
+
+    public final @FldA String [] array1 = null;
+    public final @FldA String @FldB [] array1Deep = null;
+    public final @FldA String [] [] array2 = null;
+    public final @FldA String @FldA [] @FldB [] array2Deep = null;
+    public final String @FldA [] [] array2First = null;
+    public final String [] @FldB [] array2Second = null;
+}
+
+class Parameterized<K, V> { }
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface FldA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface FldB { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface FldC { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface FldD { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/MethodReturnType.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,78 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class MtdDefaultScope {
+    MtdParameterized<String, String> unannotated() { return null; }
+    MtdParameterized<@MRtnA String, String> firstTypeArg() { return null; }
+    MtdParameterized<String, @MRtnA String> secondTypeArg() { return null; }
+    MtdParameterized<@MRtnA String, @MRtnB String> bothTypeArgs() { return null; }
+
+    MtdParameterized<@MRtnA MtdParameterized<@MRtnA String, @MRtnB String>, @MRtnB String>
+    nestedMtdParameterized() { return null; }
+
+    public <T> @MRtnA String method() { return null; }
+
+    @MRtnA String [] array1() { return null; }
+    @MRtnA String @MRtnB [] array1Deep() { return null; }
+    @MRtnA String [] [] array2() { return null; }
+    @MRtnA String @MRtnA [] @MRtnB [] array2Deep() { return null; }
+    String @MRtnA [] [] array2First() { return null; }
+    String [] @MRtnB [] array2Second() { return null; }
+
+    // Old-style array syntax
+    String array2FirstOld() @MRtnA [] { return null; }
+    String array2SecondOld() [] @MRtnB [] { return null; }
+}
+
+class MtdModifiedScoped {
+    public final MtdParameterized<String, String> unannotated() { return null; }
+    public final MtdParameterized<@MRtnA String, String> firstTypeArg() { return null; }
+    public final MtdParameterized<String, @MRtnA String> secondTypeArg() { return null; }
+    public final MtdParameterized<@MRtnA String, @MRtnB String> bothTypeArgs() { return null; }
+
+    public final MtdParameterized<@MRtnA MtdParameterized<@MRtnA String, @MRtnB String>, @MRtnB String>
+    nestedMtdParameterized() { return null; }
+
+    public final @MRtnA String [] array1() { return null; }
+    public final @MRtnA String @MRtnB [] array1Deep() { return null; }
+    public final @MRtnA String [] [] array2() { return null; }
+    public final @MRtnA String @MRtnA [] @MRtnB [] array2Deep() { return null; }
+    public final String @MRtnA [] [] array2First() { return null; }
+    public final String [] @MRtnB [] array2Second() { return null; }
+}
+
+class MtdParameterized<K, V> { }
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface MRtnA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface MRtnB { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/MethodTypeParameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class UnscopedUnmodified {
+    <K extends @MTyParamA String> void methodExtends() {}
+    <K extends @MTyParamA MtdTyParameterized<@MTyParamB String>> void nestedExtends() {}
+    <K extends @MTyParamA String, V extends @MTyParamA MtdTyParameterized<@MTyParamB String>> void dual() {}
+    <K extends String, V extends MtdTyParameterized<@MTyParamB String>> void dualOneAnno() {}
+}
+
+class PublicModifiedMethods {
+    public final <K extends @MTyParamA String> void methodExtends() {}
+    public final <K extends @MTyParamA MtdTyParameterized<@MTyParamB String>> void nestedExtends() {}
+    public final <K extends @MTyParamA String, V extends @MTyParamA MtdTyParameterized<@MTyParamB String>> void dual() {}
+    public final <K extends String, V extends MtdTyParameterized<@MTyParamB String>> void dualOneAnno() {}
+}
+
+class MtdTyParameterized<K> { }
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface MTyParamA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface MTyParamB { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Parameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,54 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class Parameters {
+    void unannotated(ParaParameterized<String, String> a) {}
+    void firstTypeArg(ParaParameterized<@ParamA String, String> a) {}
+    void secondTypeArg(ParaParameterized<String, @ParamA String> a) {}
+    void bothTypeArgs(ParaParameterized<@ParamA String, @ParamB String> both) {}
+
+    void nestedParaParameterized(ParaParameterized<@ParamA ParaParameterized<@ParamA String, @ParamB String>, @ParamB String> a) {}
+
+    void array1(@ParamA String [] a) {}
+    void array1Deep(@ParamA String @ParamB [] a) {}
+    void array2(@ParamA String [] [] a) {}
+    void array2Deep(@ParamA String @ParamA [] @ParamB [] a) {}
+    void array2First(String @ParamA [] [] a) {}
+    void array2Second(String [] @ParamB [] a) {}
+}
+
+class ParaParameterized<K, V> { }
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ParamA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ParamB { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Receivers.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,131 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class DefaultUnmodified {
+    void plain(@RcvrA DefaultUnmodified this) { }
+    <T> void generic(@RcvrA DefaultUnmodified this) { }
+    void withException(@RcvrA DefaultUnmodified this) throws Exception { }
+    String nonVoid(@RcvrA @RcvrB("m") DefaultUnmodified this) { return null; }
+    <T extends Runnable> void accept(@RcvrA DefaultUnmodified this, T r) throws Exception { }
+}
+
+class PublicModified {
+    public final void plain(@RcvrA PublicModified this) { }
+    public final <T> void generic(@RcvrA PublicModified this) { }
+    public final void withException(@RcvrA PublicModified this) throws Exception { }
+    public final String nonVoid(@RcvrA PublicModified this) { return null; }
+    public final <T extends Runnable> void accept(@RcvrA PublicModified this, T r) throws Exception { }
+}
+
+class WithValue {
+    void plain(@RcvrB("m") WithValue this) { }
+    <T> void generic(@RcvrB("m") WithValue this) { }
+    void withException(@RcvrB("m") WithValue this) throws Exception { }
+    String nonVoid(@RcvrB("m") WithValue this) { return null; }
+    <T extends Runnable> void accept(@RcvrB("m") WithValue this, T r) throws Exception { }
+}
+
+class WithFinal {
+    void plain(final @RcvrB("m") WithFinal this) { }
+    <T> void generic(final @RcvrB("m") WithFinal this) { }
+    void withException(final @RcvrB("m") WithFinal this) throws Exception { }
+    String nonVoid(final @RcvrB("m") WithFinal this) { return null; }
+    <T extends Runnable> void accept(final @RcvrB("m") WithFinal this, T r) throws Exception { }
+}
+
+class WithBody {
+    Object f;
+
+    void field(@RcvrA WithBody this) {
+        this.f = null;
+    }
+    void meth(@RcvrA WithBody this) {
+        this.toString();
+    }
+}
+
+class Generic1<X> {
+    void test1(Generic1<X> this) {}
+    void test2(@RcvrA Generic1<X> this) {}
+    void test3(Generic1<@RcvrA X> this) {}
+    void test4(@RcvrA Generic1<@RcvrA X> this) {}
+}
+
+class Generic2<@RcvrA X> {
+    void test1(Generic2<X> this) {}
+    void test2(@RcvrA Generic2<X> this) {}
+    void test3(Generic2<@RcvrA X> this) {}
+    void test4(@RcvrA Generic2<@RcvrA X> this) {}
+}
+
+class Generic3<X extends @RcvrA Object> {
+    void test1(Generic3<X> this) {}
+    void test2(@RcvrA Generic3<X> this) {}
+    void test3(Generic3<@RcvrA X> this) {}
+    void test4(@RcvrA Generic3<@RcvrA X> this) {}
+}
+
+class Generic4<X extends @RcvrA Object> {
+    <Y> void test1(Generic4<X> this) {}
+    <Y> void test2(@RcvrA Generic4<X> this) {}
+    <Y> void test3(Generic4<@RcvrA X> this) {}
+    <Y> void test4(@RcvrA Generic4<@RcvrA X> this) {}
+}
+
+class Outer {
+    class Inner {
+        void none(Outer.Inner this) {}
+        void outer(@RcvrA Outer.Inner this) {}
+        void inner(Outer. @RcvrB("i") Inner this) {}
+        void both(@RcvrA Outer.@RcvrB("i") Inner this) {}
+
+        void innerOnlyNone(Inner this) {}
+        void innerOnly(@RcvrA Inner this) {}
+    }
+}
+
+class GenericOuter<S, T> {
+    class GenericInner<U, V> {
+        void none(GenericOuter<S, T>.GenericInner<U, V> this) {}
+        void outer(@RcvrA GenericOuter<S, T>.GenericInner<U, V> this) {}
+        void inner(GenericOuter<S, T>. @RcvrB("i") GenericInner<U, V> this) {}
+        void both(@RcvrA GenericOuter<S, T>.@RcvrB("i") GenericInner<U, V> this) {}
+
+        void innerOnlyNone(GenericInner<U, V> this) {}
+        void innerOnly(@RcvrA GenericInner<U, V> this) {}
+    }
+}
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface RcvrA {}
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface RcvrB { String value(); }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Throws.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class ThrDefaultUnmodified {
+    void oneException() throws @ThrA Exception {}
+    void twoExceptions() throws @ThrA RuntimeException, @ThrA Exception {}
+}
+
+class ThrPublicModified {
+    public final void oneException(String a) throws @ThrA Exception {}
+    public final void twoExceptions(String a) throws @ThrA RuntimeException, @ThrA Exception {}
+}
+
+class ThrWithValue {
+    void oneException() throws @ThrB("m") Exception {}
+    void twoExceptions() throws @ThrB(value="m") RuntimeException, @ThrA Exception {}
+}
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ThrA {}
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface ThrB { String value(); }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/TypeParameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class TypUnannotated<K> { }
+class OneAnnotated<@TyParaA K> { }
+class TwoAnnotated<@TyParaA K, @TyParaA V> { }
+class SecondAnnotated<K, @TyParaA V extends String> { }
+
+class TestMethods {
+    <K> void unannotated() { }
+    <@TyParaA K> void oneAnnotated() { }
+    <@TyParaA K, @TyParaB("m") V> void twoAnnotated() { }
+    <K, @TyParaA V extends @TyParaA String> void secondAnnotated() { }
+}
+
+class UnannotatedB<K> { }
+class OneAnnotatedB<@TyParaB("m") K> { }
+class TwoAnnotatedB<@TyParaB("m") K, @TyParaB("m") V> { }
+class SecondAnnotatedB<K, @TyParaB("m") V extends @TyParaB("m") String> { }
+
+class OneAnnotatedC<@TyParaC K> { }
+class TwoAnnotatedC<@TyParaC K, @TyParaC V> { }
+class SecondAnnotatedC<K, @TyParaC V extends String> { }
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface TyParaA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface TyParaB { String value(); }
+@Target(ElementType.TYPE_USE)
+@Documented
+@interface TyParaC { }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Varargs.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface VarArgA {}
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class Varargs {
+
+    // Handle annotations on a varargs element type
+    void varargPlain(Object @VarArgA... objs) {
+    }
+
+    void varargGeneric(Class<?> @VarArgA ... clz) {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeAnnotations/typeannos/Wildcards.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * 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.
+ *
+ * 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 typeannos;
+
+import java.lang.annotation.*;
+
+/*
+ * This class is replicated from test/tools/javac/annotations/typeAnnotations/newlocations.
+ */
+class BoundTest {
+    void wcExtends(MyList<? extends @WldA String> l) { }
+    void wcSuper(MyList<? super @WldA String> l) { }
+
+    MyList<? extends @WldA String> returnWcExtends() { return null; }
+    MyList<? super @WldA String> returnWcSuper() { return null; }
+    MyList<? extends @WldA MyList<? super @WldB("m") String>> complex() { return null; }
+}
+
+class BoundWithValue {
+    void wcExtends(MyList<? extends @WldB("m") String> l) { }
+    void wcSuper(MyList<? super @WldB(value="m") String> l) { }
+
+    MyList<? extends @WldB("m") String> returnWcExtends() { return null; }
+    MyList<? super @WldB(value="m") String> returnWcSuper() { return null; }
+    MyList<? extends @WldB("m") MyList<? super @WldB("m") String>> complex() { return null; }
+}
+
+class SelfTest {
+    void wcExtends(MyList<@WldA ?> l) { }
+    void wcSuper(MyList<@WldA ?> l) { }
+
+    MyList<@WldA ?> returnWcExtends() { return null; }
+    MyList<@WldA ?> returnWcSuper() { return null; }
+    MyList<@WldA ? extends @WldA MyList<@WldB("m") ?>> complex() { return null; }
+}
+
+class SelfWithValue {
+    void wcExtends(MyList<@WldB("m") ?> l) { }
+    void wcSuper(MyList<@WldB(value="m") ?> l) { }
+
+    MyList<@WldB("m") ?> returnWcExtends() { return null; }
+    MyList<@WldB(value="m") ?> returnWcSuper() { return null; }
+    MyList<@WldB("m") ? extends MyList<@WldB("m") ? super String>> complex() { return null; }
+}
+
+class MyList<K> { }
+
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface WldA { }
+@Target({ElementType.TYPE_USE, ElementType.TYPE_PARAMETER})
+@Documented
+@interface WldB { String value(); }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeParams/TestTypeParameters.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4927167 4974929 7010344 8025633 8081854
+ * @summary  When the type parameters are more than 10 characters in length,
+ *           make sure there is a line break between type params and return type
+ *           in member summary. Also, test for type parameter links in package-summary and
+ *           class-use pages. The class/annotation pages should check for type
+ *           parameter links in the class/annotation signature section when -linksource is set.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestTypeParameters
+ */
+
+public class TestTypeParameters extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestTypeParameters tester = new TestTypeParameters();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-use",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/C.html", true,
+                "<td class=\"colFirst\"><code>&lt;W extends java.lang.String,V extends "
+                + "java.util.List&gt;<br>java.lang.Object</code></td>",
+                "<code>&lt;T&gt;&nbsp;java.lang.Object</code>");
+
+        checkOutput("pkg/package-summary.html", true,
+                "C</a>&lt;E extends <a href=\"../pkg/Parent.html\" "
+                + "title=\"class in pkg\">Parent</a>&gt;");
+
+        checkOutput("pkg/class-use/Foo4.html", true,
+                "<a href=\"../../pkg/ClassUseTest3.html\" title=\"class in pkg\">"
+                + "ClassUseTest3</a>&lt;T extends <a href=\"../../pkg/ParamTest2.html\" "
+                + "title=\"class in pkg\">ParamTest2</a>&lt;java.util.List&lt;? extends "
+                + "<a href=\"../../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>&gt;&gt;&gt;");
+
+        // Nested type parameters
+        checkOutput("pkg/C.html", true,
+                "<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">\n"
+                + "<!--   -->\n"
+                + "</a>");
+    }
+
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2",
+                "-linksource",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/ClassUseTest3.html", true,
+            "public class <a href=\"../src-html/pkg/ClassUseTest3.html#line.28\">" +
+            "ClassUseTest3</a>&lt;T extends <a href=\"../pkg/ParamTest2.html\" " +
+            "title=\"class in pkg\">ParamTest2</a>&lt;java.util.List&lt;? extends " +
+            "<a href=\"../pkg/Foo4.html\" title=\"class in pkg\">Foo4</a>&gt;&gt;&gt;");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeParams/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+public class C <E extends Parent> {
+
+    /**
+     * Test case one.  This should not cause a line break in the member summary.
+     */
+    public <T> Object shortTypeParamList(T param){ return null; }
+
+    /**
+     * Test case two.  This should cause a line break in the member summary.
+     */
+    public <W extends String, V extends List> Object longTypeParamList(W param1,
+        V param2){ return null; }
+
+    public static void formatDetails(Collection<Map<String,String>> job,
+        Collection<String> include) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeParams/pkg/ClassUseTest3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg;
+
+import java.util.*;
+
+public class ClassUseTest3 <T extends ParamTest2<List<? extends Foo4>>> {
+
+    public ClassUseTest3(Set<Foo4> p) {}
+
+    public <T extends ParamTest2<List<? extends Foo4>>> ParamTest2<List<? extends Foo4>> method(T t) {
+        return null;
+    }
+
+    public void method(Set<Foo4> p) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeParams/pkg/Foo4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg;
+
+public class Foo4 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeParams/pkg/ParamTest2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 pkg;
+
+public class ParamTest2<E> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testTypeParams/pkg/Parent.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg;
+
+public class Parent {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUnnamedPackage/BadSource.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,24 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+Just a dummy file that should not cause an error.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUnnamedPackage/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+/**
+ * This is a class in the unnamed package.
+ */
+public class C {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUnnamedPackage/TestUnnamedPackage.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,70 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4904075 4774450 5015144 8043698
+ * @summary  Reference unnamed package as "Unnamed", not empty string.
+ *           Generate a package summary for the unnamed package.
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestUnnamedPackage
+ */
+
+public class TestUnnamedPackage extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestUnnamedPackage tester = new TestUnnamedPackage();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-sourcepath", testSrc,
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("package-summary.html", true,
+                "<h1 title=\"Package\" class=\"title\">Package&nbsp;&lt;Unnamed&gt;</h1>",
+                "This is a package comment for the unnamed package.",
+                "This is a class in the unnamed package.");
+
+        checkOutput("package-summary.html", true,
+                "<title>&lt;Unnamed&gt;</title>");
+
+        checkOutput("package-tree.html", true,
+                "<h1 class=\"title\">Hierarchy For Package &lt;Unnamed&gt;</h1>");
+
+        checkOutput("index-all.html", true,
+                "title=\"class in &lt;Unnamed&gt;\"");
+
+        checkOutput("C.html", true,
+                "<a href=\"package-summary.html\">");
+
+        checkOutput(Output.OUT, false,
+                "BadSource");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUnnamedPackage/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<html>
+    <body>
+        This is a package comment for the unnamed package.
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/**
+ * Class in an unnamed package.
+ */
+
+public class C {
+
+    /**
+     * Field in C.
+     */
+    public UsedInC fieldInC;
+
+    /**
+     * Method in C.
+     */
+    public UsedInC methodInC(UsedInC p) {
+        return p;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/TestUseOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4496290 4985072 7006178 7068595 8016328 8050031 8048351 8081854
+ * @summary A simple test to ensure class-use files are correct.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestUseOption
+ */
+
+public class TestUseOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestUseOption tester = new TestUseOption();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out-1",
+                "-sourcepath", testSrc,
+                "-use",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+
+        // Eight tests for class use.
+        for (int i = 1; i <= 8; i++) {
+            checkOutput("pkg1/class-use/C1.html", true,
+                    "Test " + i + " passes");
+        }
+
+        // Three more tests for package use.
+        for (int i = 1; i <= 3; i++) {
+            checkOutput("pkg1/package-use.html", true,
+                    "Test " + i + " passes");
+        }
+
+        checkOrder("pkg1/class-use/UsedClass.html",
+                "Field in C1.",
+                "Field in C2.",
+                "Field in C4.",
+                "Field in C5.",
+                "Field in C6.",
+                "Field in C7.",
+                "Field in C8.",
+                "Method in C1.",
+                "Method in C2.",
+                "Method in C4.",
+                "Method in C5.",
+                "Method in C6.",
+                "Method in C7.",
+                "Method in C8."
+        );
+
+        checkOutput("pkg2/class-use/C3.html", true,
+                "<a href=\"../../index.html?pkg2/class-use/C3.html\" target=\"_top\">"
+                + "Frames</a></li>"
+        );
+        checkOutput("pkg1/class-use/UsedClass.html", true,
+          "that return types with arguments of type"
+        );
+        checkOutput("pkg1/class-use/UsedClass.html", true,
+          "<a href=\"../../pkg1/C1.html#methodInC1ReturningType--\">methodInC1ReturningType</a>"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+          "Classes in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that implement " +
+          "<a href=\"../../pkg1/UsedInterface.html\" title=\"interface in pkg1\">UsedInterface</a>"
+        );
+        checkOutput("pkg1/class-use/UsedInterfaceA.html", true,
+          "Classes in <a href=\"../../pkg1/package-summary.html\">pkg1</a> that implement " +
+          "<a href=\"../../pkg1/UsedInterfaceA.html\" title=\"interface in pkg1\">UsedInterfaceA</a>"
+        );
+        checkOutput("pkg1/class-use/UsedClass.html", false,
+           "methodInC1Protected"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+           "<a href=\"../../pkg1/AnAbstract.html\" title=\"class in pkg1\">AnAbstract</a>"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+            "../../pkg1/C10.html#withReturningTypeParameters--"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+            "../../pkg1/C10.html#withTypeParametersOfType-java.lang.Class-"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+            "\"../../pkg1/package-summary.html\">pkg1</a> that return " +
+            "<a href=\"../../pkg1/UsedInterface.html\" title=\"interface in pkg1\""
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+            "<a href=\"../../pkg1/C10.html#addAll-pkg1.UsedInterface...-\">addAll</a>"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+            "<a href=\"../../pkg1/C10.html#create-pkg1.UsedInterfaceA-pkg1." +
+            "UsedInterface-java.lang.String-\">"
+        );
+        checkOutput("pkg1/class-use/UsedInterface.html", true,
+            "<a href=\"../../pkg1/C10.html#withTypeParametersOfType-java.lang.Class-\">" +
+            "withTypeParametersOfType</a>"
+        );
+    }
+
+    @Test
+    void test2() {
+        javadoc("-d", "out-2",
+                "-sourcepath", testSrc,
+                "-use",
+                testSrc("C.java"), testSrc("UsedInC.java"));
+        checkExit(Exit.OK);
+
+        checkOutput("class-use/UsedInC.html", true,
+                "Uses of <a href=\"../UsedInC.html\" title=\"class in &lt;Unnamed&gt;\">"
+                + "UsedInC</a> in <a href=\"../package-summary.html\">&lt;Unnamed&gt;</a>"
+        );
+        checkOutput("class-use/UsedInC.html", true,
+                "<li class=\"blockList\"><a name=\"unnamed.package\">"
+        );
+        checkOutput("package-use.html", true,
+                "<td class=\"colOne\">"
+                + "<a href=\"class-use/UsedInC.html#unnamed.package\">UsedInC</a>&nbsp;</td>"
+        );
+    }
+
+    @Test
+    void test3() {
+        javadoc("-d", "out-3",
+                "-sourcepath", testSrc,
+                "-use",
+                "-package", "unique");
+        checkExit(Exit.OK);
+        checkUnique("unique/class-use/UseMe.html",
+                "<a href=\"../../unique/C1.html#umethod1-unique.UseMe-unique.UseMe:A-\">",
+                "<a href=\"../../unique/C1.html#umethod2-unique.UseMe-unique.UseMe-\">",
+                "<a href=\"../../unique/C1.html#umethod3-unique.UseMe-unique.UseMe-\">",
+                "<a href=\"../../unique/C1.html#C1-unique.UseMe-unique.UseMe-\">");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/UsedInC.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+public class UsedInC
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/AnAbstract.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+public abstract class AnAbstract implements UsedInterface {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg1;
+
+import java.util.List;
+
+/**
+ * Test 3 passes.
+ */
+
+public class C1 {
+
+    /**
+     * Field in C1.
+     */
+    public UsedClass fieldInC1;
+
+    /**
+     * Method in C1.
+     */
+    public UsedClass methodInC1(UsedClass p) {
+        return p;
+    }
+
+    public List<UsedClass> methodInC1ReturningType() {
+        return null;
+    }
+
+    /*
+     * this must not appear anywhere.
+     */
+    UsedClass methodInC1Protected(List<UsedClass> p){
+        return p;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C10.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+import java.util.List;
+
+/**
+ * An implementor
+ *
+ */
+public class C10 extends UsedClass implements UsedInterface, UsedInterfaceA {
+
+    /**
+     * Nothing
+     */
+    public void doNothing() {}
+
+    /**
+     * Me too
+     */
+    public void doNothingA() {}
+
+    /**
+     * returns a collection with type param
+     * @return something
+     */
+    public List<? extends UsedClass> foo(){return null;}
+
+    /**
+     * returns and takes type param variants
+     * @param <T> yeah
+     * @return returns a type param
+     */
+    public <T extends UsedInterface<? super T>> UsedInterfaceA<T> withTypeParametersOfType(Class<? extends UsedInterface> c){return null;}
+
+    /**
+     * returns a type param
+     * @param <T> a param
+     * @return something
+     */
+    public <T extends UsedInterface>T[] withReturningTypeParameters(){return null;}
+
+    /**
+     * a return a type parameter, as a static method
+     * @param <T> a type param
+     * @param enumType something
+     * @param name something
+     * @return a trype param
+     */
+    public static <T extends UsedInterface<T>> T withReturnVariant(Class<T> enumType, String name){return null;}
+
+    /**
+     * another variant of a method returning type parameters
+     * @param <T> something
+     * @param listenerInterface something
+     * @param target something
+     * @param action something
+     * @return a type param
+     */
+    public <T> T create(UsedInterfaceA<T> listenerInterface, UsedInterface target, String action){return null;}
+
+    /**
+     * input is an array
+     * @param elements a vararg
+     */
+    public void addAll(UsedInterface... elements) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2002, 2004, 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.
+ *
+ * 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 pkg1;
+
+public class C2 {
+
+    /**
+     * Field in C2.
+     */
+    public UsedClass fieldInC2;
+
+    /**
+     * Test 3 passes.
+     */
+    public C1 field = null;
+
+    /**
+     * Test 4 passes.
+     */
+    public C1 method2() {
+        return null;
+    }
+
+    /**
+     * Test 5 passes.
+     */
+    public void method(pkg1.C1 c1) {}
+
+    /**
+     * Method in C2.
+     */
+    public UsedClass methodInC2(UsedClass p) {
+        return p;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C4.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+public class C4
+{
+    /**
+     * Field in C4.
+     */
+    public UsedClass fieldInC4;
+
+    /**
+     * Method in C4.
+     */
+    public UsedClass methodInC4(UsedClass p) {
+        return p;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C5.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+public class C5
+{
+    /**
+     * Field in C5.
+     */
+    public UsedClass fieldInC5;
+
+    /**
+     * Method in C5.
+     */
+    public UsedClass methodInC5(UsedClass p) {
+        return p;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C6.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+public class C6
+{
+    /**
+     * Field in C6.
+     */
+    public UsedClass fieldInC6;
+
+    /**
+     * Method in C6.
+     */
+    public UsedClass methodInC6(UsedClass p) {
+        return p;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C7.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+public class C7
+{
+    /**
+     * Field in C7.
+     */
+    public UsedClass fieldInC7;
+
+    /**
+     * Method in C7.
+     */
+    public UsedClass methodInC7(UsedClass p) {
+        return p;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C8.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+public class C8
+{
+    /**
+     * Field in C8.
+     */
+    public UsedClass fieldInC8;
+
+    /**
+     * Method in C8.
+     */
+    public UsedClass methodInC8(UsedClass p) {
+        return p;
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/C9.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 pkg1;
+
+/**
+ * An implementor
+ *
+ */
+public class C9 implements UsedInterface, UsedInterfaceA {
+    public void doNothing(){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedClass.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 pkg1;
+
+public class UsedClass
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedInterface.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/**
+ * An interface
+ *
+ */
+
+package pkg1;
+
+public interface UsedInterface<T> {
+
+    /**
+     * Does nothing
+     */
+    void doNothing();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/UsedInterfaceA.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/**
+ * An interface
+ *
+ */
+
+package pkg1;
+
+public interface UsedInterfaceA<T> {
+
+    /**
+     * Does nothing
+     */
+    void doNothingA();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg1/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<HTML>
+<BODY>
+    Test 1 passes.
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg2/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg2;
+
+import pkg1.*;
+
+public class C3 {
+
+    /**
+     * Test 6 passes.
+     */
+    public C1 field = null;
+
+    /**
+     * Test 7 passes.
+     */
+    public C1 method2() {
+        return null;
+    }
+
+    /**
+     * Test 8 passes.
+     */
+    public void method(pkg1.C1 c1) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/pkg2/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<HTML>
+<BODY>
+    Test 2 passes.
+</BODY>
+</HTML>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/unique/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 unique;
+
+/**
+ * A class to ensure we get unique entries in class-use for each of these,
+ * so make sure each method is uniquely named to avoid false positives
+ */
+
+public class C1 {
+
+    /**
+     * Ctor C1 to test uniqueness
+     * @param a param
+     * @param b param
+     */
+    public C1(UseMe a, UseMe b){}
+
+    /**
+     * umethod1 to test uniqueness
+     * @param one param
+     * @param uarray param
+     */
+    public void umethod1(UseMe<?> one, UseMe<?>[] uarray){}
+
+    /**
+     * umethod1 to test uniqueness
+     * @param one param
+     * @param two param
+     */
+    public void umethod2(UseMe<?> one, UseMe<?> two){}
+
+    /**
+     * umethod1 to test uniqueness
+     * @param a param
+     * @param b param
+     */
+    public void umethod3(UseMe a, UseMe b){}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testUseOption/unique/UseMe.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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 unique;
+
+public class UseMe<T> {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testValueTag/TestValueTag.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,142 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4764045 8004825 8026567
+ * @summary  This test ensures that the value tag works in all
+ * use cases. The explainations for each test case are written below.
+ * @author   jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestValueTag
+ */
+
+public class TestValueTag extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestValueTag tester = new TestValueTag();
+        tester.runTests();
+    }
+
+    @Test
+    void test1() {
+        javadoc("-d", "out1",
+                "-sourcepath", testSrc,
+                "-tag", "todo",
+                "pkg1", "pkg2");
+        checkExit(Exit.FAILED);
+
+        checkOutput("pkg1/Class1.html", true,
+                // Base case:  using @value on a constant.
+                "Result:  \"Test 1 passes\"",
+                // Retrieve value of constant in same class.
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_2_PASSES\">\"Test 2 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_3_PASSES\">\"Test 3 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_4_PASSES\">\"Test 4 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_5_PASSES\">\"Test 5 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_6_PASSES\">\"Test 6 passes\"</a>");
+
+        checkOutput("pkg1/Class2.html", true,
+                // Retrieve value of constant in different class.
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_7_PASSES\">\"Test 7 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_8_PASSES\">\"Test 8 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_9_PASSES\">\"Test 9 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_10_PASSES\">\"Test 10 passes\"</a>",
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_11_PASSES\">\"Test 11 passes\"</a>",
+                // Retrieve value of constant in different package
+                "Result:  <a href=\"../pkg2/Class3.html#TEST_12_PASSES\">\"Test 12 passes\"</a>",
+                "Result:  <a href=\"../pkg2/Class3.html#TEST_13_PASSES\">\"Test 13 passes\"</a>",
+                "Result:  <a href=\"../pkg2/Class3.html#TEST_14_PASSES\">\"Test 14 passes\"</a>",
+                "Result:  <a href=\"../pkg2/Class3.html#TEST_15_PASSES\">\"Test 15 passes\"</a>",
+                "Result:  <a href=\"../pkg2/Class3.html#TEST_16_PASSES\">\"Test 16 passes\"</a>");
+
+        checkOutput("pkg2/package-summary.html", true,
+                // Retrieve value of constant from a package page
+                "Result: <a href=\"../pkg2/Class3.html#TEST_17_PASSES\">\"Test 17 passes\"</a>");
+
+        checkOutput("pkg1/CustomTagUsage.html", true,
+                // Test @value tag used with custom tag.
+                "<dt><span class=\"simpleTagLabel\">Todo:</span></dt>\n" +
+                "<dd>the value of this constant is 55.</dd>");
+
+        checkOutput(Output.OUT, true,
+                // Test @value errors printed due to invalid use or when used with
+                // non-constant or with bad references.
+                "error: value does not refer to a constant\n"
+                + "     * Result:  {@value TEST_12_ERROR}",
+                "error: {@value} not allowed here\n"
+                + "     * Result:  {@value}",
+                "error: value does not refer to a constant\n"
+                + "     * Result:  {@value NULL}",
+                "error: {@value} not allowed here\n"
+                + "     * Invalid (null): {@value}",
+                "error: {@value} not allowed here\n"
+                + "     * Invalid (non-constant field): {@value}",
+                "error: value does not refer to a constant\n"
+                + "     * Here is a bad value reference: {@value UnknownClass#unknownConstant}",
+                "error: reference not found\n"
+                + "     * Here is a bad value reference: {@value UnknownClass#unknownConstant}",
+                "error: {@value} not allowed here\n"
+                + "     * @todo the value of this constant is {@value}"
+        );
+
+        checkOutput("pkg1/Class1.html", false,
+                //Base case:  using @value on a constant.
+                "Result:  <a href=\"../pkg1/Class1.html#TEST_12_ERROR\">\"Test 12 "
+                + "generates an error message\"</a>");
+
+        checkForException();
+    }
+
+    @Test()
+    void test2() {
+        javadoc("-Xdoclint:none",
+                "-d", "out2",
+                "-sourcepath", testSrc,
+                "-tag", "todo",
+                "pkg1", "pkg2");
+        checkExit(Exit.OK);
+        checkOutput(Output.OUT, true,
+                //Test @value warning printed when used with non-constant.
+                "warning - @value tag (which references nonConstant) "
+                + "can only be used in constants.",
+                "warning - @value tag (which references NULL) "
+                + "can only be used in constants.",
+                "warning - @value tag (which references TEST_12_ERROR) "
+                + "can only be used in constants."
+// TODO: re-examine these.
+//                //Test warning printed for bad reference.
+//                "warning - UnknownClass#unknownConstant (referenced by "
+//                + "@value tag) is an unknown reference.",
+//                //Test warning printed for invalid use of @value.
+//                "warning - @value tag cannot be used here."
+        );
+        checkForException();
+    }
+
+    void checkForException() {
+        checkOutput(Output.STDERR, false, "DocletAbortException");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testValueTag/pkg1/Class1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,91 @@
+/*
+ * 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Result:  {@value TEST_2_PASSES}
+ */
+public class Class1 {
+
+    /**
+     * Result:  {@value}
+     */
+    public static final String TEST_1_PASSES = "Test 1 passes";
+
+    public static final String TEST_2_PASSES  = "Test 2 passes";
+    public static final String TEST_3_PASSES  = "Test 3 passes";
+    public static final String TEST_4_PASSES  = "Test 4 passes";
+    public static final String TEST_5_PASSES  = "Test 5 passes";
+    public static final String TEST_6_PASSES  = "Test 6 passes";
+    public static final String TEST_7_PASSES  = "Test 7 passes";
+    public static final String TEST_8_PASSES  = "Test 8 passes";
+    public static final String TEST_9_PASSES  = "Test 9 passes";
+    public static final String TEST_10_PASSES = "Test 10 passes";
+    public static final String TEST_11_PASSES = "Test 11 passes";
+
+    /**
+     * Invalid (non-constant field): {@value}
+     */
+    public static String TEST_12_ERROR = "Test 12 generates an error message";
+
+    /**
+     * Invalid (null): {@value}
+     */
+    public static final String NULL = null;
+
+    /**
+     * Result:  {@value TEST_3_PASSES}
+     */
+    public int field;
+
+    /**
+     * Result:  {@value TEST_4_PASSES}
+     */
+    public Class1() {}
+
+    /**
+     * Result:  {@value TEST_5_PASSES}
+     */
+    public void method() {}
+
+    /**
+     * Result:  {@value TEST_12_ERROR}
+     */
+    public void invalidValueTag1() {}
+
+    /**
+     * Result:  {@value}
+     */
+    public void invalidValueTag2() {}
+
+    /**
+     * Result:  {@value NULL}
+     */
+    public void testNullConstant() {}
+
+    /**
+     * Result:  {@value pkg1.Class1#TEST_6_PASSES}
+     */
+    public class NestedClass{}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testValueTag/pkg1/Class2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,65 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * <pre>
+ *  Result:  {@value pkg1.Class1#TEST_7_PASSES}
+ *  Result:  {@value pkg2.Class3#TEST_12_PASSES}
+ * </pre>
+ */
+public class Class2 {
+
+    /**
+     * <pre>
+     * Result:  {@value pkg1.Class1#TEST_8_PASSES}
+     * Result:  {@value pkg2.Class3#TEST_13_PASSES}
+     * </pre>
+     */
+    public int field;
+
+    /**
+     * <pre>
+     * Result:  {@value pkg1.Class1#TEST_9_PASSES}
+     * Result:  {@value pkg2.Class3#TEST_14_PASSES}
+     * </pre>
+     */
+    public Class2() {}
+
+    /**
+     * <pre>
+     * Result:  {@value pkg1.Class1#TEST_10_PASSES}
+     * Result:  {@value pkg2.Class3#TEST_15_PASSES}
+     * </pre>
+     */
+    public void method() {}
+
+    /**
+     * <pre>
+     * Result:  {@value pkg1.Class1#TEST_11_PASSES}
+     * Result:  {@value pkg2.Class3#TEST_16_PASSES}
+     * </pre>
+     */
+    public class NestedClass{}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testValueTag/pkg1/CustomTagUsage.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class CustomTagUsage {
+
+    /**
+     * @todo the value of this constant is {@value}.
+     */
+    public static final int CONSTANT_INT = 55;
+
+    /**
+     * @todo the value of this constant is {@value}.
+     */
+    public int nonConstant = 55;
+
+    /**
+     * Here is a bad value reference: {@value UnknownClass#unknownConstant}.
+     */
+    public int badReference = 55;
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testValueTag/pkg2/Class3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg2;
+
+public class Class3 {
+
+    public static final String TEST_12_PASSES  = "Test 12 passes";
+    public static final String TEST_13_PASSES  = "Test 13 passes";
+    public static final String TEST_14_PASSES  = "Test 14 passes";
+    public static final String TEST_15_PASSES  = "Test 15 passes";
+    public static final String TEST_16_PASSES  = "Test 16 passes";
+    public static final String TEST_17_PASSES  = "Test 17 passes";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testValueTag/pkg2/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+<html>
+    <body>
+        Result: {@value pkg2.Class3#TEST_17_PASSES}
+    </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWarnBadParamNames/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+public class C {
+    /**
+     * @param int arg
+     * @param IDontExist
+     * @param arg this is a valid comment for parameter arg.
+     * @param arg this is an invalid comment for a parameter arg
+     *            because it has already been documented above.
+     */
+    public void method(int arg) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWarnBadParamNames/TestWarnBadParamNames.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4693440
+ * @summary Test to make sure that warning is printed when bad parameter
+ * name is used with param.
+ * @author jamieh
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestWarnBadParamNames
+ */
+
+public class TestWarnBadParamNames extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestWarnBadParamNames tester = new TestWarnBadParamNames();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-Xdoclint:none",
+                "-d", "out",
+                testSrc("C.java"));
+        checkExit(Exit.OK);
+
+        checkOutput(Output.OUT, true,
+                "warning - @param argument \"int\" is not a parameter name.",
+                "warning - @param argument \"IDontExist\" is not a parameter name.",
+                "warning - Parameter \"arg\" is documented more than once.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWarnings/TestWarnings.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      4515705 4804296 4702454 4697036 8025633
+ * @summary  Make sure that first sentence warning only appears once.
+ *           Make sure that only warnings/errors are printed when quiet is used.
+ *           Make sure that links to private/unincluded methods do not cause
+ *           a "link unresolved" warning.
+ *           Make sure error message starts with "error -".
+ * @author   jamieh
+ * @library  ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestWarnings
+ */
+
+public class TestWarnings extends JavadocTester {
+    public static void main(String... args) throws Exception  {
+        TestWarnings tester = new TestWarnings();
+        tester.runTests();
+    }
+
+    @Test
+    void testDefault() {
+        javadoc("-d", "out-default",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.FAILED);
+
+        checkOutput(Output.OUT, true,
+                "X.java:23: error: self-closing element not allowed");
+
+        checkOutput(Output.OUT, true,
+                "X.java:24: error: self-closing element not allowed");
+
+        checkOutput(Output.OUT, true,
+                "X.java:25: error: self-closing element not allowed");
+
+        checkOutput(Output.OUT, true,
+                "X.java:26: error: self-closing element not allowed");
+
+        /* DCErroneous
+        checkOutput(Output.OUT, true,
+                "package.html: error - Body tag missing from HTML");
+        */
+
+        checkOutput("pkg/X.html", false,
+                "can't find m()");
+        checkOutput("pkg/X.html", false,
+                "can't find X()");
+        checkOutput("pkg/X.html", false,
+                "can't find f");
+    }
+
+    @Test
+    void testPrivate() {
+        javadoc("-d", "out-private",
+                "-private",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.FAILED);
+
+        checkOutput("pkg/X.html", true,
+            "<a href=\"../pkg/X.html#m--\"><code>m()</code></a><br/>",
+            "<a href=\"../pkg/X.html#X--\"><code>X()</code></a><br/>",
+            "<a href=\"../pkg/X.html#f\"><code>f</code></a><br/>");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWarnings/pkg/X.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/* /nodynamiccopyright/ */
+
+package pkg;
+
+import java.io.Serializable;
+
+/**
+ * {@link com.package1.Class1#publicStaticMethod().
+ * Any label would be ignored.
+ */
+public class X implements Serializable {
+
+    private int f;
+
+    private X(){}
+
+    private void m() {}
+
+    /** @see X#m() */
+    private static class P implements Serializable {}
+
+    /**
+     * {@link #X()}<br/>
+     * {@link #m()}<br/>
+     * {@link #f}<br/>
+     * {@link java.lang.String#toString()}<br/>
+     */
+    public void foo() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWarnings/pkg/package.html	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,4 @@
+<HTML>
+   Testing.
+<HTML>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWindowTitle/TestWindowTitle.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,218 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8016675 8026736
+ * @summary Test for window title.
+ * @author Bhavesh Patel
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build JavadocTester
+ * @run main TestWindowTitle
+ */
+public class TestWindowTitle extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestWindowTitle tester = new TestWindowTitle();
+        tester.runTests();
+        tester.printSummary();
+    }
+
+    @Test
+    void testJavaScriptChars() {
+        // Window title with JavaScript special characters.
+        String title = "Testing \"Window 'Title'\" with a \\ backslash and a / "
+                + "forward slash and a \u00e8 unicode char also a    tab and also a "
+                + "\t special character another \u0002 unicode)";
+
+        javadoc("-d", "out-js-chars",
+                "-windowtitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", true,
+                "parent.document.title=\"Overview (Testing \\\"Window \\\'Title\\\'\\\" "
+                + "with a \\\\ backslash and a / forward slash and a \\u00E8 unicode char "
+                + "also a    tab and also a \\t special character another \\u0002 unicode))\";"
+        );
+
+        checkOutput("overview-summary.html", false,
+                "parent.document.title=\"Overview (Testing \"Window \'Title\'\" "
+                + "with a \\ backslash and a / forward slash and a \u00E8 unicode char "
+                + "also a    tab and also a \t special character another \u0002 unicode))\";"
+        );
+    }
+
+    @Test
+    void testScriptTag() {
+        // Window title with a script tag.
+        String title = "Testing script tag in title </title><script>alert(\"Should not pop up\")</script>.";
+
+        javadoc("-d", "out-script",
+                "-windowtitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", true,
+                "parent.document.title=\"Overview (Testing script tag in title alert"
+                + "(\\\"Should not pop up\\\").)\";"
+        );
+
+        checkOutput("p2/C2.html", true,
+                "parent.document.title=\"C2 (Testing script tag in title alert"
+                + "(\\\"Should not pop up\\\").)\";"
+        );
+
+        checkOutput("overview-summary.html", false,
+                "parent.document.title=\"Overview (Testing script tag in title </title><script>"
+                + "alert(\\\"Should not pop up\\\")</script>.)\";"
+        );
+
+        checkOutput("p2/C2.html", false,
+                "parent.document.title=\"C2 (Testing script tag in title </title><script>"
+                + "alert(\\\"Should not pop up\\\")</script>.)\";"
+        );
+    }
+
+    @Test
+    void testHtmlTags() {
+        // Window title with other HTML tags.
+        String title = "Testing another <p>HTML</p> tag. Another <h1>tag</h1>. A "
+                + "<span id=\"testTag\">tag with attributes</span>. <script and </p are not tags.";
+
+        javadoc("-d", "out-html-tags",
+                "-windowtitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", true,
+            "parent.document.title=\"Overview (Testing another HTML tag. Another tag. A "
+            + "tag with attributes. <script and </p are not tags.)\";"
+        );
+
+        checkOutput("overview-summary.html", false,
+            "parent.document.title=\"Overview (Testing another <p>HTML</p> tag. Another "
+            + "<h1>tag</h1>. A <span id=\"testTag\">tag with attributes</span>. <script and "
+            + "</p are not tags.)\";"
+        );
+    }
+
+    @Test
+    void testHtmlEntities() {
+        // Window title using entities.
+        String title = "Testing entities &lt;script&gt;alert(\"Should not pop up\")&lt;/script&gt;.";
+
+        javadoc("-d", "out-html-entities",
+                "-windowtitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+
+        checkOutput("overview-summary.html", true,
+            "parent.document.title=\"Overview (Testing entities &lt;script&gt;alert(\\\"Should "
+            + "not pop up\\\")&lt;/script&gt;.)\";"
+        );
+
+        checkOutput("overview-summary.html", false,
+            "parent.document.title=\"Overview (Testing entities alert(\\\"Should not pop up\\\").)\";"
+        );
+    }
+
+    @Test
+    void testEmptyTags() {
+        // Window title with just empty HTML tags.
+        String title = "</title><script></script>";
+
+        javadoc("-d", "out-empty-tags",
+                "-windowtitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+
+        checkOutput("overview-summary.html", true,
+            "parent.document.title=\"Overview\";"
+        );
+
+        checkOutput("overview-summary.html", false,
+            "parent.document.title=\"Overview (</title><script></script>)\";"
+        );
+    }
+
+    @Test
+    void testUnicode() {
+        //Window title with unicode characters.
+        String title = "Testing unicode \u003cscript\u003ealert(\"Should not pop up\")\u003c/script\u003e.";
+
+        javadoc("-d", "out-unicode",
+                "-windowtitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", true,
+            "parent.document.title=\"Overview (Testing unicode alert(\\\"Should "
+            + "not pop up\\\").)\";"
+        );
+
+        checkOutput("overview-summary.html", false,
+            "parent.document.title=\"Overview (Testing unicode <script>alert(\\\"Should not pop up\\\")"
+            + "</script>.)\";"
+        );
+    }
+
+    @Test
+    void testEmpty() {
+        // An empty window title.
+        String title = "";
+        javadoc("-d", "out-empty",
+                "-windowtitle", title,
+                "-sourcepath", testSrc, "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", true,
+                "parent.document.title=\"Overview\";"
+        );
+    }
+
+    @Test
+    void testDocTitle() {
+        // Window title with JavaScript special characters, specified with -doctitle
+        String title = "Testing \"Window 'Title'\" with a \\ backslash and a / "
+                + "forward slash and a \u00e8 unicode char also a    tab and also a "
+                + "\t special character another \u0002 unicode)";
+
+        javadoc("-d", "out-doctitle",
+                "-doctitle", title,
+                "-sourcepath", testSrc,
+                "p1", "p2");
+        checkExit(Exit.OK);
+
+        checkOutput("overview-summary.html", false,
+            "parent.document.title=\"Overview (Testing \\\"Window \\\'Title\\\'\\\" "
+            + "with a \\\\ backslash and a / forward slash and a \\u00E8 unicode char "
+            + "also a    tab and also a \\t special character another \\u0002 unicode)\";"
+        );
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWindowTitle/p1/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ *
+ * 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 p1;
+
+public class C1 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testWindowTitle/p2/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * 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.
+ *
+ * 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 p2;
+
+public class C2 {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/testXOption/TestXOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,73 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug      8007687
+ * @summary  Make sure that the -X option works properly.
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestXOption
+ */
+
+public class TestXOption extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestXOption tester = new TestXOption();
+        tester.runTests();
+    }
+
+    @Test
+    void testWithOption() {
+        javadoc("-d", "out1",
+                "-sourcepath", testSrc,
+                "-X",
+                testSrc("TestXOption.java"));
+        checkExit(Exit.OK);
+        checkOutput(true);
+    }
+
+    @Test
+    void testWithoutOption() {
+        javadoc("-d", "out2",
+                "-sourcepath", testSrc,
+                testSrc("TestXOption.java"));
+        checkExit(Exit.OK);
+        checkOutput(false);
+    }
+
+    private void checkOutput(boolean expectFound) {
+        // TODO: It's an ugly hidden side-effect of the current doclet API
+        // that the -X output from the tool and the -X output from the doclet
+        // come out on different streams!
+        // When we clean up the doclet API, this should be rationalized.
+        checkOutput(Output.OUT, expectFound,
+                "-Xmaxerrs ",
+                "-Xmaxwarns ");
+        checkOutput(Output.OUT, expectFound,
+                "-Xdocrootparent ",
+                "-Xdoclint ",
+                "-Xdoclint:");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/typeAnnotations/smoke/TestSmoke.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,99 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8006735
+ * @summary  Smoke test for ensuring that annotations are emitted to javadoc
+ *
+ * @author   Mahmood Ali <mali>
+ * @library  ../../lib
+ * @modules jdk.javadoc
+ * @build    JavadocTester
+ * @run main TestSmoke
+ */
+
+public class TestSmoke extends JavadocTester {
+
+    public static void main(String... args) throws Exception {
+        TestSmoke tester = new TestSmoke();
+        tester.runTests();
+    }
+
+    @Test
+    void test() {
+        javadoc("-d", "out",
+                "-private",
+                "-sourcepath", testSrc,
+                "pkg");
+        checkExit(Exit.OK);
+
+        checkOutput("pkg/T0x1C.html", true, "@DA");
+        checkOutput("pkg/T0x1D.html", true, "@DA");
+        checkOutput("pkg/T0x0D.html", true, "@DA");
+        checkOutput("pkg/T0x0B.html", true, "@DA");
+        checkOutput("pkg/T0x0F.html", true, "@DA");
+        checkOutput("pkg/T0x20B.html", true, "@DA");
+        checkOutput("pkg/T0x22B.html", true, "@DA");
+        checkOutput("pkg/T0x10.html", true, "@DA");
+        checkOutput("pkg/T0x10A.html", true, "@DA");
+        checkOutput("pkg/T0x11.html", true, "@DA");
+        checkOutput("pkg/T0x12.html", true, "@DA");
+        checkOutput("pkg/T0x13.html", true, "@DA");
+        checkOutput("pkg/T0x14.html", true, "@DA");
+        checkOutput("pkg/T0x15.html", true, "@DA");
+        checkOutput("pkg/T0x16.html", true, "@DA");
+
+        checkOutput("pkg/T0x06.html", true, "@DA");
+        checkOutput("pkg/T0x20.html", true, "@DA");
+        checkOutput("pkg/T0x20A.html", true, "@DTPA");
+        checkOutput("pkg/T0x22.html", true, "@DA");
+        checkOutput("pkg/T0x22A.html", true, "@DTPA");
+
+        checkOutput("pkg/T0x1C.html", false, "@A");
+        checkOutput("pkg/T0x1D.html", false, "@A");
+        checkOutput("pkg/T0x00.html", false, "@A");
+        checkOutput("pkg/T0x01.html", false, "@A");
+        checkOutput("pkg/T0x02.html", false, "@A");
+        checkOutput("pkg/T0x04.html", false, "@A");
+        checkOutput("pkg/T0x08.html", false, "@A");
+        checkOutput("pkg/T0x0D.html", false, "@A");
+        checkOutput("pkg/T0x06.html", false, "@A");
+        checkOutput("pkg/T0x0B.html", false, "@A");
+        checkOutput("pkg/T0x0F.html", false, "@A");
+        checkOutput("pkg/T0x20.html", false, "@A");
+        checkOutput("pkg/T0x20A.html", false, "@A");
+        checkOutput("pkg/T0x20B.html", false, "@A");
+        checkOutput("pkg/T0x22.html", false, "@A");
+        checkOutput("pkg/T0x22A.html", false, "@A");
+        checkOutput("pkg/T0x22B.html", false, "@A");
+        checkOutput("pkg/T0x10.html", false, "@A");
+        checkOutput("pkg/T0x10A.html", false, "@A");
+        checkOutput("pkg/T0x12.html", false, "@A");
+        checkOutput("pkg/T0x11.html", false, "@A");
+        checkOutput("pkg/T0x13.html", false, "@A");
+        checkOutput("pkg/T0x15.html", false, "@A");
+        checkOutput("pkg/T0x14.html", false, "@A");
+        checkOutput("pkg/T0x16.html", false, "@A");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/doclet/typeAnnotations/smoke/pkg/TargetTypes.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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 pkg;
+
+import java.lang.annotation.*;
+import static java.lang.annotation.ElementType.*;
+import static java.lang.annotation.RetentionPolicy.*;
+
+import java.util.*;
+import java.io.*;
+
+/*
+ * @summary compiler accepts all values
+ * @author Mahmood Ali
+ * @author Yuri Gaevsky
+ */
+
+@Target(TYPE_USE)
+@Retention(RetentionPolicy.RUNTIME)
+@interface A {}
+
+@Target(TYPE_USE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@interface DA {}
+
+@Target(TYPE_PARAMETER)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+@interface DTPA {}
+
+/** typecast */
+class T0x00 {
+    void m0x00(Long l1) {
+        Object l2 = (@A @DA Long) l1;
+    }
+}
+
+/** typecast generic/array */
+class T0x01<T> {
+    void m0x01(List<T> list) {
+        List<T> l = (List<@A @DA T>) list;
+    }
+}
+
+/** instanceof */
+class T0x02 {
+    boolean m0x02(String s) {
+        return (s instanceof @A @DA String);
+    }
+}
+
+/** type test (instanceof) generic/array */
+class T0x03<T> {
+    void m0x03(T typeObj, Object obj) {
+        boolean ok = obj instanceof String @A @DA [];
+    }
+}
+
+/** object creation (new) */
+class T0x04 {
+    void m0x04() {
+        new @A @DA ArrayList<String>();
+    }
+}
+
+/** object creation (new) generic/array */
+class T0x05<T> {
+    void m0x05() {
+        new ArrayList<@A @DA T>();
+    }
+}
+
+/** method receiver */
+class T0x06 {
+    void m0x06(@A @DA T0x06 this) {}
+}
+
+/** local variable */
+class T0x08 {
+    void m0x08() {
+      @A @DA String s = null;
+    }
+}
+
+/** local variable generic/array */
+class T0x09<T> {
+    void g() {
+        List<@A @DA String> l = null;
+    }
+
+    void a() {
+        String @A @DA [] as = null;
+    }
+}
+
+/** method return type generic/array */
+class T0x0B {
+    Class<@A @DA Object> m0x0B() { return null; }
+}
+
+/** method parameter generic/array */
+class T0x0D {
+    void m0x0D(HashMap<@A @DA Object, List<@A @DA List<@A @DA Class>>> s1) {}
+}
+
+/** field generic/array */
+class T0x0F {
+    HashMap<@A @DA Object, @A @DA Object> c1;
+}
+
+/** class type parameter bound */
+class T0x10<T extends @A @DA Cloneable> {
+}
+
+class T0x10A<T extends @A @DA Object> {
+}
+
+/** class type parameter bound generic/array */
+class T0x11<T extends List<@A @DA T>> {
+}
+
+/** method type parameter bound */
+class T0x12<T> {
+    <T extends @A @DA Cloneable> void m0x12() {}
+}
+
+/** method type parameter bound generic/array */
+class T0x13 {
+    static <T extends Comparable<@A @DA T>> T m0x13() {
+        return null;
+    }
+}
+
+/** class extends/implements */
+class T0x14 extends @A @DA Thread implements @A @DA Serializable, @A @DA Cloneable {
+}
+
+/** class extends/implements generic/array */
+class T0x15<T> extends ArrayList<@A @DA T> {
+}
+
+/** exception type in throws */
+class T0x16 {
+    void m0x16() throws @A @DA Exception {}
+}
+
+/** type argument in constructor call */
+class T0x18<T> {
+    <T> T0x18() {}
+
+    void m() {
+        new <@A @DA Integer> T0x18();
+    }
+}
+
+/** type argument in constructor call generic/array */
+class T0x19 {
+    <T> T0x19() {}
+
+    void g() {
+       new <List<@A @DA String>> T0x19();
+    }
+}
+
+/** type argument in method call */
+class T0x1A<T,U> {
+    public static <T, U> T m() { return null; }
+    static void m0x1A() {
+        T0x1A.<@A @DA Integer, @A @DA Short>m();
+    }
+}
+
+/** type argument in method call generic/array */
+class T0x1B<T> {
+    void m0x1B() {
+        Collections.<T @A @DA []>emptyList();
+    }
+}
+
+/** wildcard bound */
+class T0x1C {
+    void m0x1C(List<? extends @A @DA String> lst) {}
+}
+
+/** wildcard bound generic/array */
+class T0x1D<T> {
+    void m0x1D(List<? extends @A @DA List<int[]>> lst) {}
+}
+
+/** method type parameter */
+class T0x20 {
+    <@A @DA T> void m0x20() {}
+}
+
+class T0x20A {
+    <@A @DTPA T> void m0x20A() {}
+}
+
+class T0x20B {
+    <T> void m0x20B(@A @DA T p) {}
+}
+
+/** class type parameter */
+class T0x22<@A @DA T> {
+}
+
+class T0x22A<@A @DTPA T> {
+}
+
+class T0x22B<T> {
+    @A @DA T f;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6176978/T6176978.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2008, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6176978
+ * @summary current Javadoc's invocation and extension (Doclet) mechanisms are problematic
+ * @modules jdk.javadoc
+ * @ignore no longer applicable, should delete
+ * @build T6176978
+ * @run main T6176978
+ */
+
+import java.io.*;
+import java.net.*;
+
+public class T6176978
+{
+    public static void main(String[] args) throws Exception {
+        // create and use a temp dir that will not be on jtreg's
+        // default class path
+        File tmpDir = new File("tmp");
+        tmpDir.mkdirs();
+
+        File testSrc = new File(System.getProperty("test.src", "."));
+        String[] javac_args = {
+            "-d",
+            "tmp",
+            new File(testSrc, "X.java").getPath()
+        };
+
+        int rc = com.sun.tools.javac.Main.compile(javac_args);
+        if (rc != 0)
+            throw new Error("javac exit code: " + rc);
+
+        String[] jdoc_args = {
+            "-doclet",
+            "X",
+            new File(testSrc, "T6176978.java").getPath()
+        };
+
+        rc = jdk.javadoc.internal.tool.Main.execute(jdoc_args);
+        if (rc == 0)
+            throw new Error("javadoc unexpectedly succeeded");
+
+
+
+        Thread currThread = Thread.currentThread();
+        ClassLoader saveClassLoader = currThread.getContextClassLoader();
+        URLClassLoader urlCL = new URLClassLoader(new URL[] { tmpDir.toURL() });
+        currThread.setContextClassLoader(urlCL);
+
+        try {
+            rc = jdk.javadoc.internal.tool.Main.execute(jdoc_args);
+            if (rc != 0)
+                throw new Error("javadoc exit: " + rc);
+        } finally {
+            currThread.setContextClassLoader(saveClassLoader);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6176978/X.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2008, 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.
+ *
+ * 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.
+ */
+
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Set;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class X {
+    public static boolean run(DocletEnvironment root) {
+        System.out.println("X.start");
+        return true;
+    }
+    public Set<Doclet.Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6227454/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6227454
+ * @summary package.html and overview.html may not be read fully
+ * @modules jdk.javadoc
+ */
+
+import java.io.*;
+import java.util.Arrays;
+
+import java.util.HashSet;
+import java.util.ListIterator;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.util.DocTrees;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+
+public class Test implements Doclet {
+    public static void main(String... args) throws Exception {
+        new Test().run();
+    }
+
+    File referenceFile = new File("Foo.java");
+
+    void run() throws Exception {
+        test("<body>ABC      XYZ</body>");
+        test("<body>ABC      XYZ</BODY>");
+        test("<BODY>ABC      XYZ</body>");
+        test("<BODY>ABC      XYZ</BODY>");
+        test("<BoDy>ABC      XYZ</bOdY>");
+        test("<body>ABC" + bigText(8192, 40) + "XYZ</body>");
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred");
+    }
+
+    void test(String body) throws IOException {
+        test(body, null);
+    }
+
+    void test(String body, String expectError) throws IOException {
+        if (!referenceFile.exists()) {
+            writeFile(referenceFile.getName(), "public class Foo {}");
+        }
+        String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" "
+                         + "\"http://www.w3.org/TR/html4/loose.dtd\">";
+        String headTag = "<head><title>Title </title></head>";
+        String text = docType + "<html>" + headTag + body + "</html>";
+        testNum++;
+        System.err.println("test " + testNum);
+        File file = writeFile("overview" + testNum + ".html", text);
+        String thisClassName = Test.class.getName();
+        String[] args = {
+            "-bootclasspath",
+                System.getProperty("java.class.path")
+                + File.pathSeparator
+                + System.getProperty("sun.boot.class.path"),
+            "-classpath", ".",
+            "-docletpath", System.getProperty("test.classes"),
+            "-doclet", thisClassName,
+            "-package",
+            "-overview", file.getPath(),
+            "-sourcepath", ".",
+            referenceFile.getPath()
+        };
+
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = jdk.javadoc.internal.tool.Main.execute(args, pw);
+        pw.close();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        System.err.println("javadoc exit: rc=" + rc);
+
+        if (expectError == null) {
+            if (rc != 0)
+                error("unexpected exit from javadoc; rc:" + rc);
+        } else {
+            if (!out.contains(expectError))
+                error("expected error text not found: " + expectError);
+        }
+    }
+
+    String bigText(int lines, int lineLength) {
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < lineLength; i++)
+            sb.append(String.valueOf(i % 10));
+        sb.append("\n");
+        String line = sb.toString();
+        sb.setLength(0);
+        for (int i = 0; i < lines; i++)
+            sb.append(line);
+        return sb.toString();
+    }
+
+    File writeFile(String path, String body) throws IOException {
+        File f = new File(path);
+        FileWriter out = new FileWriter(f);
+        try {
+            out.write(body);
+        } finally {
+            out.close();
+        }
+        return f;
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int testNum;
+    int errors;
+
+    public boolean run(DocletEnvironment root) {
+        DocTrees docTrees = root.getDocTrees();
+        System.out.println("classes:" + root.getIncludedClasses());
+
+        Element klass = root.getIncludedClasses().iterator().next();
+        String text = "";
+        try {
+            DocCommentTree dcTree = docTrees.getDocCommentTree(klass, overviewpath);
+            text = dcTree.getFullBody().toString();
+        } catch (IOException ioe) {
+            throw new Error(ioe);
+        }
+
+        if (text.length() < 64)
+            System.err.println("text: '" + text + "'");
+        else
+            System.err.println("text: '"
+                    + text.substring(0, 20)
+                    + "..."
+                    + text.substring(text.length() - 20)
+                    + "'");
+        return text.startsWith("ABC") && text.endsWith("XYZ");
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    private String overviewpath;
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        Option[] options = {
+            new Option() {
+
+                @Override
+                public int getArgumentCount() {
+                    return 1;
+                }
+
+                @Override
+                public String getDescription() {
+                    return "overview";
+                }
+
+                @Override
+                public Option.Kind getKind() {
+                    return Option.Kind.STANDARD;
+                }
+
+                @Override
+                public String getName() {
+                    return "overview";
+                }
+
+                @Override
+                public String getParameters() {
+                    return "url";
+                }
+
+                @Override
+                public boolean matches(String option) {
+                    String opt = option.startsWith("-") ? option.substring(1) : option;
+                    return getName().equals(opt);
+                }
+
+                @Override
+                public boolean process(String option, ListIterator<String> arguments) {
+                    if (matches(option)) {
+                        overviewpath = arguments.next();
+                    }
+                    return true;
+                }
+            }
+        };
+        return new HashSet<Option>(Arrays.asList(options));
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6942366/T6942366.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6942366
+ * @summary javadoc no longer inherits doc from sourcepath
+ * @modules jdk.javadoc
+ * @build p.Base Test
+ * @run main T6942366
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class T6942366 {
+    public static void main(String... args) throws Exception {
+        new T6942366().run();
+    }
+
+    File testSrc;
+    File testClasses;
+    int count;
+    int errors;
+
+    void run() throws Exception {
+        testSrc = new File(System.getProperty("test.src"));
+        testClasses = new File(System.getProperty("test.classes"));
+
+        test(true,  false);
+        test(false, true);
+        test(true,  true);
+
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    void test(boolean useSourcePath, boolean useClassPath) throws Exception {
+        System.out.println("test " + (++count) + " sp:" + useSourcePath + " cp:" + useClassPath);
+        File testDir = new File("test" + count);
+        testDir.mkdirs();
+
+        List<String> args = new ArrayList<String>();
+        //args.add("-verbose");
+        args.add("-d");
+        args.add(testDir.getPath());
+        if (useSourcePath) {
+            args.add("-sourcepath");
+            args.add(testSrc.getPath());
+        }
+        if (useClassPath) {
+            args.add("-classpath");
+            args.add(testClasses.getPath());
+        } else {
+            // override classpath to avoid stuff jtreg might have put on papth
+            args.add("-classpath");
+            args.add(".");
+        }
+
+        args.add(new File(testSrc, "Test.java").getPath());
+        System.out.println("javadoc: " + args);
+
+        int rc = jdk.javadoc.internal.tool.Main.execute(args.toArray(new String[args.size()]));
+        if (rc != 0)
+            throw new Exception("unexpected exit from javadoc, rc=" + rc);
+
+        if (useSourcePath && useClassPath) {
+            long srcLastMod = new File(testSrc, "Test.java").lastModified();
+            long classLastMod = new File(testClasses, "Test.class").lastModified();
+            System.out.println("Test.java last modified:  " + new Date(srcLastMod));
+            System.out.println("Test.class last modified: " + new Date(classLastMod));
+            System.out.println((srcLastMod > classLastMod ? "source" : "class") + " is newer");
+        }
+
+        String s = "javadoc-for-Base.m";
+        boolean expect = useSourcePath;
+        boolean found = contains(new File(testDir, "Test.html"), s);
+        if (found) {
+            if (expect)
+                System.out.println("javadoc content \"" + s + "\" found, as expected");
+            else
+                error("javadoc content \"" + s + "\" found unexpectedly");
+        } else {
+            if (expect)
+                error("javadoc content \"" + s + "\" not found");
+            else
+                System.out.println("javadoc content \"" + s + "\" not found, as expected");
+        }
+
+        System.out.println();
+    }
+
+    boolean contains(File f, String s) throws Exception {
+        byte[] buf = new byte[(int) f.length()];
+        try (DataInputStream in = new DataInputStream(new FileInputStream(f))) {
+            in.readFully(buf);
+        }
+        return new String(buf).contains(s);
+    }
+
+    void error(String msg) {
+        System.out.println("Error: " + msg);
+        errors++;
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6942366/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+public class Test extends p.Base {
+    // overrides Base.m
+    public void m() { }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6942366/p/Base.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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 p;
+
+public class Base {
+    /** javadoc-for-Base.m. */
+    public void m() { }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6958836/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6958836 8002168
+ * @summary javadoc should support -Xmaxerrs and -Xmaxwarns
+ * @modules jdk.javadoc
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class Test {
+    public static void main(String... args) throws Exception {
+        new Test().run();
+    }
+
+    void run() throws Exception {
+        javadoc("errs",  list(),                   10,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "0"), 10,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "2"),  2,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "4"),  4,  0);
+        javadoc("errs",  list("-Xmaxerrs",  "20"), 10,  0);
+
+        javadoc("warns", list(),                    0, 10);
+        javadoc("warns", list("-Xmaxwarns",  "0"),  0, 10);
+        javadoc("warns", list("-Xmaxwarns",  "2"),  0,  2);
+        javadoc("warns", list("-Xmaxwarns",  "4"),  0,  4);
+        javadoc("warns", list("-Xmaxwarns", "20"),  0, 10);
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred.");
+    }
+
+    void javadoc(String pkg, List<String> testOpts,
+                int expectErrs, int expectWarns) {
+        System.err.println("Test " + (++count) + ": " + pkg + " " + testOpts);
+        File testOutDir = new File("test" + count);
+
+        List<String> opts = new ArrayList<String>();
+        // Force en_US locale in lieu of something like -XDrawDiagnostics.
+        // For some reason, this must be the first option when used.
+        opts.addAll(list("-locale", "en_US"));
+        opts.add("-Xdoclint:none");
+        opts.addAll(list("-classpath", System.getProperty("test.src")));
+        opts.addAll(list("-d", testOutDir.getPath()));
+        opts.addAll(testOpts);
+        opts.add(pkg);
+
+        StringWriter errSW = new StringWriter();
+        PrintWriter errPW = new PrintWriter(errSW);
+        int rc = jdk.javadoc.internal.tool.Main.execute(
+                opts.toArray(new String[opts.size()]),
+                errPW);
+        System.err.println("rc: " + rc);
+
+        errPW.close();
+        String errOut = errSW.toString();
+        System.err.println("Errors:\n" + errOut);
+
+        check(errOut, "Errors.java", expectErrs);
+        check(errOut, " warning ", expectWarns); // requires -locale en_US
+    }
+
+    void check(String text, String expectText, int expectCount) {
+        int foundCount = 0;
+        for (String line: text.split("[\r\n]+")) {
+            if (line.contains(expectText))
+                foundCount++;
+        }
+        if (foundCount != expectCount) {
+            error("incorrect number of matches found: " + foundCount
+                  + ", expected: " + expectCount);
+        }
+    }
+
+    private List<String> list(String... args) {
+        return Arrays.asList(args);
+    }
+
+    void error(String msg) {
+        System.err.println(msg);
+        errors++;
+    }
+
+    int count;
+    int errors;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6958836/errs/Errors.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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 errs;
+
+// class with 10 errors
+class Errors {
+    X m0() { }
+    X m1() { }
+    X m2() { }
+    X m3() { }
+    X m4() { }
+    X m5() { }
+    X m6() { }
+    X m7() { }
+    X m8() { }
+    X m9() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6958836/warns/Warnings.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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 warns;
+
+// class with 10 warnings
+public class Warnings {
+    /** @param x */
+    public void m0() { }
+
+    /** @param x */
+    public void m1() { }
+
+    /** @param x */
+    public void m2() { }
+
+    /** @param x */
+    public void m3() { }
+
+    /** @param x */
+    public void m4() { }
+
+    /** @param x */
+    public void m5() { }
+
+    /** @param x */
+    public void m6() { }
+
+    /** @param x */
+    public void m7() { }
+
+    /** @param x */
+    public void m8() { }
+
+    /** @param x */
+    public void m9() { }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6964914/Error.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2010, 2011, 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.
+ *
+ * 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.
+ */
+
+public class Error {
+    Object x // no semicolon
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6964914/JavacWarning.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+public class JavacWarning {
+    String _ = null; // this will cause a warning with -source 8 (this is an error as of -source 9)
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6964914/JavadocWarning.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2010, 2011, 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.
+ *
+ * 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.
+ */
+
+public class JavadocWarning {
+    /** @see DoesNotExist */
+    int x;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6964914/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6964914
+ * @summary javadoc does not output number of warnings using user written doclet
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
+ */
+
+import java.io.*;
+
+public class Test {
+    public static void main(String... args) throws Exception {
+        new Test().run();
+    }
+
+    public void run() throws Exception {
+        javadoc("Error.java", "1 error");
+        javadoc("JavacWarning.java", "1 warning");
+        javadoc("JavadocWarning.java", "1 warning");
+        if (errors > 0)
+            throw new Exception(errors + " errors found");
+    }
+
+    void javadoc(String path, String expect) {
+        File testSrc = new File(System.getProperty("test.src"));
+        String[] args = {
+            "-Xdoclint:none",
+            "-source", "8",
+            "-bootclasspath", System.getProperty("sun.boot.class.path"),
+            "-classpath", ".",
+            "-package",
+            new File(testSrc, path).getPath()
+        };
+
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = jdk.javadoc.internal.tool.Main.execute(args, pw);
+        pw.close();
+        String out = sw.toString();
+        if (!out.isEmpty())
+            System.err.println(out);
+        System.err.println("javadoc exit: rc=" + rc);
+
+        if (!out.contains(expect))
+            error("expected text not found: " + expect);
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6964914/TestStdDoclet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,102 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6964914
+ * @summary javadoc does not output number of warnings using user written doclet
+ */
+
+import java.io.*;
+
+/**
+ * Dummy javadoc comment.
+ * @author jjg
+ * @see DoesNotExist
+ */
+public class TestStdDoclet {
+    public static void main(String... args) throws Exception {
+        new TestStdDoclet().run();
+    }
+
+    /**
+     * More dummy comments.
+     * @throws DoesNotExist   oops, javadoc does not see this
+     * @see DoesNotExist
+     */
+    void run() throws Exception {
+        File javaHome = new File(System.getProperty("java.home"));
+        if (javaHome.getName().equals("jre"))
+            javaHome = javaHome.getParentFile();
+        File javadoc = new File(new File(javaHome, "bin"), "javadoc");
+        File testSrc = new File(System.getProperty("test.src"));
+
+        // run javadoc in separate process to ensure doclet executed under
+        // normal user conditions w.r.t. classloader
+        String thisClassName = TestStdDoclet.class.getName();
+        Process p = new ProcessBuilder()
+            .command(javadoc.getPath(),
+                "-J-Xbootclasspath:" + System.getProperty("sun.boot.class.path"),
+                "-classpath", ".", // insulates us from ambient classpath
+                "-Xdoclint:none",
+                "-package",
+                new File(testSrc, thisClassName + ".java").getPath())
+            .redirectErrorStream(true)
+            .start();
+
+        int actualDocletWarnCount = 0;
+        int reportedDocletWarnCount = 0;
+        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
+        try {
+            String line;
+            while ((line = in.readLine()) != null) {
+                System.err.println(line);
+                if (line.contains("DoesNotExist"))
+                    actualDocletWarnCount++;
+                if (line.matches("[0-9]+ warning(s)?"))
+                    reportedDocletWarnCount =
+                            Integer.valueOf(line.substring(0, line.indexOf(" ")));
+                }
+        } finally {
+            in.close();
+        }
+        int rc = p.waitFor();
+        if (rc != 0)
+            System.err.println("javadoc failed, rc:" + rc);
+
+        int expectedDocletWarnCount = 2;
+        checkEqual("actual", actualDocletWarnCount, "expected", expectedDocletWarnCount);
+        checkEqual("actual", actualDocletWarnCount, "reported", reportedDocletWarnCount);
+    }
+
+    /**
+     * Private method should not cause a warning.
+     * @see DoesNotExist
+     */
+    private void checkEqual(String l1, int i1, String l2, int i2) throws Exception {
+        if (i1 != i2)
+            throw new Exception(l1 + " warn count, " + i1 + ", does not match "
+                        + l2 + " warn count, " + i2);
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/6964914/TestUserDoclet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6964914
+ * @summary javadoc does not output number of warnings using user written doclet
+ * @modules jdk.javadoc
+ */
+
+import java.io.*;
+
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class TestUserDoclet implements Doclet {
+    public static void main(String... args) throws Exception {
+        new TestUserDoclet().run();
+    }
+
+    static final String docletWarning = "warning from test doclet";
+
+    /** Main doclet method. */
+    public boolean run(DocletEnvironment root) {
+        reporter.print(javax.tools.Diagnostic.Kind.WARNING, docletWarning);
+        return true;
+    }
+
+    /** Main test method. */
+    void run() throws Exception {
+        File javaHome = new File(System.getProperty("java.home"));
+        File javadoc = new File(new File(javaHome, "bin"), "javadoc");
+        File testSrc = new File(System.getProperty("test.src"));
+        File testClasses = new File(System.getProperty("test.classes"));
+
+        // run javadoc in separate process to ensure doclet executed under
+        // normal user conditions w.r.t. classloader
+        String thisClassName = TestUserDoclet.class.getName();
+        Process p = new ProcessBuilder()
+            .command(javadoc.getPath(),
+                "-J-Xbootclasspath:" + System.getProperty("sun.boot.class.path"),
+                "-doclet", thisClassName,
+                "-docletpath", testClasses.getPath(),
+                new File(testSrc, thisClassName + ".java").getPath())
+            .redirectErrorStream(true)
+            .start();
+
+        int actualDocletWarnCount = 0;
+        int reportedDocletWarnCount = 0;
+        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
+        try {
+            String line;
+            while ((line = in.readLine()) != null) {
+                System.err.println(line);
+                if (line.contains(docletWarning))
+                    actualDocletWarnCount++;
+                if (line.matches("[0-9]+ warning(s)?"))
+                    reportedDocletWarnCount =
+                            Integer.valueOf(line.substring(0, line.indexOf(" ")));
+            }
+        } finally {
+            in.close();
+        }
+        int rc = p.waitFor();
+        if (rc != 0)
+            System.err.println("javadoc failed, rc:" + rc);
+
+        int expectedDocletWarnCount = 1;
+        checkEqual("actual", actualDocletWarnCount, "expected", expectedDocletWarnCount);
+        checkEqual("actual", actualDocletWarnCount, "reported", reportedDocletWarnCount);
+    }
+
+    void checkEqual(String l1, int i1, String l2, int i2) throws Exception {
+        if (i1 != i2)
+            throw new Exception(l1 + " warn count, " + i1 + ", does not match "
+                        + l2 + " warn count, " + i2);
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    Reporter reporter;
+    Locale locale;
+    public void init(Locale locale, Reporter reporter) {
+        this.locale = locale;
+        this.reporter = reporter;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/8025693/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8025693
+ * @summary javadoc should ignore <clinit> methods found in classes on classpath
+ * @modules jdk.javadoc
+ */
+
+import java.io.*;
+
+public class Test {
+    public static void main(String[] args) throws Exception {
+        new Test().run();
+    }
+
+    final File baseFile = new File("src/Base.java");
+    final String baseText =
+        "package p;\n" +
+        "public class Base { static { } }\n";
+
+    final File srcFile = new File("src/C.java");
+    final String srcText =
+        "package p;\n" +
+        "/** comment */\n" +
+        "public abstract class C extends Base { }\n";
+
+    void run() throws Exception {
+        File classesDir = new File("classes");
+        classesDir.mkdirs();
+        writeFile(baseFile, baseText);
+        String[] javacArgs = {
+            "-d", classesDir.getPath(),
+            baseFile.getPath()
+        };
+        com.sun.tools.javac.Main.compile(javacArgs);
+
+        writeFile(srcFile, srcText);
+        String[] args = {
+            "-d", "api",
+            "-classpath", classesDir.getPath(),
+            "-package", "p",
+            srcFile.getPath()
+        };
+
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        PrintStream ps = new PrintStream(baos);
+        PrintStream prev = System.err;
+        System.setErr(ps);
+        try {
+            int rc = com.sun.tools.javadoc.Main.execute(args);
+        } finally {
+            System.err.flush();
+            System.setErr(prev);
+        }
+        String out = baos.toString();
+        System.out.println(out);
+
+        String errorMessage = "java.lang.IllegalArgumentException: <clinit>";
+        if (out.contains(errorMessage))
+            throw new Exception("error message found: " + errorMessage);
+    }
+
+    void writeFile(File file, String body) throws IOException {
+        file.getParentFile().mkdirs();
+        try (FileWriter out = new FileWriter(file)) {
+            out.write(body);
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/BreakIteratorWarning.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4959985
+ * @summary Verify that (verbose) warnings are no longer generated when
+ *          the default first-sentence algorithm doesn't match the
+ *          BreakIterator algorithm.
+ * @modules jdk.javadoc
+ */
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.util.DocTrees;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class BreakIteratorWarning implements Doclet {
+
+    public static void main(String[] args) {
+        String thisFile = "" +
+            new java.io.File(System.getProperty("test.src", "."),
+                             "BreakIteratorWarning.java");
+
+        String[] argarray = {
+            "-docletpath", System.getProperty("test.classes", "."),
+            "-doclet", "BreakIteratorWarning",
+            "-Xwerror",
+            thisFile
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    List<VariableElement> getFields(TypeElement klass) {
+        List<VariableElement> fields = new ArrayList<>();
+        klass.getEnclosedElements()
+                .stream()
+                .filter((e) -> (e.getKind() == ElementKind.FIELD))
+                .forEach((e) -> { fields.add((VariableElement)e);});
+        return fields;
+    }
+
+    public boolean run(DocletEnvironment root) {
+        TypeElement cd = root.getIncludedClasses().iterator().next();
+        VariableElement fd = getFields(cd).get(0);
+        DocTrees docTrees = root.getDocTrees();
+        DocCommentTree docCommentTree = docTrees.getDocCommentTree(fd);
+        List<? extends DocTree> firstSentence = docCommentTree.getFirstSentence();
+        return true;
+    }
+
+
+    /**
+     * "He'll never catch up!" the Sicilian cried.  "Inconceivable!"
+     * "You keep using that word!" the Spaniard snapped.  "I do not
+     * think it means what you think it means."
+     *
+     * <p> This comment used to trigger a warning, but no longer does.
+     */
+    public String author = "William Goldman";
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/CheckResourceKeys.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,278 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8000612
+ * @summary need test program to validate javadoc resource bundles
+ * @modules jdk.jdeps/com.sun.tools.classfile
+ */
+
+import java.io.*;
+import java.util.*;
+import javax.tools.*;
+import com.sun.tools.classfile.*;
+
+/**
+ * Compare string constants in javadoc classes against keys in javadoc resource bundles.
+ */
+public class CheckResourceKeys {
+    /**
+     * Main program.
+     * Options:
+     * -finddeadkeys
+     *      look for keys in resource bundles that are no longer required
+     * -findmissingkeys
+     *      look for keys in resource bundles that are missing
+     *
+     * @throws Exception if invoked by jtreg and errors occur
+     */
+    public static void main(String... args) throws Exception {
+        CheckResourceKeys c = new CheckResourceKeys();
+        if (c.run(args))
+            return;
+
+        if (is_jtreg())
+            throw new Exception(c.errors + " errors occurred");
+        else
+            System.exit(1);
+    }
+
+    static boolean is_jtreg() {
+        return (System.getProperty("test.src") != null);
+    }
+
+    /**
+     * Main entry point.
+     */
+    boolean run(String... args) throws Exception {
+        boolean findDeadKeys = false;
+        boolean findMissingKeys = false;
+
+        if (args.length == 0) {
+            if (is_jtreg()) {
+                findDeadKeys = true;
+                findMissingKeys = true;
+            } else {
+                System.err.println("Usage: java CheckResourceKeys <options>");
+                System.err.println("where options include");
+                System.err.println("  -finddeadkeys      find keys in resource bundles which are no longer required");
+                System.err.println("  -findmissingkeys   find keys in resource bundles that are required but missing");
+                return true;
+            }
+        } else {
+            for (String arg: args) {
+                if (arg.equalsIgnoreCase("-finddeadkeys"))
+                    findDeadKeys = true;
+                else if (arg.equalsIgnoreCase("-findmissingkeys"))
+                    findMissingKeys = true;
+                else
+                    error("bad option: " + arg);
+            }
+        }
+
+        if (errors > 0)
+            return false;
+
+        Set<String> codeKeys = getCodeKeys();
+        Set<String> resourceKeys = getResourceKeys();
+
+        System.err.println("found " + codeKeys.size() + " keys in code");
+        System.err.println("found " + resourceKeys.size() + " keys in resource bundles");
+
+        if (findDeadKeys)
+            findDeadKeys(codeKeys, resourceKeys);
+
+        if (findMissingKeys)
+            findMissingKeys(codeKeys, resourceKeys);
+
+        usageTests(false);
+        usageTests(true);
+
+        return (errors == 0);
+    }
+
+    void usageTests(boolean xflag) {
+        String[] argarray = { xflag ? "-X" : "-help" };
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        if (jdk.javadoc.internal.tool.Main.execute(argarray, pw) == 0) {
+            pw.flush();
+            String s = sw.toString();
+            if (s.isEmpty()) {
+                error("no javadoc output ?");
+                return;
+            }
+            if (sw.toString().contains("<MISSING KEY>")) {
+                System.out.println(s);
+                error("missing resources in output ?");
+            }
+        } else {
+            error("failed to execute javadoc");
+        }
+    }
+
+    /**
+     * Find keys in resource bundles which are probably no longer required.
+     * A key is required if there is a string in the code that is a resource key,
+     * or if the key is well-known according to various pragmatic rules.
+     */
+    void findDeadKeys(Set<String> codeKeys, Set<String> resourceKeys) {
+        for (String rk: resourceKeys) {
+            // ignore these synthesized keys, tested by usageTests
+            if (rk.startsWith("doclet.usage.") || rk.startsWith("doclet.xusage"))
+                continue;
+            if (codeKeys.contains(rk))
+                continue;
+
+            error("Resource key not found in code: " + rk);
+        }
+    }
+
+    /**
+     * For all strings in the code that look like they might be
+     * a resource key, verify that a key exists.
+     */
+    void findMissingKeys(Set<String> codeKeys, Set<String> resourceKeys) {
+        for (String ck: codeKeys) {
+            // ignore these synthesized keys, tested by usageTests
+            if (ck.startsWith("doclet.usage.") || ck.startsWith("doclet.xusage."))
+                continue;
+            if (resourceKeys.contains(ck))
+                continue;
+            error("No resource for \"" + ck + "\"");
+        }
+    }
+
+    /**
+     * Get the set of strings from (most of) the javadoc classfiles.
+     */
+    Set<String> getCodeKeys() throws IOException {
+        Set<String> results = new TreeSet<String>();
+        JavaCompiler c = ToolProvider.getSystemJavaCompiler();
+        try (JavaFileManager fm = c.getStandardFileManager(null, null, null)) {
+            JavaFileManager.Location javadocLoc = findJavadocLocation(fm);
+            String[] pkgs = {
+                "jdk.javadoc.internal.doclets",
+                "jdk.javadoc.internal.tool"
+            };
+            for (String pkg: pkgs) {
+                for (JavaFileObject fo: fm.list(javadocLoc,
+                        pkg, EnumSet.of(JavaFileObject.Kind.CLASS), true)) {
+                    String name = fo.getName();
+                    // ignore resource files
+                    if (name.matches(".*resources.[A-Za-z_0-9]+\\.class.*"))
+                        continue;
+                    scan(fo, results);
+                }
+            }
+
+            // special handling for code strings synthesized in
+            // com.sun.tools.doclets.internal.toolkit.util.Util.getTypeName
+            String[] extras = {
+                "AnnotationType", "Class", "Enum", "Error", "Exception", "Interface"
+            };
+            for (String s: extras) {
+                if (results.contains("doclet." + s))
+                    results.add("doclet." + s.toLowerCase());
+            }
+
+            // special handling for code strings synthesized in
+            // com.sun.tools.javadoc.Messager
+            results.add("javadoc.error.msg");
+            results.add("javadoc.note.msg");
+            results.add("javadoc.note.pos.msg");
+            results.add("javadoc.warning.msg");
+
+            return results;
+        }
+    }
+
+    // depending on how the test is run, javadoc may be on bootclasspath or classpath
+    JavaFileManager.Location findJavadocLocation(JavaFileManager fm) {
+        JavaFileManager.Location[] locns =
+            { StandardLocation.PLATFORM_CLASS_PATH, StandardLocation.CLASS_PATH };
+        try {
+            for (JavaFileManager.Location l: locns) {
+                JavaFileObject fo = fm.getJavaFileForInput(l,
+                    "jdk.javadoc.internal.tool.Main", JavaFileObject.Kind.CLASS);
+                if (fo != null) {
+                    System.err.println("found javadoc in " + l);
+                    return l;
+                }
+            }
+        } catch (IOException e) {
+            throw new Error(e);
+        }
+        throw new IllegalStateException("Cannot find javadoc");
+    }
+
+    /**
+     * Get the set of strings from a class file.
+     * Only strings that look like they might be a resource key are returned.
+     */
+    void scan(JavaFileObject fo, Set<String> results) throws IOException {
+        //System.err.println("scan " + fo.getName());
+        InputStream in = fo.openInputStream();
+        try {
+            ClassFile cf = ClassFile.read(in);
+            for (ConstantPool.CPInfo cpinfo: cf.constant_pool.entries()) {
+                if (cpinfo.getTag() == ConstantPool.CONSTANT_Utf8) {
+                    String v = ((ConstantPool.CONSTANT_Utf8_info) cpinfo).value;
+                    if (v.matches("(doclet|main|javadoc|tag)\\.[A-Za-z0-9-_.]+"))
+                        results.add(v);
+                }
+            }
+        } catch (ConstantPoolException ignore) {
+        } finally {
+            in.close();
+        }
+    }
+
+    /**
+     * Get the set of keys from the javadoc resource bundles.
+     */
+    Set<String> getResourceKeys() {
+        String[] names = {
+                "jdk.javadoc.internal.doclets.formats.html.resources.standard",
+                "jdk.javadoc.internal.doclets.toolkit.resources.doclets",
+                "jdk.javadoc.internal.tool.resources.javadoc",
+        };
+        Set<String> results = new TreeSet<String>();
+        for (String name : names) {
+            ResourceBundle b = ResourceBundle.getBundle(name);
+            results.addAll(b.keySet());
+        }
+        return results;
+    }
+
+    /**
+     * Report an error.
+     */
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/EnsureNewOldDoclet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,120 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8035473
+ * @summary make sure the new doclet is invoked by default, and -Xold
+ */
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ * Dummy javadoc comment.
+ */
+public class EnsureNewOldDoclet {
+
+    final File javadoc;
+    final File testSrc;
+    final String thisClassName;
+
+    final static Pattern Expected1 = Pattern.compile("^Standard Doclet \\(Next\\) version.*");
+    final static Pattern Expected2 = Pattern.compile("^Standard Doclet version.*");
+
+    public EnsureNewOldDoclet() {
+        File javaHome = new File(System.getProperty("java.home"));
+        if (javaHome.getName().endsWith("jre"))
+            javaHome = javaHome.getParentFile();
+        javadoc = new File(new File(javaHome, "bin"), "javadoc");
+        testSrc = new File(System.getProperty("test.src"));
+        thisClassName = EnsureNewOldDoclet.class.getName();
+    }
+
+    public static void main(String... args) throws Exception {
+        EnsureNewOldDoclet test = new EnsureNewOldDoclet();
+        test.run1();
+        test.run2();
+    }
+
+    // make sure new doclet is invoked by default
+    void run1() throws Exception {
+        List<String> output = doTest(javadoc.getPath(),
+                "-J-Xbootclasspath:" + System.getProperty("sun.boot.class.path"),
+                "-classpath", ".", // insulates us from ambient classpath
+                "-Xdoclint:none",
+                "-package",
+                new File(testSrc, thisClassName + ".java").getPath());
+        System.out.println(output);
+        for (String x : output) {
+            if (Expected1.matcher(x).matches()) {
+                return;
+            }
+        }
+        throw new Exception("run1: Expected string not found:");
+    }
+
+    // make sure the old doclet is invoked with -Xold
+    void run2() throws Exception {
+        List<String> output = doTest(javadoc.getPath(),
+                "-Xold",
+                "-J-Xbootclasspath:" + System.getProperty("sun.boot.class.path"),
+                "-classpath", ".", // insulates us from ambient classpath
+                "-Xdoclint:none",
+                "-package",
+                new File(testSrc, thisClassName + ".java").getPath());
+
+        for (String x : output) {
+            if (Expected2.matcher(x).matches()) {
+                throw new Exception("run2: Expected string not found");
+            }
+            return;
+        }
+    }
+
+    /**
+     * More dummy comments.
+     */
+    List<String> doTest(String... args) throws Exception {
+        List<String> output = new ArrayList<>();
+        // run javadoc in separate process to ensure doclet executed under
+        // normal user conditions w.r.t. classloader
+        Process p = new ProcessBuilder()
+                .command(args)
+                .redirectErrorStream(true)
+                .start();
+        try (BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()))) {
+            String line = in.readLine();
+            while (line != null) {
+                output.add(line.trim());
+                line = in.readLine();
+            }
+        }
+        int rc = p.waitFor();
+        if (rc != 0)
+            throw new Exception("javadoc failed, rc:" + rc);
+        return output;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/FlagsTooEarly.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,92 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4904495
+ * @summary Compilation may go awry if we ask a symbol for its flags during
+ *          javac's Enter phase, before the flags are generally available.
+ * @modules jdk.javadoc
+ */
+
+
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class FlagsTooEarly implements Doclet {
+
+    public static void main(String[] args) {
+        String thisFile = "" +
+            new java.io.File(System.getProperty("test.src", "."),
+                             "FlagsTooEarly.java");
+
+        String[] argarray = {
+            "-docletpath", System.getProperty("test.classes", "."),
+            "-doclet", "FlagsTooEarly",
+            "-Xwerror",
+            thisFile
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    /*
+     * The world's simplest doclet.
+     */
+    public boolean run(DocletEnvironment root) {
+        return true;
+    }
+
+    /*
+     * The following sets up the scenario for triggering the (potential) bug.
+     */
+    C2 c;
+    static class C1 { }
+    static class C2 { }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/InlineTagsWithBraces.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4965490
+ * @summary Verify that matching braces can appear within inline tags.
+ * @ignore API, re-evaluate @bold, @maybe causes doclint to throw up.
+ * @modules jdk.javadoc
+ */
+
+import java.io.File;
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.doctree.DocTree;
+import com.sun.source.util.DocTrees;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+/**
+ * This is a {@code test} comment.
+ * It is {@bold {@underline only} a test}.
+ * We would like some code
+ * {@code for (int i : nums) { doit(i); } return; }
+ * to be embedded {@maybe {even {a couple {of levels}}} deep}.
+ */
+public class InlineTagsWithBraces implements Doclet {
+
+    private static String[] expectedTags = {
+        "Text", "@code", "Text",
+        "@bold", "Text", "@code", "Text",
+        "@maybe", "Text"
+    };
+    private static String[] expectedText = {
+        "This is a ", "test", " comment.\n" +
+        " It is ", "{@underline only} a test", ".\n" +
+        " We would like some code\n" +
+        " ", "for (int i : nums) { doit(i); } return; ", "\n" +
+        " to be embedded ", "{even {a couple {of levels}}} deep", "."
+    };
+
+    public static void main(String[] args) {
+        String thisFile = "" +
+            new File(System.getProperty("test.src", "."), "InlineTagsWithBraces.java");
+
+        String[] argarray = {
+            "InlineTagsWithBraces",
+            "-Xwerror",
+            thisFile
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    public boolean run(DocletEnvironment root) {
+        DocTrees trees = root.getDocTrees();
+        TypeElement cd = root.getIncludedClasses().iterator().next();
+        DocCommentTree docCommentTree = trees.getDocCommentTree(cd);
+        List<? extends DocTree> tags = docCommentTree.getBody();
+
+        for (int i = 0; i < tags.size(); i++) {
+            System.out.println(tags.get(0).getKind());
+//            if (!tags[i].name().equals(expectedTags[i]) ||
+//                        !tags[i].text().equals(expectedText[i])) {
+//                throw new Error("Tag \"" + tags[i] + "\" not as expected");
+//            }
+        }
+
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/LangVers.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,96 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4909767
+ * @summary Verify that omitting Doclet.languageVersion() hides 1.5 language
+ *      features from the doclet.
+ * @ignore API, re-evaluate, unsure of this test.
+ * @modules jdk.javadoc
+ */
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class LangVers implements Doclet {
+
+    public static void main(String[] args) {
+        String thisFile = "" +
+            new java.io.File(System.getProperty("test.src", "."),
+                             "LangVers.java");
+
+        String[] toolargs = {
+            "-doclet", "LangVers",
+            "-docletpath", System.getProperty("test.classes", "."),
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(toolargs) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    public boolean run(DocletEnvironment root) {
+        ClassDoc fishdoc = root.classNamed("LangVers.Fish");
+        System.out.println(fishdoc);
+        if (fishdoc.isEnum()) {
+            throw new Error("Enums are not hidden.");
+        }
+
+        for (MethodDoc meth : fishdoc.methods()) {
+            System.out.println(meth);
+            if (meth.flatSignature().indexOf('<') >= 0) {
+                throw new Error("Type parameters are not hidden.");
+            }
+        }
+
+        return true;
+    }
+
+    public enum Fish {
+        One, Two, Red, Blue;
+
+        public void enroll(List<? super Fish> school) {
+            school.add(this);
+        }
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/MaxWarns.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8005644
+ * @summary set default max errs and max warns
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
+ */
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+
+public class MaxWarns {
+    public static void main(String... args) throws Exception {
+        new MaxWarns().run();
+    }
+
+    void run() throws Exception {
+        final int defaultMaxWarns = 100;
+        final int genWarns = 150;
+        File f = genSrc(genWarns);
+        String out = javadoc(f);
+        check(out, defaultMaxWarns);
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred");
+    }
+
+    File genSrc(int count) throws IOException {
+        StringBuilder sb = new StringBuilder();
+        sb.append("package p;\n")
+            .append("public class C {\n")
+            .append("    /**\n");
+        for (int i = 0; i < count; i++)
+            sb.append("     * @param i").append(i).append(" does not exist!\n");
+        sb.append("     */\n")
+            .append("    public void m() { }\n")
+            .append("}\n");
+        File srcDir = new File("src");
+        srcDir.mkdirs();
+        File f = new File(srcDir, "C.java");
+        try (FileWriter fw = new FileWriter(f)) {
+            fw.write(sb.toString());
+        }
+        return f;
+    }
+
+    String javadoc(File f) {
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        String[] args = { "-Xdoclint:none", "-d", "api", f.getPath() };
+        int rc = jdk.javadoc.internal.tool.Main.execute(args, pw);
+        pw.flush();
+        return sw.toString();
+    }
+
+    void check(String out, int count) {
+        System.err.println(out);
+        Pattern warn = Pattern.compile("warning - @param argument \"i[0-9]+\" is not a parameter name");
+        Matcher m = warn.matcher(out);
+        int n = 0;
+        for (int start = 0; m.find(start); start = m.start() + 1) {
+            n++;
+        }
+        if (n != count)
+            error("unexpected number of warnings reported: " + n + "; expected: " + count);
+
+        Pattern warnCount = Pattern.compile("(?ms).*^([0-9]+) warnings$.*");
+        m = warnCount.matcher(out);
+        if (m.matches()) {
+            n = Integer.parseInt(m.group(1));
+            if (n != count)
+                error("unexpected number of warnings reported: " + n + "; expected: " + count);
+        } else
+            error("total count not found");
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/NoStar.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4587562
+ * @summary tool: Indentation messed up for javadoc comments omitting preceding *
+ * @author gafter
+ * @modules jdk.javadoc
+ * @run main NoStar
+ */
+
+import java.util.*;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.doctree.DocCommentTree;
+import com.sun.source.util.DocTrees;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+/** First sentence.
+0
+ 1
+  2
+   3
+    4
+     5
+*/
+public class NoStar implements Doclet
+{
+    public static void main(String[] args) {
+        String[] argarray = {
+            "-docletpath", System.getProperty("test.classes", "."),
+            "-doclet", "NoStar",
+            System.getProperty("test.src", ".") + java.io.File.separatorChar + "NoStar.java"
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0)
+            throw new Error();
+    }
+
+    public boolean run(DocletEnvironment root) {
+        Set<TypeElement> classes = root.getIncludedClasses();
+        if (classes.size() != 1)
+            throw new Error("1 " + Arrays.asList(classes));
+        TypeElement self = classes.iterator().next();
+        DocTrees trees = root.getDocTrees();
+        DocCommentTree docCommentTree = trees.getDocCommentTree(self);
+        String c = docCommentTree.getFullBody().toString();
+        System.out.println("\"" + c + "\"");
+        return c.equals("First sentence.\n0\n 1\n  2\n   3\n    4\n     5");
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/QuietOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,112 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8035473
+ * @summary make sure tool is quiet when told to, and chatty otherwise
+ */
+
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Dummy javadoc comment.
+ */
+public class QuietOption {
+
+    final File javadoc;
+    final File testSrc;
+    final String thisClassName;
+
+    public QuietOption() {
+        File javaHome = new File(System.getProperty("java.home"));
+        if (javaHome.getName().endsWith("jre"))
+            javaHome = javaHome.getParentFile();
+        javadoc = new File(new File(javaHome, "bin"), "javadoc");
+        testSrc = new File(System.getProperty("test.src"));
+        thisClassName = QuietOption.class.getName();
+    }
+
+    public static void main(String... args) throws Exception {
+        QuietOption test = new QuietOption();
+        test.run1();
+        test.run2();
+    }
+
+    // make sure javadoc is quiet
+    void run1() throws Exception {
+        List<String> output = doTest(javadoc.getPath(),
+                "-J-Xbootclasspath:" + System.getProperty("sun.boot.class.path"),
+                "-classpath", ".", // insulates us from ambient classpath
+                "-quiet",
+                new File(testSrc, thisClassName + ".java").getPath());
+
+        if (!output.isEmpty()) {
+            System.out.println(output);
+            throw new Exception("run1: Shhh!, very chatty javadoc!.");
+        }
+    }
+
+    // make sure javadoc is chatty
+    void run2() throws Exception {
+        List<String> output = doTest(javadoc.getPath(),
+                "-J-Xbootclasspath:" + System.getProperty("sun.boot.class.path"),
+                "-classpath", ".", // insulates us from ambient classpath
+                new File(testSrc, thisClassName + ".java").getPath());
+
+        if (output.isEmpty()) {
+            System.out.println(output);
+            throw new Exception("run2: speak up and please be heard!.");
+        }
+    }
+
+    /**
+     * More dummy comments.
+     */
+    List<String> doTest(String... args) throws Exception {
+        List<String> output = new ArrayList<>();
+        // run javadoc in separate process to ensure doclet executed under
+        // normal user conditions w.r.t. classloader
+        Process p = new ProcessBuilder()
+                .command(args)
+                .redirectErrorStream(true)
+                .start();
+        try (BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()))) {
+            String line = in.readLine();
+            while (line != null) {
+                output.add(line.trim());
+                line = in.readLine();
+            }
+        }
+        int rc = p.waitFor();
+        if (rc != 0) {
+            throw new Exception("javadoc failed, rc:" + rc);
+        }
+        return output;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/ReleaseOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Predicate;
+import jdk.javadoc.internal.tool.Main;
+
+/**
+ * @test
+ * @bug 8086737
+ * @summary Test -release option in javadoc
+ * @run main ReleaseOption
+ */
+public class ReleaseOption {
+    public static void main(String... args) {
+        new ReleaseOption().run();
+    }
+
+    void run() {
+        doRunTest(0, out -> out.contains("compiler.err.doesnt.exist: java.util.stream"), "-release", "7");
+        doRunTest(0, out -> !out.contains("compiler.err.doesnt.exist: java.util.stream"), "-release", "8");
+        doRunTest(1, out -> true, "-release", "7", "-source", "7");
+        doRunTest(1, out -> true, "-release", "7", "-bootclasspath", "any");
+    }
+
+    void doRunTest(int expectedResult, Predicate<String> validate, String... args) {
+        System.err.println("running with args: " + Arrays.asList(args));
+        List<String> options = new ArrayList<>();
+        options.addAll(Arrays.asList(args));
+        options.add("-XDrawDiagnostics");
+        options.add(System.getProperty("test.src", ".") + java.io.File.separatorChar + "ReleaseOptionSource.java");
+        StringWriter out = new StringWriter();
+        PrintWriter pw = new PrintWriter(out);
+        int actualResult = Main.execute(options.toArray(new String[0]), pw);
+        System.err.println("actual result=" + actualResult);
+        System.err.println("actual output=" + out.toString());
+        if (actualResult != expectedResult)
+            throw new Error();
+        if (!validate.test(out.toString())) {
+            throw new Error("Not an expected error output: " + out.toString());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/ReleaseOptionSource.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+import java.util.stream.Stream;
+
+public class ReleaseOptionSource {
+    public Stream s;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/T4696488.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+import com.sun.tools.doclets.internal.toolkit.Configuration;
+
+/**
+ * @test
+ * @bug     4696488
+ * @summary javadoc doesn't handle UNC paths for destination directory
+ * @author  Jesse Glick
+ * @modules jdk.javadoc/com.sun.tools.doclets.internal.toolkit
+ * @run main T4696488 T4696488.java
+ */
+public class T4696488 {
+
+    public static void main(String... args) {
+        System.setProperty("file.separator", "/");
+        assertAddTrailingFileSep("/path/to/dir", "/path/to/dir/");
+        assertAddTrailingFileSep("/path/to/dir/", "/path/to/dir/");
+        assertAddTrailingFileSep("/path/to/dir//", "/path/to/dir/");
+        System.setProperty("file.separator", "\\");
+        assertAddTrailingFileSep("C:\\path\\to\\dir", "C:\\path\\to\\dir\\");
+        assertAddTrailingFileSep("C:\\path\\to\\dir\\", "C:\\path\\to\\dir\\");
+        assertAddTrailingFileSep("C:\\path\\to\\dir\\\\", "C:\\path\\to\\dir\\");
+        assertAddTrailingFileSep("\\\\server\\share\\path\\to\\dir", "\\\\server\\share\\path\\to\\dir\\");
+        assertAddTrailingFileSep("\\\\server\\share\\path\\to\\dir\\", "\\\\server\\share\\path\\to\\dir\\");
+        assertAddTrailingFileSep("\\\\server\\share\\path\\to\\dir\\\\", "\\\\server\\share\\path\\to\\dir\\");
+    }
+
+    private static void assertAddTrailingFileSep(String input, String expectedOutput) {
+        String output = Configuration.addTrailingFileSep(input);
+        if (!expectedOutput.equals(output)) {
+            throw new Error("expected " + expectedOutput + " but was " + output);
+        }
+    }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/T4994049/FileWithTabs.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2005, 2010, 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.
+ *
+ * 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.
+ */
+
+public class FileWithTabs {
+\tpublic void tabbedMethod() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/T4994049/T4994049.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,162 @@
+/*
+ * Copyright (c) 2005, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug     4994049
+ * @summary Unit test for SourcePosition.column with respect to tab expansion
+ * @author  Peter von der Ah\u00e9
+ * @modules jdk.javadoc
+ * @run main T4994049 FileWithTabs.java
+ */
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.TypeElement;
+
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.tree.LineMap;
+import com.sun.source.util.DocTrees;
+import com.sun.source.util.SourcePositions;
+import com.sun.source.util.TreePath;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+import static jdk.javadoc.internal.tool.Main.execute;
+
+public class T4994049 implements Doclet {
+
+    public boolean run(DocletEnvironment root) {
+        DocTrees trees = root.getDocTrees();
+
+        SourcePositions sourcePositions = trees.getSourcePositions();
+        for (TypeElement klass : root.getIncludedClasses()) {
+            for (ExecutableElement method : getMethods(klass)) {
+                if (method.getSimpleName().toString().equals("tabbedMethod")) {
+                    TreePath path = trees.getPath(method);
+                    CompilationUnitTree cu = path.getCompilationUnit();
+                    long pos = sourcePositions.getStartPosition(cu, path.getLeaf());
+                    LineMap lineMap = cu.getLineMap();
+                    long columnNumber = lineMap.getColumnNumber(pos);
+                    if (columnNumber == 9) {
+                        System.out.println(columnNumber + ": OK!");
+                        return true;
+                    } else {
+                        System.err.println(columnNumber + ": wrong tab expansion");
+                        return false;
+                    }
+                }
+            }
+        }
+        return false;
+    }
+
+    public static void main(String... args) throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File tmpSrc = new File("tmpSrc");
+        initTabs(testSrc, tmpSrc);
+
+
+        for (String file : args) {
+            File source = new File(tmpSrc, file);
+            String[] array = {
+                "-docletpath", System.getProperty("test.classes", "."),
+                "-doclet", "T4994049",
+                source.getPath()
+            };
+            int rc = execute(array);
+            if (rc != 0)
+                throw new Error("Unexpected return code from javadoc: " + rc);
+        }
+    }
+
+    static void initTabs(File from, File to) throws IOException {
+        for (File f: from.listFiles()) {
+            File t = new File(to, f.getName());
+            if (f.isDirectory()) {
+                initTabs(f, t);
+            } else if (f.getName().endsWith(".java")) {
+                write(t, read(f).replace("\\t", "\t"));
+            }
+        }
+    }
+
+    static String read(File f) throws IOException {
+        StringBuilder sb = new StringBuilder();
+        try (BufferedReader in = new BufferedReader(new FileReader(f))) {
+            String line;
+            while ((line = in.readLine()) != null) {
+                sb.append(line);
+                sb.append("\n");
+            }
+        }
+        return sb.toString();
+    }
+
+    static void write(File f, String s) throws IOException {
+        f.getParentFile().mkdirs();
+        try (Writer out = new FileWriter(f)) {
+            out.write(s);
+        }
+    }
+
+    List<ExecutableElement> getMethods(TypeElement klass) {
+        List<ExecutableElement> methods = new ArrayList<>();
+        klass.getEnclosedElements()
+                .stream()
+                .filter((e) -> (e.getKind() == ElementKind.METHOD))
+                .forEach((e) -> {
+                    methods.add((ExecutableElement) e);
+                });
+        return methods;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/T6551367.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2010, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug     6551367
+ * @summary javadoc throws ClassCastException when an link tag tries to reference constructor.
+ * @author  A. Sundararajan
+ * @modules jdk.javadoc/com.sun.tools.doclets.standard
+ * @run main T6551367 T6551367.java
+ */
+
+import java.io.File;
+
+import jdk.javadoc.doclet.DocletEnvironment;
+
+import static jdk.javadoc.internal.tool.Main.execute;
+
+public class T6551367 extends jdk.javadoc.internal.doclets.standard.Standard {
+    public T6551367() {}
+    public boolean run(DocletEnvironment root) {
+        return true;
+    }
+    /** Here, in the javadoc for this method, I try to link to
+     *  {@link #<init> a constructor}.
+     */
+    public static void main(String... args) {
+        File testSrc = new File(System.getProperty("test.src", "."));
+        File destDir = new File(System.getProperty("user.dir", "."));
+        for (String file : args) {
+            File source = new File(testSrc, file);
+            String[] array = {
+                "-docletpath", System.getProperty("test.classes", "."),
+                "-doclet", "T6551367",
+                "-Xdoclint:none",
+                source.getPath(),
+                "-d",
+                destDir.getAbsolutePath()
+            };
+
+            int rc = execute(array);
+            if (rc != 0)
+                throw new Error("unexpected exit from javadoc: " + rc);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/T6968833.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6968833
+ * @summary javadoc reports error but still returns 0
+ * @modules jdk.javadoc
+ */
+
+import java.io.*;
+
+public class T6968833 {
+    public static void main(String... args) throws IOException {
+        new T6968833().run();
+    }
+
+    void run() throws IOException {
+        File srcDir = new File("src");
+        // following file causes error: No public or protected classes found to document.
+        File f = writeFile(srcDir, "Foo.java", "class Foo { }");
+        String[] args = { f.getPath() };
+        int rc = jdk.javadoc.internal.tool.Main.execute(args);
+        if (rc == 0)
+            throw new Error("Unexpected exit from javadoc: " + rc);
+    }
+
+    File writeFile(File dir, String path, String s) throws IOException {
+        File f = new File(dir, path);
+        f.getParentFile().mkdirs();
+        try (Writer out = new FileWriter(f)) {
+            out.write(s);
+        }
+        return f;
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/VerifyLocale.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8035473
+ * @summary Verify that init method works correctly.
+ * @modules jdk.javadoc
+ */
+
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.tools.Diagnostic.Kind;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class VerifyLocale implements Doclet {
+    Locale locale;
+    Reporter reporter;
+
+    public static void main(String[] args) {
+        String thisFile = "" +
+            new java.io.File(System.getProperty("test.src", "."),
+                             "VerifyLocale.java");
+
+        String[] argarray = {
+            // jumble the options in some weird order
+            "-doclet", "VerifyLocale",
+            "-locale", "ja",
+            "-docletpath", System.getProperty("test.classes", "."),
+            thisFile
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(argarray) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    public boolean run(DocletEnvironment root) {
+        reporter.print(Kind.NOTE, "just a test: Locale is: " + locale.getDisplayName());
+        return locale.getDisplayName(Locale.ENGLISH).contains("Japan");
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        this.locale = locale;
+        this.reporter = reporter;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/XWerror.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4099527
+ * @summary javadoc tool: want flag to exit nonzero if there were warnings.
+ * @author gafter
+ * @modules jdk.javadoc
+ * @run main XWerror
+ */
+
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Collections;
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+import javax.tools.Diagnostic;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class XWerror implements Doclet {
+
+    private static final String message = "warning message";
+
+    public static void main(String[] args) {
+        StringWriter sw = new StringWriter();
+        PrintWriter output = new PrintWriter(sw);
+
+        String[] aargs = {
+            "-docletpath", System.getProperty("test.classes", "."),
+            "-doclet", "XWerror",
+            "-Xwerror",
+            System.getProperty("test.src", ".") + java.io.File.separatorChar
+            + "XWerror.java"
+        };
+        if (jdk.javadoc.internal.tool.Main.execute(aargs, output) == 0) {
+            throw new Error("did not get non-zero exit code");
+        }
+        if (!sw.toString().contains(message)) {
+            throw new Error("expected message not found: " + message);
+        }
+    }
+    Reporter reporter;
+
+    public boolean run(DocletEnvironment root) {
+        reporter.print(Diagnostic.Kind.WARNING , message);
+        return false;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
+    public void init(Locale locale, Reporter reporter) {
+        this.reporter = reporter;
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/APITest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,248 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.nio.file.DirectoryStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.TreeSet;
+import java.util.stream.*;
+
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+
+
+/*
+ * Superclass with utility methods for API tests.
+ */
+class APITest {
+    protected APITest() { }
+
+    /** Marker annotation for test cases. */
+    @Retention(RetentionPolicy.RUNTIME)
+    @interface Test { }
+
+    /** Invoke all methods annotated with @Test. */
+    protected void run() throws Exception {
+        for (Method m: getClass().getDeclaredMethods()) {
+            Annotation a = m.getAnnotation(Test.class);
+            if (a != null) {
+                testCount++;
+                testName = m.getName();
+                System.err.println("test: " + testName);
+                try {
+                    m.invoke(this, new Object[] { });
+                } catch (InvocationTargetException e) {
+                    Throwable cause = e.getCause();
+                    throw (cause instanceof Exception) ? ((Exception) cause) : e;
+                }
+                System.err.println();
+            }
+        }
+
+        if (testCount == 0)
+            error("no tests found");
+
+        StringBuilder summary = new StringBuilder();
+        if (testCount != 1)
+            summary.append(testCount).append(" tests");
+        if (errorCount > 0) {
+            if (summary.length() > 0) summary.append(", ");
+            summary.append(errorCount).append(" errors");
+        }
+        System.err.println(summary);
+        if (errorCount > 0)
+            throw new Exception(errorCount + " errors found");
+    }
+
+    /**
+     * Create a directory in which to store generated doc files.
+     * Avoid using the default (current) directory, so that we can
+     * be sure that javadoc is writing in the intended location,
+     * not a default location.
+     */
+    protected File getOutDir() {
+        File dir = new File(testName);
+        dir.mkdirs();
+        return dir;
+    }
+
+    /**
+     * Create a directory in which to store generated doc files.
+     * Avoid using the default (current) directory, so that we can
+     * be sure that javadoc is writing in the intended location,
+     * not a default location.
+     */
+    protected File getOutDir(String path) {
+        File dir = new File(testName, path);
+        dir.mkdirs();
+        return dir;
+    }
+
+    protected JavaFileObject createSimpleJavaFileObject() {
+        return createSimpleJavaFileObject("pkg/C", "package pkg; public class C { }");
+    }
+
+    protected JavaFileObject createSimpleJavaFileObject(final String binaryName, final String content) {
+        return new SimpleJavaFileObject(
+                URI.create("myfo:///" + binaryName + ".java"), JavaFileObject.Kind.SOURCE) {
+            @Override
+            public CharSequence getCharContent(boolean ignoreEncoding) {
+                return content;
+            }
+        };
+    }
+
+    protected void checkFiles(File dir, Set<String> expectFiles) {
+        Set<File> files = new HashSet<File>();
+        listFiles(dir, files);
+        Set<String> foundFiles = new HashSet<String>();
+        URI dirURI = dir.toURI();
+        for (File f: files)
+            foundFiles.add(dirURI.relativize(f.toURI()).getPath());
+        checkFiles(foundFiles, expectFiles, dir);
+    }
+
+    protected void checkFiles(Path dir, Set<String> expectFiles) throws IOException {
+        Set<Path> files = new HashSet<Path>();
+        listFiles(dir, files);
+        Set<String> foundFiles = new HashSet<String>();
+        for (Path f: files) {
+            foundFiles.add(dir.relativize(f).toString().replace(f.getFileSystem().getSeparator(), "/"));
+        }
+        checkFiles(foundFiles, expectFiles, dir);
+    }
+
+    private void checkFiles(Set<String> foundFiles, Set<String> expectFiles, Object where) {
+        if (!foundFiles.equals(expectFiles)) {
+            Set<String> missing = new TreeSet<String>(expectFiles);
+            missing.removeAll(foundFiles);
+            if (!missing.isEmpty())
+                error("the following files were not found in " + where + ": " + missing);
+            Set<String> unexpected = new TreeSet<String>(foundFiles);
+            unexpected.removeAll(expectFiles);
+            if (!unexpected.isEmpty())
+                error("the following unexpected files were found in " + where + ": " + unexpected);
+        }
+    }
+
+    protected void listFiles(File dir, Set<File> files) {
+        for (File f: dir.listFiles()) {
+            if (f.isDirectory())
+                listFiles(f, files);
+            else if (f.isFile())
+                files.add(f);
+        }
+    }
+
+    private void listFiles(Path dir, Set<Path> files) throws IOException {
+        try (DirectoryStream<Path> ds = Files.newDirectoryStream(dir)) {
+            for (Path f: ds) {
+                if (Files.isDirectory(f))
+                    listFiles(f, files);
+                else if (Files.isRegularFile(f))
+                    files.add(f);
+            }
+        }
+    }
+
+    protected void error(String msg) {
+        System.err.println("Error: " + msg);
+        errorCount++;
+    }
+
+    protected int testCount;
+    protected int errorCount;
+
+    protected String testName;
+
+    /**
+     * Standard files generated by processing a documented class pkg.C.
+     */
+    protected static Set<String> standardExpectFiles = new HashSet<>(Arrays.asList(
+            "allclasses-frame.html",
+            "allclasses-noframe.html",
+            "constant-values.html",
+            "deprecated-list.html",
+            "help-doc.html",
+            "index-all.html",
+            "index.html",
+            "jquery/jquery-1.10.2.js",
+            "jquery/jquery-ui.js",
+            "jquery/jquery-ui.css",
+            "jquery/jquery-ui.min.js",
+            "jquery/jquery-ui.min.css",
+            "jquery/jquery-ui.structure.min.css",
+            "jquery/jquery-ui.structure.css",
+            "jquery/external/jquery/jquery.js",
+            "jquery/jszip/dist/jszip.js",
+            "jquery/jszip/dist/jszip.min.js",
+            "jquery/jszip-utils/dist/jszip-utils.js",
+            "jquery/jszip-utils/dist/jszip-utils.min.js",
+            "jquery/jszip-utils/dist/jszip-utils-ie.js",
+            "jquery/jszip-utils/dist/jszip-utils-ie.min.js",
+            "jquery/images/ui-bg_flat_0_aaaaaa_40x100.png",
+            "jquery/images/ui-icons_454545_256x240.png",
+            "jquery/images/ui-bg_glass_95_fef1ec_1x400.png",
+            "jquery/images/ui-bg_glass_75_dadada_1x400.png",
+            "jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
+            "jquery/images/ui-icons_888888_256x240.png",
+            "jquery/images/ui-icons_2e83ff_256x240.png",
+            "jquery/images/ui-bg_glass_65_ffffff_1x400.png",
+            "jquery/images/ui-icons_cd0a0a_256x240.png",
+            "jquery/images/ui-bg_glass_55_fbf9ee_1x400.png",
+            "jquery/images/ui-icons_222222_256x240.png",
+            "jquery/images/ui-bg_glass_75_e6e6e6_1x400.png",
+            "jquery/images/ui-bg_flat_75_ffffff_40x100.png",
+            "member-search-index.zip",
+            "overview-tree.html",
+            "package-list",
+            "package-search-index.zip",
+            "pkg/C.html",
+            "pkg/package-frame.html",
+            "pkg/package-summary.html",
+            "pkg/package-tree.html",
+            "resources/glass.png",
+            "resources/x.png",
+            "script.js",
+            "search.js",
+            "stylesheet.css",
+            "type-search-index.zip"
+    ));
+
+    protected static Set<String> noIndexFiles = standardExpectFiles.stream()
+            .filter(s -> !s.startsWith("jquery") && !s.startsWith("resources") && !s.endsWith("zip")
+                    && !s.equals("index-all.html") && !s.equals("search.js"))
+            .collect(Collectors.toSet());
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/DocletPathTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main DocletPathTest
+ */
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Arrays;
+
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for locating a doclet via the file manager's DOCLET_PATH.
+ */
+public class DocletPathTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new DocletPathTest().run();
+    }
+
+    /**
+     * Verify that an alternate doclet can be specified, and located via
+     * the file manager's DOCLET_PATH.
+     */
+    @Test
+    public void testDocletPath() throws Exception {
+        JavaFileObject docletSrc =
+                createSimpleJavaFileObject("DocletOnDocletPath", docletSrcText);
+        File docletDir = getOutDir("classes");
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        try (StandardJavaFileManager cfm = compiler.getStandardFileManager(null, null, null)) {
+            cfm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(docletDir));
+            Iterable<? extends JavaFileObject> cfiles = Arrays.asList(docletSrc);
+            if (!compiler.getTask(null, cfm, null, null, null, cfiles).call())
+                throw new Exception("cannot compile doclet");
+        }
+
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir("api");
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            fm.setLocation(DocumentationTool.Location.DOCLET_PATH, Arrays.asList(docletDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            Iterable<String> options = Arrays.asList("-doclet", "DocletOnDocletPath");
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            DocumentationTask t = tool.getTask(pw, fm, null, null, options, files);
+            boolean ok = t.call();
+            String out = sw.toString();
+            System.err.println(">>" + out + "<<");
+            if (ok) {
+                if (out.contains(TEST_STRING)) {
+                    System.err.println("doclet executed as expected");
+                } else {
+                    error("test string not found in doclet output");
+                }
+            } else {
+                error("task failed");
+            }
+        }
+    }
+
+    private static final String TEST_STRING = "DocletOnDocletPath found and running";
+
+    private static final String docletSrcText =
+        "import jdk.javadoc.doclet.*;\n" +
+        "import javax.lang.model.SourceVersion;\n" +
+        "import java.util.List;\n" +
+        "import java.util.Collections;\n" +
+        "import java.util.Set;\n" +
+        "import jdk.javadoc.doclet.Doclet;\n" +
+        "import java.util.Locale;\n" +
+        "import jdk.javadoc.doclet.Reporter;\n" +
+        "public class DocletOnDocletPath implements Doclet {\n" +
+        "    public boolean run(DocletEnvironment doc) {\n" +
+        "        reporter.print(javax.tools.Diagnostic.Kind.NOTE, " +
+        "                                \"" + TEST_STRING + "\");\n" +
+        "        return true;\n" +
+        "    }\n" +
+        "    public Set<Doclet.Option> getSupportedOptions() {return Collections.emptySet();}\n" +
+        "    public SourceVersion getSupportedSourceVersion() {\n" +
+        "        return SourceVersion.latestSupported();\n" +
+        "    }\n" +
+        "    Reporter reporter;\n" +
+        "    public void init(Locale locale, Reporter reporter) {\n" +
+        "        this.reporter = reporter;\n" +
+        "        return;\n" +
+        "    }" +
+        "    public String getName() { return \"DocletOnPath\"; }\n" +
+        "}\n";
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/DocumentationToolLocationTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8025844
+ * @summary test DocumentationTool.Location methods
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main DocumentationToolLocationTest
+ */
+
+import javax.tools.DocumentationTool;
+import java.util.Objects;
+
+/**
+ * Test for DocumentationTool.Location methods.
+ */
+public class DocumentationToolLocationTest extends APITest {
+    public static void main(String[] args) throws Exception {
+        new DocumentationToolLocationTest().run();
+    }
+
+    /**
+     * Test getName() method
+     */
+    @Test
+    public void testGetName() throws Exception {
+        // getName() returns name(). This is for test coverage of getName.
+        for (DocumentationTool.Location dl: DocumentationTool.Location.values()) {
+            String expect = dl.name();
+            String found = dl.getName();
+            if (!Objects.equals(expect, found))
+                throw new Exception("mismatch for " + dl + "; expected " + expect + ", found " + found);
+        }
+    }
+
+    /**
+     * Test generated enum methods values() and valueOf()
+     */
+    @Test
+    public void testEnumMethods() throws Exception {
+        DocumentationTool.Location[] values = DocumentationTool.Location.values();
+        if (values.length != 3)
+            throw new Exception("unexpected number of values returned");
+
+        for (DocumentationTool.Location dl: values) {
+            DocumentationTool.Location expect = dl;
+            DocumentationTool.Location found = DocumentationTool.Location.valueOf(dl.name());
+            if (!Objects.equals(expect, found))
+                throw new Exception("mismatch for " + dl + "; expected " + expect + ", found " + found);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetSourceVersionsTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main GetSourceVersionsTest
+ */
+
+import java.util.EnumSet;
+import java.util.Set;
+import javax.lang.model.SourceVersion;
+import javax.tools.DocumentationTool;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.getSourceVersions method.
+ */
+public class GetSourceVersionsTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetSourceVersionsTest().run();
+    }
+
+    /**
+     * Verify getSourceVersions.
+     */
+    @Test
+    public void testRun() throws Exception {
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        Set<SourceVersion> found = tool.getSourceVersions();
+        Set<SourceVersion> expect = EnumSet.range(SourceVersion.RELEASE_3, SourceVersion.latest());
+        if (!expect.equals(found)) {
+            System.err.println("expect: " + expect);
+            System.err.println(" found: " + expect);
+            error("unexpected versions");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetTask_DiagListenerTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main GetTask_DiagListenerTest
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticCollector;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.getTask  diagnosticListener  parameter.
+ */
+public class GetTask_DiagListenerTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetTask_DiagListenerTest().run();
+    }
+
+    /**
+     * Verify that a diagnostic listener can be specified.
+     * Note that messages from the tool and doclet are imperfectly modeled
+     * because the DocErrorReporter API works in terms of localized strings
+     * and file:line positions. Therefore, messages reported via DocErrorReporter
+     * and simply wrapped and passed through.
+     */
+    @Test
+    public void testDiagListener() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject("pkg/C", "package pkg; public error { }");
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            DiagnosticCollector<JavaFileObject> dc = new DiagnosticCollector<JavaFileObject>();
+            DocumentationTask t = tool.getTask(null, fm, dc, null, null, files);
+            if (t.call()) {
+                throw new Exception("task succeeded unexpectedly");
+            } else {
+                List<String> diagCodes = new ArrayList<String>();
+                for (Diagnostic d: dc.getDiagnostics()) {
+                    System.err.println(d);
+                    diagCodes.add(d.getCode());
+                }
+                List<String> expect = Arrays.asList(
+                        "javadoc.note.msg",         // Loading source file
+                        "compiler.err.expected3",   // class, interface, or enum expected
+                        "javadoc.note.msg");        // 1 error
+                if (!diagCodes.equals(expect))
+                    throw new Exception("unexpected diagnostics occurred");
+                System.err.println("diagnostics received as expected");
+            }
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetTask_DocletClassTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,163 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules jdk.javadoc
+ * @build APITest
+ * @run main GetTask_DocletClassTest
+ * @key randomness
+ */
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Random;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.javadoc.DocErrorReporter;
+import com.sun.javadoc.LanguageVersion;
+import com.sun.javadoc.RootDoc;
+
+/**
+ * Tests for DocumentationTool.getTask  docletClass  parameter.
+ */
+public class GetTask_DocletClassTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetTask_DocletClassTest().run();
+    }
+
+    /**
+     * Verify that an alternate doclet can be specified.
+     *
+     * There is no standard interface or superclass for a doclet;
+     * the only requirement is that it provides static methods that
+     * can be invoked via reflection. So, for now, the doclet is
+     * specified as a class.
+     * Because we cannot create and use a unique instance of the class,
+     * we verify that the doclet has been called by having it record
+     * (in a static field!) the comment from the last time it was invoked,
+     * which is randomly generated each time the test is run.
+     */
+    @Test
+    public void testDoclet() throws Exception {
+        Random r = new Random();
+        int key = r.nextInt();
+        JavaFileObject srcFile = createSimpleJavaFileObject(
+                "pkg/C",
+                "package pkg; /** " + key + "*/ public class C { }");
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            DocumentationTask t = tool.getTask(null, fm, null, TestDoclet.class, null, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+                if (TestDoclet.lastCaller.equals(String.valueOf(key)))
+                    System.err.println("found expected key: " + key);
+                else
+                    error("Expected key not found");
+                checkFiles(outDir, Collections.<String>emptySet());
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+
+    public static class TestDoclet {
+        static String lastCaller;
+        public static boolean start(RootDoc root) {
+            lastCaller = root.classNamed("pkg.C").commentText().trim();
+            return true;
+        }
+
+        public static int optionLength(String option) {
+            return 0;  // default is option unknown
+        }
+
+        public static boolean validOptions(String options[][],
+                DocErrorReporter reporter) {
+            return true;  // default is options are valid
+        }
+
+        public static LanguageVersion languageVersion() {
+            return LanguageVersion.JAVA_1_1;
+        }
+    }
+
+    /**
+     * Verify that exceptions from a doclet are thrown as expected.
+     */
+    @Test
+    public void testBadDoclet() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            DocumentationTask t = tool.getTask(null, fm, null, BadDoclet.class, null, files);
+            try {
+                t.call();
+                error("call completed without exception");
+            } catch (RuntimeException e) {
+                e.printStackTrace();
+                Throwable c = e.getCause();
+                if (c.getClass() == UnexpectedError.class)
+                    System.err.println("exception caught as expected: " + c);
+                else
+                    throw e;
+            }
+        }
+    }
+
+    public static class UnexpectedError extends Error { }
+
+    public static class BadDoclet {
+        public static boolean start(RootDoc root) {
+            throw new UnexpectedError();
+        }
+
+        public static int optionLength(String option) {
+            return 0;  // default is option unknown
+        }
+
+        public static boolean validOptions(String options[][],
+                DocErrorReporter reporter) {
+            return true;  // default is options are valid
+        }
+
+        public static LanguageVersion languageVersion() {
+            return LanguageVersion.JAVA_1_1;
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetTask_FileManagerTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690 8024434
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @build APITest
+ * @run main GetTask_FileManagerTest
+ */
+
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Path;
+import java.util.Arrays;
+import java.util.Set;
+
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.FileObject;
+import javax.tools.ForwardingJavaFileManager;
+import javax.tools.JavaFileObject;
+import javax.tools.JavaFileObject.Kind;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.util.Context;
+
+/**
+ * Tests for DocumentationTool.getTask  fileManager  parameter.
+ */
+public class GetTask_FileManagerTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetTask_FileManagerTest().run();
+    }
+
+    /**
+     * Verify that an alternate file manager can be specified:
+     * in this case, a TestFileManager.
+     */
+    @Test
+    public void testFileManager() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        StandardJavaFileManager fm = new TestFileManager();
+        File outDir = getOutDir();
+        fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+        Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+        DocumentationTask t = tool.getTask(null, fm, null, null, Arrays.asList("-verbose"), files);
+        if (t.call()) {
+            System.err.println("task succeeded");
+            checkFiles(outDir, standardExpectFiles);
+        } else {
+            throw new Exception("task failed");
+        }
+    }
+
+    /**
+     * Verify that exceptions from a bad file manager are thrown as expected.
+     */
+    @Test
+    public void testBadFileManager() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        StandardJavaFileManager fm = new TestFileManager() {
+            @Override
+            public Iterable<JavaFileObject> list(Location location,
+                    String packageName,
+                    Set<Kind> kinds,
+                    boolean recurse)
+                    throws IOException {
+                throw new UnexpectedError();
+            }
+        };
+        fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(getOutDir()));
+        Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+        DocumentationTask t = tool.getTask(null, fm, null, null, null, files);
+        try {
+            t.call();
+            error("call completed without exception");
+        } catch (RuntimeException e) {
+            Throwable c = e.getCause();
+            if (c.getClass() == UnexpectedError.class)
+                System.err.println("exception caught as expected: " + c);
+            else
+                throw e;
+        }
+    }
+
+    public static class UnexpectedError extends Error { }
+
+    /*
+     * A JavaFileManager which is not a JavacFileManager, even though it uses one internally for
+     * convenience.
+     */
+    static class TestFileManager extends ForwardingJavaFileManager<StandardJavaFileManager>
+            implements StandardJavaFileManager  {
+        TestFileManager() {
+            super(new JavacFileManager(new Context(), false, null));
+        }
+
+        @Override
+        public Iterable<? extends JavaFileObject> getJavaFileObjectsFromFiles(Iterable<? extends File> files) {
+            return fileManager.getJavaFileObjectsFromFiles(files);
+        }
+
+        @Override
+        public Iterable<? extends JavaFileObject> getJavaFileObjects(File... files) {
+            return fileManager.getJavaFileObjects(files);
+        }
+
+        @Override
+        public Iterable<? extends JavaFileObject> getJavaFileObjectsFromStrings(Iterable<String> names) {
+            return fileManager.getJavaFileObjectsFromStrings(names);
+        }
+
+        @Override
+        public Iterable<? extends JavaFileObject> getJavaFileObjects(String... names) {
+            return fileManager.getJavaFileObjects(names);
+        }
+
+        @Override
+        public void setLocation(Location location, Iterable<? extends File> path) throws IOException {
+            fileManager.setLocation(location, path);
+        }
+
+        @Override
+        public Iterable<? extends File> getLocation(Location location) {
+            return fileManager.getLocation(location);
+        }
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetTask_FileObjectsTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,136 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main GetTask_FileObjectsTest
+ */
+
+import java.io.File;
+import java.util.Arrays;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.getTask  fileObjects  parameter.
+ */
+public class GetTask_FileObjectsTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetTask_FileObjectsTest().run();
+    }
+
+    /**
+     * Verify that expected output files are written via the file manager,
+     * for a source file read from the file system with StandardJavaFileManager.
+     */
+    @Test
+    public void testStandardFileObject() throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File srcFile = new File(testSrc, "pkg/C.java");
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = fm.getJavaFileObjects(srcFile);
+            DocumentationTask t = tool.getTask(null, fm, null, null, null, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+                checkFiles(outDir, standardExpectFiles);
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+
+    /**
+     * Verify that expected output files are written via the file manager,
+     * for an in-memory file object.
+     */
+    @Test
+    public void testMemoryFileObject() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            DocumentationTask t = tool.getTask(null, fm, null, null, null, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+                checkFiles(outDir, standardExpectFiles);
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+
+    /**
+     * Verify bad file object is handled correctly.
+     */
+    @Test
+    public void testBadFileObject() throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File srcFile = new File(testSrc, "pkg/C.class");  // unacceptable file kind
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = fm.getJavaFileObjects(srcFile);
+            try {
+                DocumentationTask t = tool.getTask(null, fm, null, null, null, files);
+                error("getTask succeeded, no exception thrown");
+            } catch (IllegalArgumentException e) {
+                System.err.println("exception caught as expected: " + e);
+            }
+        }
+    }
+
+    /**
+     * Verify null is handled correctly.
+     */
+    @Test
+    public void testNull() throws Exception {
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList((JavaFileObject) null);
+            try {
+                DocumentationTask t = tool.getTask(null, fm, null, null, null, files);
+                error("getTask succeeded, no exception thrown");
+            } catch (NullPointerException e) {
+                System.err.println("exception caught as expected: " + e);
+            }
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetTask_OptionsTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690 8141492
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main GetTask_OptionsTest
+ */
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.TreeSet;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.getTask  options  parameter.
+ */
+public class GetTask_OptionsTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetTask_OptionsTest().run();
+    }
+
+    /**
+     * Verify that expected output files are written for given options.
+     */
+    @Test
+    public void testNoIndex() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            Iterable<String> options = Arrays.asList("-noindex");
+            DocumentationTask t = tool.getTask(null, fm, null, null, options, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+                Set<String> expectFiles = new TreeSet<String>(noIndexFiles);
+                checkFiles(outDir, expectFiles);
+            } else {
+                error("task failed");
+            }
+        }
+    }
+
+    /**
+     * Verify null is handled correctly.
+     */
+    @Test
+    public void testNull() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<String> options = Arrays.asList((String) null);
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            try {
+                DocumentationTask t = tool.getTask(null, fm, null, null, options, files);
+                error("getTask succeeded, no exception thrown");
+            } catch (NullPointerException e) {
+                System.err.println("exception caught as expected: " + e);
+            }
+        }
+    }
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/GetTask_WriterTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main GetTask_WriterTest
+ */
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Arrays;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.getTask  writer  parameter.
+ */
+public class GetTask_WriterTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new GetTask_WriterTest().run();
+    }
+
+    /**
+     * Verify that a writer can be provided.
+     */
+    @Test
+    public void testWriter() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            DocumentationTask t = tool.getTask(pw, fm, null, null, null, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+                checkFiles(outDir, standardExpectFiles);
+                String out = sw.toString();
+                System.err.println(">>" + out + "<<");
+                for (String f: standardExpectFiles) {
+                    String f1 = f.replace('/', File.separatorChar);
+                    if (f1.endsWith(".html") && !out.contains(f1))
+                        throw new Exception("expected string not found: " + f1);
+                }
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/IsSupportedOptionTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main IsSupportedOptionTest
+ */
+
+import javax.tools.DocumentationTool;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.usSupportedOption method.
+ */
+public class IsSupportedOptionTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new IsSupportedOptionTest().run();
+    }
+
+    /**
+     * Verify that isSupportedOption method can be invoked.
+     */
+    @Test
+    public void test() throws Exception {
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        check(tool, "-sourcepath", 1);
+        check(tool, "-verbose", 0);
+        check(tool, "-ZZZ", -1);
+
+        try {
+            check(tool, null, -1);
+            error("null was accepted without exception");
+        } catch (NullPointerException e) {
+        }
+    }
+
+    private void check(DocumentationTool tool, String option, int numArgs) {
+        System.err.println("check " + option);
+        int n = tool.isSupportedOption(option);
+        if (n != numArgs)
+            error("unexpected result for option: " + option + ": " + n);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/JavadocTaskImplTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules jdk.compiler/com.sun.tools.javac.file
+ *          jdk.compiler/com.sun.tools.javac.util
+ *          jdk.javadoc/com.sun.tools.javadoc.api
+ * @build APITest
+ * @run main JavadocTaskImplTest
+ */
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.concurrent.Callable;
+
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.util.Context;
+import jdk.javadoc.internal.api.JavadocTaskImpl;
+import jdk.javadoc.internal.tool.Messager;
+
+/**
+ *  Misc tests for JavacTaskImpl.
+ */
+public class JavadocTaskImplTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new JavadocTaskImplTest().run();
+    }
+
+    @Test
+    public void testRawCall() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+
+            @SuppressWarnings("rawtypes")
+            Callable t = tool.getTask(null, fm, null, null, null, files);
+
+            if (t.call() == Boolean.TRUE) {
+                System.err.println("task succeeded");
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+
+    @Test
+    public void testDirectAccess1() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+        Context c = new Context();
+        Messager.preRegister(c, "javadoc");
+        try (StandardJavaFileManager fm = new JavacFileManager(c, true, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            DocumentationTask t = new JavadocTaskImpl(c, null, null, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+
+    @Test
+    public void testDirectAccess2() throws Exception {
+        JavaFileObject srcFile = null; // error, provokes NPE
+        Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+        Context c = new Context();
+        Messager.preRegister(c, "javadoc");
+        try (StandardJavaFileManager fm = new JavacFileManager(c, true, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            try {
+                DocumentationTask t = new JavadocTaskImpl(c, null, null, files);;
+                error("getTask succeeded, no exception thrown");
+            } catch (NullPointerException e) {
+                System.err.println("exception caught as expected: " + e);
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/RunTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,150 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690 8007490
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main RunTest
+ */
+
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.PrintStream;
+import javax.tools.DocumentationTool;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for DocumentationTool.run method.
+ */
+public class RunTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new RunTest().run();
+    }
+
+    /**
+     * Verify that run method can be invoked.
+     */
+//    @Test
+    public void testRunOK() throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File srcFile = new File(testSrc, "pkg/C.java");
+        File outDir = getOutDir();
+        String[] args = { "-d", outDir.getPath(), srcFile.getPath() };
+
+        ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+        ByteArrayOutputStream stderr = new ByteArrayOutputStream();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        int rc = tool.run(null, stdout, stderr, args);
+        System.err.println("stdout >>" + stdout.toString() + "<<");
+        System.err.println("stderr >>" + stderr.toString() + "<<");
+
+        if (rc == 0) {
+            System.err.println("call succeeded");
+            checkFiles(outDir, standardExpectFiles);
+            String out = stdout.toString();
+            for (String f: standardExpectFiles) {
+                String f1 = f.replace('/', File.separatorChar);
+                if (f1.endsWith(".html") && !out.contains(f1))
+                    error("expected string not found: " + f1);
+            }
+        } else {
+            error("call failed");
+        }
+    }
+
+    /**
+     * Verify that run method can be invoked.
+     */
+    @Test
+    public void testRunFail() throws Exception {
+        File outDir = getOutDir();
+        String badfile = "badfile.java";
+        String[] args = { "-d", outDir.getPath(), badfile };
+
+        ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+        ByteArrayOutputStream stderr = new ByteArrayOutputStream();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        int rc = tool.run(null, stdout, stderr, args);
+        System.err.println("stdout >>" + stdout.toString() + "<<");
+        System.err.println("stderr >>" + stderr.toString() + "<<");
+
+        if (rc == 0) {
+            error("call succeeded unexpectedly");
+        } else {
+            String err = stderr.toString();
+            if (err.contains(badfile))
+                System.err.println("call failed as expected");
+            else
+                error("expected diagnostic not found");
+        }
+    }
+
+    /**
+     * Verify that null args are accepted.
+     */
+//    @Test
+    public void testNullArgs() throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File srcFile = new File(testSrc, "pkg/C.java");
+        File outDir = getOutDir();
+        String[] args = { "-d", outDir.getPath(), srcFile.getPath() };
+
+        ByteArrayOutputStream stdout = new ByteArrayOutputStream();
+        PrintStream prevStdout = System.out;
+        System.setOut(new PrintStream(stdout));
+
+        ByteArrayOutputStream stderr = new ByteArrayOutputStream();
+        PrintStream prevStderr = System.err;
+        System.setErr(new PrintStream(stderr));
+
+        int rc ;
+        try {
+            DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+            rc = tool.run(null, null, null, args);
+        } finally {
+            System.setOut(prevStdout);
+            System.setErr(prevStderr);
+        }
+
+        System.err.println("stdout >>" + stdout.toString() + "<<");
+        System.err.println("stderr >>" + stderr.toString() + "<<");
+
+        if (rc == 0) {
+            System.err.println("call succeeded");
+            checkFiles(outDir, standardExpectFiles);
+            String out = stdout.toString();
+            for (String f: standardExpectFiles) {
+                String f1 = f.replace('/', File.separatorChar);
+                if (f1.endsWith(".html") && !out.contains(f1))
+                    error("expected string not found: " + f1);
+            }
+        } else {
+            error("call failed");
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/TagletPathTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main TagletPathTest
+ */
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.nio.charset.Charset;
+import java.nio.file.Files;
+import java.util.Arrays;
+import java.util.List;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for locating a doclet via the file manager's DOCLET_PATH.
+ */
+public class TagletPathTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new TagletPathTest().run();
+    }
+
+    /**
+     * Verify that a taglet can be specified, and located via
+     * the file manager's TAGLET_PATH.
+     */
+    @Test
+    public void testTagletPath() throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        File tagletSrcFile = new File(testSrc, "taglets/UnderlineTaglet.java");
+        File tagletDir = getOutDir("classes");
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        try (StandardJavaFileManager cfm = compiler.getStandardFileManager(null, null, null)) {
+            cfm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(tagletDir));
+            Iterable<? extends JavaFileObject> cfiles = cfm.getJavaFileObjects(tagletSrcFile);
+            if (!compiler.getTask(null, cfm, null, null, null, cfiles).call())
+                throw new Exception("cannot compile taglet");
+        }
+
+        JavaFileObject srcFile = createSimpleJavaFileObject("pkg/C", testSrcText);
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir("api");
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            fm.setLocation(DocumentationTool.Location.TAGLET_PATH, Arrays.asList(tagletDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            Iterable<String> options = Arrays.asList("-taglet", "UnderlineTaglet");
+            StringWriter sw = new StringWriter();
+            PrintWriter pw = new PrintWriter(sw);
+            DocumentationTask t = tool.getTask(pw, fm, null, null, options, files);
+            boolean ok = t.call();
+            String out = sw.toString();
+            System.err.println(">>" + out + "<<");
+            if (ok) {
+                File f = new File(outDir, "pkg/C.html");
+                List<String> doc = Files.readAllLines(f.toPath(), Charset.defaultCharset());
+                for (String line: doc) {
+                    if (line.contains("<u>" + TEST_STRING + "</u>")) {
+                        System.err.println("taglet executed as expected");
+                        return;
+                    }
+                }
+                error("expected text not found in output " + f);
+            } else {
+                error("task failed");
+            }
+        }
+    }
+
+    static final String TEST_STRING = "xyzzy";
+    static final String testSrcText =
+            "package pkg;\n" +
+            "/** {@underline " + TEST_STRING + "} */\n" +
+            "public class C { }";
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/Task_reuseTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 6493690
+ * @summary javadoc should have a javax.tools.Tool service provider
+ * @modules java.compiler
+ *          jdk.compiler
+ * @build APITest
+ * @run main Task_reuseTest
+ */
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Locale;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+/**
+ * Tests for reusing a documentation task.
+ */
+public class Task_reuseTest extends APITest {
+    public static void main(String... args) throws Exception {
+        new Task_reuseTest().run();
+    }
+
+    /**
+     * Verify that call can only be called once.
+     */
+    @Test
+    public void testReuse() throws Exception {
+        DocumentationTask t = getAndRunTask();
+        try {
+            t.call();
+            error("task was reused without exception");
+        } catch (IllegalStateException e) {
+            System.err.println("caught exception " + e);
+        }
+    }
+
+    /**
+     * Verify that cannot update task after call
+     */
+    @Test
+    public void testUpdateSetLocale() throws Exception {
+        DocumentationTask t = getAndRunTask();
+        try {
+            t.setLocale(Locale.getDefault());
+            error("task was reused without exception");
+        } catch (IllegalStateException e) {
+            System.err.println("caught exception " + e);
+        }
+    }
+
+    private DocumentationTask getAndRunTask() throws Exception {
+        JavaFileObject srcFile = createSimpleJavaFileObject();
+        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
+        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
+            File outDir = getOutDir();
+            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
+            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
+            DocumentationTask t = tool.getTask(null, fm, null, null, null, files);
+            if (t.call()) {
+                System.err.println("task succeeded");
+                return t;
+            } else {
+                throw new Exception("task failed");
+            }
+        }
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/pkg/C.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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 pkg;
+
+public class C { }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/api/basic/taglets/UnderlineTaglet.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,137 @@
+/*
+ * Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or
+ * without modification, are permitted provided that the following
+ * conditions are met:
+ *
+ * -Redistributions of source code must retain the above copyright
+ *  notice, this list of conditions and the following disclaimer.
+ *
+ * -Redistribution in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in
+ *  the documentation and/or other materials provided with the
+ *  distribution.
+ *
+ * Neither the name of Oracle nor the names of
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * This software is provided "AS IS," without a warranty of any
+ * kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
+ * WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
+ * EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
+ * DAMAGES OR LIABILITIES  SUFFERED BY LICENSEE AS A RESULT OF OR
+ * RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THE SOFTWARE OR
+ * ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
+ * FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
+ * SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
+ * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
+ * THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+ *
+ * You acknowledge that Software is not designed, licensed or
+ * intended for use in the design, construction, operation or
+ * maintenance of any nuclear facility.
+ */
+
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+
+import com.sun.source.doctree.DocTree;
+import com.sun.source.doctree.TextTree;
+import com.sun.source.doctree.UnknownBlockTagTree;
+import com.sun.source.doctree.UnknownInlineTagTree;
+import com.sun.source.util.SimpleDocTreeVisitor;
+import jdk.javadoc.doclet.taglet.Taglet;
+
+/**
+ * A sample Inline Taglet representing {@underline ...}. This tag can
+ * be used in any kind of {@link javax.lang.model.Element}.
+ * The text is underlined.  For example,
+ * "@underline UNDERLINE ME" would be shown as: <u>UNDERLINE ME</u>.
+ *
+ * @author Jamie Ho
+ * @since 1.4
+ */
+
+public class UnderlineTaglet implements Taglet {
+
+    private static final String NAME = "underline";
+
+    /**
+     * Return the name of this custom tag.
+     */
+    public String getName() {
+        return NAME;
+    }
+
+    private final EnumSet<Location> allowedSet = EnumSet.allOf(Location.class);
+
+    @Override
+    public Set<Taglet.Location> getAllowedLocations() {
+        return allowedSet;
+    }
+
+    /**
+     * Will return true since this is an inline tag.
+     * @return true since this is an inline tag.
+     */
+
+    public boolean isInlineTag() {
+        return true;
+    }
+
+    /**
+     * Given the <code>Tag</code> representation of this custom
+     * tag, return its string representation.
+     * @param tag he <code>Tag</code> representation of this custom tag.
+     */
+    public String toString(DocTree tag) {
+        return "<u>" + getText(tag) + "</u>";
+    }
+
+    /**
+     * This method should not be called since arrays of inline tags do not
+     * exist.  Method {@link #tostring(Tag)} should be used to convert this
+     * inline tag to a string.
+     * @param tags the array of <code>Tag</code>s representing of this custom tag.
+     */
+    public String toString(List<? extends DocTree> tags) {
+        return null;
+    }
+
+    static String getText(DocTree dt) {
+        return new SimpleDocTreeVisitor<String, Void>() {
+            @Override
+            public String visitUnknownBlockTag(UnknownBlockTagTree node, Void p) {
+                for (DocTree dt : node.getContent()) {
+                    return dt.accept(this, null);
+                }
+                return "";
+            }
+
+            @Override
+            public String visitUnknownInlineTag(UnknownInlineTagTree node, Void p) {
+                for (DocTree dt : node.getContent()) {
+                    return dt.accept(this, null);
+                }
+                return "";
+            }
+
+            @Override
+            public String visitText(TextTree node, Void p) {
+                return node.getBody();
+            }
+
+            @Override
+            protected String defaultAction(DocTree node, Void p) {
+                return "";
+            }
+
+        }.visit(dt, null);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/badSuper/BadSuper.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4983023
+ * @summary A bad superclass shouldn't throw the standard doclet into a loop
+ * @modules jdk.javadoc
+ */
+
+public class BadSuper {
+
+    public static void main(String[] args) {
+        String srcpath = System.getProperty("test.src", ".");
+
+        if (com.sun.tools.javadoc.Main.execute(
+                new String[] {"-d", "doc", "-sourcepath", srcpath, "p"}) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/badSuper/p/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 p;
+
+public class A extends Bogus {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/badSuper/p/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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 p;
+
+public class B extends I {      // should be "implements"
+}
+
+interface I {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/completionFailure/CompletionFailure.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4670772 6328529
+ * @summary Completion failures should be ignored in javadoc.
+ * @author gafter
+ * @modules jdk.javadoc
+ */
+
+
+import java.io.PrintWriter;
+import java.util.*;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+
+public class CompletionFailure implements Doclet {
+    public static void main(String[] args) {
+        String[] toolargs = {
+            "-doclet", "CompletionFailure",
+            "-docletpath", System.getProperty("test.classes", "."),
+            "pkg"
+        };
+        // run javadoc on package pkg
+        if (jdk.javadoc.internal.tool.Main.execute(toolargs,
+                new PrintWriter(System.err)) != 0)
+            throw new Error();
+    }
+
+    public boolean run(DocletEnvironment root) {
+        Set<TypeElement> classes = root.getIncludedClasses();
+        if (classes.size() != 1)
+            throw new Error("1 " + Arrays.asList(classes));
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
+    public void init(Locale locale, Reporter reporter) {
+        // do nothing
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/completionFailure/pkg/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 pkg;
+
+public class A {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/completionFailure/pkg/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+import pkg.A;
+
+public class B {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/doclint/DocLintTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,302 @@
+/*
+ * Copyright (c) 2012, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8004834 8007610 8129909
+ * @summary Add doclint support into javadoc
+ * @modules jdk.compiler/com.sun.tools.javac.main
+ */
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.tools.Diagnostic;
+import javax.tools.DocumentationTool;
+import javax.tools.DocumentationTool.DocumentationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.StandardLocation;
+import javax.tools.ToolProvider;
+import static javax.tools.Diagnostic.Kind.*;
+
+import com.sun.tools.javac.main.Main;
+
+public class DocLintTest {
+    public static void main(String... args) throws Exception {
+        new DocLintTest().run();
+    }
+
+    DocumentationTool javadoc;
+    StandardJavaFileManager fm;
+    Iterable<? extends JavaFileObject> files;
+
+    final String code =
+        /* 01 */    "/** Class comment. */\n" +
+        /* 02 */    "public class Test {\n" +
+        /* 03 */    "    /** Method comment. */\n" +
+        /* 04 */    "    public void method() { }\n" +
+        /* 05 */    "\n" +
+        /* 06 */    "    /** Syntax < error. */\n" +
+        /* 07 */    "    private void syntaxError() { }\n" +
+        /* 08 */    "\n" +
+        /* 09 */    "    /** @see DoesNotExist */\n" +
+        /* 10 */    "    protected void referenceError() { }\n" +
+        /* 11 */    "\n" +
+        /* 12 */    "    /** @return */\n" +
+        /* 13 */    "    public int emptyReturn() { return 0; }\n" +
+        /* 14 */    "}\n";
+
+    final String p1Code =
+        /* 01 */    "package p1;\n" +
+        /* 02 */    "public class P1Test {\n" +
+        /* 03 */    "    /** Syntax < error. */\n" +
+        /* 04 */    "    public void method() { }\n" +
+        /* 05 */    "}\n";
+
+    final String p2Code =
+        /* 01 */    "package p2;\n" +
+        /* 02 */    "public class P2Test {\n" +
+        /* 03 */    "    /** Syntax < error. */\n" +
+        /* 04 */    "    public void method() { }\n" +
+        /* 05 */    "}\n";
+
+    private final String rawDiags = "-XDrawDiagnostics";
+
+    private enum Message {
+        // doclint messages
+        DL_ERR6(ERROR, "Test.java:6:16: compiler.err.proc.messager: malformed HTML"),
+        DL_ERR9(ERROR, "Test.java:9:14: compiler.err.proc.messager: reference not found"),
+        DL_WRN12(WARNING, "Test.java:12:9: compiler.warn.proc.messager: no description for @return"),
+
+        DL_ERR_P1TEST(ERROR, "P1Test.java:3:16: compiler.err.proc.messager: malformed HTML"),
+        DL_ERR_P2TEST(ERROR, "P2Test.java:3:16: compiler.err.proc.messager: malformed HTML"),
+
+        // doclint messages when -XDrawDiagnostics is not in effect
+        DL_ERR9A(ERROR, "Test.java:9: error: reference not found"),
+        DL_WRN12A(WARNING, "Test.java:12: warning: no description for @return"),
+
+        // javadoc messages about bad content: these should only appear when doclint is disabled
+        JD_WRN10(WARNING, "Test.java:10: warning - Tag @see: reference not found: DoesNotExist"),
+        JD_WRN13(WARNING, "Test.java:13: warning - @return tag has no arguments."),
+
+        // javadoc messages for bad options
+        OPT_BADARG(ERROR, "javadoc: error - Invalid argument for -Xdoclint option"),
+        OPT_BADQUAL(ERROR, "javadoc: error - Access qualifiers not permitted for -Xdoclint arguments"),
+        OPT_BADPACKAGEARG(ERROR, "javadoc: error - Invalid argument for -Xdoclint/package option");
+
+        final Diagnostic.Kind kind;
+        final String text;
+
+        static Message get(String text) {
+            for (Message m: values()) {
+                if (m.text.equals(text))
+                    return m;
+            }
+            return null;
+        }
+
+        Message(Diagnostic.Kind kind, String text) {
+            this.kind = kind;
+            this.text = text;
+        }
+
+        @Override
+        public String toString() {
+            return "[" + kind + ",\"" + text + "\"]";
+        }
+    }
+
+    void run() throws Exception {
+        javadoc = ToolProvider.getSystemDocumentationTool();
+        fm = javadoc.getStandardFileManager(null, null, null);
+        try {
+            fm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(new File(".")));
+            files = Arrays.asList(new TestJFO("Test.java", code));
+
+            test(Collections.<String>emptyList(),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
+
+            test(Arrays.asList(rawDiags),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
+
+//            test(Arrays.asList("-Xdoclint:none"),
+//                    Main.Result.OK,
+//                    EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint:all/public"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.OPT_BADQUAL));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint:all", "-public"),
+                    Main.Result.OK,
+                    EnumSet.of(Message.DL_WRN12));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint:syntax"),
+                    Main.Result.OK,
+                    EnumSet.of(Message.DL_WRN12));
+
+            test(Arrays.asList(rawDiags, "-private"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR6, Message.DL_WRN12));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint:reference"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR9));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint:badarg"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.OPT_BADARG));
+
+            files = Arrays.asList(new TestJFO("p1/P1Test.java", p1Code),
+                                  new TestJFO("p2/P2Test.java", p2Code));
+
+            test(Arrays.asList(rawDiags),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR_P1TEST, Message.DL_ERR_P2TEST));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint/package:p1"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.DL_ERR_P1TEST));
+
+            test(Arrays.asList(rawDiags, "-Xdoclint/package:*p"),
+                    Main.Result.ERROR,
+                    EnumSet.of(Message.OPT_BADPACKAGEARG));
+
+            if (errors > 0)
+                throw new Exception(errors + " errors occurred");
+        } finally {
+            fm.close();
+        }
+    }
+
+    void test(List<String> opts, Main.Result expectResult, Set<Message> expectMessages) {
+        System.err.println("test: " + opts);
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        try {
+            DocumentationTask t = javadoc.getTask(pw, fm, null, null, opts, files);
+            boolean ok = t.call();
+            pw.close();
+            String out = sw.toString().replaceAll("[\r\n]+", "\n");
+            if (!out.isEmpty())
+                System.err.println(out);
+            if (ok && expectResult != Main.Result.OK) {
+                error("Compilation succeeded unexpectedly");
+            } else if (!ok && expectResult != Main.Result.ERROR) {
+                error("Compilation failed unexpectedly");
+            } else
+                check(out, expectMessages);
+        } catch (IllegalArgumentException e) {
+            System.err.println(e);
+            String expectOut = expectMessages.iterator().next().text;
+            if (expectResult != Main.Result.CMDERR)
+                error("unexpected exception caught");
+            else if (!e.getMessage().equals(expectOut)) {
+                error("unexpected exception message: "
+                        + e.getMessage()
+                        + " expected: " + expectOut);
+            }
+        }
+
+//        if (errors > 0)
+//            throw new Error("stop");
+    }
+
+    private void check(String out, Set<Message> expect) {
+        Pattern ignore = Pattern.compile("^(Building|Constructing|Generating|Loading|Standard|Starting| ) .*");
+        Pattern stats = Pattern.compile("^([1-9]+) (error|warning)(s?)");
+        Set<Message> found = EnumSet.noneOf(Message.class);
+        int e = 0, w = 0;
+        for (String line: out.split("[\r\n]+")) {
+            if (ignore.matcher(line).matches())
+                continue;
+
+            Matcher s = stats.matcher(line);
+            if (s.matches()) {
+                int i = Integer.valueOf(s.group(1));
+                if (s.group(2).equals("error"))
+                    e++;
+                else
+                    w++;
+                continue;
+            }
+
+            Message m = Message.get(line);
+            if (m == null)
+                error("Unexpected line: " + line);
+            else
+                found.add(m);
+        }
+        for (Message m: expect) {
+            if (!found.contains(m))
+                error("expected message not found: " + m.text);
+        }
+        for (Message m: found) {
+            if (!expect.contains(m))
+                error("unexpected message found: " + m.text);
+        }
+    }
+
+    void error(String msg) {
+        System.err.println("Error: " + msg);
+        errors++;
+    }
+
+    int errors;
+
+    class TestJFO extends SimpleJavaFileObject {
+
+        private final String content;
+
+        public TestJFO(String fileName, String content) {
+            super(URI.create(fileName), JavaFileObject.Kind.SOURCE);
+            this.content = content;
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncoding) {
+            return content;
+        }
+    };
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/doclint/ImplicitHeadersTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8006346
+ * @summary doclint should make allowance for headers generated by standard doclet
+ * @modules jdk.javadoc
+ */
+
+import java.io.File;
+
+/**
+ * <h3> Header </h3>
+ */
+public class ImplicitHeadersTest {
+    public static void main(String... args) {
+        File testSrc = new File(System.getProperty("test.src"));
+        File testFile = new File(testSrc, ImplicitHeadersTest.class.getSimpleName() + ".java");
+        String[] javadocArgs = { "-d", "out", testFile.getPath() };
+        int rc = jdk.javadoc.internal.tool.Main.execute(javadocArgs);
+        if (rc != 0)
+            throw new Error("unexpected exit: rc=" + rc);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/dupOk/DupOk.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,105 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4673477
+ * @summary The first definition found for each class should be documented
+ * @author gafter
+ * @modules jdk.javadoc
+ */
+
+import java.io.File;
+import java.util.*;
+
+import javax.lang.model.SourceVersion;
+import javax.lang.model.element.Element;
+import javax.lang.model.element.ElementKind;
+import javax.lang.model.element.TypeElement;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class DupOk implements Doclet
+{
+    public static void main(String[] args) {
+        File srcFile = new File(System.getProperty("test.src", "."));
+        String path1 = new File(srcFile, "sp1").getPath();
+        String path2 = new File(srcFile, "sp2").getPath();
+        String[] aargs = {
+            "javadoc",
+            "-docletpath",
+            new File(System.getProperty("test.classes", ".")).getPath(),
+            "-doclet",
+            "DupOk",
+            "-sourcepath",
+            path1 + System.getProperty("path.separator") + path2,
+            "p"
+        };
+        // run javadoc on package p
+        if (jdk.javadoc.internal.tool.Main.execute(aargs) != 0)
+            throw new Error();
+    }
+
+    public boolean run(DocletEnvironment root) {
+        Set<TypeElement> classes = root.getIncludedClasses();
+        if (classes.size() != 2)
+            throw new Error("1 " + Arrays.asList(classes));
+        for (TypeElement clazz : classes) {
+            if (getFields(clazz).size() != 1)
+                throw new Error("2 " + clazz + " " + getFields(clazz));
+        }
+        return true;
+    }
+
+    List<Element> getFields(TypeElement klass) {
+        List<Element> out = new ArrayList<>();
+        for (Element e : klass.getEnclosedElements()) {
+            if (e.getKind() == ElementKind.FIELD) {
+                out.add(e);
+            }
+        }
+        return out;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+
+    @Override
+    public void init(Locale locale, Reporter reporter) {
+        return;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/dupOk/sp1/p/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p;
+
+public class A {
+    public int x;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/dupOk/sp2/p/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p;
+
+public class A {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/dupOk/sp2/p/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p;
+
+public class B {
+    public int x;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/enum/docComments/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the comments in an enum type.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+
+import com.sun.javadoc.*;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester =
+            new Tester("Main", "-package", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        ClassDoc operation = root.classes()[0];
+        boolean ok =
+            checkComment(operation.commentText(), "Arithmetic operations.");
+
+        for (FieldDoc f : operation.fields()) {
+            if (f.name().equals("plus")) {
+                ok = checkComment(f.commentText(), "Addition") && ok;
+                for (MethodDoc m : operation.methods()) {
+                    if (m.name().equals("eval")) {
+                        ok = checkComment(m.commentText(),
+                                          "Perform arithmetic operation " +
+                                          "represented by this constant.") &&
+                            ok;
+                        break;
+                    }
+                }
+                break;
+            }
+        }
+        if (!ok) {
+            throw new Error("Comments don't match expectations.");
+        } else {
+            return true;
+        }
+    }
+
+    private static boolean checkComment(String found, String expected) {
+        System.out.println("expected: \"" + expected + "\"");
+        System.out.println("found:    \"" + found + "\"");
+        return expected.equals(found);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/enum/docComments/pkg1/Operation.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+/*
+ * Example from JSR 201, which borrowed it from "Effective Java".
+ */
+
+/**
+ * Arithmetic operations.
+ */
+public abstract enum Operation {
+    /** Addition */
+    plus {
+        /** Add 'em up. */
+        double eval(double x, double y) { return x + y; }
+    },
+    minus {
+        double eval(double x, double y) { return x - y; }
+    },
+    times {
+        double eval(double x, double y) { return x * y; }
+    },
+    divided_by {
+        double eval(double x, double y) { return x / y; }
+    };
+
+    /**
+     * Perform arithmetic operation represented by this constant.
+     */
+    abstract double eval(double x, double y);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/enum/enumType/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the contents of an enum type.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                tester.printClass(cd);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/enum/enumType/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,18 @@
+enum pkg1.QuotablePerson
+  name: QuotablePerson / QuotablePerson / pkg1.QuotablePerson
+  superclass:
+    java.lang.Enum<pkg1.QuotablePerson>
+  enum constants:
+    Thoreau
+    McLuhan
+    Pynchon
+    Mencken
+    Allen
+    Vidal
+    Occam
+    Groening
+    Juvenal
+    Eco
+  methods:
+    pkg1.QuotablePerson[] values()
+    QuotablePerson valueOf(String)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/enum/enumType/pkg1/QuotablePerson.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Some people we love to quote.
+ */
+public enum QuotablePerson {
+
+    /** "Beware of all enterprises that require new clothes." */
+    Thoreau,
+
+    /**
+     * "A point of view can be a dangerous luxury when substituted for
+     * insight and understanding."
+     */
+    McLuhan,
+
+    /**
+     * "If they can keep you asking the wrong questions, they don't have to
+     * worry about the answers."
+     */
+    Pynchon,
+
+    /**
+     * "For every problem, there is a solution that is simple, elegant,
+     * and wrong."
+     */
+    Mencken,
+
+    /**
+     * "Formerly unsolvable equations are dealt with by threats of reprisals."
+     */
+    Allen,
+
+    /** "It is not enough to succeed.  Others must fail." */
+    Vidal,
+
+    /** "Entia non sunt multiplicanda praeter necessitatem." */
+    Occam,
+
+    /**
+     * "Love is a snowmobile racing across the tundra and then suddenly it
+     * flips over, pinning you underneath.  At night, the ice weasels come."
+     */
+    Groening,
+
+    /** "Sed Quis custodiet ipsos custodes?" */
+    Juvenal,
+
+    /**
+     * "The list could surely go on, and there is nothing more wonderful
+     * than a list, instrument of wondrous hypotyposis."
+     */
+    Eco
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericClass/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the contents of the ClassDoc of a generic class.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                tester.printClass(cd);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericClass/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,16 @@
+class pkg1.A<T>
+  name: A / A / pkg1.A
+  type parameters:
+    T
+  superclass:
+    java.lang.Object
+  fields:
+    T t
+    pkg1.A<T> at
+    pkg1.A<java.lang.String> as
+  constructors:
+    A()
+  methods:
+    void m1(T)
+    void m2(A<T>)
+    void m3(A<String>)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericClass/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class A<T> {
+    public T t;
+    public A<T> at;
+    public A<String> as;
+
+    public void m1(T t) {}
+    public void m2(A<T> at) {}
+    public void m3(A<String> as) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInnerAndOuter/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the contents of the ClassDoc of
+ *          a generic class with a generic inner class.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import java.util.Arrays;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            ClassDoc[] cds = root.classes();
+            Arrays.sort(cds);
+            for (ClassDoc cd : cds) {
+                tester.printClass(cd);
+                tester.println();
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInnerAndOuter/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,53 @@
+class pkg1.O<T>
+  name: O / O / pkg1.O
+  type parameters:
+    T
+  superclass:
+    java.lang.Object
+  constructors:
+    O()
+
+class pkg1.O<T>.I<S>
+  name: I / O.I / pkg1.O.I
+  type parameters:
+    S
+  nested in:
+    pkg1.O<T>
+  superclass:
+    java.lang.Object
+  constructors:
+    I()
+  methods:
+    void m1(O<String>.I<Number>)
+
+class pkg1.X<T>
+  name: X / X / pkg1.X
+  type parameters:
+    T
+  superclass:
+    java.lang.Object
+  constructors:
+    X()
+
+class pkg1.X<T>.Y
+  name: Y / X.Y / pkg1.X.Y
+  nested in:
+    pkg1.X<T>
+  superclass:
+    java.lang.Object
+  constructors:
+    Y()
+
+class pkg1.X<T>.Y.Z<S>
+  name: Z / X.Y.Z / pkg1.X.Y.Z
+  type parameters:
+    S
+  nested in:
+    pkg1.X<T>.Y
+  superclass:
+    java.lang.Object
+  constructors:
+    Z()
+  methods:
+    void m1(X<String>.Y.Z<Number>)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInnerAndOuter/pkg1/O.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class O<T> {
+    public class I<S> {
+        public void m1(O<String>.I<Number> a) {}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInnerAndOuter/pkg1/X.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class X<T> {
+    public class Y {
+        public class Z<S> {
+            public void m1(X<String>.Y.Z<Number> a) {}
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInterface/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the contents of the ClassDoc of a generic interface.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                tester.printClass(cd);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInterface/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,6 @@
+interface pkg1.A<T>
+  name: A / A / pkg1.A
+  type parameters:
+    T
+  methods:
+    void m1(T)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericInterface/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public interface A<T> {
+    void m1(T t);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericMethod/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,61 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the reading of generic methods and constructors.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                for (ConstructorDoc c : cd.constructors())
+                    tester.printConstructor(c);
+                for (MethodDoc m : cd.methods())
+                    tester.printMethod(m);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericMethod/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,20 @@
+constructor <T>pkg1.A()
+  signature: ()
+             ()
+  type parameters:
+    T
+method pkg1.A.<T>m1(T)
+  signature: (T)
+             (T)
+  type parameters:
+    T
+  returns:
+    void
+method pkg1.A.<T extends java.lang.Number, U>m2(T, U)
+  signature: (T, U)
+             (T, U)
+  type parameters:
+    T extends java.lang.Number
+    U
+  returns:
+    void
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericMethod/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class A {
+    public <T> A() {}
+    public <T> void m1(T t) {}
+    public <T extends Number, U> void m2(T t, U u) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericSuper/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the contents of the ClassDoc of a generic class.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import java.util.Arrays;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester =
+            new Tester("Main", "pkg1", "-package");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            ClassDoc[] cds = root.classes();
+            Arrays.sort(cds);
+            for (ClassDoc cd : cds) {
+                tester.printClass(cd);
+                tester.println();
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericSuper/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+class pkg1.A<V, W>
+  name: A / A / pkg1.A
+  type parameters:
+    V
+    W
+  superclass:
+    pkg1.S<W, V>
+  interfaces:
+    pkg1.I<java.lang.String>
+  constructors:
+    A()
+
+interface pkg1.I<R>
+  name: I / I / pkg1.I
+  type parameters:
+    R
+
+class pkg1.S<T, U>
+  name: S / S / pkg1.S
+  type parameters:
+    T
+    U
+  superclass:
+    java.lang.Object
+  constructors:
+    S()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/genericSuper/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+class S<T,U> {
+}
+
+interface I<R> {
+}
+
+public class A<V,W> extends S<W,V> implements I<String> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/supertypes/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,81 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4922918
+ * @summary Check supertypes and superinterfaces of parameterized types.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import java.util.Comparator;
+import java.util.Arrays;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            ClassDoc[] cds = root.classes();
+            Arrays.sort(cds);
+            for (ClassDoc cd : cds) {
+                ParameterizedType arrayList =
+                    cd.superclassType().asParameterizedType();
+                tester.println(arrayList);
+                tester.println();
+
+                tester.println(arrayList.superclassType());
+                Type[] interfaces = arrayList.interfaceTypes();
+                // Sort interfaces by type name, for consistent output.
+                Arrays.sort(interfaces,
+                            new Comparator<Type>() {
+                                    public int compare(Type t1, Type t2) {
+                                        String name1 = t1.qualifiedTypeName();
+                                        String name2 = t2.qualifiedTypeName();
+                                        return name1.compareTo(name2);
+                                    }
+                                });
+                for (Type t : interfaces) {
+                    tester.println(t);
+                }
+                tester.println();
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/supertypes/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,16 @@
+java.util.ArrayList<java.lang.String>
+
+java.util.AbstractList<java.lang.String>
+java.io.Serializable
+java.lang.Cloneable
+java.util.List<java.lang.String>
+java.util.RandomAccess
+
+java.util.ArrayList<X>
+
+java.util.AbstractList<X>
+java.io.Serializable
+java.lang.Cloneable
+java.util.List<X>
+java.util.RandomAccess
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/supertypes/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+import java.util.ArrayList;
+
+public class A extends ArrayList<String> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/supertypes/pkg1/B.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+import java.util.ArrayList;
+
+public class B<X> extends ArrayList<X> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/throwsGeneric/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,59 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the reading of generic methods and constructors.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                for (MethodDoc m : cd.methods())
+                    tester.printMethod(m);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/throwsGeneric/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,16 @@
+method pkg1.A.m1()
+  signature: ()
+             ()
+  throws:
+    T extends java.lang.Throwable
+  returns:
+    void
+method pkg1.A.<U extends java.lang.Throwable>m2()
+  signature: ()
+             ()
+  type parameters:
+    U extends java.lang.Throwable
+  throws:
+    U extends java.lang.Throwable
+  returns:
+    void
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/throwsGeneric/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public interface A<T extends Throwable> {
+    void m1() throws T;
+    <U extends Throwable> void m2() throws U;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamCycle/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,64 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Check a type parameter whose bound cycles back on itself.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        ClassDoc cd = root.classes()[0];
+        System.out.println("*** " + cd);
+        TypeVariable E = cd.typeParameters()[0];
+        System.out.println("*** " + E);
+        Type bound = E.bounds()[0];
+        System.out.println("*** " + bound);
+
+        // Verify that we have an instantiation of Enum<E>, and not
+        // the generic interface.
+        ParameterizedType enumE = (ParameterizedType)bound;
+
+        if (enumE.asClassDoc() != cd) {
+            throw new Error("Type declaration and type use don't match up.");
+        } else {
+            return true;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamCycle/pkg1/LikeEnum.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public interface LikeEnum<E extends LikeEnum<E>> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamTagOnMethod/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,60 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the reading of type parameter tags on methods.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                for (MethodDoc m : cd.methods()) {
+                    tester.printMethod(m);
+                }
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamTagOnMethod/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,12 @@
+method pkg1.A.<T, U>m1(T, U)
+  signature: (T, U)
+             (T, U)
+  @param <T> the kind of thing
+  @param <U> the other kind of thing
+  @param t the thing itself
+  @param u the other thing
+  type parameters:
+    T
+    U
+  returns:
+    void
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamTagOnMethod/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public interface A {
+    /**
+     * @param <T> the kind of thing
+     * @param <U> the other kind of thing
+     * @param t the thing itself
+     * @param u the other thing
+     */
+    public <T,U> void m1(T t, U u);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamTagOnType/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the reading of a type parameter tag on an interface.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                tester.printClass(cd);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamTagOnType/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+interface pkg1.A<T>
+  name: A / A / pkg1.A
+  type parameters:
+    T
+  @param <T> the type parameter
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/tparamTagOnType/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * @param <T> the type parameter
+ */
+public interface A<T> {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/wildcards/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066
+ * @summary Verify the contents of the ClassDoc of a generic class.
+ * @ignore API modifications
+ * @library ../../lib
+ * @modules jdk.javadoc
+ * @compile  ../../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+import com.sun.javadoc.*;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester = new Tester("Main", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                tester.printClass(cd);
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/wildcards/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,16 @@
+class pkg1.A<T>
+  name: A / A / pkg1.A
+  type parameters:
+    T
+  superclass:
+    java.lang.Object
+  fields:
+    pkg1.A<?> f1
+    pkg1.A<? extends java.lang.Number> f2
+    pkg1.A<? super java.lang.Long> f3
+  constructors:
+    A()
+  methods:
+    void m1(A<?>)
+    void m2(A<? extends Number>)
+    void m3(A<? super Long>)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/generics/wildcards/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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 pkg1;
+
+public class A<T> {
+    public A<?> f1;
+    public A<? extends Number> f2;
+    public A<? super Long> f3;
+
+    public void m1(A<?> p1) {}
+    public void m2(A<? extends Number> p2) {}
+    public void m3(A<? super Long> p3) {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/imports/I.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+// The following imported class is bogus, but should still be returned
+// when inquired of.
+import bo.o.o.o.Gus;
+
+public interface I {
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/imports/MissingImport.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2004, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 5012972
+ * @summary ClassDoc.getImportedClasses should return a class even if
+ *          it's not in the classpath.
+ * @ignore API modifications, testing deprecated APIs.
+ * @modules jdk.javadoc
+ */
+
+import java.util.Collections;
+import java.util.Set;
+import javax.lang.model.SourceVersion;
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Doclet.Option;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+
+public class MissingImport implements Doclet {
+
+    public static void main(String[] args) {
+        String thisFile = "" +
+            new java.io.File(System.getProperty("test.src", "."),
+                             "I.java");
+        String[] toolargs = {
+            "-doclet", "MissingImport",
+            "-docletpath", System.getProperty("test.classes", "."),
+            thisFile
+        };
+        if (com.sun.tools.javadoc.Main.execute(toolargs) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    /*
+     * The world's simplest doclet.
+     */
+    public static boolean run(DocletEnvironment root) {
+        ClassDoc c = root.classNamed("I");
+        ClassDoc[] imps = c.importedClasses();
+        if (imps.length == 0 ||
+            !imps[0].qualifiedName().equals("bo.o.o.o.Gus")) {
+            throw new Error("Import bo.o.o.o.Gus not found");
+        }
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/lib/Tester.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,331 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * A utility used to invoke and test the javadoc tool.
+ *
+ * @author Scott Seligman
+ */
+
+
+import java.io.*;
+import java.util.*;
+
+import javax.lang.model.SourceVersion;
+
+
+public class Tester {
+
+    protected final String TEST_SRC = System.getProperty("test.src", ".");
+    protected final String TEST_CLASSES = System.getProperty("test.classes",
+                                                             ".");
+    private final String DEFAULT_ARGS[] = {
+        "-sourcepath", TEST_SRC,
+    };
+
+    private final File outputFile = new File(TEST_CLASSES, "testrun.out");
+    private final File expectedOutputFile = new File(TEST_SRC, "expected.out");
+
+    private String docletName;
+    private String[] args;
+    private Writer out = null;
+
+
+    /*
+     * Individual tests can extend this to create generics-aware doclets.
+     */
+    public abstract class Doclet extends jdk.javadoc.doclet.Doclet {
+
+        @Override
+        public SourceVersion getSupportedSourceVersion() {
+            return super.getSourceVersion();
+        }
+
+    }
+
+
+    public Tester(String docletName) {
+        this(docletName, new String[0]);
+    }
+
+    public Tester(String docletName, String... additionalArgs) {
+        this.docletName = docletName;
+        List<String> args = new ArrayList<>();
+        args.addAll(Arrays.asList(DEFAULT_ARGS));
+        args.addAll(Arrays.asList(additionalArgs));
+
+        try {
+            out = new BufferedWriter(new FileWriter(outputFile));
+        } catch (IOException e) {
+            throw new Error("Could not open output file " + outputFile);
+        }
+    }
+
+    public void run() throws IOException {
+        try {
+            if (Main.execute("javadoc", docletName, getClass().getClassLoader(), args) != 0) {
+                throw new Error("Javadoc errors encountered.");
+            }
+            System.out.println("--> Output written to " + outputFile);
+        } finally {
+            out.close();
+        }
+    }
+
+    /*
+     * Compare output of test run to expected output.
+     * Throw an Error if they don't match.
+     */
+    public void verify() throws IOException {
+        BufferedReader thisRun =
+            new BufferedReader(new FileReader(outputFile));
+        BufferedReader expected =
+            new BufferedReader(new FileReader(expectedOutputFile));
+
+        for (int lineNum = 1; true; lineNum++) {
+            String line1 = thisRun.readLine();
+            String line2 = expected.readLine();
+            if (line1 == null && line2 == null) {
+                return;         // EOF with all lines matching
+            }
+            if (line1 == null || !line1.equals(line2)) {
+                throw new Error(outputFile + ":" + lineNum +
+                                ": output doesn't match");
+            }
+        }
+    }
+
+
+    public void println(Object o) throws IOException {
+        prln(0, o);
+    }
+
+    public void println() throws IOException {
+        prln();
+    }
+//
+//    public void printPackage(PackageDoc p) throws IOException {
+//        prPackage(0, p);
+//    }
+//
+//    public void printClass(ClassDoc cd) throws IOException {
+//        if (cd.isAnnotationType())
+//            printAnnotationType((AnnotationTypeDoc)cd);
+//        else
+//            prClass(0, cd);
+//    }
+//
+//    public void printAnnotationType(AnnotationTypeDoc at) throws IOException {
+//        prAnnotationType(0, at);
+//    }
+//
+//    public void printField(FieldDoc f) throws IOException {
+//        prField(0, f);
+//    }
+//
+//    public void printParameter(Parameter p) throws IOException {
+//        prParameter(0, p);
+//    }
+//
+//    public void printMethod(MethodDoc m) throws IOException {
+//        prln(0, "method " + m);
+//        prMethod(0, m);
+//    }
+//
+//    public void printAnnotationTypeElement(AnnotationTypeElementDoc e)
+//                                                        throws IOException {
+//        prln(0, "element " + e);
+//        prMethod(0, e);
+//    }
+//
+//    public void printConstructor(ConstructorDoc c) throws IOException {
+//        prln(0, "constructor " + c);
+//        prExecutable(0, c);
+//    }
+//
+//
+//    private void prPackage(int off, PackageDoc p) throws IOException {
+//        prln(off, "package " + p);
+//        prAnnotations(off + 2, p.annotations());
+//    }
+//
+//    private void prClass(int off, ClassDoc cd) throws IOException {
+//        prln(off,
+//             (cd.isInterface() ? "interface" : cd.isEnum() ? "enum" : "class")
+//             + " " + cd);
+//        prln(off + 2, "name: " + cd.simpleTypeName() + " / " +
+//             cd.typeName() + " / " + cd.qualifiedTypeName());
+//        prAnnotations(off + 2, cd.annotations());
+//        prLabel(off + 2, "type parameters");
+//        for (Type t : cd.typeParameters())
+//            prln(off + 4, t);
+//        prParamTags(off + 2, cd.typeParamTags());
+//        prLabel(off + 2, "nested in");
+//        prln(off + 4, cd.containingClass());
+//        prLabel(off + 2, "superclass");
+//        prln(off + 4, cd.superclassType());
+//        prLabel(off + 2, "interfaces");
+//        Type[] ts = cd.interfaceTypes();
+//        Arrays.sort(ts);
+//        for (Type t : ts)
+//            prln(off + 4, t);
+//        prLabel(off + 2, "enum constants");
+//        for (FieldDoc f : cd.enumConstants())
+//            prln(off + 4, f.name());
+//        prLabel(off + 2, "fields");
+//        for (FieldDoc f : cd.fields())
+//            prln(off + 4, f.type() + " " + f.name());
+//        prLabel(off + 2, "constructors");
+//        for (ConstructorDoc c : cd.constructors())
+//            prln(off + 4, c.name() + c.flatSignature());
+//        prLabel(off + 2, "methods");
+//        for (MethodDoc m : cd.methods())
+//            prln(off + 4, typeUseString(m.returnType()) + " " +
+//                          m.name() + m.flatSignature());
+//    }
+//
+//    private void prAnnotationType(int off, AnnotationTypeDoc at)
+//                                                        throws IOException {
+//        prln(off, "@interface " + at);
+//        prAnnotations(off + 2, at.annotations());
+//        prLabel(off + 2, "elements");
+//        for (AnnotationTypeElementDoc e : at.elements()) {
+//            String def = (e.defaultValue() == null)
+//                                ? ""
+//                                : " default " + e.defaultValue();
+//            prln(off + 4, typeUseString(e.returnType()) + " " + e.name() +
+//                          e.flatSignature() + def);
+//        }
+//    }
+//
+//    private void prField(int off, FieldDoc f) throws IOException {
+//        prln(off, "field " + typeUseString(f.type()) + " " + f.name());
+//        prAnnotations(off + 2, f.annotations());
+//    }
+//
+//    private void prParameter(int off, Parameter p) throws IOException {
+//        prln(off, "parameter " + p);
+//        prAnnotations(off + 2, p.annotations());
+//    }
+//
+//    private void prMethod(int off, MethodDoc m) throws IOException {
+//        prExecutable(off, m);
+//        prLabel(off + 2, "returns");
+//        prln(off + 4, typeUseString(m.returnType()));
+//        prLabel(off + 2, "overridden type");
+//        prln(off + 4, m.overriddenType());
+//    }
+//
+//    private void prExecutable(int off, ExecutableMemberDoc m)
+//                                                        throws IOException {
+//        if (!m.isAnnotationTypeElement()) {
+//            prln(off + 2, "signature: " + m.flatSignature());
+//            prln(off + 2, "           " + m.signature());
+//        }
+//        prAnnotations(off + 2, m.annotations());
+//        prParamTags(off + 2, m.typeParamTags());
+//        prParamTags(off + 2, m.paramTags());
+//        prLabel(off + 2, "type parameters");
+//        for (Type t : m.typeParameters())
+//            prln(off + 4, t);
+//        prLabel(off + 2, "throws");
+//        Type[] ts = m.thrownExceptionTypes();
+//        Arrays.sort(ts);
+//        for (Type t : ts)
+//            prln(off + 4, t);
+//    }
+//
+//    private void prAnnotations(int off, AnnotationDesc[] as)
+//                                                        throws IOException {
+//        prLabel(off, "annotations");
+//        for (AnnotationDesc a : as)
+//            prln(off + 2, a.toString());
+//    }
+//
+//    private void prParamTags(int off, ParamTag tags[]) throws IOException {
+//        for (ParamTag tag : tags)
+//            prParamTag(off, tag);
+//    }
+//
+//    private void prParamTag(int off, ParamTag tag) throws IOException {
+//        String name = tag.parameterName();
+//        if (tag.isTypeParameter()) name = "<" + name + ">";
+//        prln(off, "@param " + name + " " + tag.parameterComment());
+//    }
+//
+//
+//    private String typeUseString(Type t) {
+//        return (t instanceof ClassDoc || t instanceof TypeVariable)
+//                ? t.typeName()
+//                : t.toString();
+//    }
+
+
+    // Labels queued for possible printing.  Innermost is first in list.
+    List<Line> labels = new ArrayList<Line>();
+
+    // Print label if its section is nonempty.
+    void prLabel(int off, String s) {
+        while (!labels.isEmpty() && labels.get(0).off >= off)
+            labels.remove(0);
+        labels.add(0, new Line(off, s));
+    }
+
+    // Print queued labels with offsets less than "off".
+    void popLabels(int off) throws IOException {
+        while (!labels.isEmpty()) {
+            Line label = labels.remove(0);
+            if (label.off < off)
+                prln(label.off, label.o + ":");
+        }
+    }
+
+    // Print "o" at given offset.
+    void pr(int off, Object o) throws IOException {
+        popLabels(off);
+        for (int i = 0; i < off; i++)
+            out.write(' ');
+        if (o != null)
+            out.write(o.toString());
+    }
+
+    // Print "o" (if non-null) at given offset, then newline.
+    void prln(int off, Object o) throws IOException {
+        if (o != null) {
+            pr(off, o);
+            prln();
+        }
+    }
+
+    // Print newline.
+    void prln() throws IOException {
+        out.write('\n');        // don't want platform-dependent separator
+    }
+
+
+    static class Line {
+        int off;
+        Object o;
+        Line(int off, Object o) { this.off = off; this.o = o; }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/nonConstExprs/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2013, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug     8010310
+ * @summary Error processing sources with -private
+ * @modules jdk.javadoc
+ */
+
+import java.io.File;
+
+public class Test {
+    public static void main(String... args) throws Exception {
+        File testSrc = new File(System.getProperty("test.src"));
+        String[] jdoc_args = {
+            "-d", "out",
+            new File(testSrc, Test.class.getSimpleName() + ".java").getPath()
+        };
+        int rc = jdk.javadoc.internal.tool.Main.execute(jdoc_args);
+        if (rc != 0)
+            throw new Exception("unexpected return code from javadoc: " + rc);
+    }
+
+    static int array[] = { 1, 2, 3};
+    static int method(int p) { return p; }
+    static int value = 0;
+
+    public int not_static_not_final = 1;
+    public static int static_not_final = 2;
+    public final int not_static_final = 3;
+    public static final int static_final = 4;
+
+    public static final int array_index = array[0];
+    public static final int method_call = method(0);
+    public static final int inner_class = new Test() { }.method(0);
+    public static final int new_class = new Test().method(0);
+    public static final int pre_inc = ++value;
+    public static final int pre_dec = --value;
+    public static final int post_inc = value++;
+    public static final int post_dec = value--;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/outputRedirect/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/* @test
+ * @bug 4587487
+ * @summary jdk.javadoc.internal.tool.Main.execute ignores PrintWriters
+ * @author gafter
+ * @modules jdk.javadoc
+ * @compile p/OutputRedirect.java
+ * @run main p.OutputRedirect
+ */
+
+// jtreg description-only file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/outputRedirect/p/OutputRedirect.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p;
+
+import java.io.*;
+import jdk.javadoc.internal.tool.Main;
+
+public class OutputRedirect {
+    private static final PrintStream originalOutput = System.err;
+
+    public static void main(String[] args) {
+        try {
+            doTest();
+        } finally {
+            // restore things
+            System.setOut(originalOutput);
+        }
+    }
+
+    static void doTest() {
+        ByteArrayOutputStream redirectedOutput = new ByteArrayOutputStream();
+
+        // redirect System.err to a buffer
+        System.setErr(new PrintStream(redirectedOutput));
+
+        PrintWriter sink = new PrintWriter(new ByteArrayOutputStream());
+
+        // execute javadoc
+        int result = Main.execute(new String[] {"p"}, sink);
+
+        // test whether javadoc did any output to System.out
+        if (redirectedOutput.toByteArray().length > 0) {
+            originalOutput.println("Test failed; here's what javadoc wrote on its standard output:");
+            originalOutput.println(redirectedOutput.toString());
+            throw new Error("javadoc output wasn\'t properly redirected");
+        } else if (result != 0) {
+            throw new Error("javadoc run failed");
+        } else {
+            originalOutput.println("OK, good");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/parser/7091528/T7091528.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,96 @@
+/*
+ * Copyright (c) 2009, 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.
+ *
+ * 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.
+ */
+
+/**
+ * @test
+ * @bug     7091528 8029145 8037484
+ * @summary ensures javadoc parses unique source files and ignores all class files
+ * @modules jdk.javadoc/jdk.javadoc.internal.doclets.standard
+ * @compile p/C1.java p/q/C2.java
+ * @run main T7091528
+ */
+
+import java.io.File;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+
+public class T7091528 {
+    public static void main(String... args) {
+        new T7091528().run();
+    }
+    void run() {
+        File testSrc = new File(System.getProperty("test.src"));
+        File testClasses = new File(System.getProperty("test.classes"));
+        // 7091528, tests if class files are being ignored
+        runTest("-d", "out-1",
+            "-sourcepath", testClasses + File.pathSeparator + testSrc,
+            "-subpackages",
+            "p");
+        // 8029145, tests if unique source files are parsed
+        runTest("-d", "out-2",
+            "-sourcepath", testSrc.getAbsolutePath(),
+            "-subpackages",
+            "p:p.q");
+        File testPkgDir = new File(testSrc, "p");
+        File testFile = new File(testPkgDir, "C3.java");
+        runTest("-d", "out-3",
+            "-sourcepath", testSrc.getAbsolutePath(),
+            testFile.getAbsolutePath());
+        runTest("-d", "out-4",
+            "-classpath", testSrc.getAbsolutePath(),
+            testFile.getAbsolutePath());
+
+    }
+
+    String getOutputDir(String... args) {
+        for (int i = 0; i < args.length; i++) {
+            if (args[i].equals("-d")) {
+                i++;
+                return args[i];
+            }
+        }
+        return ".";
+    }
+
+    void runTest(String... args) {
+        String outdirname  = getOutputDir(args);
+        StringWriter sw = new StringWriter();
+        PrintWriter pw = new PrintWriter(sw);
+        int rc = jdk.javadoc.internal.tool.Main.execute(args, pw);
+        pw.close();
+
+        String out = sw.toString();
+        if (!out.isEmpty()) {
+            System.err.println(out);
+        }
+
+        if (rc != 0)
+            throw new Error("javadoc failed: exit code = " + rc);
+
+        if (out.matches("(?s).*p/[^ ]+\\.class.*"))
+            throw new Error("reading .class files");
+
+        if (!new File(outdirname, "index.html").exists())
+            throw new Error("index.html not found");
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/parser/7091528/p/C1.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 p1;
+
+/** This is class C1. */
+public class C1 { }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/parser/7091528/p/C3.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/** This is class C3, and no package for me please */
+public class C3 {}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/parser/7091528/p/q/C2.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2011, 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.
+ *
+ * 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 p.q;
+
+/** This is class p.q.C2. */
+public class C2 { }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/README.txt	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,59 @@
+
+            SampleAPI Generator for javadoc
+
+1. General description
+
+    The primary goal is to provide one or more data sets to be used as input
+to the javadoc tool, such that it can be used to generate representative samples
+of all the different content on all the different types of pages that can be
+generated by javadoc.
+
+    The tool is implemented as generator based on xml descriptions of data sets.
+The xml description of data set provides top level entities (class, interface,
+enum, annotation) with all possible content. Desired output parameters (fields,
+methods, inner/nested classes) are also described in xml as lists of modifiers,
+types and annotations. The generator "multiply" the entities from the lists
+providing the set of all possible combinations.
+
+    After the api generation the tool connects the javadoc style comments to
+the generated entities with full possible sets of supported tags.
+
+2. Tool structure
+
+    Sources:
+        test/tools/javadoc/sampleapi/lib - generator sources
+        test/tools/javadoc/sampleapi/res/xml - sample data sets in xml
+        test/tools/javadoc/sampleapi/res/txt - sample texts for doc comments
+
+3. Public API
+
+3.1 Command line runner
+
+  * test/tools/javadoc/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java
+
+    class sampleapi.SampleApiDefaultRunner
+
+  Options: [-?|-h|--help] [-o:<dir>|--outdir:<dir>]
+    -?|-h|--help             - print help
+    -o:<dir>|--outdir:<dir>  - set <dir> to generate output
+
+3.2 Programmatic access
+
+  * test/tools/javadoc/sampleapi/lib/sampleapi/SampleApi.java
+
+    class sampleapi.SampleApi
+
+    public void generate(File dir)
+    public void generate(Path dir)
+    public void generate(String dir)
+
+3.3 How to run other xml data set description
+
+  Put data set xml description into res/xml directory
+
+  * test/tools/javadoc/sampleapi/lib/sampleapi/generator/PackageGenerator.java
+
+    class sampleapi.generator.PackageGenerator
+
+    public void processDataSet(String dsName)
+    public void generate(File outDir)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/SampleApiTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,80 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8130880
+ * @library lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.code
+ *          jdk.compiler/com.sun.tools.javac.parser
+ *          jdk.compiler/com.sun.tools.javac.tree
+ *          jdk.compiler/com.sun.tools.javac.util
+ * @run main sampleapi.SampleApiDefaultRunner -o:out/src
+ * @run main SampleApiTest
+ */
+
+import com.sun.tools.javadoc.*;
+import java.nio.file.Paths;
+
+public class SampleApiTest {
+
+    public static void main(String... args) {
+
+        // html4
+        Main.execute(
+            new String[] {
+                "-d", "out/doc.html4",
+                "-verbose",
+                "-private",
+                "-use",
+                "-splitindex",
+                "-linksource",
+                "-html4",
+                "-javafx",
+                "-windowtitle", "SampleAPI",
+                "-sourcepath", "out/src",
+                "sampleapi.simple",
+                "sampleapi.tiny",
+                "sampleapi.fx"
+            });
+
+        // html5
+        Main.execute(
+            new String[] {
+                "-d", "out/doc.html5",
+                "-verbose",
+                "-private",
+                "-use",
+                "-splitindex",
+                "-linksource",
+                "-html5",
+                "-javafx",
+                "-windowtitle", "SampleAPI",
+                "-sourcepath", "out/src",
+                "sampleapi.simple",
+                "sampleapi.tiny",
+                "sampleapi.fx"
+            });
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApi.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi;
+
+import java.io.File;
+import java.nio.file.Path;
+
+import sampleapi.generator.PackageGenerator;
+
+public class SampleApi {
+
+    PackageGenerator pkgGen = new PackageGenerator();
+
+    public void generate(File dir) throws Fault {
+        pkgGen.processDataSet("simple");
+        pkgGen.generate(dir);
+        pkgGen.processDataSet("tiny");
+        pkgGen.generate(dir);
+        pkgGen.processDataSet("fx");
+        pkgGen.generate(dir);
+    }
+
+    public void generate(Path dir) throws Fault {
+        generate(dir.toFile());
+    }
+
+    public void generate(String dir) throws Fault {
+        generate(new File(dir));
+    }
+
+    public static class Fault extends Exception {
+        public Fault(String msg) {
+            super(msg);
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/SampleApiDefaultRunner.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,137 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi;
+
+import java.io.File;
+
+import sampleapi.SampleApi.Fault;
+
+public class SampleApiDefaultRunner {
+
+    public static final String MSG_DUP_OUTDIR =
+        "SampleApi: duplicated outdir detected: ";
+    public static final String MSG_USE_FIRST =
+        "           will use first occurance: ";
+    public static final String MSG_INVAL_OUTDIR =
+        "SampleApi: outdir is not valid: ";
+    public static final String MSG_CANNOT_GEN =
+        "SampleApi: cannot generate output: ";
+    public static final String MSG_WRONG_OPTION =
+        "SampleApi: incorrect option: ";
+    public static final String MSG_USE_HELP =
+        "           use -? for help";
+
+    public static void main(String... args) throws Exception {
+        if (args.length == 0) {
+            printHelp();
+            System.exit(1);
+        }
+
+        String outDirName = "";
+
+        boolean isOutDirSet = false;
+        boolean isHelpPrinted = false;
+        for (String arg : args) {
+            Option option = new Option(arg);
+            switch (option.getOptionName()) {
+                case "-?":
+                case "-h":
+                case "--help":
+                    if (!isHelpPrinted) {
+                        printHelp();
+                        isHelpPrinted = true;
+                    }
+                    break;
+                case "-o":
+                case "--outdir":
+                    if (!isOutDirSet) {
+                        outDirName = option.getOptionValue();
+                        isOutDirSet = true;
+                    } else {
+                        System.err.println(MSG_DUP_OUTDIR + option.getOptionValue());
+                        System.err.println(MSG_USE_FIRST + outDirName);
+                    }
+                    break;
+                default:
+                    System.err.println(MSG_WRONG_OPTION + arg);
+                    System.err.println(MSG_USE_HELP);
+                    break;
+            }
+
+        }
+
+        if (!isOutDirSet) {
+            System.exit(1);
+        }
+
+        if (outDirName.length() == 0) {
+            System.err.println(MSG_INVAL_OUTDIR + outDirName);
+            System.exit(1);
+        }
+
+        File outDir = new File(outDirName);
+        outDir.mkdirs();
+        SampleApi apiGen = new SampleApi();
+
+        try {
+            apiGen.generate(outDir);
+        } catch (Fault e) {
+            System.err.println(MSG_CANNOT_GEN + e.getMessage());
+            e.printStackTrace();
+        }
+    }
+
+    private static void printHelp() {
+        System.out.println("SampleApi:");
+        System.out.println("    options: [-?|-h|--help] [-o:<dir>|--outdir:<dir>]");
+        System.out.println("    -?|-h|--help             - print help");
+        System.out.println("    -o:<dir>|--outdir:<dir>  - set <dir> to generate output");
+    }
+
+    private static class Option {
+
+        private String optionName;
+        private String optionValue;
+
+        public Option(String arg) {
+            int delimPos = arg.indexOf(':');
+
+            if (delimPos == -1) {
+                optionName = arg;
+                optionValue = "";
+            } else {
+                optionName = arg.substring(0, delimPos);
+                optionValue = arg.substring(delimPos + 1, arg.length());
+            }
+        }
+
+        public String getOptionName() {
+            return optionName;
+        }
+
+        public String getOptionValue() {
+            return optionValue;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/DocCommentGenerator.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,470 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi.generator;
+
+import java.io.File;
+import java.io.BufferedInputStream;
+import java.io.IOException;
+import java.util.Set;
+import javax.lang.model.element.Modifier;
+
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.util.List;
+
+class DocCommentGenerator {
+
+    public enum Text {
+        BROWNFOX(BROWNFOX_TEXT),
+        NOWISTHETIME(NOWISTHETIME_TEXT),
+        THISPANGRAM(THISPANGRAM_TEXT),
+        LOREMIPSUM(LOREMIPSUM_TEXT),
+        LIEUROPANLINGUES(LIEUROPANLINGUES_TEXT),
+        CODE(CODE_TEXT);
+
+        String commentText;
+
+        Text(String text) {
+            commentText = text;
+        }
+
+        @Override
+        public String toString() {
+            return commentText;
+        }
+    }
+
+    public enum Tag {
+        AUTHOR("@author", "Cody J. Writer"),
+        PARAM("@param", ""),
+        RETURN("@return", Text.NOWISTHETIME.toString()),
+        SINCE("@since", "1.0"),
+        THROWS("@throws", "If problem detected"),
+        EXCEPTION("@exception", "If problem detected"),
+        SERIAL("@serial", ""),
+        SERIALDATA("@serialData", "The types and order of data could be here."),
+        SERIALFIELD("@serialField", "\n        Serial field in special array"),
+        FX_PROPSETTER("@propertySetter", "Set the property"),
+        FX_PROPGETTER("@propertyGetter", "Get the property"),
+        FX_PROPDESC("@propertyDescription", ""),
+        FX_DEFVALUE("@defaultValue", ""),
+        FX_TREATASPRIVATE("@treatAsPrivate", "");
+
+        String tagName;
+        String tagValue;
+
+        Tag(String tagName, String tagValue) {
+            this.tagName = tagName;
+            this.tagValue = tagValue;
+        }
+
+        public String toString() {
+            return value("", "");
+        }
+
+        public String value(String value) {
+            return value(value, "");
+        }
+
+        public String value(String value, String extra) {
+            return tagName
+                   + ((value.length() != 0) ? " " + value : "")
+                   + ((tagValue.length() != 0) ? " " + tagValue : "")
+                   + ((extra.length() != 0) ? " " + extra : "");
+        }
+    }
+
+    public enum InlineTag {
+        LITERAL("@literal", "Use < and > brackets instead of &lt; and &gt; escapes."),
+        CODE("@code", "(i) -> new Abc<Object>((i > 0) ? (i << 1) : 0)"),
+        LINK("@link", ""),
+        VALUE("@value", "");
+
+        String tagName;
+        String tagValue;
+
+        InlineTag(String tagName, String tagValue) {
+            this.tagName = tagName;
+            this.tagValue = tagValue;
+        }
+
+        public String toString() {
+            return value("");
+        }
+
+        public String value(String value) {
+            return "{" + tagName
+                   + ((tagValue.length() != 0) ? " " + tagValue : "")
+                   + ((value.length() != 0) ? " " + value : "")
+                   + "}";
+        }
+    }
+
+    public static class LinkTag {
+
+        static String[] links = new String[] {
+            "Boolean",
+            "Boolean#TRUE",
+            "Boolean#Boolean(boolean)",
+            "Boolean#Boolean(String s)",
+            "Boolean#compare(boolean, boolean)",
+            "Boolean#compareTo(Boolean b)",
+            "java.util.Vector",
+            "java.util.Vector#elementCount",
+            "java.util.Vector#Vector(int)",
+            "java.util.Vector#Vector(int initialCapacity, int capacityIncrement)",
+            "java.util.Vector#indexOf(Object)",
+            "java.util.Vector#indexOf(Object o, int index)",
+            "java.lang.annotation" };
+
+        static int index = 0;
+
+        public static String nextSee() {
+            String next = "@see " + links[index];
+            index = (index + 1) % links.length;
+            return next;
+        }
+
+        public static String nextLink() {
+            String next = "Also check "
+                          + (((index % 2) == 0) ? "{@link " : "{@linkplain ")
+                          + links[index]
+                          + "} for details.\n";
+            index = (index + 1) % links.length;
+            return next;
+        }
+    }
+
+    public static class VersionTag {
+
+        static String[] versions = new String[] {
+            "1.5, 09/01/04",
+            "1.6, 12/11/06",
+            "1.7, 07/28/11",
+            "1.8, 04/19/14",
+            "9,   06/03/16" };
+
+        static int index = 0;
+
+        public static String nextVersion() {
+            String next = "@version " + versions[index];
+            index = (index + 1) % versions.length;
+            return next;
+        }
+    }
+
+    //
+    // getters (build comments for entities)
+    //
+
+    public String getPackageComment() {
+        return Text.LOREMIPSUM
+               + "\n <p>" + Text.LIEUROPANLINGUES
+               + "\n" + Text.CODE
+               + "\n" + LinkTag.nextLink()
+               + "\n" + LinkTag.nextSee()
+               + "\n" + Tag.SINCE;
+    }
+
+    String[] serialVals = new String[] { "include", "exclude" };
+    // static index to roll over "include/exclude"
+    static int serialValIdx = 0;
+
+    public String getBaseComment(JCClassDecl baseDecl, boolean toplevel) {
+        String buildComment = Text.LIEUROPANLINGUES + "\n";
+
+        buildComment += "<p>It is possible to see inlined code:\n"
+                        + InlineTag.CODE
+                        + " is the example.\n\n";
+
+        buildComment += "<p>Literal use example.\n"
+                        + InlineTag.LITERAL + "\n\n";
+
+        buildComment += "<p>" + Text.THISPANGRAM + "\n"; // make comment longer
+
+        buildComment += "<p>" + LinkTag.nextLink() + "\n";
+
+        if (toplevel)
+            buildComment += "\n" + VersionTag.nextVersion() + "\n";
+
+        // @param for type params
+        List<JCTypeParameter> params = baseDecl.getTypeParameters();
+        int paramIndex = 0;
+        for (JCTypeParameter paramDecl : params) {
+            buildComment += Tag.PARAM.value(
+                                "<" + paramDecl.getName().toString() + ">",
+                                "the type of value set #" + paramIndex++)
+                            + "\n";
+        }
+
+        buildComment += "\n" + LinkTag.nextSee();
+
+        buildComment += "\n";
+
+        if (toplevel)
+            buildComment += Tag.AUTHOR + "\n";
+
+        buildComment += Tag.SINCE + "\n";
+
+        // for serial; currently no need to dig too deep
+        if (isSerializable(baseDecl) || isErrorOrException(baseDecl)) {
+            buildComment += "\n" + Tag.SERIAL.value(serialVals[serialValIdx]);
+            serialValIdx = (serialValIdx + 1) % 2;
+        }
+
+        return buildComment;
+    }
+
+    public String getConstComment() {
+        String buildComment = Text.NOWISTHETIME + " " + Text.BROWNFOX + "\n";
+
+        buildComment += LinkTag.nextLink() + "\n";
+        buildComment += LinkTag.nextSee() + "\n";
+        buildComment += Tag.SINCE + "\n";
+
+        return buildComment;
+    }
+
+    public String getFieldComment(JCClassDecl baseDecl,
+                                  JCVariableDecl varDecl,
+                                  boolean isFxStyle) {
+        String buildComment = Text.BROWNFOX + "<p>" + Text.NOWISTHETIME + "\n";
+
+        Set<Modifier> mods = varDecl.getModifiers().getFlags();
+        String varName = varDecl.getName().toString();
+
+        if (mods.contains(Modifier.STATIC) && mods.contains(Modifier.FINAL)) {
+            JCExpression init = varDecl.getInitializer();
+            if (init != null
+                && !"null".equals(init.toString())
+                && !"serialPersistentFields".equals(varName))
+                buildComment += "<p>The value of this constant is "
+                                + InlineTag.VALUE
+                                + ".\n";
+        }
+
+        buildComment += "<p>" + LinkTag.nextLink() + "\n";
+
+        if (isSerializable(baseDecl)) {
+            if (isErrorOrException(baseDecl)) {
+                buildComment += Tag.SERIAL + "\n";
+            } else if ("serialPersistentFields".equals(varName)) {
+                JCNewArray sfList = (JCNewArray)varDecl.getInitializer();
+                for (JCExpression sf : sfList.getInitializers()) {
+                    List<JCExpression> args = ((JCNewClass)sf).getArguments();
+                    String sfName = ((JCLiteral)args.get(0)).getValue().toString();
+                    String sfClass = ((JCIdent)args.get(1)).getName().toString();
+                    String sfType = sfClass.substring(0, sfClass.indexOf(".class"));
+
+                    buildComment += Tag.SERIALFIELD.value(sfName + "    " + sfType)
+                                    + "\n";
+                }
+            } else {
+                buildComment += Tag.SERIAL.value("Very important value.") + "\n";
+            }
+        }
+
+        if (isFxStyle) {
+            // set default value
+            String varType = varDecl.getType().toString();
+            buildComment += Tag.FX_DEFVALUE.value(defValue(varType)) + "\n";
+        }
+
+        buildComment += LinkTag.nextSee() + "\n";
+
+        return buildComment;
+    }
+
+    public String getMethodComment(JCClassDecl baseDecl,
+                                   JCMethodDecl methodDecl,
+                                   boolean isFxStyle) {
+        String buildComment = Text.BROWNFOX + "\n<p>" + Text.THISPANGRAM + "\n";
+
+        buildComment += "<p>" + LinkTag.nextLink() + "\n";
+
+        buildComment += "<p>Literal use example.\n"
+                        + InlineTag.LITERAL + "\n\n";
+
+        // @param for type params
+        List<JCTypeParameter> tparams = methodDecl.getTypeParameters();
+        int tparamIndex = 0;
+        for (JCTypeParameter paramDecl : tparams) {
+            String paramDeclString = paramDecl.getName().toString();
+            // simplify it (could contain 'extend'/'super' clauses
+            int spacePos = paramDeclString.indexOf(' ');
+            if (spacePos != -1)
+                paramDeclString = paramDeclString.substring(0, spacePos);
+            buildComment += Tag.PARAM.value(
+                                "<" + paramDeclString + ">",
+                                "the type of value set #" + tparamIndex++)
+                            + "\n";
+        }
+
+        // @param
+        List<JCVariableDecl> params =  methodDecl.getParameters();
+        int paramIndex = 0;
+        for (JCVariableDecl paramDecl : params) {
+            buildComment += Tag.PARAM.value(
+                                paramDecl.getName().toString(),
+                                "an income parameter #" + paramIndex++)
+                            + "\n";
+        }
+
+        // @return
+        JCTree retType = methodDecl.getReturnType(); // null for constructors
+        if (retType != null && !"void".equals(retType.toString()))
+            buildComment += Tag.RETURN + "\n";
+
+        // @throws/@exception
+        Tag t = isDerived(baseDecl) ? Tag.EXCEPTION : Tag.THROWS;
+        List<JCExpression> throwTypes = methodDecl.getThrows();
+        for (JCExpression throwsExp : throwTypes) {
+            buildComment += t.value(throwsExp.toString()) + "\n";
+        }
+
+        if (isSerializable(baseDecl)) {
+            switch (methodDecl.getName().toString()) {
+                case "writeObject":
+                case "readObject":
+                case "writeExternal":
+                case "readExternal":
+                case "writeReplace":
+                case "readResolve":
+                    buildComment += Tag.SERIALDATA + "\n";
+                    break;
+                default:
+            }
+        }
+
+        if (isFxStyle) {
+            // @propertySetter/Getter + Description
+            if ("void".equals(retType.toString())) {
+                buildComment += Tag.FX_PROPSETTER + "\n";
+            } else {
+                buildComment += Tag.FX_PROPGETTER + "\n";
+                buildComment += Tag.FX_DEFVALUE.value(defValue(retType.toString()))
+                                + "\n";
+            }
+            buildComment += Tag.FX_PROPDESC.value(Text.BROWNFOX.toString()) + "\n";
+
+            // @treatAsPrivate
+            if (methodDecl.getModifiers().getFlags().contains(Modifier.PUBLIC))
+                buildComment += Tag.FX_TREATASPRIVATE + "\n";
+        }
+
+        // @see
+        buildComment += LinkTag.nextSee() + "\n";
+
+        // @since
+        buildComment += Tag.SINCE + "\n";
+
+        return buildComment;
+    }
+
+    //
+    // util methods
+    //
+
+    private boolean isErrorOrException(JCClassDecl baseDecl) {
+        JCExpression ext = baseDecl.getExtendsClause();
+        if (ext != null) {
+            String extClassName = ext.toString();
+            if (extClassName.contains("Error") || extClassName.contains("Exception"))
+                return true;
+        }
+        return false;
+    }
+
+    private boolean isSerializable(JCClassDecl baseDecl) {
+        List<JCExpression> impls = baseDecl.getImplementsClause();
+        for (JCExpression impl : impls) {
+            if (impl.toString().contains("Serializable"))
+                return true;
+        }
+        return false;
+    }
+
+    private boolean isDerived(JCClassDecl baseDecl) {
+        return (baseDecl.getExtendsClause() == null) ? false : true;
+    }
+
+    private String defValue(String type) {
+        switch (type) {
+            case "boolean":
+                return "true";
+            case "byte": case "char": case "int": case "long":
+            case "Integer": case "Long":
+                return "1";
+            case "float": case "double": case "Float": case "Double":
+                return "1.0";
+            case "String":
+                return "string";
+            default:
+                return "null";
+        }
+    }
+
+    private static final String BROWNFOX_TEXT =
+        "The quick brown fox jumps over the lazy dog.\n";
+    private static final String NOWISTHETIME_TEXT =
+        "Now is the time for all good men to come to the aid of the party.\n";
+    private static final String THISPANGRAM_TEXT =
+        "This pangram contains four a's, one b, two c's, one d, thirty e's,\n" +
+        "six f's, five g's, seven h's, eleven i's, one j, one k, two l's,\n" +
+        "two m's, eighteen n's, fifteen o's, two p's, one q, five r's,\n" +
+        "twenty-seven s's, eighteen t's, two u's, seven v's, eight w's,\n" +
+        "two x's, three y's, &amp; one z.";
+    private static final String LOREMIPSUM_TEXT =
+        "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do\n" +
+        "eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut\n" +
+        "enim ad minim veniam, quis nostrud exercitation ullamco laboris\n" +
+        "nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor\n" +
+        "in reprehenderit in voluptate velit esse cillum dolore eu fugiat\n" +
+        "nulla pariatur. Excepteur sint occaecat cupidatat non proident,\n" +
+        "sunt in culpa qui officia deserunt mollit anim id est laborum.\n";
+    private static final String LIEUROPANLINGUES_TEXT =
+        "Li Europan lingues es membres del sam familie. Lor separat existentie\n" +
+        "es un myth. Por scientie, musica, sport etc, litot Europa usa li sam\n" +
+        "vocabular. Li lingues differe solmen in li grammatica, li pronunciation\n" +
+        "e li plu commun vocabules. Omnicos directe al desirabilite de un nov\n" +
+        "lingua franca: On refusa continuar payar custosi traductores.\n" +
+        "\n" +
+        "<p>At solmen va esser necessi far uniform grammatica, pronunciation\n" +
+        "e plu commun paroles. Ma quande lingues coalesce, li grammatica del\n" +
+        "resultant lingue es plu simplic e regulari quam ti del coalescent\n" +
+        "lingues. Li nov lingua franca va esser plu simplic e regulari quam\n" +
+        "li existent Europan lingues. It va esser tam simplic quam Occidental\n" +
+        "in fact, it va esser Occidental. A un Angleso it va semblar un simplificat\n" +
+        "Angles, quam un skeptic Cambridge amico dit me que Occidental es.\n";
+    private static final String CODE_TEXT =
+        "<pre>\n" +
+        "public void checkLanguage(Language lang) throws Exception {\n" +
+        "    if (lang.getName().equals(\"Java\")) {\n" +
+        "        System.out.println(\"Warning! Hot!\");\n" +
+        "    else {\n" +
+        "        throw new LooserException();\n" +
+        "    }\n" +
+        "}\n" +
+        "</pre>\n";
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/Documentifier.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,124 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi.generator;
+
+import java.util.ArrayList;
+import java.util.Set;
+import javax.lang.model.element.Modifier;
+
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.tree.DocCommentTable;
+import com.sun.tools.javac.parser.ScannerFactory;
+import com.sun.tools.javac.parser.Scanner;
+import com.sun.tools.javac.parser.Tokens.Token;
+import com.sun.tools.javac.parser.Tokens.Comment;
+import com.sun.tools.javac.parser.Tokens.Comment.CommentStyle;
+import com.sun.source.tree.Tree.Kind;
+
+import sampleapi.util.*;
+
+class Documentifier {
+
+    static Documentifier instance;
+
+    final DocCommentGenerator docGen;
+    final ScannerFactory scanners;
+
+    private Documentifier(Context context) {
+        docGen = new DocCommentGenerator();
+        scanners = ScannerFactory.instance(context);
+    }
+
+    public static Documentifier instance(Context context) {
+        if (instance == null)
+            instance = new Documentifier(context);
+        return instance;
+    }
+
+    private DocCommentTable curDocComments;
+
+    public void documentify(JCCompilationUnit topLevel, boolean isFxStyle) {
+        JCClassDecl base = (JCClassDecl)topLevel.getTypeDecls().get(0);
+        curDocComments = new PoorDocCommentTable();
+        documentifyBase(base, true, isFxStyle);
+        topLevel.docComments = curDocComments;
+    }
+
+    private void documentifyBase(JCClassDecl base, boolean isTopLevel, boolean isFxStyle) {
+        // add doc comment to class itself
+        Comment comm = comment(docGen.getBaseComment(base, isTopLevel));
+        curDocComments.putComment(base, comm);
+
+        // add doc comments to members
+        for (JCTree member : base.getMembers()) {
+            switch (member.getTag()) {
+                case VARDEF:
+                    documentifyField(base, (JCVariableDecl)member, isFxStyle);
+                    break;
+                case METHODDEF:
+                    documentifyMethod(base, (JCMethodDecl)member, isFxStyle);
+                    break;
+                case CLASSDEF:
+                    documentifyBase((JCClassDecl)member, false, isFxStyle);
+                    break;
+            }
+        }
+    }
+
+    private void documentifyField(JCClassDecl base, JCVariableDecl field, boolean isFxStyle) {
+        Kind baseKind = base.getKind();
+        Set<Modifier> fieldMods = field.getModifiers().getFlags();
+        String doc = (baseKind == Kind.ENUM
+                      && fieldMods.contains(Modifier.PUBLIC)
+                      && fieldMods.contains(Modifier.STATIC)
+                      && fieldMods.contains(Modifier.FINAL)) ?
+                     docGen.getConstComment() :
+                     docGen.getFieldComment(base, field, isFxStyle);
+        Comment comm = comment(doc);
+        curDocComments.putComment(field, comm);
+    }
+
+    private void documentifyMethod(JCClassDecl base, JCMethodDecl method, boolean isFxStyle) {
+        Comment comm = comment(docGen.getMethodComment(base, method, isFxStyle));
+        curDocComments.putComment(method, comm);
+    }
+
+    private Comment comment(String docString) {
+        StringBuilder docComment = new StringBuilder()
+                                   .append("/**")
+                                   .append(docString)
+                                   .append("*/");
+        Scanner scanner = scanners.newScanner(docComment, true);
+        scanner.nextToken();
+        Token token = scanner.token();
+        return token.comment(CommentStyle.JAVADOC);
+    }
+
+    // provide package comment data ONLY
+    public DocCommentGenerator getDocGenerator() {
+        return docGen;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/generator/PackageGenerator.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,832 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi.generator;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.ParserConfigurationException;
+import org.xml.sax.SAXException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Text;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.sun.source.util.JavacTask;
+import com.sun.tools.javac.api.JavacTool;
+import com.sun.tools.javac.api.JavacTaskImpl;
+import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.Name;
+import com.sun.tools.javac.util.Names;
+import com.sun.tools.javac.util.List;
+import com.sun.tools.javac.util.ListBuffer;
+import com.sun.tools.javac.tree.TreeMaker;
+import com.sun.tools.javac.tree.JCTree;
+import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.code.Flags;
+import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.code.TypeTag;
+import com.sun.tools.javac.code.TypeMetadata;
+import com.sun.tools.javac.code.Symbol;
+import com.sun.tools.javac.code.Symtab;
+
+import sampleapi.util.*;
+import sampleapi.SampleApi.Fault;
+
+public class PackageGenerator {
+
+    String packageName;
+    String packageDirName;
+
+    ArrayList<JCCompilationUnit> topLevels;
+    Hashtable<String, Integer> nameIndex;
+    Hashtable<String, JCClassDecl> idBases;
+    Hashtable<String, JCAnnotation> idAnnos;
+
+    TreeMaker make;
+    Names names;
+    Symtab syms;
+    DocumentBuilderFactory factory;
+    Documentifier documentifier;
+    boolean fx = false;
+
+    public PackageGenerator() {
+        JavacTool jt = JavacTool.create();
+        JavacTask task = jt.getTask(null, null, null, null, null, null);
+        Context ctx = ((JavacTaskImpl)task).getContext();
+
+        make = TreeMaker.instance(ctx);
+        names = Names.instance(ctx);
+        syms = Symtab.instance(ctx);
+        factory = DocumentBuilderFactory.newInstance();
+
+        documentifier = Documentifier.instance(ctx);
+    }
+
+    String dataSetName;
+
+    public void processDataSet(String dsName) throws Fault {
+        dataSetName = dsName;
+        topLevels = new ArrayList<>();
+        nameIndex = new Hashtable<>();
+        idBases =  new Hashtable<>();
+        idAnnos =  new Hashtable<>();
+
+        String dsPath = "res/xml/" + dsName + ".xml";
+
+        try {
+            InputStream is = getClass().getResourceAsStream("/" + dsPath);
+            if (is == null)
+                is = new FileInputStream(dsPath);
+
+            DocumentBuilder builder = factory.newDocumentBuilder();
+            Document document = builder.parse(is);
+
+            Element rootElement = document.getDocumentElement();
+            packageName = rootElement.getAttribute("package");
+            fx = "fx".equals(rootElement.getAttribute("style"));
+            packageDirName = packageName.replace('.', '/');
+
+            // process nodes (toplevels)
+            NodeList nodeList = rootElement.getChildNodes();
+            for (int i = 0; i < nodeList.getLength(); i++) {
+                Node node = nodeList.item(i);
+
+                if (!(node instanceof Element))
+                    continue;
+                processTopLevel((Element)node);
+            }
+        } catch (ParserConfigurationException | SAXException | IOException e) {
+            throw new Fault("Error parsing dataset " + dsName);
+        }
+
+        fx = false;
+    }
+
+    public void generate(File outDir) throws Fault {
+        if (dataSetName == null)
+            throw new Fault("No Data Set processed");
+
+        try {
+            File pkgDir = new File(outDir, packageDirName);
+            pkgDir.mkdirs();
+
+            for (JCCompilationUnit decl : topLevels) {
+                JCClassDecl classDecl = (JCClassDecl)decl.getTypeDecls().get(0);
+                File outFile = new File(pkgDir,
+                                        classDecl.getSimpleName().toString() + ".java");
+                FileWriter writer = new FileWriter(outFile);
+                writer.write(decl.toString());
+                writer.flush();
+                writer.close();
+            }
+
+            // package-info
+            File outFile = new File(pkgDir, "package-info.java");
+            FileWriter writer = new FileWriter(outFile);
+            writer.write("/**\n");
+            writer.write(documentifier.getDocGenerator().getPackageComment());
+            writer.write("*/\n");
+            writer.write("package " + packageName + ";");
+            writer.flush();
+            writer.close();
+        } catch (IOException e) {
+            throw new Fault("Error writing output");
+        }
+    }
+
+    // levels' processing methods
+
+    void processTopLevel(Element tlTag) {
+        String kind = tlTag.getTagName();
+
+        if (kind.equals("annodecl")) {
+            // decls stored separately, does not affect bases
+            String declId = tlTag.getAttribute("id");
+            if (!declId.startsWith("@"))
+                declId = "@" + declId;
+            idAnnos.put(declId, processAnnoDecl(tlTag));
+            return;
+        }
+
+        ListBuffer<JCTree>[] bases = processBases(tlTag, null);
+
+        for (JCTree base : bases[0]) { // [0] - bases namely
+            JCPackageDecl pkg = make.PackageDecl(
+                                    List.<JCAnnotation>nil(),
+                                    make.QualIdent(
+                                        new Symbol.PackageSymbol(
+                                            names.fromString(packageName),
+                                            null)));
+            ListBuffer<JCTree> topLevelParts = new ListBuffer<>();
+            topLevelParts.append(pkg);
+            topLevelParts.appendList(bases[1]); // [1] imports
+            topLevelParts.append(base);
+
+            JCCompilationUnit topLevel = make.TopLevel(topLevelParts.toList());
+            documentifier.documentify(topLevel, fx);
+            topLevels.add(topLevel);
+        }
+    }
+
+    ListBuffer<JCTree>[] processBases(Element baseTag, Hashtable<String, Integer> scope) {
+        String kind = baseTag.getTagName();
+        String baseName = baseTag.getAttribute("basename");
+        String typeParam = baseTag.getAttribute("tparam");
+        String baseId = baseTag.getAttribute("id");
+
+        long kindFlag = 0;
+        switch (kind) {
+            case "class":
+                // no flags for class
+                break;
+            case "interface":
+                kindFlag |= Flags.INTERFACE;
+                break;
+            case "enum":
+                kindFlag |= Flags.ENUM;
+                break;
+            case "annotation":
+                kindFlag |= Flags.ANNOTATION | Flags.INTERFACE;
+                break;
+        }
+
+        // go through other nodes; add modifiers to multiplier
+        NodeList nodes = baseTag.getChildNodes();
+        ListBuffer<JCTree> bases = new ListBuffer<>();
+        ListBuffer<JCTree> members = new ListBuffer<>();
+        ListBuffer<JCTree> imports = new ListBuffer<>();
+        JCExpression extType = null;
+        ListBuffer<JCExpression> implTypes = new ListBuffer<>();
+        SimpleMultiplier multiply = new SimpleMultiplier();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
+
+            if (!(node instanceof Element))
+                continue;
+
+            switch (((Element)node).getTagName()) {
+                case "modifier":
+                    multiply.addAxis(((Element)node).getTextContent());
+                    break;
+                case "anno":
+                    multiply.addAxis(((Element)node).getTextContent());
+                    break;
+                case "member":
+                    // process members here
+                    members.appendList(processMembers((Element)node, baseName, kind));
+                    break;
+                case "extend":
+                    String classId = ((Element)node).getAttribute("id");   // this pkg
+                    String classRef = ((Element)node).getAttribute("ref"); // external
+                    if (classId.length() !=0 &&
+                        idBases.containsKey(classId)) {
+                        // if have base, take methods from base members
+                        JCClassDecl baseDecl = idBases.get(classId);
+                        extType = make.Type(
+                                      getTypeByName(
+                                          baseDecl.getSimpleName().toString()));
+                        members.appendList(processMethods(baseDecl.getMembers(), false));
+                    } else if (classRef.length() !=0) {
+                        extType = make.Type(getTypeByName(classRef));
+                    }
+                    break;
+                case "implement":
+                    String interfaceId = ((Element)node).getAttribute("id");
+                    String interfaceRef = ((Element)node).getAttribute("ref");
+                    if (interfaceId.length() != 0 &&
+                        idBases.containsKey(interfaceId)) {
+                        JCClassDecl baseDecl = idBases.get(interfaceId);
+                        implTypes.add(
+                            make.Type(
+                                getTypeByName(
+                                    baseDecl.getSimpleName().toString())));
+                        members.appendList(processMethods(baseDecl.getMembers(), true));
+                    } else if (interfaceRef.length() != 0) {
+                        implTypes.add(make.Type(getTypeByName(interfaceRef)));
+                    }
+                    break;
+                case "import":
+                    imports.append(
+                        make.Import(
+                            make.Ident(names.fromString(((Element)node).getTextContent())),
+                            false));
+            }
+        }
+
+        // process modifiers through multiplier
+        multiply.initIterator();
+        while (multiply.hasNext()) {
+            ArrayList<String> tuple = multiply.getNext();
+
+            long declFlags = kindFlag;
+            ListBuffer<JCAnnotation> annos = new ListBuffer<>();
+            for (String modifier : tuple) {
+                if (modifier.startsWith("@") && idAnnos.containsKey(modifier))
+                    annos.add(idAnnos.get(modifier)); // it's anno
+                else
+                    declFlags |= getFlagByName(modifier); // it's modifier
+            }
+
+            String declName = (scope == null)
+                                  ? getUniqName(baseName)
+                                  : baseName + getUniqIndex(scope, baseName);
+            JCClassDecl baseDecl = make.ClassDef(
+                                       make.Modifiers(declFlags, annos.toList()),
+                                       names.fromString(declName),
+                                       processTypeParams(typeParam), // type params
+                                       extType,                      // ext
+                                       implTypes.toList(),           // impl
+                                       members.toList());            // members
+
+            // fix constructors names
+            fixConstructorNames(baseDecl);
+
+            bases.append(baseDecl);
+
+            // for non-empty ids store first base occurence from multiplied sequence
+            if (baseId.length() != 0) {
+                idBases.put(baseId, baseDecl);
+                baseId = "";
+            }
+        }
+
+        return new ListBuffer[] { bases, imports };
+    }
+
+    List<JCTypeParameter> processTypeParams(String typeParams) {
+
+        if (typeParams == null || typeParams.length() == 0)
+            return List.<JCTypeParameter>nil(); // empty
+
+        String[] typeVarsArr = typeParams.split(",");
+        ListBuffer<JCTypeParameter> typeParamsDecls = new ListBuffer<>();
+
+        for (String typeVar : typeVarsArr) {
+            typeParamsDecls.add(
+                make.TypeParameter(names.fromString(typeVar),
+                                    List.<JCExpression>nil()));
+        }
+
+        return typeParamsDecls.toList();
+    }
+
+    ListBuffer<JCTree> processMembers(Element memberTag, String name, String kind) {
+        ListBuffer<JCTree> members = new ListBuffer<>();
+        NodeList nodes = memberTag.getChildNodes();
+        Hashtable<String, Integer> scope = new Hashtable<>();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
+
+            if (!(node instanceof Element))
+                continue;
+
+            switch (((Element)node).getTagName()) {
+                case "field":
+                    members.appendList(processFields((Element)node, scope));
+                    break;
+                case "serialfield":
+                    members.append(processSerialFields((Element)node));
+                    break;
+                case "constant":
+                    members.appendList(processConstants((Element)node, scope));
+                    break;
+                case "constructor":
+                    members.appendList(processMethods((Element)node, scope, true, true));
+                    break;
+                case "method":
+                    boolean needBody = kind.equals("class") || kind.equals("enum");
+                    members.appendList(processMethods((Element)node, scope, needBody, false));
+                    break;
+                case "class":
+                case "interface":
+                case "enum":
+                case "annotation":
+                    members.appendList(processBases((Element)node, scope)[0]);
+                    break;
+            }
+        }
+
+        return members;
+    }
+
+    ListBuffer<JCTree> processFields(Element fieldsNode, Hashtable<String, Integer> scope) {
+        String kind = fieldsNode.getTagName();
+        String baseName = fieldsNode.getAttribute("basename");
+
+        ListBuffer<JCTree> fields = new ListBuffer<>();
+        NodeList nodes = fieldsNode.getChildNodes();
+        SimpleMultiplier multiply = new SimpleMultiplier(); // for modifiers
+        String[] types = new String[] {};
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
+
+            if (!(node instanceof Element))
+                continue;
+
+            // parse type and modifiers
+            switch (((Element)node).getTagName()) {
+                case "modifier":
+                    multiply.addAxis(((Element)node).getTextContent());
+                    break;
+                case "anno":
+                    multiply.addAxis(((Element)node).getTextContent());
+                case "type":
+                    types = ((Element)node).getTextContent().split("\\|");
+                    break;
+            }
+        }
+
+        // process through modifiers and types
+        multiply.initIterator();
+        while (multiply.hasNext()) {
+            ArrayList<String> tuple = multiply.getNext();
+
+            long declFlags = 0;
+            ListBuffer<JCAnnotation> annos = new ListBuffer<>();
+            for (String modifier : tuple) {
+                if (modifier.startsWith("@") && idAnnos.containsKey(modifier))
+                    annos.add(idAnnos.get(modifier)); // it's anno
+                else
+                    declFlags |= getFlagByName(modifier); // it's modifier
+            }
+
+
+            for (String type : types) {
+                String declName = baseName + getUniqIndex(scope, baseName);
+
+                Type initType = getTypeByName(type);
+                JCExpression initExpr = null;
+                if ((declFlags & Flags.STATIC) != 0) // static to be initialized
+                    initExpr = make.Literal(initType.isPrimitive() ?
+                                             initType.getTag() :
+                                             TypeTag.BOT,
+                                             "String".equals(type)
+                                                 ? new String("blah-blah-blah")
+                                                 : new Integer(0));
+
+                JCVariableDecl fieldDecl = make.VarDef(
+                                               make.Modifiers(declFlags, annos.toList()),
+                                               names.fromString(declName),
+                                               make.Type(getTypeByName(type)),
+                                               initExpr);
+
+                fields.append(fieldDecl);
+            }
+        }
+
+        return fields;
+    }
+
+    JCTree processSerialFields(Element sfNode) {
+        String baseName = sfNode.getAttribute("basename");
+        String[] fieldTypes = sfNode.getTextContent().split(",");
+
+        ListBuffer<JCExpression> serialFields = new ListBuffer<>();
+        Hashtable<String, Integer> scope = new Hashtable<>();
+
+        for (String fType : fieldTypes) {
+            String fieldName = baseName + getUniqIndex(scope, baseName);
+            serialFields.add(
+                make.NewClass(
+                    null,
+                    null,
+                    make.Type(getTypeByName("ObjectStreamField")),
+                    List.from(
+                        new JCTree.JCExpression[] {
+                            make.Literal(fieldName),
+                            make.Ident(names.fromString(fType + ".class"))
+                        }),
+                    null));
+        }
+
+        JCTree sfDecl = make.VarDef(
+                            make.Modifiers(
+                                Flags.PRIVATE | Flags.STATIC | Flags.FINAL),
+                            names.fromString("serialPersistentFields"),
+                            make.TypeArray(
+                                make.Type(getTypeByName("ObjectStreamField"))),
+                            make.NewArray(
+                                null,
+                                List.<JCExpression>nil(),
+                                serialFields.toList()));
+
+        return sfDecl;
+    }
+
+    ListBuffer<JCTree> processConstants(Element constNode, Hashtable<String, Integer> scope) {
+        String baseName = constNode.getAttribute("basename");
+        int count = 1;
+        try {
+            count = Integer.parseInt(constNode.getAttribute("count"));
+        } catch (Exception e) {} // nothing to do, will use count = 1
+
+        long declFlags = Flags.PUBLIC | Flags.STATIC | Flags.FINAL | Flags.ENUM;
+        ListBuffer<JCTree> fields = new ListBuffer<>();
+
+        for (int i = 0; i < count; i++) {
+            String declName = baseName +
+                              ((count == 1) ? "" : getUniqIndex(scope, baseName));
+
+            JCVariableDecl constDecl = make.VarDef(
+                                           make.Modifiers(declFlags),
+                                           names.fromString(declName),
+                                           null,  // no need for type in enum decl
+                                           null); // no init
+
+            fields.append(constDecl);
+        }
+        return fields;
+    }
+
+    ListBuffer<JCTree> processMethods(Element methodsNode, Hashtable<String, Integer> scope, boolean needBody, boolean isConstructor) {
+        String kind = methodsNode.getTagName();
+        String baseName = methodsNode.getAttribute("basename");
+        String name = methodsNode.getAttribute("name");
+        String methodTypeParam = methodsNode.getAttribute("tparam");
+
+        ListBuffer<JCTree> methods = new ListBuffer<>();
+        NodeList nodes = methodsNode.getChildNodes();
+        SimpleMultiplier multiply = new SimpleMultiplier(); // for modifiers
+        String[] types = new String[0];
+        String[] params = new String[] { "none" }; // default - no params
+        ListBuffer<Type> throwTypes = new ListBuffer<>();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
+
+            if (!(node instanceof Element))
+                continue;
+
+            // parse type and modifiers
+            switch (((Element)node).getTagName()) {
+                case "modifier":
+                    multiply.addAxis(((Element)node).getTextContent());
+                    break;
+                case "anno":
+                    multiply.addAxis(((Element)node).getTextContent());
+                    break;
+                case "type":
+                    types = ((Element)node).getTextContent().split("\\|");
+                    break;
+                case "param":
+                    params = ((Element)node).getTextContent().split("\\|");
+                    break;
+                case "throw":
+                    throwTypes.add(
+                        getTypeByName(((Element)node).getTextContent()));
+                    break;
+
+            }
+        }
+
+        // constructor?
+        if (isConstructor) {
+            baseName = "constructor";
+            types = new String[] { "" };
+        }
+
+        // direct name not indexed
+        boolean isDirectName = false;
+        if (name.length() > 0) {
+            baseName = name;
+            isDirectName = true;
+        }
+
+        // process through modifiers and types
+        multiply.initIterator();
+        while (multiply.hasNext()) {
+            ArrayList<String> tuple = multiply.getNext();
+
+            long declFlags = 0;
+            ListBuffer<JCAnnotation> annos = new ListBuffer<>();
+            for (String modifier : tuple) {
+                if (modifier.startsWith("@") && idAnnos.containsKey(modifier))
+                    annos.add(idAnnos.get(modifier)); // it's anno
+                else
+                    declFlags |= getFlagByName(modifier); // it's modifier
+            }
+
+            for (String type : types) {
+                String declName = baseName
+                                  + ((isConstructor || isDirectName)
+                                     ? "" : getUniqIndex(scope, baseName));
+
+                JCBlock body = null;
+                if (needBody && (declFlags & Flags.ABSTRACT) == 0) { // create body
+                    List<JCStatement> bodyStatements = List.<JCStatement>nil();
+                    if (!type.equals("") && !type.equals("void")) { // create return statement
+                        Type retType = getTypeByName(type);
+                        bodyStatements = List.<JCStatement>of(
+                                             make.Return(
+                                                 make.Literal(
+                                                     retType.isPrimitive() ?
+                                                         retType.getTag() :
+                                                         TypeTag.BOT,
+                                                     new Integer(0))));
+                    }
+                    body = make.Block(0, bodyStatements);
+                }
+
+                // same method by different params (if they exist)
+                for (String param : params) {
+
+                    JCMethodDecl methodDecl =
+                        make.MethodDef(
+                            make.Modifiers(declFlags, annos.toList()),
+                            names.fromString(declName),
+                            isConstructor ? null : make.Type(getTypeByName(type)),
+                            processTypeParams(methodTypeParam), // type params
+                            null,                               // no receiver
+                            processParams(param),               // formal params
+                            make.Types(throwTypes.toList()),   // throws
+                            body,
+                            null);                              // no default value YET
+
+                    methods.append(methodDecl);
+                }
+            }
+        }
+
+        return methods;
+    }
+
+    JCAnnotation processAnnoDecl(Element annoDeclNode) {
+        String annoId = annoDeclNode.getAttribute("id");
+
+        ListBuffer<JCExpression> args = new ListBuffer<>();
+        String className = "";
+
+        NodeList nodes = annoDeclNode.getChildNodes();
+        for (int i = 0; i < nodes.getLength(); i++) {
+            Node node = nodes.item(i);
+
+            if (!(node instanceof Element))
+                continue;
+
+            switch (((Element)node).getTagName()) {
+                case "class":
+                    className = ((Element)node).getTextContent();
+                    break;
+                case "arg":
+                    String argName = ((Element)node).getAttribute("name");
+                    String argValue = ((Element)node).getAttribute("value");
+
+                    JCExpression arg;
+                    if (argName.length() == 0)
+                        arg = make.Ident(names.fromString(argValue));
+                    else
+                        arg = make.Assign(
+                                  make.Ident(names.fromString(argName)),
+                                  make.Ident(names.fromString(argValue)));
+
+                    args.add(arg);
+                    break;
+            }
+        }
+
+        return make.Annotation(
+                   make.Ident(names.fromString(className)),
+                   args.toList());
+    }
+
+    ListBuffer<JCTree> processMethods(List<JCTree> tree, boolean needBody) {
+        // for "extends" clause; returns methods only
+        ListBuffer<JCTree> methods = new ListBuffer<>();
+        for (JCTree memberDecl : tree) {
+            if (memberDecl instanceof JCMethodDecl) {
+                JCMethodDecl methodDecl = (JCMethodDecl)memberDecl;
+                JCTree retTypeTree = methodDecl.getReturnType();
+
+                // skip constructors
+                if (retTypeTree == null)
+                    continue;
+
+                if (needBody) {
+                    // here we need to 'implement' interface declared methods
+                    Type retType = retTypeTree.type;
+
+                    List<JCStatement> bodyStatements = List.<JCStatement>nil();
+                    if (retType.getTag() != TypeTag.VOID)
+                        bodyStatements = List.<JCStatement>of(
+                                             make.Return(
+                                                 make.Literal(
+                                                     retType.isPrimitive() ?
+                                                         retType.getTag() :
+                                                         TypeTag.BOT,
+                                                     new Integer(0))));
+
+                    JCBlock body = make.Block(0, bodyStatements);
+
+                    methodDecl = make.MethodDef(
+                                     methodDecl.getModifiers(),
+                                     methodDecl.getName(),
+                                     (JCExpression)methodDecl.getReturnType(),
+                                     methodDecl.getTypeParameters(),
+                                     methodDecl.getReceiverParameter(),
+                                     methodDecl.getParameters(),
+                                     methodDecl.getThrows(),
+                                     body,
+                                     (JCExpression)methodDecl.getDefaultValue());
+                }
+
+                methods.add(methodDecl);
+            }
+        }
+        return methods;
+    }
+
+    void fixConstructorNames(JCClassDecl baseDecl) {
+        ListBuffer<JCTree> newMembers = new ListBuffer<>();
+        List<JCTree> members = baseDecl.getMembers();
+        Name name = baseDecl.getSimpleName();
+
+        for (JCTree memberDecl : members) {
+            JCTree newDecl = memberDecl;
+
+            if (memberDecl instanceof JCMethodDecl) {
+                JCMethodDecl methodDecl = (JCMethodDecl)memberDecl;
+                JCTree retTypeTree = methodDecl.getReturnType();
+
+                if (retTypeTree == null)
+                    newDecl = make.MethodDef(
+                                  methodDecl.getModifiers(),
+                                  name,
+                                  (JCExpression)methodDecl.getReturnType(),
+                                  methodDecl.getTypeParameters(),
+                                  methodDecl.getReceiverParameter(),
+                                  methodDecl.getParameters(),
+                                  methodDecl.getThrows(),
+                                  methodDecl.getBody(),
+                                  (JCExpression)methodDecl.getDefaultValue());
+            }
+
+            newMembers.add(newDecl);
+        }
+
+        baseDecl.defs = newMembers.toList();
+    }
+
+    List<JCVariableDecl> processParams(String paramTypes) {
+
+        if ("none".equals(paramTypes))
+            return List.<JCVariableDecl>nil(); // empty
+
+        String[] typesArr = paramTypes.split(",(?!(\\w+,)*\\w+>)");
+        ListBuffer<JCVariableDecl> paramsDecls = new ListBuffer<>();
+
+        int i = 0;
+        for (String typeName : typesArr) {
+            String paramName = "param"
+                               + (typesArr.length == 1 ? "" : String.valueOf(i));
+            paramsDecls.add(
+                make.VarDef(make.Modifiers(0),
+                             names.fromString(paramName),
+                             make.Type(getTypeByName(typeName)),
+                             null));
+            i++;
+        }
+
+        return paramsDecls.toList();
+    }
+
+    //
+    // util methods
+    //
+
+    String getUniqName(String name) {
+        if (!nameIndex.containsKey(name))
+            nameIndex.put(name, new Integer(0));
+        Integer index = nameIndex.get(name);
+        String uniqName = name + index;
+        nameIndex.put(name, index + 1);
+        return uniqName;
+    }
+
+    int getUniqIndex(Hashtable<String, Integer> scope, String name) {
+        if (!scope.containsKey(name))
+            scope.put(name, new Integer(0));
+        Integer index = scope.get(name);
+        scope.put(name, index + 1);
+        return index;
+    }
+
+    long getFlagByName(String modifierName) {
+        switch (modifierName) {
+            case "public":
+                return Flags.PUBLIC;
+            case "private":
+                return Flags.PRIVATE;
+            case "protected":
+                return Flags.PROTECTED;
+            case "static":
+                return Flags.STATIC;
+            case "final":
+                return Flags.FINAL;
+            case "abstract":
+                return Flags.ABSTRACT;
+            case "strictfp":
+                return Flags.STRICTFP;
+            default:
+                return 0;
+        }
+    }
+
+    Type getTypeByName(String typeName) {
+        //check for primitive types
+        switch (typeName) {
+            case "void":
+                return syms.voidType;
+            case "boolean":
+                return syms.booleanType;
+            case "byte":
+                return syms.byteType;
+            case "char":
+                return syms.charType;
+            case "double":
+                return syms.doubleType;
+            case "float":
+                return syms.floatType;
+            case "int":
+                return syms.intType;
+            case "long":
+                return syms.longType;
+            default:
+                return getTypeByName(typeName, List.<Type>nil());
+        }
+    }
+
+    Type getTypeByName(String typeName, List<Type> tparams) {
+        return new Type.ClassType(
+                   Type.noType,
+                   tparams,
+                   new Symbol.ClassSymbol(0, names.fromString(typeName), null));
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/PoorDocCommentTable.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,67 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi.util;
+
+import java.util.HashMap;
+
+import com.sun.tools.javac.parser.Tokens.Comment;
+import com.sun.tools.javac.tree.DCTree.DCDocComment;
+import com.sun.tools.javac.tree.DocCommentTable;
+import com.sun.tools.javac.tree.JCTree;
+
+/*
+ * This class is replica of LazyDocCommentTable from com.sun.tools.javac.parser
+ * package. It's created due to restrictions of LazyDocCommentTable (cannot be
+ * used outside the package) and implements minimal functionality necessary
+ * for doc comment generation purposes.
+ */
+public class PoorDocCommentTable implements DocCommentTable {
+
+    HashMap<JCTree, Comment> table;
+
+    public PoorDocCommentTable() {
+        table = new HashMap<>();
+    }
+
+    public boolean hasComment(JCTree tree) {
+        return table.containsKey(tree);
+    }
+
+    public Comment getComment(JCTree tree) {
+        return table.get(tree);
+    }
+
+    public String getCommentText(JCTree tree) {
+        Comment c = getComment(tree);
+        return (c == null) ? null : c.getText();
+    }
+
+    public DCDocComment getCommentTree(JCTree tree) {
+        return null; // no need for generator purposes, Pretty does not call it
+    }
+
+    public void putComment(JCTree tree, Comment c) {
+        table.put(tree, c);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/lib/sampleapi/util/SimpleMultiplier.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,102 @@
+/*
+ * 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.
+ *
+ * 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 sampleapi.util;
+
+import java.util.StringTokenizer;
+import java.util.ArrayList;
+
+/*
+ * The class implements unknown number of nested loops. The number of modifiers
+ * in class/interface definitions could be any size. Annotations are also multiplied
+ * by this class.
+ * That is, dataset xml can provide any number of modifier sets, and generator should
+ * iterate through all possible modifiers, annotations and types combinations.
+ *
+ * For example, class definition xml provides 3 modifiers sets:
+ *
+ * "public,private"
+ * "static"
+ * "final,abstract"
+ *
+ * and one types set "void,int"
+ *
+ * the class will generate the sequence like:
+ * "public static final void"
+ * "public static final int"
+ * "public static abstract void"
+ * "public static abstract int"
+ * "private static final void"
+ * "private static final int"
+ * "private static abstract void"
+ * "private static abstract int".
+ *
+ * This sequence could be processed by just one loop instead of four.
+ *
+ * In other places where the number of possible positions are known,
+ * the generator uses nested loops instead.
+ */
+public class SimpleMultiplier {
+
+    ArrayList<ArrayList<String>> valueSpace = new ArrayList<>();
+
+    int size = 0;
+    int index = 0;
+
+    public void addAxis(String values) {
+        ArrayList<String> valueAxis = new ArrayList<>();
+        StringTokenizer valuesTokens = new StringTokenizer(values, "|");
+        while (valuesTokens.hasMoreTokens())
+            valueAxis.add(valuesTokens.nextToken());
+        valueSpace.add(valueAxis);
+    }
+
+    public void initIterator() {
+        if (!valueSpace.isEmpty()) {
+            size = 1;
+            for (int i = 0; i < valueSpace.size(); i++)
+                size *= valueSpace.get(i).size();
+        }
+        index = 0;
+    }
+
+    public boolean hasNext() {
+        return index < size;
+    }
+
+    public ArrayList<String> getNext() {
+        ArrayList<String> next = new ArrayList<>();
+        int positionIndex = index;
+
+        // last added changing faster
+        for (int i = valueSpace.size() - 1; i >= 0; i--) {
+            ArrayList<String> valueAxis = valueSpace.get(i);
+            int axisSize = valueAxis.size();
+            next.add(valueAxis.get(positionIndex % axisSize));
+            positionIndex /= axisSize;
+        }
+        index += 1;
+
+        return next;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/res/xml/fx.xml	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+
+ 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.
+-->
+<dataset package="sampleapi.fx" style="fx">
+
+    <class basename="FXClass">
+        <modifier>public</modifier>
+        <member>
+            <field basename="id">
+                <modifier>public</modifier>
+                <type>int|boolean</type>
+            </field>
+            <method basename="setProp">
+                <modifier>public|protected|private</modifier>
+                <param>int|String</param>
+                <type>void</type>
+            </method>
+            <method basename="getProp">
+                <modifier>public|protected|private</modifier>
+                <type>int|int|String</type>
+            </method>
+        </member>
+    </class>
+
+</dataset>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/res/xml/simple.xml	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,529 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+
+ 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.
+-->
+<dataset package="sampleapi.simple">
+
+    <class basename="SampleClass" id="baseclass">
+        <modifier>public</modifier>
+        <modifier>none|abstract</modifier>
+        <member>
+            <field basename="field">
+                <modifier>none|public</modifier>
+                <modifier>none|static</modifier>
+                <modifier>none|final</modifier>
+                <type>boolean|int|String</type>
+            </field>
+            <field basename="field">
+                <modifier>protected|private</modifier>
+                <type>String</type>
+            </field>
+            <constructor>
+                <modifier>public</modifier>
+                <param>none|int|int,boolean|int,String</param>
+            </constructor>
+            <constructor>
+                <modifier>public</modifier>
+                <param>String</param>
+                <throw>NullPointerException</throw>
+                <throw>SampleException0</throw>
+            </constructor>
+            <method basename="set">
+                <modifier>public</modifier>
+                <type>void</type>
+                <param>int</param>
+            </method>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>int|boolean|String</type>
+            </method>
+            <method basename="doSomething">
+                <modifier>public</modifier>
+                <type>void|int</type>
+                <param>none|int|Object,int</param>
+                <throw>NullPointerException</throw>
+                <throw>ArithmeticException</throw>
+            </method>
+        </member>
+    </class>
+
+    <class basename="Derived">
+        <modifier>public</modifier>
+        <extend id="baseclass"/>
+        <member>
+            <field basename="myField">
+                <modifier>public</modifier>
+                <type>int|boolean</type>
+            </field>
+            <constructor>
+                <modifier>public</modifier>
+                <param>none|int|int,boolean|int,String</param>
+            </constructor>
+            <method basename="myGet">
+                <modifier>public</modifier>
+                <type>int|boolean</type>
+            </method>
+        </member>
+    </class>
+
+    <class basename="SampleSerial">
+        <import>java.io.Serializable</import>
+        <modifier>public</modifier>
+        <implement ref="Serializable"/>
+        <member>
+            <field basename="specialData">
+                <modifier>private|none|public</modifier>
+                <type>boolean|int|String</type>
+            </field>
+        </member>
+    </class>
+
+    <class basename="SampleSerial">
+        <import>java.io.Serializable</import>
+        <import>java.io.ObjectStreamField</import>
+        <modifier>public</modifier>
+        <implement ref="Serializable"/>
+        <member>
+            <serialfield basename="serialField">String,Long,Boolean</serialfield>
+            <method basename="justToBeHere">
+                <modifier>public</modifier>
+                <type>String|long|boolean</type>
+            </method>
+        </member>
+    </class>
+
+    <class basename="SampleSerial">
+        <import>java.io.Serializable</import>
+        <import>java.io.ObjectOutputStream</import>
+        <import>java.io.ObjectOutput</import>
+        <import>java.io.IOException</import>
+        <import>java.io.ObjectStreamException</import>
+        <modifier>public</modifier>
+        <implement ref="Serializable"/>
+        <member>
+            <method name="writeObject">
+                <modifier>private</modifier>
+                <param>ObjectOutputStream</param>
+                <type>void</type>
+                <throw>IOException</throw>
+            </method>
+            <method name="writeExternal">
+                <modifier>public</modifier>
+                <param>ObjectOutput</param>
+                <type>void</type>
+                <throw>IOException</throw>
+            </method>
+            <method name="writeReplace">
+                <modifier>protected</modifier>
+                <param>none</param>
+                <type>Object</type>
+                <throw>ObjectStreamException</throw>
+            </method>
+            <method name="writeSomethingElse">
+                <modifier>public</modifier>
+                <param>Object</param>
+                <type>void</type>
+                <throw>IOException</throw>
+            </method>
+        </member>
+    </class>
+
+    <class basename="SampleSerial">
+        <import>java.io.Serializable</import>
+        <import>java.io.ObjectInputStream</import>
+        <import>java.io.ObjectInput</import>
+        <import>java.io.IOException</import>
+        <import>java.io.ObjectStreamException</import>
+        <modifier>public</modifier>
+        <implement ref="Serializable"/>
+        <member>
+            <method name="readObject">
+                <modifier>private</modifier>
+                <param>ObjectInputStream</param>
+                <type>void</type>
+                <throw>IOException</throw>
+                <throw>ClassNotFoundException</throw>
+            </method>
+            <method name="readExternal">
+                <modifier>public</modifier>
+                <param>ObjectInput</param>
+                <type>void</type>
+                <throw>IOException</throw>
+            </method>
+            <method name="readResolve">
+                <modifier>protected</modifier>
+                <param>none</param>
+                <type>Object</type>
+                <throw>ObjectStreamException</throw>
+            </method>
+            <method name="readSomethingElse">
+                <modifier>public</modifier>
+                <param>Object</param>
+                <type>void</type>
+                <throw>IOException</throw>
+            </method>
+        </member>
+    </class>
+
+    <class basename="Container">
+        <modifier>public</modifier>
+        <member>
+            <class basename="Inner">
+                <modifier>public</modifier>
+                <member>
+                    <field basename="value">
+                        <modifier>public</modifier>
+                        <type>int</type>
+                    </field>
+                </member>
+            </class>
+            <class basename="Nested">
+                <modifier>public</modifier>
+                <modifier>static</modifier>
+            </class>
+            <interface basename="EventListener">
+                <modifier>public</modifier>
+                <modifier>static</modifier>
+                <member>
+                    <method basename="onEvent">
+                         <modifier>public</modifier>
+                         <type>void</type>
+                    </method>
+                </member>
+            </interface>
+        </member> 
+    </class>
+
+    <!-- Errors and exceptions -->
+    <class basename="SampleError">
+        <modifier>public</modifier>
+        <extend ref="java.lang.Error"/>
+        <member>
+            <field basename="errorInfo">
+                <modifier>private</modifier>
+                <type>boolean|int|String</type>
+            </field>
+            <constructor>
+                <modifier>public</modifier>
+                <param>String</param>
+            </constructor>
+            <method basename="getSampleData">
+                <modifier>public</modifier>
+                <type>int|String</type>
+            </method>
+        </member>
+    </class>
+
+    <class basename="SampleException">
+        <modifier>public</modifier>
+        <extend ref="java.lang.Exception"/>
+        <member>
+            <field basename="exceptionInfo">
+                <modifier>private</modifier>
+                <type>boolean|int|String</type>
+            </field>
+            <constructor>
+                <modifier>public</modifier>
+                <param>String</param>
+            </constructor>
+            <method basename="getSampleData">
+                <modifier>public</modifier>
+                <type>int|String</type>
+            </method>
+        </member>
+    </class>
+
+    <interface basename="SampleInterface" id="baseinterface">
+        <modifier>public|none</modifier>
+        <member>
+            <method basename="method">
+                <modifier>public</modifier>
+                <type>void|int|Object</type>
+            </method>
+        </member>
+    </interface>
+
+    <class basename="Implementor">
+        <modifier>public</modifier>
+        <implement id="baseinterface"/>
+        <member>
+            <field basename="myField">
+                <modifier>public</modifier>
+                <type>int|boolean</type>
+            </field>
+            <method basename="myGet">
+                <modifier>public</modifier>
+                <type>int|boolean</type>
+            </method>
+        </member>
+    </class>
+
+    <class basename="GenericClass" tparam="T">
+        <import>java.util.List</import>
+        <modifier>public</modifier>
+        <member>
+            <method basename="put">
+                <modifier>public</modifier>
+                <type>void</type>
+                <param>T</param>
+            </method>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>T</type>
+                <param>int</param>
+            </method>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>List&lt;T&gt;</type>
+            </method>
+        </member>
+    </class>
+
+    <class basename="GenericClass" tparam="K,V">
+        <import>java.util.Set</import>
+        <import>java.util.List</import>
+        <import>java.util.Map</import>
+        <modifier>public</modifier>
+        <member>
+            <method basename="put">
+                <modifier>public</modifier>
+                <type>void</type>
+                <param>K,V</param>
+            </method>
+            <method basename="putMap">
+                <modifier>public</modifier>
+                <type>void</type>
+                <param>Map&lt;K,V&gt;</param>
+            </method>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>V</type>
+                <param>K</param>
+            </method>
+            <method basename="getV">
+                <modifier>public</modifier>
+                <type>Set&lt;V&gt;|List&lt;V&gt;</type>
+            </method>
+            <method basename="getK">
+                <modifier>public</modifier>
+                <type>Set&lt;K&gt;|List&lt;K&gt;</type>
+            </method>
+        </member>
+    </class>
+
+    <class basename="GenericClass" tparam="M,N,O">
+        <import>java.util.Set</import>
+        <import>java.util.List</import>
+        <import>java.util.Map</import>
+        <modifier>public</modifier>
+        <member>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>Set&lt;M&gt;|List&lt;M&gt;</type>
+                <param>Map&lt;N,O&gt;</param>
+            </method>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>Set&lt;N&gt;|List&lt;N&gt;</type>
+                <param>Map&lt;M,O&gt;</param>
+            </method>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>Set&lt;O&gt;|List&lt;O&gt;</type>
+                <param>Map&lt;M,N&gt;</param>
+            </method>
+        </member>
+    </class>
+
+    <class basename="GenericUtil"> <!-- public static generic methods like Collections -->
+        <import>java.util.Set</import>
+        <import>java.util.List</import>
+        <import>java.util.Map</import>
+        <import>java.util.function.Supplier</import>
+        <modifier>public</modifier>
+        <member>
+            <method tparam="E" basename="getSomething">
+                <modifier>public</modifier>
+                <modifier>static</modifier>
+                <type>Set&lt;? extends E&gt;|List&lt;? extends E&gt;</type>
+            </method>
+            <method tparam="V,K" basename="getMore">
+                <modifier>public|private</modifier>
+                <modifier>static</modifier>
+                <type>Map&lt;V,K&gt;</type>
+            </method>
+            <method tparam="E" basename="doSomething">
+                <modifier>public</modifier>
+                <modifier>static</modifier>
+                <type>void</type>
+                <param>E</param>
+            </method>
+            <method tparam="X extends Throwable" basename="orElseThrow">
+                <modifier>public|private</modifier>
+                <modifier>static</modifier>
+                <type>X</type>
+                <param>Supplier&lt;? extends X&gt;</param>
+                <throw>X</throw>
+            </method>
+        </member>
+    </class>
+
+    <enum basename="SampleEnum">
+        <modifier>public</modifier>
+        <member>
+            <constant basename="VALUE" count="3"/>
+        </member>
+    </enum>
+        
+    <enum basename="SampleEnum">
+        <modifier>public</modifier>
+        <member>
+            <constant basename="VALUE" count="2"/>
+            <constant basename="NOVALUE" count="1"/>
+            <field basename="field">
+                <modifier>private</modifier>
+                <type>int|String</type>
+            </field>
+            <method basename="method">
+                <modifier>public</modifier>
+                <type>void|String</type>
+            </method>
+        </member>
+    </enum>
+
+    <annodecl id="documented">
+        <class>Documented</class>
+    </annodecl>
+
+    <annodecl id="reten-source">
+        <class>Retention</class>
+        <arg name="value" value="RetentionPolicy.SOURCE"/>
+    </annodecl>
+
+    <annodecl id="reten-class">
+        <class>Retention</class>
+        <arg name="value" value="RetentionPolicy.CLASS"/>
+    </annodecl>
+
+    <annodecl id="reten-runtime">
+        <class>Retention</class>
+        <arg name="value" value="RetentionPolicy.RUNTIME"/>
+    </annodecl>
+
+    <annodecl id="target-method">
+        <class>Target</class>
+        <arg value="ElementType.METHOD"/>
+    </annodecl>
+
+    <annodecl id="target-field">
+        <class>Target</class>
+        <arg value="ElementType.FIELD"/>
+    </annodecl>
+
+    <annodecl id="target-type">
+        <class>Target</class>
+        <arg value="{ElementType.TYPE, ElementType.TYPE_USE}"/>
+    </annodecl>
+
+    <annotation basename="AnnotatedAnno">
+        <import>java.lang.annotation.Documented</import>
+        <anno>@documented</anno>
+        <modifier>public</modifier>
+        <member>
+            <method basename="value">
+                <modifier>public</modifier>
+                <type>boolean|String</type>
+            </method>
+        </member>
+    </annotation>
+
+    <annotation basename="AnnotatedAnno">
+        <import>java.lang.annotation.Retention</import>
+        <import>java.lang.annotation.RetentionPolicy</import>
+        <anno>@reten-source|@reten-class|@reten-runtime</anno>
+        <modifier>public</modifier>
+        <member>
+            <method basename="value">
+                <modifier>public</modifier>
+                <type>int</type>
+            </method>
+        </member>
+    </annotation>
+
+    <class basename="AnnoContainer">
+        <import>java.lang.annotation.Retention</import>
+        <import>java.lang.annotation.RetentionPolicy</import>
+        <import>java.lang.annotation.Target</import>
+        <import>java.lang.annotation.ElementType</import>
+        <modifier>public</modifier>
+        <member>
+            <annotation basename="AnnotatedAnno">
+                <anno>@reten-source|@reten-class|@reten-runtime</anno>
+                <anno>@target-method|@target-field|@target-type</anno>
+                <modifier>public</modifier>
+                <modifier>static</modifier>
+                <member>
+                    <method basename="value">
+                        <modifier>public</modifier>
+                        <type>String</type>
+                    </method>
+                </member>
+            </annotation>
+        </member>
+    </class>
+
+    <annodecl id="deprecated">
+        <class>Deprecated</class>
+    </annodecl>
+
+    <annodecl id="safevarargs">
+        <class>SafeVarargs</class>
+    </annodecl>
+
+    <annodecl id="suppresswarnings">
+        <class>SuppressWarnings</class>
+        <arg value="{&quot;unchecked&quot;, &quot;rawtypes&quot;}"/>
+    </annodecl>
+
+    <class basename="AnnotatedClass">
+        <modifier>public</modifier>
+        <member>
+            <method basename="deprecatedMethod">
+                <anno>@deprecated</anno>
+                <modifier>public</modifier>
+                <type>void</type>
+            </method>
+            <method basename="safeVarargsMethod">
+                <anno>@safevarargs</anno>
+                <modifier>public</modifier>
+                <type>void|int</type>
+                <param>String...</param>
+            </method>
+            <method basename="suppressWarningsMethod">
+                <anno>@suppresswarnings</anno>
+                <modifier>public</modifier>
+                <type>void</type>
+                <param>int|Object</param>
+            </method>
+        </member>
+    </class>
+</dataset>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sampleapi/res/xml/tiny.xml	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ 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.
+
+ 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.
+-->
+<dataset package="sampleapi.tiny">
+
+    <class basename="TinyClass">
+        <modifier>public</modifier>
+        <modifier>none|abstract</modifier>
+        <member>
+            <field basename="id">
+                <modifier>public</modifier>
+                <type>int</type>
+            </field>
+            <method basename="get">
+                <modifier>public</modifier>
+                <type>int</type>
+            </method>
+        </member>
+    </class>
+
+    <interface basename="TinyInterface">
+        <modifier>public</modifier>
+        <member>
+            <method basename="put">
+                <modifier>public</modifier>
+                <type>void</type>
+                <param>int</param>
+            </method>
+        </member>
+    </interface>
+
+    <enum basename="TinyEnum">
+        <modifier>public</modifier>
+        <member>
+            <constant basename="YES" count="1"/>
+            <constant basename="NO" count="1"/>
+            <constant basename="MAYBE" count="1"/>
+        </member>
+    </enum>
+
+    <annotation basename="TinyAnno">
+        <modifier>public</modifier>
+        <member>
+            <method basename="value">
+                <modifier>public</modifier>
+                <type>boolean</type>
+            </method>
+        </member>
+    </annotation>
+        
+</dataset>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sourceOnly/Test.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4548768
+ * @summary Javadoc in JDK 1.4 uses classpath and not just source dir
+ * @author gafter
+ * @ignore API modifications
+ * @modules jdk.javadoc
+ * @compile p/SourceOnly.java
+ * @run main p.SourceOnly
+ */
+
+// this file is just a dummy to get the javadoc started.
+//
+// NOTE: this test only seems to work in separate JVM mode for
+// reasons having something to do with javing tools.jar
+// on the classpath.  Until that is sorted out, these tests
+// must be run in separate VM mode.
Binary file test/jdk/javadoc/tool/sourceOnly/p/NonSource.class has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sourceOnly/p/SourceOnly.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,66 @@
+/*
+ * Copyright (c) 2002, 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.
+ *
+ * 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 p;
+
+import java.util.Collections;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+/** Test that when running javadoc on a package, we only get
+ *  documentation for those classes for which source was provided.
+ */
+public class SourceOnly implements Doclet {
+    public static void main(String[] args) {
+        // run javadoc on package p
+        int result = jdk.javadoc.internal.tool.Main.
+            execute("javadoc", "p.SourceOnly", SourceOnly.class.getClassLoader(), new String[] {"p"});
+        if (result != 0)
+            throw new Error();
+    }
+
+    public boolean start(DocletEnvironment root) {
+        if (root.getIncludedClasses().size() != 1)
+            throw new Error("wrong set of classes documented: " + java.util.Arrays.asList(root.getIncludedClasses()));
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sourceOption/SourceOption.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,107 @@
+/*
+ * Copyright (c) 2006, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug     6507179
+ * @summary Ensure that "-source" option isn't ignored.
+ * @author  Scott Seligman
+ * @ignore API modifications
+ * @modules jdk.javadoc
+ * @run main/fail SourceOption 7
+ * @run main      SourceOption 9
+ * @run main      SourceOption
+ */
+
+/*
+ * TEST NOTE
+ * With JDK9, this test has been transformed into a NEGATIVE test.
+ *
+ * Generally speaking, this test should check a feature not in at least
+ * one of the currently supported previous versions.  In this manner,
+ * a failure of the -source option to be honored would mean a pass of
+ * the test, and therefore a failure of the -source option.
+ *
+ * For JDK9 and JDK10, both support 1.7, which did not support javac's
+ * lambda construct.  So we set "-source 1.7" to compile a .java file
+ * containing the lambda construct.  javac should fail, thus showing
+ * -source to be working.  Thus the test passes.
+ *
+ * The second jtreg @run command checks to make sure that the source
+ * provided is valid for the current release of the JDK.
+ *
+ *  fixVersion: JDK11
+ *      replace ./p/LambdaConstructTest.java with a missing from
+ *      JDK8, JDK9, or JDK10.  Set -source below appropriately.
+ */
+
+import java.util.Collections;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.Doclet.Option;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class SourceOption implements Doclet {
+
+    public static void main(String[] args) {
+        String[] params;
+        if ((args == null) || (args.length==0)) {
+            params = new String[]{"p"};
+            System.out.println("NOTE : -source not provided, default taken");
+        } else {
+            params = new String[]{"-source", args[0], "p"};
+            System.out.println("NOTE : -source will be: " + args[0]);
+        }
+
+        if (com.sun.tools.javadoc.Main.execute(
+                "javadoc",
+                "SourceOption",
+                SourceOption.class.getClassLoader(),
+                params) != 0)
+        throw new Error("Javadoc encountered warnings or errors.");
+
+    }
+
+    public boolean run(DocletEnvironment root) {
+        root.getIncludedClasses();         // force parser into action
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/sourceOption/p/LambdaConstructTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+public class LambdaConstructTest {
+   public static void main(String[] args) {
+
+     System.out.println("=== LambdaConstructTest ===");
+
+     // Lambda Runnable
+     Runnable lambda = () -> System.out.println("it's a Lambda world!");
+
+     // Run it!
+     lambda.run();
+
+  }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/subpackageIgnore/SubpackageIgnore.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,77 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4773013
+ * @summary When hunting subpackages, silently ignore any directory name that
+ *          can't be part of a subpackage.
+ * @ignore API modifications
+ * @modules jdk.javadoc
+ */
+
+import java.util.Collections;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class SubpackageIgnore implements Doclet {
+
+    public static void main(String[] args) {
+        if (jdk.javadoc.internal.tool.Main.execute(
+                "javadoc",
+                "SubpackageIgnore",
+                SubpackageIgnore.class.getClassLoader(),
+                new String[] {"-Xwerror",
+                              "-sourcepath",
+                              System.getProperty("test.src", "."),
+                              "-subpackages",
+                              "pkg1"}) != 0)
+            throw new Error("Javadoc encountered warnings or errors.");
+    }
+
+    /*
+     * The world's simplest doclet.
+     */
+    public boolean run(DocletEnvironment root) {
+        return true;
+    }
+
+    @Override
+    public String getName() {
+        return "Test";
+    }
+
+    @Override
+    public Set<Option> getSupportedOptions() {
+        return Collections.emptySet();
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/subpackageIgnore/pkg1/not-subpkg/SomeJavaFile.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,23 @@
+/*
+ * Copyright (c) 2003, 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.
+ *
+ * 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.
+ */
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/varArgs/Main.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,68 @@
+/*
+ * 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 4421066 5006659
+ * @summary Verify the contents of a ClassDoc containing a varArgs method.
+ *          Verify that see/link tags can use "..." notation.
+ * @ignore API modifications
+ * @library ../lib
+ * @modules jdk.javadoc
+ * @compile  ../lib/Tester.java Main.java
+ * @run main Main
+ */
+
+import java.io.IOException;
+
+import com.sun.javadoc.*;
+import jdk.javadoc.doclet.DocletEnvironment;
+
+public class Main extends Tester.Doclet {
+
+    private static final Tester tester =
+            new Tester("Main", "-Xwerror", "pkg1");
+
+    public static void main(String[] args) throws IOException {
+        tester.run();
+        tester.verify();
+    }
+
+    public static boolean run(DocletEnvironment root) {
+        try {
+            for (ClassDoc cd : root.classes()) {
+                tester.printClass(cd);
+
+                for (SeeTag tag : cd.seeTags()) {
+                    if (tag.referencedMember() != cd.methods()[0]) {
+                        throw new Error("5006659: @see tag meets varArgs");
+                    }
+                }
+            }
+
+            return true;
+        } catch (IOException e) {
+            return false;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/varArgs/expected.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,4 @@
+interface pkg1.A
+  name: A / A / pkg1.A
+  methods:
+    void m1(int, String...)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/jdk/javadoc/tool/varArgs/pkg1/A.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2003, 2004, 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.
+ *
+ * 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 pkg1;
+
+/**
+ * Interface A.
+ *
+ * @see #m1(int, String[])
+ * @see #m1(int, String...)
+ */
+public interface A {
+    void m1(int i, String... ss);
+}
--- a/test/tools/javac/MethodParameters/LambdaTest.out	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/tools/javac/MethodParameters/LambdaTest.out	Thu Jan 28 15:42:06 2016 -0800
@@ -2,6 +2,6 @@
 LambdaTest.<init>()
 LambdaTest.foo(i)
 LambdaTest.lambda$static$1(arg0)/*synthetic*/
-LambdaTest.lambda$null$0(arg0, arg1)/*synthetic*/
+LambdaTest.lambda$static$0(arg0, arg1)/*synthetic*/
 static interface LambdaTest$I -- inner
 LambdaTest$I.m(x)
--- a/test/tools/javac/T5024091/T5024091.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/tools/javac/T5024091/T5024091.java	Thu Jan 28 15:42:06 2016 -0800
@@ -3,7 +3,7 @@
  * @bug     5024091
  * @summary AssertionError shouldn't be thrown
  * @author  Wei Tao
- * @compile/fail/ref=T5024091.out -XDfailcomplete=java.lang.StringBuilder -XDdev -XDrawDiagnostics T5024091.java
+ * @compile/fail/ref=T5024091.out -XDfailcomplete=java.lang.StringBuilder -XDdev -XDrawDiagnostics -XDstringConcat=inline T5024091.java
  */
 
 public class T5024091 {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/TestIndyStringConcat.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @summary Test that StringConcat is working for JDK >= 9
+ * @compile -source 6 -target 6 TestIndyStringConcat.java
+ * @run main TestIndyStringConcat false
+ * @clean TestIndyStringConcat*
+ * @compile -source 7 -target 7 TestIndyStringConcat.java
+ * @run main TestIndyStringConcat false
+ * @clean TestIndyStringConcat*
+ * @compile -source 8 -target 8 TestIndyStringConcat.java
+ * @run main TestIndyStringConcat false
+ * @clean TestIndyStringConcat*
+ * @compile -XDstringConcat=inline -source 9 -target 9 TestIndyStringConcat.java
+ * @run main TestIndyStringConcat false
+ * @clean TestIndyStringConcat*
+ * @compile -XDstringConcat=indy -source 9 -target 9 TestIndyStringConcat.java
+ * @run main TestIndyStringConcat true
+ * @clean TestIndyStringConcat*
+ * @compile -XDstringConcat=indyWithConstants -source 9 -target 9 TestIndyStringConcat.java
+ * @run main TestIndyStringConcat true
+ */
+public class TestIndyStringConcat {
+
+    private static class MyObject {
+        public String toString() {
+            throw new RuntimeException("Boyyaa");
+        }
+    }
+
+    class Inner { }
+
+    public static void main(String[] args) {
+        boolean useIndyConcat = Boolean.valueOf(args[0]);
+        try {
+            String s = "Foo" + new MyObject();
+        } catch (RuntimeException ex) {
+            boolean indifiedStringConcat = false;
+            ex.printStackTrace();
+            for (StackTraceElement e : ex.getStackTrace()) {
+                if (e.getClassName().startsWith("java.lang.String$Concat") &&
+                        e.getMethodName().equals("concat")) {
+                    indifiedStringConcat = true;
+                    break;
+                }
+            }
+            if (indifiedStringConcat != useIndyConcat) {
+                throw new AssertionError();
+            }
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/typeAnnotations/classfile/NestedLambdasCastedTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 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.
+ *
+ * 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.
+ */
+
+/*
+ * @test
+ * @bug 8144168 8148432
+ * @summary No type annotations generated for nested lambdas
+ * @library /tools/lib
+ * @modules jdk.compiler/com.sun.tools.javac.api
+ *          jdk.compiler/com.sun.tools.javac.file
+ *          jdk.compiler/com.sun.tools.javac.main
+ * @build ToolBox
+ * @run compile -g NestedLambdasCastedTest.java
+ * @run main NestedLambdasCastedTest
+ */
+
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Target;
+
+public class NestedLambdasCastedTest {
+
+    // Expected output can't be directly encoded into NestedLambdasCastedTest !!!
+    static class ExpectedOutputHolder {
+        public String [] outputs = {
+                      "public static strictfp void main(java.lang.String[])",
+                      "private static strictfp void lambda$main$3();",
+                      "private static strictfp void lambda$main$2();",
+                      "private static strictfp void lambda$main$1();",
+                      "private static strictfp void lambda$main$0();",
+                      "0: #63(#64=s#65): CAST, offset=5, type_index=0",
+                      "0: #63(#64=s#70): CAST, offset=5, type_index=0",
+                      "0: #63(#64=s#73): CAST, offset=5, type_index=0",
+                      "0: #63(#64=s#76): CAST, offset=5, type_index=0"
+        };
+    }
+
+    @Target(ElementType.TYPE_USE)
+    public @interface TA {
+        String value() default "";
+    };
+
+    public static strictfp void main(String args[]) throws Exception {
+        Runnable one = (@TA("1") Runnable) () -> {
+            Runnable two = (@TA("2") Runnable) () -> {
+                Runnable three = (@TA("3") Runnable) () -> {
+                    Runnable four = (@TA("4") Runnable) () -> {
+                    };
+                };
+            };
+        };
+        ToolBox tb = new ToolBox();
+        Path classPath = Paths.get(ToolBox.testClasses, "NestedLambdasCastedTest.class");
+        String javapOut = tb.new JavapTask()
+                .options("-v", "-p")
+                .classes(classPath.toString())
+                .run()
+                .getOutput(ToolBox.OutputKind.DIRECT);
+        ExpectedOutputHolder holder = new ExpectedOutputHolder();
+        for (String s : holder.outputs) {
+            if (!javapOut.contains(s))
+                throw new AssertionError("Expected type annotation on LOCAL_VARIABLE missing");
+        }
+    }
+}
--- a/test/tools/javac/diags/CheckResourceKeys.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/tools/javac/diags/CheckResourceKeys.java	Thu Jan 28 15:42:06 2016 -0800
@@ -261,7 +261,7 @@
                 if (cs.matches(".*\\.java"))
                     continue;
                 // ignore package and class names
-                if (cs.matches("(com|java|javax|sun)\\.[A-Za-z.]+"))
+                if (cs.matches("(com|java|javax|jdk|sun)\\.[A-Za-z.]+"))
                     continue;
                 // explicit known exceptions
                 if (noResourceRequired.contains(cs))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/8148213/T8148213.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,30 @@
+/*
+ * @test /nodynamiccopyright/
+ * @bug 8148213
+ * @summary Regression: nested unchecked call does not trigger erasure of return type
+ *
+ * @compile/fail/ref=T8148213.out -Werror -Xlint:unchecked -XDrawDiagnostics T8148213.java
+ */
+
+abstract class T8148213 {
+
+    interface R<E> { }
+
+    interface Q<T> { }
+
+    interface T {
+        <E> Q<E> n(R<E> r);
+    }
+
+    abstract <T> T isA(Class<T> t);
+
+    abstract <T> S<T> w(T t);
+
+    interface S<T> {
+        S<T> t(T value);
+    }
+
+    void f(T t, Q<String> q) {
+        w(t.n(isA(R.class))).t(q);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/inference/8148213/T8148213.out	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,5 @@
+T8148213.java:28:14: compiler.warn.unchecked.meth.invocation.applied: kindname.method, n, T8148213.R<E>, T8148213.R, kindname.interface, T8148213.T
+T8148213.java:28:18: compiler.warn.prob.found.req: (compiler.misc.unchecked.assign), T8148213.R, T8148213.R<E>
+- compiler.err.warnings.and.werror
+1 error
+2 warnings
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/lambda/8148128/T8148128.java	Thu Jan 28 15:42:06 2016 -0800
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 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.
+ */
+
+/*
+ * @test
+ * @bug 8148128
+ * @summary Regression: array constructor references marked as inexact
+ * @compile T8148128.java
+ */
+import java.util.*;
+import java.util.stream.*;
+
+class T8148128 {
+    public static void doSomething (List<String>[] stuff) {
+        System.out.println("List Stuff");
+    }
+
+    public static void doSomething (Set<String>[] stuff) {
+        System.out.println("Set Stuff");
+    }
+
+    public static void main (String[] args) {
+        doSomething(Stream.of("Foo", "Bar").map(Collections::singletonList).toArray(List[]::new));
+    }
+}
--- a/test/tools/javadoc/api/basic/JavadocTaskImplTest.java	Thu Jan 28 09:43:12 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
- * Copyright (c) 2012, 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.
- *
- * 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.
- */
-
-/*
- * @test
- * @bug 6493690
- * @summary javadoc should have a javax.tools.Tool service provider
- * @modules jdk.compiler/com.sun.tools.javac.file
- *          jdk.compiler/com.sun.tools.javac.util
- *          jdk.javadoc/com.sun.tools.javadoc.api
- * @build APITest
- * @run main JavadocTaskImplTest
- */
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.concurrent.Callable;
-
-import javax.tools.DocumentationTool;
-import javax.tools.DocumentationTool.DocumentationTask;
-import javax.tools.JavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.ToolProvider;
-
-import com.sun.tools.javac.file.JavacFileManager;
-import com.sun.tools.javac.util.Context;
-import com.sun.tools.javadoc.Messager;
-import com.sun.tools.javadoc.api.JavadocTaskImpl;
-
-/**
- *  Misc tests for JavacTaskImpl.
- */
-public class JavadocTaskImplTest extends APITest {
-    public static void main(String... args) throws Exception {
-        new JavadocTaskImplTest().run();
-    }
-
-    @Test
-    public void testRawCall() throws Exception {
-        JavaFileObject srcFile = createSimpleJavaFileObject();
-        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
-        try (StandardJavaFileManager fm = tool.getStandardFileManager(null, null, null)) {
-            File outDir = getOutDir();
-            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
-            Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
-
-            @SuppressWarnings("rawtypes")
-            Callable t = tool.getTask(null, fm, null, null, null, files);
-
-            if (t.call() == Boolean.TRUE) {
-                System.err.println("task succeeded");
-            } else {
-                throw new Exception("task failed");
-            }
-        }
-    }
-
-    @Test
-    public void testDirectAccess1() throws Exception {
-        JavaFileObject srcFile = createSimpleJavaFileObject();
-        Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
-        Context c = new Context();
-        Messager.preRegister(c, "javadoc");
-        try (StandardJavaFileManager fm = new JavacFileManager(c, true, null)) {
-            File outDir = getOutDir();
-            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
-            DocumentationTask t = new JavadocTaskImpl(c, null, null, files);
-            if (t.call()) {
-                System.err.println("task succeeded");
-            } else {
-                throw new Exception("task failed");
-            }
-        }
-    }
-
-    @Test
-    public void testDirectAccess2() throws Exception {
-        JavaFileObject srcFile = null; // error, provokes NPE
-        Iterable<? extends JavaFileObject> files = Arrays.asList(srcFile);
-        Context c = new Context();
-        Messager.preRegister(c, "javadoc");
-        try (StandardJavaFileManager fm = new JavacFileManager(c, true, null)) {
-            File outDir = getOutDir();
-            fm.setLocation(DocumentationTool.Location.DOCUMENTATION_OUTPUT, Arrays.asList(outDir));
-            try {
-                DocumentationTask t = new JavadocTaskImpl(c, null, null, files);;
-                error("getTask succeeded, no exception thrown");
-            } catch (NullPointerException e) {
-                System.err.println("exception caught as expected: " + e);
-            }
-        }
-    }
-}
-
--- a/test/tools/javadoc/api/basic/RunTest.java	Thu Jan 28 09:43:12 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-/*
- * Copyright (c) 2012, 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.
- *
- * 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.
- */
-
-/*
- * @test
- * @bug 6493690 8007490
- * @summary javadoc should have a javax.tools.Tool service provider
- * @modules java.compiler
- *          jdk.compiler
- * @build APITest
- * @run main RunTest
- */
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.PrintStream;
-import javax.tools.DocumentationTool;
-import javax.tools.ToolProvider;
-
-/**
- * Tests for DocumentationTool.run method.
- */
-public class RunTest extends APITest {
-    public static void main(String... args) throws Exception {
-        new RunTest().run();
-    }
-
-    /**
-     * Verify that run method can be invoked.
-     */
-    @Test
-    public void testRunOK() throws Exception {
-        File testSrc = new File(System.getProperty("test.src"));
-        File srcFile = new File(testSrc, "pkg/C.java");
-        File outDir = getOutDir();
-        String[] args = { "-d", outDir.getPath(), srcFile.getPath() };
-
-        ByteArrayOutputStream stdout = new ByteArrayOutputStream();
-        ByteArrayOutputStream stderr = new ByteArrayOutputStream();
-        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
-        int rc = tool.run(null, stdout, stderr, args);
-        System.err.println("stdout >>" + stdout.toString() + "<<");
-        System.err.println("stderr >>" + stderr.toString() + "<<");
-
-        if (rc == 0) {
-            System.err.println("call succeeded");
-            checkFiles(outDir, standardExpectFiles);
-            String out = stdout.toString();
-            for (String f: standardExpectFiles) {
-                String f1 = f.replace('/', File.separatorChar);
-                if (f1.endsWith(".html") && !out.contains(f1))
-                    error("expected string not found: " + f1);
-            }
-        } else {
-            error("call failed");
-        }
-    }
-
-    /**
-     * Verify that run method can be invoked.
-     */
-    @Test
-    public void testRunFail() throws Exception {
-        File outDir = getOutDir();
-        String badfile = "badfile.java";
-        String[] args = { "-d", outDir.getPath(), badfile };
-
-        ByteArrayOutputStream stdout = new ByteArrayOutputStream();
-        ByteArrayOutputStream stderr = new ByteArrayOutputStream();
-        DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
-        int rc = tool.run(null, stdout, stderr, args);
-        System.err.println("stdout >>" + stdout.toString() + "<<");
-        System.err.println("stderr >>" + stderr.toString() + "<<");
-
-        if (rc == 0) {
-            error("call succeeded unexpectedly");
-        } else {
-            String err = stderr.toString();
-            if (err.contains(badfile))
-                System.err.println("call failed as expected");
-            else
-                error("expected diagnostic not found");
-        }
-    }
-
-    /**
-     * Verify that null args are accepted.
-     */
-    @Test
-    public void testNullArgs() throws Exception {
-        File testSrc = new File(System.getProperty("test.src"));
-        File srcFile = new File(testSrc, "pkg/C.java");
-        File outDir = getOutDir();
-        String[] args = { "-d", outDir.getPath(), srcFile.getPath() };
-
-        ByteArrayOutputStream stdout = new ByteArrayOutputStream();
-        PrintStream prevStdout = System.out;
-        System.setOut(new PrintStream(stdout));
-
-        ByteArrayOutputStream stderr = new ByteArrayOutputStream();
-        PrintStream prevStderr = System.err;
-        System.setErr(new PrintStream(stderr));
-
-        int rc ;
-        try {
-            DocumentationTool tool = ToolProvider.getSystemDocumentationTool();
-            rc = tool.run(null, null, null, args);
-        } finally {
-            System.setOut(prevStdout);
-            System.setErr(prevStderr);
-        }
-
-        System.err.println("stdout >>" + stdout.toString() + "<<");
-        System.err.println("stderr >>" + stderr.toString() + "<<");
-
-        if (rc == 0) {
-            System.err.println("call succeeded");
-            checkFiles(outDir, standardExpectFiles);
-            String out = stdout.toString();
-            for (String f: standardExpectFiles) {
-                String f1 = f.replace('/', File.separatorChar);
-                if (f1.endsWith(".html") && !out.contains(f1))
-                    error("expected string not found: " + f1);
-            }
-        } else {
-            error("call failed");
-        }
-    }
-}
-
--- a/test/tools/javadoc/api/basic/TagletPathTest.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/tools/javadoc/api/basic/TagletPathTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -81,7 +81,7 @@
             Iterable<String> options = Arrays.asList("-taglet", "UnderlineTaglet");
             StringWriter sw = new StringWriter();
             PrintWriter pw = new PrintWriter(sw);
-            DocumentationTask t = tool.getTask(pw, fm, null, null, options, files);
+            DocumentationTask t = tool.getTask(pw, fm, null, com.sun.tools.doclets.standard.Standard.class, options, files);
             boolean ok = t.call();
             String out = sw.toString();
             System.err.println(">>" + out + "<<");
--- a/test/tools/javadoc/doclint/DocLintTest.java	Thu Jan 28 09:43:12 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,302 +0,0 @@
-/*
- * Copyright (c) 2012, 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.
- *
- * 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.
- */
-
-/*
- * @test
- * @bug 8004834 8007610 8129909
- * @summary Add doclint support into javadoc
- * @modules jdk.compiler/com.sun.tools.javac.main
- */
-
-import java.io.File;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.URI;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import javax.tools.Diagnostic;
-import javax.tools.DocumentationTool;
-import javax.tools.DocumentationTool.DocumentationTask;
-import javax.tools.JavaFileObject;
-import javax.tools.SimpleJavaFileObject;
-import javax.tools.StandardJavaFileManager;
-import javax.tools.StandardLocation;
-import javax.tools.ToolProvider;
-import static javax.tools.Diagnostic.Kind.*;
-
-import com.sun.tools.javac.main.Main;
-
-public class DocLintTest {
-    public static void main(String... args) throws Exception {
-        new DocLintTest().run();
-    }
-
-    DocumentationTool javadoc;
-    StandardJavaFileManager fm;
-    Iterable<? extends JavaFileObject> files;
-
-    final String code =
-        /* 01 */    "/** Class comment. */\n" +
-        /* 02 */    "public class Test {\n" +
-        /* 03 */    "    /** Method comment. */\n" +
-        /* 04 */    "    public void method() { }\n" +
-        /* 05 */    "\n" +
-        /* 06 */    "    /** Syntax < error. */\n" +
-        /* 07 */    "    private void syntaxError() { }\n" +
-        /* 08 */    "\n" +
-        /* 09 */    "    /** @see DoesNotExist */\n" +
-        /* 10 */    "    protected void referenceError() { }\n" +
-        /* 11 */    "\n" +
-        /* 12 */    "    /** @return */\n" +
-        /* 13 */    "    public int emptyReturn() { return 0; }\n" +
-        /* 14 */    "}\n";
-
-    final String p1Code =
-        /* 01 */    "package p1;\n" +
-        /* 02 */    "public class P1Test {\n" +
-        /* 03 */    "    /** Syntax < error. */\n" +
-        /* 04 */    "    public void method() { }\n" +
-        /* 05 */    "}\n";
-
-    final String p2Code =
-        /* 01 */    "package p2;\n" +
-        /* 02 */    "public class P2Test {\n" +
-        /* 03 */    "    /** Syntax < error. */\n" +
-        /* 04 */    "    public void method() { }\n" +
-        /* 05 */    "}\n";
-
-    private final String rawDiags = "-XDrawDiagnostics";
-
-    private enum Message {
-        // doclint messages
-        DL_ERR6(ERROR, "Test.java:6:16: compiler.err.proc.messager: malformed HTML"),
-        DL_ERR9(ERROR, "Test.java:9:14: compiler.err.proc.messager: reference not found"),
-        DL_WRN12(WARNING, "Test.java:12:9: compiler.warn.proc.messager: no description for @return"),
-
-        DL_ERR_P1TEST(ERROR, "P1Test.java:3:16: compiler.err.proc.messager: malformed HTML"),
-        DL_ERR_P2TEST(ERROR, "P2Test.java:3:16: compiler.err.proc.messager: malformed HTML"),
-
-        // doclint messages when -XDrawDiagnostics is not in effect
-        DL_ERR9A(ERROR, "Test.java:9: error: reference not found"),
-        DL_WRN12A(WARNING, "Test.java:12: warning: no description for @return"),
-
-        // javadoc messages about bad content: these should only appear when doclint is disabled
-        JD_WRN10(WARNING, "Test.java:10: warning - Tag @see: reference not found: DoesNotExist"),
-        JD_WRN13(WARNING, "Test.java:13: warning - @return tag has no arguments."),
-
-        // javadoc messages for bad options
-        OPT_BADARG(ERROR, "javadoc: error - Invalid argument for -Xdoclint option"),
-        OPT_BADQUAL(ERROR, "javadoc: error - Access qualifiers not permitted for -Xdoclint arguments"),
-        OPT_BADPACKAGEARG(ERROR, "javadoc: error - Invalid argument for -Xdoclint/package option");
-
-        final Diagnostic.Kind kind;
-        final String text;
-
-        static Message get(String text) {
-            for (Message m: values()) {
-                if (m.text.equals(text))
-                    return m;
-            }
-            return null;
-        }
-
-        Message(Diagnostic.Kind kind, String text) {
-            this.kind = kind;
-            this.text = text;
-        }
-
-        @Override
-        public String toString() {
-            return "[" + kind + ",\"" + text + "\"]";
-        }
-    }
-
-    void run() throws Exception {
-        javadoc = ToolProvider.getSystemDocumentationTool();
-        fm = javadoc.getStandardFileManager(null, null, null);
-        try {
-            fm.setLocation(StandardLocation.CLASS_OUTPUT, Arrays.asList(new File(".")));
-            files = Arrays.asList(new TestJFO("Test.java", code));
-
-            test(Collections.<String>emptyList(),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR9A, Message.DL_WRN12A));
-
-            test(Arrays.asList(rawDiags),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
-
-            test(Arrays.asList("-Xdoclint:none"),
-                    Main.Result.OK,
-                    EnumSet.of(Message.JD_WRN10, Message.JD_WRN13));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR9, Message.DL_WRN12));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint:all/public"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.OPT_BADQUAL));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint:all", "-public"),
-                    Main.Result.OK,
-                    EnumSet.of(Message.DL_WRN12));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint:syntax"),
-                    Main.Result.OK,
-                    EnumSet.of(Message.DL_WRN12));
-
-            test(Arrays.asList(rawDiags, "-private"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR6, Message.DL_ERR9, Message.DL_WRN12));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint:syntax", "-private"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR6, Message.DL_WRN12));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint:reference"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR9));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint:badarg"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.OPT_BADARG));
-
-            files = Arrays.asList(new TestJFO("p1/P1Test.java", p1Code),
-                                  new TestJFO("p2/P2Test.java", p2Code));
-
-            test(Arrays.asList(rawDiags),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR_P1TEST, Message.DL_ERR_P2TEST));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint/package:p1"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.DL_ERR_P1TEST));
-
-            test(Arrays.asList(rawDiags, "-Xdoclint/package:*p"),
-                    Main.Result.ERROR,
-                    EnumSet.of(Message.OPT_BADPACKAGEARG));
-
-            if (errors > 0)
-                throw new Exception(errors + " errors occurred");
-        } finally {
-            fm.close();
-        }
-    }
-
-    void test(List<String> opts, Main.Result expectResult, Set<Message> expectMessages) {
-        System.err.println("test: " + opts);
-        StringWriter sw = new StringWriter();
-        PrintWriter pw = new PrintWriter(sw);
-        try {
-            DocumentationTask t = javadoc.getTask(pw, fm, null, null, opts, files);
-            boolean ok = t.call();
-            pw.close();
-            String out = sw.toString().replaceAll("[\r\n]+", "\n");
-            if (!out.isEmpty())
-                System.err.println(out);
-            if (ok && expectResult != Main.Result.OK) {
-                error("Compilation succeeded unexpectedly");
-            } else if (!ok && expectResult != Main.Result.ERROR) {
-                error("Compilation failed unexpectedly");
-            } else
-                check(out, expectMessages);
-        } catch (IllegalArgumentException e) {
-            System.err.println(e);
-            String expectOut = expectMessages.iterator().next().text;
-            if (expectResult != Main.Result.CMDERR)
-                error("unexpected exception caught");
-            else if (!e.getMessage().equals(expectOut)) {
-                error("unexpected exception message: "
-                        + e.getMessage()
-                        + " expected: " + expectOut);
-            }
-        }
-
-//        if (errors > 0)
-//            throw new Error("stop");
-    }
-
-    private void check(String out, Set<Message> expect) {
-        Pattern ignore = Pattern.compile("^(Building|Constructing|Generating|Loading|Standard|Starting| ) .*");
-        Pattern stats = Pattern.compile("^([1-9]+) (error|warning)(s?)");
-        Set<Message> found = EnumSet.noneOf(Message.class);
-        int e = 0, w = 0;
-        for (String line: out.split("[\r\n]+")) {
-            if (ignore.matcher(line).matches())
-                continue;
-
-            Matcher s = stats.matcher(line);
-            if (s.matches()) {
-                int i = Integer.valueOf(s.group(1));
-                if (s.group(2).equals("error"))
-                    e++;
-                else
-                    w++;
-                continue;
-            }
-
-            Message m = Message.get(line);
-            if (m == null)
-                error("Unexpected line: " + line);
-            else
-                found.add(m);
-        }
-        for (Message m: expect) {
-            if (!found.contains(m))
-                error("expected message not found: " + m.text);
-        }
-        for (Message m: found) {
-            if (!expect.contains(m))
-                error("unexpected message found: " + m.text);
-        }
-    }
-
-    void error(String msg) {
-        System.err.println("Error: " + msg);
-        errors++;
-    }
-
-    int errors;
-
-    class TestJFO extends SimpleJavaFileObject {
-
-        private final String content;
-
-        public TestJFO(String fileName, String content) {
-            super(URI.create(fileName), JavaFileObject.Kind.SOURCE);
-            this.content = content;
-        }
-
-        @Override
-        public CharSequence getCharContent(boolean ignoreEncoding) {
-            return content;
-        }
-    };
-}
--- a/test/tools/javadoc/doclint/ImplicitHeadersTest.java	Thu Jan 28 09:43:12 2016 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) 2013, 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.
- *
- * 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.
- */
-
-/*
- * @test
- * @bug 8006346
- * @summary doclint should make allowance for headers generated by standard doclet
- * @modules jdk.javadoc
- */
-
-import java.io.File;
-
-/**
- * <h3> Header </h3>
- */
-public class ImplicitHeadersTest {
-    public static void main(String... args) {
-        File testSrc = new File(System.getProperty("test.src"));
-        File testFile = new File(testSrc, ImplicitHeadersTest.class.getSimpleName() + ".java");
-        String[] javadocArgs = { "-d", "out", testFile.getPath() };
-        int rc = com.sun.tools.javadoc.Main.execute(javadocArgs);
-        if (rc != 0)
-            throw new Error("unexpected exit: rc=" + rc);
-    }
-}
-
--- a/test/tools/javadoc/sampleapi/SampleApiTest.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/tools/javadoc/sampleapi/SampleApiTest.java	Thu Jan 28 15:42:06 2016 -0800
@@ -35,7 +35,6 @@
  */
 
 import com.sun.tools.javadoc.*;
-import java.nio.file.Paths;
 
 public class SampleApiTest {
 
--- a/test/tools/javap/T6868539.java	Thu Jan 28 09:43:12 2016 -0800
+++ b/test/tools/javap/T6868539.java	Thu Jan 28 15:42:06 2016 -0800
@@ -58,10 +58,12 @@
             throw new Error(errors + " found.");
     }
 
+    String notFound = " not found";
+
     void verify(String output, String... expects) {
         for (String expect: expects) {
             if (!output.matches("(?s).*" + expect + ".*"))
-                error(expect + " not found");
+                error(expect + notFound);
         }
     }