changeset 14269:f62d878bd50f

Merge
author lana
date Thu, 25 Oct 2012 20:33:49 -0700
parents a38177cd9f4d 27d36231d705
children c9ce28f01a29 c890ac2d9641
files
diffstat 281 files changed, 2331 insertions(+), 3369 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/src/share/classes/com/sun/javadoc/Tag.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/javadoc/Tag.java	Thu Oct 25 20:33:49 2012 -0700
@@ -70,14 +70,14 @@
      * than one tag of a given kind:
      * <p>
      * <table border="1" cellpadding="4" cellspacing="0">
-     * <tr><th><tt> kind()  </th>  <th><tt> name()      </th></tr>
-     * <tr><td><tt> @throws </td>  <td><tt> @throws     </td></tr>
-     * <tr><td><tt> @throws </td>  <td><tt> @exception  </td></tr>
-     * <tr><td><tt> @see    </td>  <td><tt> @see        </td></tr>
-     * <tr><td><tt> @see    </td>  <td><tt> @link       </td></tr>
-     * <tr><td><tt> @see    </td>  <td><tt> @linkplain  </td></tr>
-     * <tr><td><tt> @serial </td>  <td><tt> @serial     </td></tr>
-     * <tr><td><tt> @serial </td>  <td><tt> @serialData </td></tr>
+     * <tr><th><tt> kind()  </tt></th>  <th><tt> name()      </tt></th></tr>
+     * <tr><td><tt> @throws </tt></td>  <td><tt> @throws     </tt></td></tr>
+     * <tr><td><tt> @throws </tt></td>  <td><tt> @exception  </tt></td></tr>
+     * <tr><td><tt> @see    </tt></td>  <td><tt> @see        </tt></td></tr>
+     * <tr><td><tt> @see    </tt></td>  <td><tt> @link       </tt></td></tr>
+     * <tr><td><tt> @see    </tt></td>  <td><tt> @linkplain  </tt></td></tr>
+     * <tr><td><tt> @serial </tt></td>  <td><tt> @serial     </tt></td></tr>
+     * <tr><td><tt> @serial </tt></td>  <td><tt> @serialData </tt></td></tr>
      * </table>
      */
     String kind();
--- a/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -27,7 +27,6 @@
 
 import java.util.List;
 import javax.tools.JavaFileObject;
-import com.sun.source.tree.LineMap;
 
 /**
  * Represents the abstract syntax tree for compilation units (source
--- a/langtools/src/share/classes/com/sun/source/tree/Scope.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/source/tree/Scope.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -25,11 +25,9 @@
 
 package com.sun.source.tree;
 
-import com.sun.source.tree.Tree;
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
-import javax.lang.model.type.DeclaredType;
 
 /**
  * Interface for determining locally available program elements, such as
--- a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -25,10 +25,11 @@
 
 package com.sun.source.util;
 
-import com.sun.source.tree.CompilationUnitTree;
 import javax.lang.model.element.TypeElement;
 import javax.tools.JavaFileObject;
 
+import com.sun.source.tree.CompilationUnitTree;
+
 /**
  * Provides details about work that has been done by the JDK Java Compiler, javac.
  *
--- a/langtools/src/share/classes/com/sun/source/util/TreePath.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/source/util/TreePath.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -25,8 +25,9 @@
 
 package com.sun.source.util;
 
+import java.util.Iterator;
+
 import com.sun.source.tree.*;
-import java.util.Iterator;
 
 /**
  * A path of tree nodes, typically used to represent the sequence of ancestor
--- a/langtools/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /**
- * See JVMS <TBD>
- * http://cr.openjdk.java.net/~jrose/pres/indy-javadoc-mlvm/
+ * See JVMS 4.7.21
+ * http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.21
  *
  *  <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.
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -25,6 +25,8 @@
 
 package com.sun.tools.classfile;
 
+import java.util.Map;
+
 import com.sun.tools.classfile.ConstantPool.CONSTANT_Class_info;
 import com.sun.tools.classfile.ConstantPool.CONSTANT_Double_info;
 import com.sun.tools.classfile.ConstantPool.CONSTANT_Fieldref_info;
@@ -40,7 +42,6 @@
 import com.sun.tools.classfile.ConstantPool.CONSTANT_String_info;
 import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info;
 import com.sun.tools.classfile.ConstantPool.CPInfo;
-import java.util.Map;
 
 /**
  * Rewrites a class file using a map of translations.
--- a/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -33,8 +33,8 @@
 import java.util.Set;
 import java.util.regex.Pattern;
 
+import com.sun.tools.classfile.Dependency.Filter;
 import com.sun.tools.classfile.Dependency.Finder;
-import com.sun.tools.classfile.Dependency.Filter;
 import com.sun.tools.classfile.Dependency.Location;
 import com.sun.tools.classfile.Type.ArrayType;
 import com.sun.tools.classfile.Type.ClassSigType;
@@ -43,7 +43,6 @@
 import com.sun.tools.classfile.Type.SimpleType;
 import com.sun.tools.classfile.Type.TypeParamType;
 import com.sun.tools.classfile.Type.WildcardType;
-
 import static com.sun.tools.classfile.ConstantPool.*;
 
 /**
@@ -99,7 +98,7 @@
          * Get the ClassFile object for a specified class.
          * @param className the name of the class to be returned.
          * @return the ClassFile for the given class
-         * @throws Dependencies#ClassFileNotFoundException if the classfile cannot be
+         * @throws Dependencies.ClassFileNotFoundException if the classfile cannot be
          *   found
          */
         public ClassFile getClassFile(String className)
--- a/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2007, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 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
@@ -114,7 +114,7 @@
     private String parse(String desc, int start, int end)
             throws InvalidDescriptor {
         int p = start;
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         int dims = 0;
         count = 0;
 
--- a/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -103,7 +103,7 @@
         R visitConstantPoolRefAndValue(Instruction instr, int index, int value, P p);
         /** See {@link Kind#LOCAL}. */
         R visitLocal(Instruction instr, int index, P p);
-        /** See {@link Kind#LOCAL_UBYTE}. */
+        /** See {@link Kind#LOCAL_BYTE}. */
         R visitLocalAndValue(Instruction instr, int index, int value, P p);
         /** See {@link Kind#DYNAMIC}. */
         R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, P p);
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -33,6 +33,11 @@
 /**
  * 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)
@@ -81,7 +86,7 @@
      * Add the summary link for the member.
      *
      * @param context the id of the context where the link will be printed
-     * @param classDoc the classDoc that we should link to
+     * @param cd the classDoc that we should link to
      * @param member the member being linked to
      * @param tdSummary the content tree to which the link will be added
      */
@@ -101,7 +106,7 @@
     /**
      * Add the inherited summary link for the member.
      *
-     * @param classDoc the classDoc that we should link to
+     * @param cd the classDoc that we should link to
      * @param member the member being linked to
      * @param linksTree the content tree to which the link will be added
      */
@@ -138,7 +143,7 @@
      * Add all the parameters for the executable member.
      *
      * @param member the member to write parameters for.
-     * @param tree the content tree to which the parameters information will be added.
+     * @param htmltree the content tree to which the parameters information will be added.
      */
     protected void addParameters(ExecutableMemberDoc member, Content htmltree) {
         addParameters(member, true, htmltree);
@@ -149,7 +154,7 @@
      *
      * @param member the member to write parameters for.
      * @param includeAnnotations true if annotation information needs to be added.
-     * @param tree the content tree to which the parameters information will be added.
+     * @param htmltree the content tree to which the parameters information will be added.
      */
     protected void addParameters(ExecutableMemberDoc member,
             boolean includeAnnotations, Content htmltree) {
@@ -276,7 +281,7 @@
      * @return the 1.4.x style anchor for the ExecutableMemberDoc.
      */
     protected String getErasureAnchor(ExecutableMemberDoc emd) {
-        StringBuffer buf = new StringBuffer(emd.name() + "(");
+        StringBuilder buf = new StringBuilder(emd.name() + "(");
         Parameter[] params = emd.parameters();
         boolean foundTypeVariable = false;
         for (int i = 0; i < params.length; i++) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -29,9 +29,9 @@
 import java.util.*;
 
 import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * Generate Index for all the Member Names with Indexing in
@@ -39,6 +39,11 @@
  * {@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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -25,17 +25,23 @@
 
 package com.sun.tools.doclets.formats.html;
 
+import java.lang.reflect.Modifier;
 import java.util.*;
-import java.lang.reflect.Modifier;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.taglets.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
 
 /**
  * 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)
@@ -181,23 +187,6 @@
      */
     protected abstract void addNavDetailLink(boolean link, Content liNav);
 
-    /***  ***/
-
-    protected void print(String str) {
-        writer.print(str);
-        writer.displayLength += str.length();
-    }
-
-    protected void print(char ch) {
-        writer.print(ch);
-        writer.displayLength++;
-    }
-
-    protected void strong(String str) {
-        writer.strong(str);
-        writer.displayLength += str.length();
-    }
-
     /**
      * Add the member name to the content tree and modifies the display length.
      *
@@ -257,7 +246,7 @@
         if (len <= 0) {
             return "";
         }
-        StringBuffer sb = new StringBuffer(len);
+        StringBuilder sb = new StringBuilder(len);
         for(int i = 0; i < len; i++) {
             sb.append(' ');
     }
@@ -304,23 +293,6 @@
         tdSummaryType.addContent(code);
     }
 
-    private void printModifier(ProgramElementDoc member) {
-        if (member.isProtected()) {
-            print("protected ");
-        } else if (member.isPrivate()) {
-            print("private ");
-        } else if (!member.isPublic()) { // Package private
-            writer.printText("doclet.Package_private");
-            print(" ");
-        }
-        if (member.isMethod() && ((MethodDoc)member).isAbstract()) {
-            print("abstract ");
-        }
-        if (member.isStatic()) {
-            print("static");
-        }
-    }
-
     /**
      * Add the modifier for the member.
      *
@@ -364,7 +336,7 @@
      * Add the comment for the given member.
      *
      * @param member the member being documented.
-     * @param contentTree the content tree to which the comment will be added.
+     * @param htmltree the content tree to which the comment will be added.
      */
     protected void addComment(ProgramElementDoc member, Content htmltree) {
         if (member.inlineTags().length > 0) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -36,6 +36,11 @@
  * 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -27,10 +27,11 @@
 
 import java.io.*;
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.javadoc.*;
 
 /**
  * Abstract class to print the class hierarchy page for all the Classes. This
@@ -38,6 +39,11 @@
  * 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 {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -29,9 +29,9 @@
 import java.util.*;
 
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * Generate the file with list of all the classes in this run. This page will be
@@ -39,6 +39,11 @@
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -34,6 +34,11 @@
 /**
  * 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -34,6 +34,11 @@
 /**
  * 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,14 +25,22 @@
 
 package com.sun.tools.doclets.formats.html;
 
+import java.io.IOException;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.builders.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.builders.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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 com.sun.javadoc.ClassDoc
  * @see java.util.Collections
  * @see java.util.List
@@ -187,7 +195,7 @@
     /**
      * {@inheritDoc}
      */
-    public void printDocument(Content contentTree) {
+    public void printDocument(Content contentTree) throws IOException {
         printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType),
                 true, contentTree);
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -27,14 +27,20 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * Generate class usage information.
  *
+ *  <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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -25,17 +25,24 @@
 
 package com.sun.tools.doclets.formats.html;
 
+import java.io.IOException;
 import java.util.*;
 
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.internal.toolkit.builders.*;
 import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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 com.sun.javadoc.ClassDoc
  * @see java.util.Collections
  * @see java.util.List
@@ -196,7 +203,7 @@
     /**
      * {@inheritDoc}
      */
-    public void printDocument(Content contentTree) {
+    public void printDocument(Content contentTree) throws IOException {
         printHtmlDocument(configuration.metakeywords.getMetaKeywords(classDoc),
                 true, contentTree);
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -25,14 +25,14 @@
 
 package com.sun.tools.doclets.formats.html;
 
+import java.io.*;
+import java.net.*;
+import java.util.*;
+
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
-import com.sun.javadoc.*;
-import java.util.*;
-import java.io.*;
-import java.net.*;
-
 /**
  * Configure the output based on the command line options.
  * <p>
@@ -188,8 +188,8 @@
     // ClassWriter.
 
     /**
-     * Constructor. Initialises resource for the
-     * {@link com.sun.tools.doclets.MessageRetriever}.
+     * Constructor. Initializes resource for the
+     * {@link com.sun.tools.doclets.internal.toolkit.util.MessageRetriever MessageRetriever}.
      */
     private ConfigurationImpl() {
         standardmessage = new MessageRetriever(this,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -27,14 +27,20 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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)
  * @since 1.4
@@ -297,7 +303,7 @@
     /**
      * {@inheritDoc}
      */
-    public void printDocument(Content contentTree) {
+    public void printDocument(Content contentTree) throws IOException {
         printHtmlDocument(null, true, contentTree);
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -36,6 +36,11 @@
 /**
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -26,15 +26,20 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
+
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.DeprecatedAPIListBuilder;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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)
@@ -208,7 +213,7 @@
      *
      * @param builder the deprecated list builder
      * @param type the type of list being documented
-     * @param contentTree the content tree to which the anchor will be added
+     * @param htmlTree the content tree to which the anchor will be added
      */
     private void addAnchor(DeprecatedAPIListBuilder builder, int type, Content htmlTree) {
         if (builder.hasDocumentation(type)) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -35,6 +35,11 @@
 /**
  * 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -35,6 +35,11 @@
 /**
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -26,9 +26,10 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
+
+import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * Generate the documentation in the Html "frame" format in the browser. The
@@ -40,6 +41,11 @@
  * 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 {
@@ -89,7 +95,7 @@
      * Generate the contants in the "index.html" file. Print the frame details
      * as well as warning if browser is not supporting the Html frames.
      */
-    protected void generateFrameFile() {
+    protected void generateFrameFile() throws IOException {
         Content frameset = getFrameDetails();
         if (configuration.windowtitle.length() > 0) {
             printFramesetDocument(configuration.windowtitle, configuration.notimestamp,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,14 +26,20 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
+
+import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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 {
@@ -73,7 +79,7 @@
     /**
      * Generate the help file contents.
      */
-    protected void generateHelpFile() {
+    protected void generateHelpFile() throws IOException {
         String title = configuration.getText("doclet.Window_Help_title");
         Content body = getBody(true, getWindowTitle(title));
         addTop(body);
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -24,17 +24,22 @@
  */
 package com.sun.tools.doclets.formats.html;
 
+import java.io.*;
+import java.util.*;
+
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.builders.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
-import com.sun.javadoc.*;
-import java.util.*;
-import java.io.*;
-
 /**
  * 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
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -32,14 +32,19 @@
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.taglets.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
 
 /**
  * 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>
+ *
  * @since 1.2
  * @author Atul M Dambalkar
  * @author Robert Field
@@ -201,33 +206,6 @@
     }
 
     /**
-     * Print Html Hyper Link, with target frame.  This
-     * link will only appear if page is not in a frame.
-     *
-     * @param link String name of the file.
-     * @param where Position in the file
-     * @param target Name of the target frame.
-     * @param label Tag for the link.
-     * @param strong Whether the label should be strong or not?
-     */
-    public void printNoFramesTargetHyperLink(String link, String where,
-                                               String target, String label,
-                                               boolean strong) {
-        script();
-        println("  <!--");
-        println("  if(window==top) {");
-        println("    document.writeln('"
-            + getHyperLinkString(link, where, label, strong, "", "", target) + "');");
-        println("  }");
-        println("  //-->");
-        scriptEnd();
-        noScript();
-        println("  " + getHyperLinkString(link, where, label, strong, "", "", target));
-        noScriptEnd();
-        println(DocletConstants.NL);
-    }
-
-    /**
      * Get the script to show or hide the All classes link.
      *
      * @param id id of the element to show or hide
@@ -324,14 +302,6 @@
         return new TagletWriterImpl(this, isFirstSentence);
     }
 
-    protected void printTagsInfoHeader() {
-        dl();
-    }
-
-    protected void printTagsInfoFooter() {
-        dlEnd();
-    }
-
     /**
      * Get Package link, with target frame.
      *
@@ -346,66 +316,6 @@
     }
 
     /**
-     * Print the html file header. Also print Html page title and stylesheet
-     * default properties.
-     *
-     * @param title         String window title to go in the &lt;TITLE&gt; tag
-     * @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 boolean true if printing windowtitle script.
-     *             False for files that appear in the left-hand frames.
-     */
-    public void printHtmlHeader(String title, String[] metakeywords,
-            boolean includeScript) {
-        println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 " +
-                    "Transitional//EN\" " +
-                    "\"http://www.w3.org/TR/html4/loose.dtd\">");
-        println("<!--NewPage-->");
-        html();
-        head();
-        if (! configuration.notimestamp) {
-            print("<!-- Generated by javadoc (build " + ConfigurationImpl.BUILD_DATE + ") on ");
-            print(today());
-            println(" -->");
-        }
-        if (configuration.charset.length() > 0) {
-            println("<META http-equiv=\"Content-Type\" content=\"text/html; "
-                        + "charset=" + configuration.charset + "\">");
-        }
-        if ( configuration.windowtitle.length() > 0 ) {
-            title += " (" + configuration.windowtitle  + ")";
-        }
-        title(title);
-        println(title);
-        titleEnd();
-        println("");
-        if (! configuration.notimestamp) {
-                SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
-                println("<META NAME=\"date\" "
-                                    + "CONTENT=\"" + dateFormat.format(new Date()) + "\">");
-        }
-        if ( metakeywords != null ) {
-            for ( int i=0; i < metakeywords.length; i++ ) {
-                println("<META NAME=\"keywords\" "
-                            + "CONTENT=\"" + metakeywords[i] + "\">");
-            }
-        }
-        println("");
-        printStyleSheetProperties();
-        println("");
-        // Don't print windowtitle script for overview-frame, allclasses-frame
-        // and package-frame
-        if (includeScript) {
-            printWinTitleScript(title);
-        }
-        println("");
-        headEnd();
-        println("");
-        body("white", includeScript);
-    }
-
-    /**
      * Generates the HTML document tree and prints it out.
      *
      * @param metakeywords Array of String keywords for META tag. Each element
@@ -416,13 +326,12 @@
      * @param body the body htmltree to be included in the document
      */
     public void printHtmlDocument(String[] metakeywords, boolean includeScript,
-            Content body) {
+            Content body) throws IOException {
         Content htmlDocType = DocType.Transitional();
         Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
         Content head = new HtmlTree(HtmlTag.HEAD);
         if (!configuration.notimestamp) {
-            Content headComment = new Comment("Generated by javadoc (version " +
-                    ConfigurationImpl.BUILD_DATE + ") on " + today());
+            Content headComment = new Comment(getGeneratedByString());
             head.addContent(headComment);
         }
         if (configuration.charset.length() > 0) {
@@ -447,7 +356,7 @@
                 head, body);
         Content htmlDocument = new HtmlDocument(htmlDocType,
                 htmlComment, htmlTree);
-        print(htmlDocument.toString());
+        write(htmlDocument);
     }
 
     /**
@@ -464,26 +373,6 @@
     }
 
     /**
-     * Print user specified header and the footer.
-     *
-     * @param header if true print the user provided header else print the
-     * user provided footer.
-     */
-    public void printUserHeaderFooter(boolean header) {
-        em();
-        if (header) {
-            print(replaceDocRootDir(configuration.header));
-        } else {
-            if (configuration.footer.length() != 0) {
-                print(replaceDocRootDir(configuration.footer));
-            } else {
-                print(replaceDocRootDir(configuration.header));
-            }
-        }
-        emEnd();
-    }
-
-    /**
      * Get user specified header and the footer.
      *
      * @param header if true print the user provided header else print the
@@ -506,14 +395,6 @@
     }
 
     /**
-     * Print the user specified top.
-     */
-    public void printTop() {
-        print(replaceDocRootDir(configuration.top));
-        hr();
-    }
-
-    /**
      * Adds the user specified top.
      *
      * @param body the content tree to which user specified top will be added
@@ -524,14 +405,6 @@
     }
 
     /**
-     * Print the user specified bottom.
-     */
-    public void printBottom() {
-        hr();
-        print(replaceDocRootDir(configuration.bottom));
-    }
-
-    /**
      * Adds the user specified bottom.
      *
      * @param body the content tree to which user specified bottom will be added
@@ -544,128 +417,6 @@
     }
 
     /**
-     * Print 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
-     * print the nevigation bar at the bottom.
-     */
-    protected void navLinks(boolean header) {
-        println("");
-        if (!configuration.nonavbar) {
-            if (header) {
-                println(DocletConstants.NL + "<!-- ========= START OF TOP NAVBAR ======= -->");
-                anchor("navbar_top");
-                println();
-                print(getHyperLinkString("", "skip-navbar_top", "", false, "",
-                    configuration.getText("doclet.Skip_navigation_links"), ""));
-            } else {
-                println(DocletConstants.NL + "<!-- ======= START OF BOTTOM NAVBAR ====== -->");
-                anchor("navbar_bottom");
-                println();
-                print(getHyperLinkString("", "skip-navbar_bottom", "", false, "",
-                    configuration.getText("doclet.Skip_navigation_links"), ""));
-            }
-            table(0, "100%", 1, 0);
-            tr();
-            tdColspanBgcolorStyle(2, "#EEEEFF", "NavBarCell1");
-            println("");
-            if (header) {
-                anchor("navbar_top_firstrow");
-            } else {
-                anchor("navbar_bottom_firstrow");
-            }
-            table(0, 0, 3);
-            print("  ");
-            trAlignVAlign("center", "top");
-
-            if (configuration.createoverview) {
-                navLinkContents();
-            }
-
-            if (configuration.packages.length == 1) {
-                navLinkPackage(configuration.packages[0]);
-            } else if (configuration.packages.length > 1) {
-                navLinkPackage();
-            }
-
-            navLinkClass();
-
-            if(configuration.classuse) {
-                navLinkClassUse();
-            }
-            if(configuration.createtree) {
-                navLinkTree();
-            }
-            if(!(configuration.nodeprecated ||
-                     configuration.nodeprecatedlist)) {
-                navLinkDeprecated();
-            }
-            if(configuration.createindex) {
-                navLinkIndex();
-            }
-            if (!configuration.nohelp) {
-                navLinkHelp();
-            }
-            print("  ");
-            trEnd();
-            tableEnd();
-            tdEnd();
-
-            tdAlignVAlignRowspan("right", "top", 3);
-
-            printUserHeaderFooter(header);
-            tdEnd();
-            trEnd();
-            println("");
-
-            tr();
-            tdBgcolorStyle("white", "NavBarCell2");
-            font("-2");
-            space();
-            navLinkPrevious();
-            space();
-            println("");
-            space();
-            navLinkNext();
-            fontEnd();
-            tdEnd();
-
-            tdBgcolorStyle("white", "NavBarCell2");
-            font("-2");
-            print("  ");
-            navShowLists();
-            print("  ");
-            space();
-            println("");
-            space();
-            navHideLists(filename);
-            print("  ");
-            space();
-            println("");
-            space();
-            navLinkClassIndex();
-            fontEnd();
-            tdEnd();
-
-            trEnd();
-
-            printSummaryDetailLinks();
-
-            tableEnd();
-            if (header) {
-                aName("skip-navbar_top");
-                aEnd();
-                println(DocletConstants.NL + "<!-- ========= END OF TOP NAVBAR ========= -->");
-            } else {
-                aName("skip-navbar_bottom");
-                aEnd();
-                println(DocletConstants.NL + "<!-- ======== END OF BOTTOM NAVBAR ======= -->");
-            }
-            println("");
-        }
-    }
-
-    /**
      * 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
@@ -757,14 +508,6 @@
     }
 
     /**
-     * Print the word "NEXT" to indicate that no link is available.  Override
-     * this method to customize next link.
-     */
-    protected void navLinkNext() {
-        navLinkNext(null);
-    }
-
-    /**
      * Get the word "NEXT" to indicate that no link is available.  Override
      * this method to customize next link.
      *
@@ -775,14 +518,6 @@
     }
 
     /**
-     * Print the word "PREV" to indicate that no link is available.  Override
-     * this method to customize prev link.
-     */
-    protected void navLinkPrevious() {
-        navLinkPrevious(null);
-    }
-
-    /**
      * Get the word "PREV" to indicate that no link is available.  Override
      * this method to customize prev link.
      *
@@ -795,26 +530,10 @@
     /**
      * Do nothing. This is the default method.
      */
-    protected void printSummaryDetailLinks() {
-    }
-
-    /**
-     * Do nothing. This is the default method.
-     */
     protected void addSummaryDetailLinks(Content navDiv) {
     }
 
     /**
-     * Print link to the "overview-summary.html" page.
-     */
-    protected void navLinkContents() {
-        navCellStart();
-        printHyperLink(relativePath + "overview-summary.html", "",
-                       configuration.getText("doclet.Overview"), true, "NavBarFont1");
-        navCellEnd();
-    }
-
-    /**
      * Get link to the "overview-summary.html" page.
      *
      * @return a content tree for the link
@@ -827,46 +546,6 @@
     }
 
     /**
-     * Description for a cell in the navigation bar.
-     */
-    protected void navCellStart() {
-        print("  ");
-        tdBgcolorStyle("#EEEEFF", "NavBarCell1");
-        print("    ");
-    }
-
-    /**
-     * Description for a cell in the navigation bar, but with reverse
-     * high-light effect.
-     */
-    protected void navCellRevStart() {
-        print("  ");
-        tdBgcolorStyle("#FFFFFF", "NavBarCell1Rev");
-        print(" ");
-        space();
-    }
-
-    /**
-     * Closing tag for navigation bar cell.
-     */
-    protected void navCellEnd() {
-        space();
-        tdEnd();
-    }
-
-    /**
-     * Print link to the "package-summary.html" page for the package passed.
-     *
-     * @param pkg Package to which link will be generated.
-     */
-    protected void navLinkPackage(PackageDoc pkg) {
-        navCellStart();
-        printPackageLink(pkg, configuration.getText("doclet.Package"), true,
-            "NavBarFont1");
-        navCellEnd();
-    }
-
-    /**
      * Get link to the "package-summary.html" page for the package passed.
      *
      * @param pkg Package to which link will be generated
@@ -880,18 +559,6 @@
     }
 
     /**
-     * Print the word "Package" in the navigation bar cell, to indicate that
-     * link is not available here.
-     */
-    protected void navLinkPackage() {
-        navCellStart();
-        fontStyle("NavBarFont1");
-        printText("doclet.Package");
-        fontEnd();
-        navCellEnd();
-    }
-
-    /**
      * Get the word "Package" , to indicate that link is not available here.
      *
      * @return a content tree for the link
@@ -902,18 +569,6 @@
     }
 
     /**
-     * Print the word "Use" in the navigation bar cell, to indicate that link
-     * is not available.
-     */
-    protected void navLinkClassUse() {
-        navCellStart();
-        fontStyle("NavBarFont1");
-        printText("doclet.navClassUse");
-        fontEnd();
-        navCellEnd();
-    }
-
-    /**
      * Get the word "Use", to indicate that link is not available.
      *
      * @return a content tree for the link
@@ -924,20 +579,6 @@
     }
 
     /**
-     * Print link for previous file.
-     *
-     * @param prev File name for the prev link.
-     */
-    public void navLinkPrevious(String prev) {
-        String tag = configuration.getText("doclet.Prev");
-        if (prev != null) {
-            printHyperLink(prev, "", tag, true) ;
-        } else {
-            print(tag);
-        }
-    }
-
-    /**
      * Get link for previous file.
      *
      * @param prev File name for the prev link
@@ -954,21 +595,6 @@
     }
 
     /**
-     * Print link for next file.  If next is null, just print the label
-     * without linking it anywhere.
-     *
-     * @param next File name for the next link.
-     */
-    public void navLinkNext(String next) {
-        String tag = configuration.getText("doclet.Next");
-        if (next != null) {
-            printHyperLink(next, "", tag, true);
-        } else {
-            print(tag);
-        }
-    }
-
-    /**
      * Get link for next file.  If next is null, just print the label
      * without linking it anywhere.
      *
@@ -986,16 +612,6 @@
     }
 
     /**
-     * Print "FRAMES" link, to switch to the frame version of the output.
-     *
-     * @param link File to be linked, "index.html".
-     */
-    protected void navShowLists(String link) {
-        print(getHyperLinkString(link + "?" + path + filename, "",
-            configuration.getText("doclet.FRAMES"), true, "", "", "_top"));
-    }
-
-    /**
      * Get "FRAMES" link, to switch to the frame version of the output.
      *
      * @param link File to be linked, "index.html"
@@ -1009,13 +625,6 @@
     }
 
     /**
-     * Print "FRAMES" link, to switch to the frame version of the output.
-     */
-    protected void navShowLists() {
-        navShowLists(relativePath + "index.html");
-    }
-
-    /**
      * Get "FRAMES" link, to switch to the frame version of the output.
      *
      * @return a content tree for the link
@@ -1025,16 +634,6 @@
     }
 
     /**
-     * Print "NO FRAMES" link, to switch to the non-frame version of the output.
-     *
-     * @param link File to be linked.
-     */
-    protected void navHideLists(String link) {
-        print(getHyperLinkString(link, "", configuration.getText("doclet.NO_FRAMES"),
-            true, "", "", "_top"));
-    }
-
-    /**
      * Get "NO FRAMES" link, to switch to the non-frame version of the output.
      *
      * @param link File to be linked
@@ -1047,25 +646,6 @@
     }
 
     /**
-     * Print "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.
-     */
-    protected void navLinkTree() {
-        navCellStart();
-        PackageDoc[] packages = configuration.root.specifiedPackages();
-        if (packages.length == 1 && configuration.root.specifiedClasses().length == 0) {
-            printHyperLink(pathString(packages[0], "package-tree.html"), "",
-                           configuration.getText("doclet.Tree"), true, "NavBarFont1");
-        } else {
-            printHyperLink(relativePath + "overview-tree.html", "",
-                           configuration.getText("doclet.Tree"), true, "NavBarFont1");
-        }
-        navCellEnd();
-    }
-
-    /**
      * 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
@@ -1102,18 +682,6 @@
     }
 
     /**
-     * Print the word "Class" in the navigation bar cell, to indicate that
-     * class link is not available.
-     */
-    protected void navLinkClass() {
-        navCellStart();
-        fontStyle("NavBarFont1");
-        printText("doclet.Class");
-        fontEnd();
-        navCellEnd();
-    }
-
-    /**
      * Get the word "Class", to indicate that class link is not available.
      *
      * @return a content tree for the link
@@ -1124,16 +692,6 @@
     }
 
     /**
-     * Print "Deprecated" API link in the navigation bar.
-     */
-    protected void navLinkDeprecated() {
-        navCellStart();
-        printHyperLink(relativePath + "deprecated-list.html", "",
-                       configuration.getText("doclet.navDeprecated"), true, "NavBarFont1");
-        navCellEnd();
-    }
-
-    /**
      * Get "Deprecated" API link in the navigation bar.
      *
      * @return a content tree for the link
@@ -1146,17 +704,6 @@
     }
 
     /**
-     * Print 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.
-     */
-    protected void navLinkClassIndex() {
-        printNoFramesTargetHyperLink(relativePath +
-                AllClassesFrameWriter.OUTPUT_FILE_NAME_NOFRAMES,
-            "", "", configuration.getText("doclet.All_Classes"), true);
-    }
-
-    /**
      * 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.
@@ -1170,20 +717,6 @@
         Content li = HtmlTree.LI(allClassesContent);
         return li;
     }
-    /**
-     * Print link for generated class index.
-     */
-    protected void navLinkIndex() {
-        navCellStart();
-        printHyperLink(relativePath +
-                           (configuration.splitindex?
-                                DirectoryManager.getPath("index-files") +
-                                fileseparator: "") +
-                           (configuration.splitindex?
-                                "index-1.html" : "index-all.html"), "",
-                       configuration.getText("doclet.Index"), true, "NavBarFont1");
-        navCellEnd();
-    }
 
     /**
      * Get link for generated class index.
@@ -1200,27 +733,6 @@
     }
 
     /**
-     * Print 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.
-     */
-    protected void navLinkHelp() {
-        String helpfilenm = configuration.helpfile;
-        if (helpfilenm.equals("")) {
-            helpfilenm = "help-doc.html";
-        } else {
-            int lastsep;
-            if ((lastsep = helpfilenm.lastIndexOf(File.separatorChar)) != -1) {
-                helpfilenm = helpfilenm.substring(lastsep + 1);
-            }
-        }
-        navCellStart();
-        printHyperLink(relativePath + helpfilenm, "",
-                       configuration.getText("doclet.Help"), true, "NavBarFont1");
-        navCellEnd();
-    }
-
-    /**
      * 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.
@@ -1244,87 +756,6 @@
     }
 
     /**
-     * Print the word "Detail" in the navigation bar. No link is available.
-     */
-    protected void navDetail() {
-        printText("doclet.Detail");
-    }
-
-    /**
-     * Print the word "Summary" in the navigation bar. No link is available.
-     */
-    protected void navSummary() {
-        printText("doclet.Summary");
-    }
-
-    /**
-     * Print the Html table tag for the index summary tables. The table tag
-     * printed is
-     * {@code <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> }
-     */
-    public void tableIndexSummary() {
-        table(1, "100%", 3, 0);
-    }
-
-    /**
-     * Print the Html table tag for the index summary tables.
-     *
-     * @param summary the summary for the table tag summary attribute.
-     */
-    public void tableIndexSummary(String summary) {
-        table(1, "100%", 3, 0, summary);
-    }
-
-    /**
-     * Same as {@link #tableIndexSummary()}.
-     */
-    public void tableIndexDetail() {
-        table(1, "100%", 3, 0);
-    }
-
-    /**
-     * Print Html tag for table elements. The tag printed is
-     * &lt;TD ALIGN="right" VALIGN="top" WIDTH="1%"&gt;.
-     */
-    public void tdIndex() {
-        print("<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\">");
-    }
-
-    /**
-     * Print table caption.
-     */
-    public void tableCaptionStart() {
-        captionStyle("TableCaption");
-    }
-
-    /**
-     * Print table sub-caption.
-     */
-    public void tableSubCaptionStart() {
-        captionStyle("TableSubCaption");
-    }
-
-    /**
-     * Print table caption end tags.
-     */
-    public void tableCaptionEnd() {
-        captionEnd();
-    }
-
-    /**
-     * Print summary table header.
-     */
-    public void summaryTableHeader(String[] header, String scope) {
-        tr();
-        for ( int i=0; i < header.length; i++ ) {
-            thScopeNoWrap("TableHeader", scope);
-            print(header[i]);
-            thEnd();
-        }
-        trEnd();
-    }
-
-    /**
      * Get summary table header.
      *
      * @param header the header for the table
@@ -1407,7 +838,7 @@
     /**
      * Returns a package name label.
      *
-     * @param parsedName the package name
+     * @param packageName the package name
      * @return the package name content
      */
     public Content getPackageLabel(String packageName) {
@@ -1453,144 +884,6 @@
     }
 
     /**
-     * Prine table header information about color, column span and the font.
-     *
-     * @param color Background color.
-     * @param span  Column span.
-     */
-    public void tableHeaderStart(String color, int span) {
-        trBgcolorStyle(color, "TableHeadingColor");
-        thAlignColspan("left", span);
-        font("+2");
-    }
-
-    /**
-     * Print table header for the inherited members summary tables. Print the
-     * background color information.
-     *
-     * @param color Background color.
-     */
-    public void tableInheritedHeaderStart(String color) {
-        trBgcolorStyle(color, "TableSubHeadingColor");
-        thAlign("left");
-    }
-
-    /**
-     * Print "Use" table header. Print the background color and the column span.
-     *
-     * @param color Background color.
-     */
-    public void tableUseInfoHeaderStart(String color) {
-        trBgcolorStyle(color, "TableSubHeadingColor");
-        thAlignColspan("left", 2);
-    }
-
-    /**
-     * Print table header with the background color with default column span 2.
-     *
-     * @param color Background color.
-     */
-    public void tableHeaderStart(String color) {
-        tableHeaderStart(color, 2);
-    }
-
-    /**
-     * Print table header with the column span, with the default color #CCCCFF.
-     *
-     * @param span Column span.
-     */
-    public void tableHeaderStart(int span) {
-        tableHeaderStart("#CCCCFF", span);
-    }
-
-    /**
-     * Print table header with default column span 2 and default color #CCCCFF.
-     */
-    public void tableHeaderStart() {
-        tableHeaderStart(2);
-    }
-
-    /**
-     * Print table header end tags for font, column and row.
-     */
-    public void tableHeaderEnd() {
-        fontEnd();
-        thEnd();
-        trEnd();
-    }
-
-    /**
-     * Print table header end tags in inherited tables for column and row.
-     */
-    public void tableInheritedHeaderEnd() {
-        thEnd();
-        trEnd();
-    }
-
-    /**
-     * Print the summary table row cell attribute width.
-     *
-     * @param width Width of the table cell.
-     */
-    public void summaryRow(int width) {
-        if (width != 0) {
-            tdWidth(width + "%");
-        } else {
-            td();
-        }
-    }
-
-    /**
-     * Print the summary table row cell end tag.
-     */
-    public void summaryRowEnd() {
-        tdEnd();
-    }
-
-    /**
-     * Print the heading in Html {@literal <H2>} format.
-     *
-     * @param str The Header string.
-     */
-    public void printIndexHeading(String str) {
-        h2();
-        print(str);
-        h2End();
-    }
-
-    /**
-     * Print Html tag &lt;FRAMESET=arg&gt;.
-     *
-     * @param arg Argument for the tag.
-     */
-    public void frameSet(String arg) {
-        println("<FRAMESET " + arg + ">");
-    }
-
-    /**
-     * Print Html closing tag &lt;/FRAMESET&gt;.
-     */
-    public void frameSetEnd() {
-        println("</FRAMESET>");
-    }
-
-    /**
-     * Print Html tag &lt;FRAME=arg&gt;.
-     *
-     * @param arg Argument for the tag.
-     */
-    public void frame(String arg) {
-        println("<FRAME " + arg + ">");
-    }
-
-    /**
-     * Print Html closing tag &lt;/FRAME&gt;.
-     */
-    public void frameEnd() {
-        println("</FRAME>");
-    }
-
-    /**
      * Return path to the class page for a classdoc. For example, the class
      * name is "java.lang.Object" and if the current file getting generated is
      * "java/io/File.html", then the path string to the class, returned is
@@ -1623,36 +916,12 @@
      * @param name File name, to which path string is.
      */
     protected String pathString(PackageDoc pd, String name) {
-        StringBuffer buf = new StringBuffer(relativePath);
+        StringBuilder buf = new StringBuilder(relativePath);
         buf.append(DirectoryManager.getPathToPackage(pd, name));
         return buf.toString();
     }
 
     /**
-     * Print the link to the given package.
-     *
-     * @param pkg the package to link to.
-     * @param label the label for the link.
-     * @param isStrong true if the label should be strong.
-     */
-    public void printPackageLink(PackageDoc pkg, String label, boolean isStrong) {
-        print(getPackageLinkString(pkg, label, isStrong));
-    }
-
-    /**
-     * Print the link to the given package.
-     *
-     * @param pkg the package to link to.
-     * @param label the label for the link.
-     * @param isStrong true if the label should be strong.
-     * @param style  the font of the package link label.
-     */
-    public void printPackageLink(PackageDoc pkg, String label, boolean isStrong,
-            String style) {
-        print(getPackageLinkString(pkg, label, isStrong, style));
-    }
-
-    /**
      * Return the link to the given package.
      *
      * @param pkg the package to link to.
@@ -1735,21 +1004,6 @@
         return (cd.isInterface())?  italicsText(name): name;
     }
 
-    public void printSrcLink(ProgramElementDoc d, String label) {
-        if (d == null) {
-            return;
-        }
-        ClassDoc cd = d.containingClass();
-        if (cd == null) {
-            //d must be a class doc since in has no containing class.
-            cd = (ClassDoc) d;
-        }
-        String href = relativePath + DocletConstants.SOURCE_OUTPUT_DIR_NAME
-            + DirectoryManager.getDirectoryPath(cd.containingPackage())
-            + cd.name() + ".html#" + SourceToHTMLConverter.getAnchorName(d);
-        printHyperLink(href, "", label, true);
-    }
-
     /**
      * Add the link to the content tree.
      *
@@ -1799,13 +1053,6 @@
             factory.getTypeParameterLinks(linkInfo, false)).toString();
     }
 
-    /**
-     * Print the link to the given class.
-     */
-    public void printLink(LinkInfoImpl linkInfo) {
-        print(getLink(linkInfo));
-    }
-
     /*************************************************************
      * Return a class cross link to external class documentation.
      * The name must be fully qualified to determine which package
@@ -1829,7 +1076,7 @@
         while((periodIndex = packageName.lastIndexOf('.')) != -1) {
             className = packageName.substring(periodIndex + 1, packageName.length()) +
                 (className.length() > 0 ? "." + className : "");
-            String defaultLabel = code ? getCode() + className + getCodeEnd() : className;
+            String defaultLabel = code ? codeText(className) : className;
             packageName = packageName.substring(0, periodIndex);
             if (getCrossPackageLink(packageName) != null) {
                 //The package exists in external documentation, so link to the external
@@ -1937,30 +1184,6 @@
         addPreQualifiedClassLink(context, cd, true, contentTree);
     }
 
-    public void printText(String key) {
-        print(configuration.getText(key));
-    }
-
-    public void printText(String key, String a1) {
-        print(configuration.getText(key, a1));
-    }
-
-    public void printText(String key, String a1, String a2) {
-        print(configuration.getText(key, a1, a2));
-    }
-
-    public void strongText(String key) {
-        strong(configuration.getText(key));
-    }
-
-    public void strongText(String key, String a1) {
-        strong(configuration.getText(key, a1));
-    }
-
-    public void strongText(String key, String a1, String a2) {
-        strong(configuration.getText(key, a1, a2));
-    }
-
     /**
      * Get the link for the given member.
      *
@@ -1974,22 +1197,6 @@
     }
 
     /**
-     * Print the link for the given member.
-     *
-     * @param context the id of the context where the link will be printed.
-     * @param classDoc the classDoc that we should link to.  This is not
-     *                 necessarily equal to doc.containingClass().  We may be
-     *                 inheriting comments.
-     * @param doc the member being linked to.
-     * @param label the label for the link.
-     * @param strong true if the link should be strong.
-     */
-    public void printDocLink(int context, ClassDoc classDoc, MemberDoc doc,
-            String label, boolean strong) {
-        print(getDocLink(context, classDoc, doc, label, strong));
-    }
-
-    /**
      * Return the link for the given member.
      *
      * @param context the id of the context where the link will be printed.
@@ -2060,10 +1267,6 @@
         }
     }
 
-    public void anchor(ExecutableMemberDoc emd) {
-        anchor(getAnchor(emd));
-    }
-
     public String getAnchor(ExecutableMemberDoc emd) {
         StringBuilder signature = new StringBuilder(emd.signature());
         StringBuilder signatureParsed = new StringBuilder();
@@ -2086,66 +1289,61 @@
         if (! (tagName.startsWith("@link") || tagName.equals("@see"))) {
             return "";
         }
-        StringBuffer result = new StringBuffer();
-        boolean isplaintext = tagName.toLowerCase().equals("@linkplain");
-        String label = see.label();
-        label = (label.length() > 0)?
-            ((isplaintext) ? label :
-                 getCode() + label + getCodeEnd()):"";
+
         String seetext = replaceDocRootDir(see.text());
 
         //Check if @see is an href or "string"
         if (seetext.startsWith("<") || seetext.startsWith("\"")) {
-            result.append(seetext);
-            return result.toString();
+            return seetext;
         }
 
+        boolean plain = tagName.equalsIgnoreCase("@linkplain");
+        String label = plainOrCodeText(plain, see.label());
+
         //The text from the @see tag.  We will output this text when a label is not specified.
-        String text = (isplaintext) ? seetext : getCode() + seetext + getCodeEnd();
+        String text = plainOrCodeText(plain, seetext);
 
         ClassDoc refClass = see.referencedClass();
         String refClassName = see.referencedClassName();
         MemberDoc refMem = see.referencedMember();
         String refMemName = see.referencedMemberName();
+
         if (refClass == null) {
             //@see is not referencing an included class
             PackageDoc refPackage = see.referencedPackage();
             if (refPackage != null && refPackage.isIncluded()) {
                 //@see is referencing an included package
-                String packageName = isplaintext ? refPackage.name() :
-                    getCode() + refPackage.name() + getCodeEnd();
-                result.append(getPackageLinkString(refPackage,
-                    label.length() == 0 ? packageName : label, false));
+                if (label.isEmpty())
+                    label = plainOrCodeText(plain, refPackage.name());
+                return getPackageLinkString(refPackage, label, false);
             } else {
                 //@see is not referencing an included class or package.  Check for cross links.
                 String classCrossLink, packageCrossLink = getCrossPackageLink(refClassName);
                 if (packageCrossLink != null) {
                     //Package cross link found
-                    result.append(getHyperLinkString(packageCrossLink, "",
-                        (label.length() == 0)? text : label, false));
+                    return getHyperLinkString(packageCrossLink, "",
+                        (label.isEmpty() ? text : label), false);
                 } else if ((classCrossLink = getCrossClassLink(refClassName,
-                        refMemName, label, false, "", ! isplaintext)) != null) {
-                    //Class cross link found (possiblly to a member in the class)
-                    result.append(classCrossLink);
+                        refMemName, label, false, "", !plain)) != 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(see.position(), "doclet.see.class_or_package_not_found",
                             tagName, seetext);
-                    result.append((label.length() == 0)? text: label);
+                    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.length() == 0) {
-                label = (isplaintext) ? refClass.name() : getCode() + refClass.name() + getCodeEnd();
-                result.append(getLink(new LinkInfoImpl(refClass, label)));
-            } else {
-                result.append(getLink(new LinkInfoImpl(refClass, label)));
+            if (label.isEmpty()) {
+                label = plainOrCodeText(plain, refClass.name());
             }
+            return getLink(new LinkInfoImpl(refClass, 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.
-            result.append((label.length() == 0)? text: label);
+            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.
@@ -2177,17 +1375,16 @@
                     refMemName += ((ExecutableMemberDoc)refMem).signature();
                 }
             }
-            text = (isplaintext) ?
-                refMemName : getCode() + Util.escapeHtmlChars(refMemName) + getCodeEnd();
 
-            result.append(getDocLink(LinkInfoImpl.CONTEXT_SEE_TAG, containing,
-                refMem, (label.length() == 0)? text: label, false));
+            text = plainOrCodeText(plain, Util.escapeHtmlChars(refMemName));
+
+            return getDocLink(LinkInfoImpl.CONTEXT_SEE_TAG, containing,
+                refMem, (label.isEmpty() ? text: label), false);
         }
-        return result.toString();
     }
 
-    public void printInlineComment(Doc doc, Tag tag) {
-        printCommentTags(doc, tag.inlineTags(), false, false);
+    private String plainOrCodeText(boolean plain, String text) {
+        return (plain || text.isEmpty()) ? text : codeText(text);
     }
 
     /**
@@ -2201,10 +1398,6 @@
         addCommentTags(doc, tag.inlineTags(), false, false, htmltree);
     }
 
-    public void printInlineDeprecatedComment(Doc doc, Tag tag) {
-        printCommentTags(doc, tag.inlineTags(), true, false);
-    }
-
     /**
      * Add the inline deprecated comment.
      *
@@ -2216,10 +1409,6 @@
         addCommentTags(doc, tag.inlineTags(), true, false, htmltree);
     }
 
-    public void printSummaryComment(Doc doc) {
-        printSummaryComment(doc, doc.firstSentenceTags());
-    }
-
     /**
      * Adds the summary content.
      *
@@ -2230,10 +1419,6 @@
         addSummaryComment(doc, doc.firstSentenceTags(), htmltree);
     }
 
-    public void printSummaryComment(Doc doc, Tag[] firstSentenceTags) {
-        printCommentTags(doc, firstSentenceTags, false, true);
-    }
-
     /**
      * Adds the summary content.
      *
@@ -2245,23 +1430,10 @@
         addCommentTags(doc, firstSentenceTags, false, true, htmltree);
     }
 
-    public void printSummaryDeprecatedComment(Doc doc) {
-        printCommentTags(doc, doc.firstSentenceTags(), true, true);
-    }
-
-    public void printSummaryDeprecatedComment(Doc doc, Tag tag) {
-        printCommentTags(doc, tag.firstSentenceTags(), true, true);
-    }
-
     public void addSummaryDeprecatedComment(Doc doc, Tag tag, Content htmltree) {
         addCommentTags(doc, tag.firstSentenceTags(), true, true, htmltree);
     }
 
-    public void printInlineComment(Doc doc) {
-        printCommentTags(doc, doc.inlineTags(), false, false);
-        p();
-    }
-
     /**
      * Adds the inline comment.
      *
@@ -2272,27 +1444,6 @@
         addCommentTags(doc, doc.inlineTags(), false, false, htmltree);
     }
 
-    public void printInlineDeprecatedComment(Doc doc) {
-        printCommentTags(doc, doc.inlineTags(), true, false);
-    }
-
-    private void printCommentTags(Doc doc, Tag[] tags, boolean depr, boolean first) {
-        if(configuration.nocomment){
-            return;
-        }
-        if (depr) {
-            italic();
-        }
-        String result = commentTagsToString(null, doc, tags, first);
-        print(result);
-        if (depr) {
-            italicEnd();
-        }
-        if (tags.length == 0) {
-            space();
-        }
-    }
-
     /**
      * Adds the comment tags.
      *
@@ -2385,7 +1536,7 @@
                     text = removeNonInlineHtmlTags(text);
                 }
                 StringTokenizer lines = new StringTokenizer(text, "\r\n", true);
-                StringBuffer textBuff = new StringBuffer();
+                StringBuilder textBuff = new StringBuilder();
                 while (lines.hasMoreTokens()) {
                     StringBuilder line = new StringBuilder(lines.nextToken());
                     Util.replaceTabs(configuration.sourcetab, line);
@@ -2454,7 +1605,7 @@
         //Redirect all relative links.
         int end, begin = text.toLowerCase().indexOf("<a");
         if(begin >= 0){
-            StringBuffer textBuff = new StringBuffer(text);
+            StringBuilder textBuff = new StringBuilder(text);
 
             while(begin >=0){
                 if (textBuff.length() > begin + 2 && ! Character.isWhitespace(textBuff.charAt(begin+2))) {
@@ -2557,22 +1708,6 @@
         }
     }
 
-    public void printStyleSheetProperties() {
-        String filename = configuration.stylesheetfile;
-        if (filename.length() > 0) {
-            File stylefile = new File(filename);
-            String parent = stylefile.getParent();
-            filename = (parent == null)?
-                filename:
-                filename.substring(parent.length() + 1);
-        } else {
-            filename = "stylesheet.css";
-        }
-        filename = relativePath + filename;
-        link("REL =\"stylesheet\" TYPE=\"text/css\" HREF=\"" +
-                 filename + "\" " + "TITLE=\"Style\"");
-    }
-
     /**
      * Returns a link to the stylesheet file.
      *
@@ -2604,15 +1739,6 @@
     }
 
     /**
-     * Write the annotatation types for the given packageDoc.
-     *
-     * @param packageDoc the package to write annotations for.
-     */
-    public void writeAnnotationInfo(PackageDoc packageDoc) {
-        writeAnnotationInfo(packageDoc, packageDoc.annotations());
-    }
-
-    /**
      * Adds the annotatation types for the given packageDoc.
      *
      * @param packageDoc the package to write annotations for.
@@ -2624,18 +1750,9 @@
     }
 
     /**
-     * Write the annotatation types for the given doc.
-     *
-     * @param doc the doc to write annotations for.
-     */
-    public void writeAnnotationInfo(ProgramElementDoc doc) {
-        writeAnnotationInfo(doc, doc.annotations());
-    }
-
-    /**
      * Adds the annotatation types for the given doc.
      *
-     * @param packageDoc the package to write annotations for
+     * @param doc the package to write annotations for
      * @param htmltree the content tree to which the annotation types will be added
      */
     public void addAnnotationInfo(ProgramElementDoc doc, Content htmltree) {
@@ -2643,17 +1760,6 @@
     }
 
     /**
-     * Write the annotatation types for the given doc and parameter.
-     *
-     * @param indent the number of spaced to indent the parameters.
-     * @param doc the doc to write annotations for.
-     * @param param the parameter to write annotations for.
-     */
-    public boolean writeAnnotationInfo(int indent, Doc doc, Parameter param) {
-        return writeAnnotationInfo(indent, doc, param.annotations(), false);
-    }
-
-    /**
      * Add the annotatation types for the given doc and parameter.
      *
      * @param indent the number of spaces to indent the parameters.
@@ -2667,16 +1773,6 @@
     }
 
     /**
-     * Write the annotatation types for the given doc.
-     *
-     * @param doc the doc to write annotations for.
-     * @param descList the array of {@link AnnotationDesc}.
-     */
-    private void writeAnnotationInfo(Doc doc, AnnotationDesc[] descList) {
-        writeAnnotationInfo(0, doc, descList, true);
-    }
-
-    /**
      * Adds the annotatation types for the given doc.
      *
      * @param doc the doc to write annotations for.
@@ -2690,26 +1786,6 @@
     }
 
     /**
-     * Write the annotatation types for the given doc.
-     *
-     * @param indent the number of extra spaces to indent the annotations.
-     * @param doc the doc to write annotations for.
-     * @param descList the array of {@link AnnotationDesc}.
-     */
-    private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
-        List<String> annotations = getAnnotations(indent, descList, lineBreak);
-        if (annotations.size() == 0) {
-            return false;
-        }
-        fontNoNewLine("-1");
-        for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
-            print(iter.next());
-        }
-        fontEnd();
-        return true;
-    }
-
-    /**
      * Adds the annotatation types for the given doc.
      *
      * @param indent the number of extra spaces to indent the annotations.
@@ -2744,13 +1820,13 @@
      */
     private List<String> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak) {
         List<String> results = new ArrayList<String>();
-        StringBuffer annotation;
+        StringBuilder annotation;
         for (int i = 0; i < descList.length; i++) {
             AnnotationTypeDoc annotationDoc = descList[i].annotationType();
             if (! Util.isDocumentedAnnotation(annotationDoc)){
                 continue;
             }
-            annotation = new StringBuffer();
+            annotation = new StringBuilder();
             LinkInfoImpl linkInfo = new LinkInfoImpl(
                 LinkInfoImpl.CONTEXT_ANNOTATION, annotationDoc);
             linkInfo.label = "@" + annotationDoc.name();
@@ -2815,9 +1891,9 @@
             List<String> list = getAnnotations(0,
                 new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
                     false);
-            StringBuffer buf = new StringBuffer();
-            for (Iterator<String> iter = list.iterator(); iter.hasNext(); ) {
-                buf.append(iter.next());
+            StringBuilder buf = new StringBuilder();
+            for (String s: list) {
+                buf.append(s);
             }
             return buf.toString();
         } else if (annotationValue.value() instanceof MemberDoc) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -28,15 +28,20 @@
 import java.util.*;
 
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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)
  */
@@ -55,18 +60,6 @@
         return Arrays.asList(cd.serializableFields());
     }
 
-    protected void printTypeLinkNoDimension(Type type) {
-        ClassDoc cd = type.asClassDoc();
-        //Linking to package private classes in serialized for causes
-        //broken links.  Don't link to them.
-        if (type.isPrimitive() || cd.isPackagePrivate()) {
-            print(type.typeName());
-        } else {
-            writer.printLink(new LinkInfoImpl(
-                LinkInfoImpl.CONTEXT_SERIAL_MEMBER, type));
-        }
-    }
-
     /**
      * Return the header for serializable fields section.
      *
@@ -121,10 +114,10 @@
     /**
      * Add the member header.
      *
-     * @param fieldsType the class document to be listed
-     * @param fieldTypeStr the string for the filed type to be documented
+     * @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 firldName name of the field 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(ClassDoc fieldType, String fieldTypeStr,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -26,14 +26,19 @@
 package com.sun.tools.doclets.formats.html;
 
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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)
  */
@@ -161,14 +166,4 @@
                 method.containingClass().qualifiedName(), method.name());
         }
     }
-
-    protected void printTypeLinkNoDimension(Type type) {
-        ClassDoc cd = type.asClassDoc();
-        if (type.isPrimitive() || cd.isPackagePrivate()) {
-            print(type.typeName());
-        } else {
-            writer.printLink(new LinkInfoImpl(
-                LinkInfoImpl.CONTEXT_SERIAL_MEMBER,type));
-        }
-    }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,14 +25,19 @@
 
 package com.sun.tools.doclets.formats.html;
 
-import com.sun.tools.doclets.internal.toolkit.util.links.*;
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
+import com.sun.tools.doclets.internal.toolkit.util.links.*;
 
 /**
  * A factory that returns a link given the information about it.
  *
+ *  <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
  * @since 1.5
  */
@@ -66,7 +71,7 @@
                     classLinkInfo.type != null &&
                     !classDoc.qualifiedTypeName().equals(classLinkInfo.type.qualifiedTypeName())) :
             "";
-        StringBuffer label = new StringBuffer(
+        StringBuilder label = new StringBuilder(
             classLinkInfo.getClassLinkLabel(m_writer.configuration));
         classLinkInfo.displayLength += label.length();
         Configuration configuration = ConfigurationImpl.getInstance();
@@ -155,7 +160,6 @@
      * "../../java/lang/Object.html"
      *
      * @param linkInfo the information about the link.
-     * @param fileName the file name, to which path string is.
      */
     private String pathString(LinkInfoImpl linkInfo) {
         if (linkInfo.context == LinkInfoImpl.PACKAGE_FRAME) {
@@ -163,7 +167,7 @@
             //with 1.4.2 output.
             return linkInfo.classDoc.name() + ".html";
         }
-        StringBuffer buf = new StringBuffer(m_writer.relativePath);
+        StringBuilder buf = new StringBuilder(m_writer.relativePath);
         buf.append(DirectoryManager.getPathToPackage(
             linkInfo.classDoc.containingPackage(),
             linkInfo.classDoc.name() + ".html"));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkInfoImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,6 +30,12 @@
 import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.internal.toolkit.util.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>
+ */
 public class LinkInfoImpl extends LinkInfo {
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/LinkOutputImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,6 +30,11 @@
 /**
  * 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
  * @since 1.5
  */
@@ -38,13 +43,13 @@
     /**
      * The output of the link.
      */
-    public StringBuffer output;
+    public StringBuilder output;
 
     /**
      * Construct a new LinkOutputImpl.
      */
     public LinkOutputImpl() {
-        output = new StringBuffer();
+        output = new StringBuilder();
     }
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -35,6 +35,11 @@
 /**
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -36,6 +36,11 @@
 /**
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -27,16 +27,22 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -26,16 +26,22 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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 {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -27,16 +27,22 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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 "pacakge-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)
  */
@@ -228,7 +234,7 @@
      * Adds the lower navigation bar and the bottom text
      * (from the -bottom option) at the bottom of page.
      *
-     * @param the documentation tree to which the navigation bar footer will be added
+     * @param body the documentation tree to which the navigation bar footer will be added
      */
     protected void addNavigationBarFooter(Content body) {
         addNavLinks(false, body);
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -28,14 +28,19 @@
 import java.io.*;
 
 import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * Class to generate 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -27,14 +27,20 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * Generate package usage information.
  *
+ *  <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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -27,16 +27,22 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * 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)
  */
@@ -248,7 +254,7 @@
     /**
      * {@inheritDoc}
      */
-    public void printDocument(Content contentTree) {
+    public void printDocument(Content contentTree) throws IOException {
         printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageDoc),
                 true, contentTree);
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -29,14 +29,20 @@
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.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 com.sun.tools.doclets.internal.toolkit.SerializedFormWriter {
+    implements SerializedFormWriter {
 
     private static final String FILE_NAME = "serialized-form.html";
 
@@ -49,23 +55,6 @@
     }
 
     /**
-     * Writes the given header.
-     *
-     * @param header the header to write.
-     */
-    public void writeHeader(String header) {
-        printHtmlHeader(header, null, true);
-        printTop();
-        navLinks(true);
-        hr();
-        center();
-        h1();
-        print(header);
-        h1End();
-        centerEnd();
-    }
-
-    /**
      * Get the given header.
      *
      * @param header the header to write
@@ -225,20 +214,10 @@
     /**
      * {@inheritDoc}
      */
-    public void printDocument(Content serializedTree) {
+    public void printDocument(Content serializedTree) throws IOException {
         printHtmlDocument(null, true, serializedTree);
     }
 
-    private void tableHeader() {
-        tableIndexSummary();
-        trBgcolorStyle("#CCCCFF", "TableSubHeadingColor");
-    }
-
-    private void tableFooter() {
-        fontEnd();
-        thEnd(); trEnd(); tableEnd();
-    }
-
     /**
      * Return an instance of a SerialFieldWriter.
      *
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -26,15 +26,21 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
+
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -35,9 +35,10 @@
 /**
  * Converts Java Source Code to HTML.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SplitIndexWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -26,15 +26,21 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
+
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SubWriterHolderWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -26,10 +26,11 @@
 package com.sun.tools.doclets.formats.html;
 
 import java.io.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
 
 /**
  * This abstract class exists to provide functionality needed in the
@@ -39,6 +40,11 @@
  * 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
  *
@@ -60,18 +66,6 @@
         super(configuration, path, filename, relpath);
     }
 
-    public void printTypeSummaryHeader() {
-        tdIndex();
-        font("-1");
-        code();
-    }
-
-    public void printTypeSummaryFooter() {
-        codeEnd();
-        fontEnd();
-        tdEnd();
-    }
-
     /**
      * Add the summary header.
      *
@@ -99,14 +93,6 @@
         return table;
     }
 
-    public void printTableHeadingBackground(String str) {
-        tableIndexDetail();
-        tableHeaderStart("#CCCCFF", 1);
-        strong(str);
-        tableHeaderEnd();
-        tableEnd();
-    }
-
     /**
      * Add the inherited summary header.
      *
@@ -120,19 +106,6 @@
         mw.addInheritedSummaryLabel(cd, inheritedTree);
     }
 
-    public void printSummaryFooter(AbstractMemberWriter mw, ClassDoc cd) {
-        tableEnd();
-        space();
-    }
-
-    public void printInheritedSummaryFooter(AbstractMemberWriter mw, ClassDoc cd) {
-        codeEnd();
-        summaryRowEnd();
-        trEnd();
-        tableEnd();
-        space();
-    }
-
     /**
      * Add the index comment.
      *
@@ -143,24 +116,6 @@
         addIndexComment(member, member.firstSentenceTags(), contentTree);
     }
 
-    protected void printIndexComment(Doc member, Tag[] firstSentenceTags) {
-        Tag[] deprs = member.tags("deprecated");
-        if (Util.isDeprecated((ProgramElementDoc) member)) {
-            strongText("doclet.Deprecated");
-            space();
-            if (deprs.length > 0) {
-                printInlineDeprecatedComment(member, deprs[0]);
-            }
-            return;
-        } else {
-            ClassDoc cd = ((ProgramElementDoc)member).containingClass();
-            if (cd != null && Util.isDeprecated(cd)) {
-                strongText("doclet.Deprecated"); space();
-            }
-        }
-        printSummaryComment(member, firstSentenceTags);
-    }
-
     /**
      * Add the index comment.
      *
@@ -217,18 +172,6 @@
         addSummaryLinkComment(mw, member, member.firstSentenceTags(), contentTree);
     }
 
-    public void printSummaryLinkComment(AbstractMemberWriter mw,
-                                        ProgramElementDoc member,
-                                        Tag[] firstSentenceTags) {
-        codeEnd();
-        println();
-        br();
-        printNbsps();
-        printIndexComment(member, firstSentenceTags);
-        summaryRowEnd();
-        trEnd();
-    }
-
     /**
      * Add the summary link comment.
      *
@@ -259,13 +202,6 @@
         mw.addInheritedSummaryLink(cd, member, linksTree);
     }
 
-    public void printMemberHeader() {
-        hr();
-    }
-
-    public void printMemberFooter() {
-    }
-
     /**
      * Get the document content header tree
      *
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,13 +30,18 @@
 /**
  * The output for HTML 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>
+ *
  * @since 1.5
  * @author Jamie Ho
  */
 
 public class TagletOutputImpl implements TagletOutput {
 
-    private StringBuffer output;
+    private StringBuilder output;
 
     public TagletOutputImpl(String o) {
         setOutput(o);
@@ -46,7 +51,7 @@
      * {@inheritDoc}
      */
     public void setOutput (Object o) {
-        output = new StringBuffer(o == null ? "" : (String) o);
+        output = new StringBuilder(o == null ? "" : (String) o);
     }
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -34,6 +34,11 @@
 /**
  * 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>
+ *
  * @since 1.5
  * @author Jamie Ho
  * @author Bhavesh Patel (Modified)
@@ -69,7 +74,7 @@
      * {@inheritDoc}
      */
     public TagletOutput deprecatedTagOutput(Doc doc) {
-        StringBuffer output = new StringBuffer();
+        StringBuilder output = new StringBuilder();
         Tag[] deprs = doc.tags("deprecated");
         if (doc instanceof ClassDoc) {
             if (Util.isDeprecated((ProgramElementDoc) doc)) {
@@ -120,9 +125,9 @@
      * {@inheritDoc}
      */
     public TagletOutput getParamHeader(String header) {
-        StringBuffer result = new StringBuffer();
+        StringBuilder result = new StringBuilder();
         result.append("<dt>");
-        result.append("<span class=\"strong\">" +  header + "</span></dt>");
+        result.append("<span class=\"strong\">").append(header).append("</span></dt>");
         return new TagletOutputImpl(result.toString());
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -28,9 +28,9 @@
 import java.io.*;
 
 import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.formats.html.markup.*;
 import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * Generate Class Hierarchy page for all the Classes in this run.  Use
@@ -38,6 +38,11 @@
  * 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)
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,13 +25,18 @@
 
 package com.sun.tools.doclets.formats.html;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
 
 /**
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/Comment.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/Comment.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,15 +25,23 @@
 
 package com.sun.tools.doclets.formats.html.markup;
 
+import java.io.IOException;
+import java.io.Writer;
+
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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{
+public class Comment extends Content {
 
     private String commentText;
 
@@ -80,11 +88,13 @@
     /**
      * {@inheritDoc}
      */
-    public void write(StringBuilder contentBuilder) {
-        if (!endsWithNewLine(contentBuilder))
-            contentBuilder.append(DocletConstants.NL);
-        contentBuilder.append("<!-- ");
-        contentBuilder.append(commentText);
-        contentBuilder.append(" -->" + DocletConstants.NL);
+    @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;
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/DocType.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,12 +25,20 @@
 
 package com.sun.tools.doclets.formats.html.markup;
 
+import java.io.IOException;
+import java.io.Writer;
+
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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{
@@ -107,7 +115,9 @@
     /**
      * {@inheritDoc}
      */
-    public void write(StringBuilder contentBuilder) {
-        contentBuilder.append(docType);
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        out.write(docType);
+        return true; // guaranteed by constructor
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -28,6 +28,11 @@
 /**
  * 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 {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -30,6 +30,11 @@
 /**
  * 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 {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -29,6 +29,7 @@
 import java.util.*;
 
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.ConfigurationImpl;
 import com.sun.tools.doclets.internal.toolkit.*;
 
 
@@ -38,6 +39,11 @@
  * are used by the Sub-Classes in the package com.sun.tools.doclets.standard
  * and com.sun.tools.doclets.oneone.
  *
+ *  <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>
+ *
  * @since 1.2
  * @author Atul M Dambalkar
  * @author Robert Field
@@ -77,48 +83,6 @@
     public abstract Configuration configuration();
 
     /**
-     * Print Html Hyper Link.
-     *
-     * @param link String name of the file.
-     * @param where Position of the link in the file. Character '#' is not
-     * needed.
-     * @param label Tag for the link.
-     * @param strong  Boolean that sets label to strong.
-     */
-    public void printHyperLink(String link, String where,
-                               String label, boolean strong) {
-        print(getHyperLinkString(link, where, label, strong, "", "", ""));
-    }
-
-    /**
-     * Print Html Hyper Link.
-     *
-     * @param link String name of the file.
-     * @param where Position of the link in the file. Character '#' is not
-     * needed.
-     * @param label Tag for the link.
-     */
-    public void printHyperLink(String link, String where, String label) {
-        printHyperLink(link, where, label, false);
-    }
-
-    /**
-     * Print Html Hyper Link.
-     *
-     * @param link       String name of the file.
-     * @param where      Position of the link in the file. Character '#' is not
-     * needed.
-     * @param label      Tag for the link.
-     * @param strong       Boolean that sets label to strong.
-     * @param stylename  String style of text defined in style sheet.
-     */
-    public void printHyperLink(String link, String where,
-                               String label, boolean strong,
-                               String stylename) {
-        print(getHyperLinkString(link, where, label, strong, stylename, "", ""));
-    }
-
-    /**
      * Return Html Hyper Link string.
      *
      * @param link       String name of the file.
@@ -180,7 +144,7 @@
     public String getHyperLinkString(String link, String where,
                                String label, boolean strong,
                                String stylename, String title, String target) {
-        StringBuffer retlink = new StringBuffer();
+        StringBuilder retlink = new StringBuilder();
         retlink.append("<a href=\"");
         retlink.append(link);
         if (where != null && where.length() != 0) {
@@ -189,10 +153,10 @@
         }
         retlink.append("\"");
         if (title != null && title.length() != 0) {
-            retlink.append(" title=\"" + title + "\"");
+            retlink.append(" title=\"").append(title).append("\"");
         }
         if (target != null && target.length() != 0) {
-            retlink.append(" target=\"" + target + "\"");
+            retlink.append(" target=\"").append(target).append("\"");
         }
         retlink.append(">");
         if (stylename != null && stylename.length() != 0) {
@@ -263,15 +227,6 @@
     }
 
     /**
-     * Print the name of the package, this class is in.
-     *
-     * @param cd    ClassDoc.
-     */
-    public void printPkgName(ClassDoc cd) {
-        print(getPkgName(cd));
-    }
-
-    /**
      * Get the name of the package, this class is in.
      *
      * @param cd    ClassDoc.
@@ -285,27 +240,6 @@
         return "";
     }
 
-    /**
-     * Keep track of member details list. Print the definition list start tag
-     * if it is not printed yet.
-     */
-    public void printMemberDetailsListStartTag () {
-        if (!getMemberDetailsListPrinted()) {
-            dl();
-            memberDetailsListPrinted = true;
-        }
-    }
-
-    /**
-     * Print the definition list end tag if the list start tag was printed.
-     */
-    public void printMemberDetailsListEndTag () {
-        if (getMemberDetailsListPrinted()) {
-            dlEnd();
-            memberDetailsListPrinted = false;
-        }
-    }
-
     public boolean getMemberDetailsListPrinted() {
         return memberDetailsListPrinted;
     }
@@ -319,12 +253,12 @@
      * @param frameset the frameset to be added to the HTML document
      */
     public void printFramesetDocument(String title, boolean noTimeStamp,
-            Content frameset) {
+            Content frameset) throws IOException {
         Content htmlDocType = DocType.Frameset();
         Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
         Content head = new HtmlTree(HtmlTag.HEAD);
         if (! noTimeStamp) {
-            Content headComment = new Comment("Generated by javadoc on " + today());
+            Content headComment = new Comment(getGeneratedByString());
             head.addContent(headComment);
         }
         if (configuration.charset.length() > 0) {
@@ -339,7 +273,7 @@
                 head, frameset);
         Content htmlDocument = new HtmlDocument(htmlDocType,
                 htmlComment, htmlTree);
-        print(htmlDocument.toString());
+        write(htmlDocument);
     }
 
     /**
@@ -356,46 +290,9 @@
         return space;
     }
 
-    /**
-     * Print the closing &lt;/body&gt; and &lt;/html&gt; tags.
-     */
-    public void printBodyHtmlEnd() {
-        println();
-        bodyEnd();
-        htmlEnd();
-    }
-
-    /**
-     * Calls {@link #printBodyHtmlEnd()} method.
-     */
-    public void printFooter() {
-        printBodyHtmlEnd();
-    }
-
-    /**
-     * Print closing &lt;/html&gt; tag.
-     */
-    public void printFrameFooter() {
-        htmlEnd();
-    }
-
-    /**
-     * Print ten non-breaking spaces("&#38;nbsp;").
-     */
-    public void printNbsps() {
-        print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
-    }
-
-    /**
-     * Get the day and date information for today, depending upon user option.
-     *
-     * @return String Today.
-     * @see java.util.Calendar
-     * @see java.util.GregorianCalendar
-     * @see java.util.TimeZone
-     */
-    public String today() {
+    protected String getGeneratedByString() {
         Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
-        return calendar.getTime().toString();
+        Date today = calendar.getTime();
+        return "Generated by javadoc ("+ ConfigurationImpl.BUILD_DATE + ") on " + today;
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocument.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,13 +25,21 @@
 
 package com.sun.tools.doclets.formats.html.markup;
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.*;
+
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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 {
@@ -69,7 +77,7 @@
      *
      * @param htmlContent html content to be added
      */
-    public void addContent(Content htmlContent) {
+    public final void addContent(Content htmlContent) {
         if (htmlContent.isValid())
             docContent.add(htmlContent);
     }
@@ -96,8 +104,9 @@
     /**
      * {@inheritDoc}
      */
-    public void write(StringBuilder contentBuilder) {
+    public boolean write(Writer out,  boolean atNewline) throws IOException {
         for (Content c : docContent)
-            c.write(contentBuilder);
+            atNewline = c.write(out, atNewline);
+        return atNewline;
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -28,6 +28,11 @@
 /**
  * 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 {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTag.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -28,6 +28,11 @@
 /**
  * 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/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,13 +25,21 @@
 
 package com.sun.tools.doclets.formats.html.markup;
 
+import java.io.IOException;
+import java.io.Writer;
 import java.util.*;
+
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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 {
@@ -423,9 +431,9 @@
     /**
      * Generates a META tag with the http-equiv, content and charset attributes.
      *
-     * @param http-equiv http equiv attribute for the META tag
+     * @param httpEquiv http equiv attribute for the META tag
      * @param content type of content
-     * @param charset character set used
+     * @param charSet character set used
      * @return an HtmlTree object for the META tag
      */
     public static HtmlTree META(String httpEquiv, String content, String charSet) {
@@ -751,35 +759,41 @@
     /**
      * {@inheritDoc}
      */
-    public void write(StringBuilder contentBuilder) {
-        if (!isInline() && !endsWithNewLine(contentBuilder))
-            contentBuilder.append(DocletConstants.NL);
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        if (!isInline() && !atNewline)
+            out.write(DocletConstants.NL);
         String tagString = htmlTag.toString();
-        contentBuilder.append("<");
-        contentBuilder.append(tagString);
+        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);
-            contentBuilder.append(" ");
-            contentBuilder.append(key.toString());
+            out.write(" ");
+            out.write(key.toString());
             if (!value.isEmpty()) {
-                contentBuilder.append("=\"");
-                contentBuilder.append(value);
-                contentBuilder.append("\"");
+                out.write("=\"");
+                out.write(value);
+                out.write("\"");
             }
         }
-        contentBuilder.append(">");
+        out.write(">");
+        boolean nl = false;
         for (Content c : content)
-            c.write(contentBuilder);
+            nl = c.write(out, nl);
         if (htmlTag.endTagRequired()) {
-            contentBuilder.append("</");
-            contentBuilder.append(tagString);
-            contentBuilder.append(">");
+            out.write("</");
+            out.write(tagString);
+            out.write(">");
         }
-        if (!isInline())
-            contentBuilder.append(DocletConstants.NL);
+        if (!isInline()) {
+            out.write(DocletConstants.NL);
+            return true;
+        } else {
+            return false;
+        }
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -32,14 +32,19 @@
 
 /**
  * Class for the Html format code generation.
- * Initilizes PrintWriter with FileWriter, to enable print
+ * 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>
+ *
  * @since 1.2
  * @author Atul M Dambalkar
  * @author Bhavesh Patel (Modified)
  */
-public class HtmlWriter extends PrintWriter {
+public class HtmlWriter {
 
     /**
      * Name of the file, to which this writer is writing to.
@@ -148,6 +153,8 @@
 
     public final Content descfrmInterfaceLabel;
 
+    private final Writer writer;
+
     /**
      * Constructor.
      *
@@ -158,13 +165,13 @@
      * @param docencoding Encoding to be used for this file.
      * @exception IOException Exception raised by the FileWriter is passed on
      * to next level.
-     * @exception UnSupportedEncodingException Exception raised by the
+     * @exception UnsupportedEncodingException Exception raised by the
      * OutputStreamWriter is passed on to next level.
      */
     public HtmlWriter(Configuration configuration,
                       String path, String filename, String docencoding)
                       throws IOException, UnsupportedEncodingException {
-        super(Util.genWriter(configuration, path, filename, docencoding));
+        writer = Util.genWriter(configuration, path, filename, docencoding);
         this.configuration = configuration;
         htmlFilename = filename;
         this.memberDetailsListPrinted = false;
@@ -213,6 +220,14 @@
         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.
      *
@@ -247,38 +262,6 @@
     }
 
     /**
-     * Print &lt;HTML&gt; tag. Add a newline character at the end.
-     */
-    public void html() {
-        println("<HTML lang=\"" + configuration.getLocale().getLanguage() + "\">");
-    }
-
-    /**
-     * Print &lt;/HTML&gt; tag. Add a newline character at the end.
-     */
-    public void htmlEnd() {
-        println("</HTML>");
-    }
-
-    /**
-     * Print the script code to be embeded before the  &lt;/HEAD&gt; tag.
-     */
-    protected void printWinTitleScript(String winTitle){
-        if(winTitle != null && winTitle.length() > 0) {
-            script();
-            println("function windowTitle()");
-            println("{");
-            println("    if (location.href.indexOf('is-external=true') == -1) {");
-            println("        parent.document.title=\"" + winTitle + "\";");
-            println("    }");
-            println("}");
-            scriptEnd();
-            noScript();
-            noScriptEnd();
-        }
-    }
-
-    /**
      * Returns an HtmlTree for the SCRIPT tag.
      *
      * @return an HtmlTree for the SCRIPT tag
@@ -321,64 +304,6 @@
     }
 
     /**
-     * Print the Javascript &lt;SCRIPT&gt; start tag with its type
-     * attribute.
-     */
-    public void script() {
-        println("<SCRIPT type=\"text/javascript\">");
-    }
-
-    /**
-     * Print the Javascript &lt;/SCRIPT&gt; end tag.
-     */
-    public void scriptEnd() {
-        println("</SCRIPT>");
-    }
-
-    /**
-     * Print the Javascript &lt;NOSCRIPT&gt; start tag.
-     */
-    public void noScript() {
-        println("<NOSCRIPT>");
-    }
-
-    /**
-     * Print the Javascript &lt;/NOSCRIPT&gt; end tag.
-     */
-    public void noScriptEnd() {
-        println("</NOSCRIPT>");
-    }
-
-    /**
-     * Return the Javascript call to be embedded in the &lt;BODY&gt; tag.
-     * Return nothing if winTitle is empty.
-     * @return the Javascript call to be embedded in the &lt;BODY&gt; tag.
-     */
-    protected String getWindowTitleOnload(){
-        if(winTitle != null && winTitle.length() > 0) {
-            return " onload=\"windowTitle();\"";
-        } else {
-            return "";
-        }
-    }
-
-    /**
-     * Print &lt;BODY BGCOLOR="bgcolor"&gt;, including JavaScript
-     * "onload" call to load windowtitle script.  This script shows the name
-     * of the document in the window title bar when frames are on.
-     *
-     * @param bgcolor Background color.
-     * @param includeScript  boolean set true if printing windowtitle script
-     */
-    public void body(String bgcolor, boolean includeScript) {
-        print("<BODY BGCOLOR=\"" + bgcolor + "\"");
-        if (includeScript) {
-            print(getWindowTitleOnload());
-        }
-        println(">");
-    }
-
-    /**
      * Returns an HtmlTree for the BODY tag.
      *
      * @param includeScript  set true if printing windowtitle script
@@ -401,31 +326,6 @@
     }
 
     /**
-     * Print &lt;/BODY&gt; tag. Add a newline character at the end.
-     */
-    public void bodyEnd() {
-        println("</BODY>");
-    }
-
-    /**
-     * Print &lt;TITLE&gt; tag. Add a newline character at the end.
-     */
-    public void title() {
-        println("<TITLE>");
-    }
-
-    /**
-     * Print &lt;TITLE&gt; tag. Add a newline character at the end.
-     *
-     * @param winTitle The title of this document.
-     */
-    public void title(String winTitle) {
-        // Set window title string which is later printed
-        this.winTitle = winTitle;
-        title();
-    }
-
-    /**
      * Returns an HtmlTree for the TITLE tag.
      *
      * @return an HtmlTree for the TITLE tag
@@ -436,295 +336,6 @@
     }
 
     /**
-     * Print &lt;/TITLE&gt; tag. Add a newline character at the end.
-     */
-    public void titleEnd() {
-        println("</TITLE>");
-    }
-
-    /**
-     * Print &lt;UL&gt; tag. Add a newline character at the end.
-     */
-    public void ul() {
-        println("<UL>");
-    }
-
-    /**
-     * Print &lt;/UL&gt; tag. Add a newline character at the end.
-     */
-    public void ulEnd() {
-        println("</UL>");
-    }
-
-    /**
-     * Print &lt;LI&gt; tag.
-     */
-    public void li() {
-        print("<LI>");
-    }
-
-    /**
-     * Print &lt;LI TYPE="type"&gt; tag.
-     *
-     * @param type Type string.
-     */
-    public void li(String type) {
-        print("<LI TYPE=\"" + type + "\">");
-    }
-
-    /**
-     * Print &lt;H1&gt; tag. Add a newline character at the end.
-     */
-    public void h1() {
-        println("<H1>");
-    }
-
-    /**
-     * Print &lt;/H1&gt; tag. Add a newline character at the end.
-     */
-    public void h1End() {
-        println("</H1>");
-    }
-
-    /**
-     * Print text with &lt;H1&gt; tag. Also adds &lt;/H1&gt; tag. Add a newline character
-     * at the end of the text.
-     *
-     * @param text Text to be printed with &lt;H1&gt; format.
-     */
-    public void h1(String text) {
-        h1();
-        println(text);
-        h1End();
-    }
-
-    /**
-     * Print &lt;H2&gt; tag. Add a newline character at the end.
-     */
-    public void h2() {
-        println("<H2>");
-    }
-
-    /**
-     * Print text with &lt;H2&gt; tag. Also adds &lt;/H2&gt; tag. Add a newline character
-     *  at the end of the text.
-     *
-     * @param text Text to be printed with &lt;H2&gt; format.
-     */
-    public void h2(String text) {
-        h2();
-        println(text);
-        h2End();
-    }
-
-    /**
-     * Print &lt;/H2&gt; tag. Add a newline character at the end.
-     */
-    public void h2End() {
-        println("</H2>");
-    }
-
-    /**
-     * Print &lt;H3&gt; tag. Add a newline character at the end.
-     */
-    public void h3() {
-        println("<H3>");
-    }
-
-    /**
-     * Print text with &lt;H3&gt; tag. Also adds &lt;/H3&gt; tag. Add a newline character
-     *  at the end of the text.
-     *
-     * @param text Text to be printed with &lt;H3&gt; format.
-     */
-    public void h3(String text) {
-        h3();
-        println(text);
-        h3End();
-    }
-
-    /**
-     * Print &lt;/H3&gt; tag. Add a newline character at the end.
-     */
-    public void h3End() {
-        println("</H3>");
-    }
-
-    /**
-     * Print &lt;H4&gt; tag. Add a newline character at the end.
-     */
-    public void h4() {
-        println("<H4>");
-    }
-
-    /**
-     * Print &lt;/H4&gt; tag. Add a newline character at the end.
-     */
-    public void h4End() {
-        println("</H4>");
-    }
-
-    /**
-     * Print text with &lt;H4&gt; tag. Also adds &lt;/H4&gt; tag. Add a newline character
-     * at the end of the text.
-     *
-     * @param text Text to be printed with &lt;H4&gt; format.
-     */
-    public void h4(String text) {
-        h4();
-        println(text);
-        h4End();
-    }
-
-    /**
-     * Print &lt;H5&gt; tag. Add a newline character at the end.
-     */
-    public void h5() {
-        println("<H5>");
-    }
-
-    /**
-     * Print &lt;/H5&gt; tag. Add a newline character at the end.
-     */
-    public void h5End() {
-        println("</H5>");
-    }
-
-    /**
-     * Print HTML &lt;IMG SRC="imggif" WIDTH="width" HEIGHT="height" ALT="imgname&gt;
-     * tag. It prepends the "images" directory name to the "imggif". This
-     * method is used for oneone format generation. Add a newline character
-     * at the end.
-     *
-     * @param imggif   Image GIF file.
-     * @param imgname  Image name.
-     * @param width    Width of the image.
-     * @param height   Height of the image.
-     */
-    public void img(String imggif, String imgname, int width, int height) {
-        println("<IMG SRC=\"images/" + imggif + ".gif\""
-              + " WIDTH=\"" + width + "\" HEIGHT=\"" + height
-              + "\" ALT=\"" + imgname + "\">");
-    }
-
-    /**
-     * Print &lt;MENU&gt; tag. Add a newline character at the end.
-     */
-    public void menu() {
-        println("<MENU>");
-    }
-
-    /**
-     * Print &lt;/MENU&gt; tag. Add a newline character at the end.
-     */
-    public void menuEnd() {
-        println("</MENU>");
-    }
-
-    /**
-     * Print &lt;PRE&gt; tag. Add a newline character at the end.
-     */
-    public void pre() {
-        println("<PRE>");
-    }
-
-    /**
-     * Print &lt;PRE&gt; tag without adding new line character at th eend.
-     */
-    public void preNoNewLine() {
-        print("<PRE>");
-    }
-
-    /**
-     * Print &lt;/PRE&gt; tag. Add a newline character at the end.
-     */
-    public void preEnd() {
-        println("</PRE>");
-    }
-
-    /**
-     * Print &lt;HR&gt; tag. Add a newline character at the end.
-     */
-    public void hr() {
-        println("<HR>");
-    }
-
-    /**
-     * Print &lt;HR SIZE="size" WIDTH="widthpercent%"&gt; tag. Add a newline
-     * character at the end.
-     *
-     * @param size           Size of the ruler.
-     * @param widthPercent   Percentage Width of the ruler
-     */
-    public void hr(int size, int widthPercent) {
-        println("<HR SIZE=\"" + size + "\" WIDTH=\"" + widthPercent + "%\">");
-    }
-
-    /**
-     * Print &lt;HR SIZE="size" NOSHADE&gt; tag. Add a newline character at the end.
-     *
-     * @param size           Size of the ruler.
-     * @param noshade        noshade string.
-     */
-    public void hr(int size, String noshade) {
-        println("<HR SIZE=\"" + size + "\" NOSHADE>");
-    }
-
-    /**
-     * Get the "&lt;STRONG&gt;" string.
-     *
-     * @return String Return String "&lt;STRONG&gt;";
-     */
-    public String getStrong() {
-        return "<STRONG>";
-    }
-
-    /**
-     * Get the "&lt;/STRONG&gt;" string.
-     *
-     * @return String Return String "&lt;/STRONG&gt;";
-     */
-    public String getStrongEnd() {
-        return "</STRONG>";
-    }
-
-    /**
-     * Print &lt;STRONG&gt; tag.
-     */
-    public void strong() {
-        print("<STRONG>");
-    }
-
-    /**
-     * Print &lt;/STRONG&gt; tag.
-     */
-    public void strongEnd() {
-        print("</STRONG>");
-    }
-
-    /**
-     * Print text passed, in strong format using &lt;STRONG&gt; and &lt;/STRONG&gt; tags.
-     *
-     * @param text String to be printed in between &lt;STRONG&gt; and &lt;/STRONG&gt; tags.
-     */
-    public void strong(String text) {
-        strong();
-        print(text);
-        strongEnd();
-    }
-
-    /**
-     * Print text passed, in Italics using &lt;I&gt; and &lt;/I&gt; tags.
-     *
-     * @param text String to be printed in between &lt;I&gt; and &lt;/I&gt; tags.
-     */
-    public void italics(String text) {
-        print("<I>");
-        print(text);
-        println("</I>");
-    }
-
-    /**
      * Return, text passed, with Italics &lt;i&gt; and &lt;/i&gt; tags, surrounding it.
      * So if the text passed is "Hi", then string returned will be "&lt;i&gt;Hi&lt;/i&gt;".
      *
@@ -739,690 +350,16 @@
     }
 
     /**
-     * Print "&#38;nbsp;", non-breaking space.
-     */
-    public void space() {
-        print("&nbsp;");
-    }
-
-    /**
      * Return "&#38;nbsp;", non-breaking space.
      */
     public Content getSpace() {
         return RawHtml.nbsp;
     }
 
-    /**
-     * Print &lt;DL&gt; tag. Add a newline character at the end.
-     */
-    public void dl() {
-        println("<DL>");
-    }
-
-    /**
-     * Print &lt;/DL&gt; tag. Add a newline character at the end.
-     */
-    public void dlEnd() {
-        println("</DL>");
-    }
-
-    /**
-     * Print &lt;DT&gt; tag.
-     */
-    public void dt() {
-        print("<DT>");
-    }
-
-    /**
-     * Print &lt;/DT&gt; tag.
-     */
-    public void dtEnd() {
-        print("</DT>");
-    }
-
-    /**
-     * Print &lt;DD&gt; tag.
-     */
-    public void dd() {
-        print("<DD>");
-    }
-
-    /**
-     * Print &lt;/DD&gt; tag. Add a newline character at the end.
-     */
-    public void ddEnd() {
-        println("</DD>");
-    }
-
-    /**
-     * Print &lt;SUP&gt; tag. Add a newline character at the end.
-     */
-    public void sup() {
-        println("<SUP>");
-    }
-
-    /**
-     * Print &lt;/SUP&gt; tag. Add a newline character at the end.
-     */
-    public void supEnd() {
-        println("</SUP>");
-    }
-
-    /**
-     * Print &lt;FONT SIZE="size"&gt; tag. Add a newline character at the end.
-     *
-     * @param size String size.
-     */
-    public void font(String size) {
-        println("<FONT SIZE=\"" + size + "\">");
-    }
-
-    /**
-     * Print &lt;FONT SIZE="size"&gt; tag.
-     *
-     * @param size String size.
-     */
-    public void fontNoNewLine(String size) {
-        print("<FONT SIZE=\"" + size + "\">");
-    }
-
-    /**
-     * Print &lt;FONT CLASS="stylename"&gt; tag. Add a newline character at the end.
-     *
-     * @param stylename String stylename.
-     */
-    public void fontStyle(String stylename) {
-        print("<FONT CLASS=\"" + stylename + "\">");
-    }
-
-    /**
-     * Print &lt;FONT SIZE="size" CLASS="stylename"&gt; tag. Add a newline character
-     * at the end.
-     *
-     * @param size String size.
-     * @param stylename String stylename.
-     */
-    public void fontSizeStyle(String size, String stylename) {
-        println("<FONT size=\"" + size + "\" CLASS=\"" + stylename + "\">");
-    }
-
-    /**
-     * Print &lt;/FONT&gt; tag.
-     */
-    public void fontEnd() {
-        print("</FONT>");
-    }
-
-    /**
-     * Get the "&lt;FONT COLOR="color"&gt;" string.
-     *
-     * @param color String color.
-     * @return String Return String "&lt;FONT COLOR="color"&gt;".
-     */
-    public String getFontColor(String color) {
-        return "<FONT COLOR=\"" + color + "\">";
-    }
-
-    /**
-     * Get the "&lt;/FONT&gt;" string.
-     *
-     * @return String Return String "&lt;/FONT&gt;";
-     */
-    public String getFontEnd() {
-        return "</FONT>";
-    }
-
-    /**
-     * Print &lt;CENTER&gt; tag. Add a newline character at the end.
-     */
-    public void center() {
-        println("<CENTER>");
-    }
-
-    /**
-     * Print &lt;/CENTER&gt; tag. Add a newline character at the end.
-     */
-    public void centerEnd() {
-        println("</CENTER>");
-    }
-
-    /**
-     * Print anchor &lt;A NAME="name"&gt; tag.
-     *
-     * @param name Name String.
-     */
-    public void aName(String name) {
-        print("<A NAME=\"" + name + "\">");
-    }
-
-    /**
-     * Print &lt;/A&gt; tag.
-     */
-    public void aEnd() {
-        print("</A>");
-    }
-
-    /**
-     * Print &lt;I&gt; tag.
-     */
-    public void italic() {
-        print("<I>");
-    }
-
-    /**
-     * Print &lt;/I&gt; tag.
-     */
-    public void italicEnd() {
-        print("</I>");
-    }
-
-    /**
-     * Print contents within anchor &lt;A NAME="name"&gt; tags.
-     *
-     * @param name String name.
-     * @param content String contents.
-     */
-    public void anchor(String name, String content) {
-        aName(name);
-        print(content);
-        aEnd();
-    }
-
-    /**
-     * Print anchor &lt;A NAME="name"&gt; and &lt;/A&gt;tags. Print comment string
-     * "&lt;!-- --&gt;" within those tags.
-     *
-     * @param name String name.
-     */
-    public void anchor(String name) {
-        anchor(name, "<!-- -->");
-    }
-
-    /**
-     * Print newline and then print &lt;P&gt; tag. Add a newline character at the
-     * end.
-     */
-    public void p() {
-        println();
-        println("<P>");
-    }
-
-    /**
-     * Print newline and then print &lt;/P&gt; tag. Add a newline character at the
-     * end.
-     */
-    public void pEnd() {
-        println();
-        println("</P>");
-    }
-
-    /**
-     * Print newline and then print &lt;BR&gt; tag. Add a newline character at the
-     * end.
-     */
-    public void br() {
-        println();
-        println("<BR>");
-    }
-
-    /**
-     * Print &lt;ADDRESS&gt; tag. Add a newline character at the end.
-     */
-    public void address() {
-        println("<ADDRESS>");
-    }
-
-    /**
-     * Print &lt;/ADDRESS&gt; tag. Add a newline character at the end.
-     */
-    public void addressEnd() {
-        println("</ADDRESS>");
-    }
-
-    /**
-     * Print &lt;HEAD&gt; tag. Add a newline character at the end.
-     */
-    public void head() {
-        println("<HEAD>");
-    }
-
-    /**
-     * Print &lt;/HEAD&gt; tag. Add a newline character at the end.
-     */
-    public void headEnd() {
-        println("</HEAD>");
-    }
-
-    /**
-     * Print &lt;CODE&gt; tag.
-     */
-    public void code() {
-        print("<CODE>");
-    }
-
-    /**
-     * Print &lt;/CODE&gt; tag.
-     */
-    public void codeEnd() {
-        print("</CODE>");
-    }
-
-    /**
-     * Print &lt;EM&gt; tag. Add a newline character at the end.
-     */
-    public void em() {
-        println("<EM>");
-    }
-
-    /**
-     * Print &lt;/EM&gt; tag. Add a newline character at the end.
-     */
-    public void emEnd() {
-        println("</EM>");
-    }
-
-    /**
-     * Print HTML &lt;TABLE BORDER="border" WIDTH="width"
-     * CELLPADDING="cellpadding" CELLSPACING="cellspacing"&gt; tag.
-     *
-     * @param border       Border size.
-     * @param width        Width of the table.
-     * @param cellpadding  Cellpadding for the table cells.
-     * @param cellspacing  Cellspacing for the table cells.
-     */
-    public void table(int border, String width, int cellpadding,
-                      int cellspacing) {
-        println(DocletConstants.NL +
-                "<TABLE BORDER=\"" + border +
-                "\" WIDTH=\"" + width +
-                "\" CELLPADDING=\"" + cellpadding +
-                "\" CELLSPACING=\"" + cellspacing +
-                "\" SUMMARY=\"\">");
-    }
-
-    /**
-     * Print HTML &lt;TABLE BORDER="border" WIDTH="width"
-     * CELLPADDING="cellpadding" CELLSPACING="cellspacing" SUMMARY="summary"&gt; tag.
-     *
-     * @param border       Border size.
-     * @param width        Width of the table.
-     * @param cellpadding  Cellpadding for the table cells.
-     * @param cellspacing  Cellspacing for the table cells.
-     * @param summary      Table summary.
-     */
-    public void table(int border, String width, int cellpadding,
-                      int cellspacing, String summary) {
-        println(DocletConstants.NL +
-                "<TABLE BORDER=\"" + border +
-                "\" WIDTH=\"" + width +
-                "\" CELLPADDING=\"" + cellpadding +
-                "\" CELLSPACING=\"" + cellspacing +
-                "\" SUMMARY=\"" + summary + "\">");
-    }
-
-    /**
-     * Print HTML &lt;TABLE BORDER="border" CELLPADDING="cellpadding"
-     * CELLSPACING="cellspacing"&gt; tag.
-     *
-     * @param border       Border size.
-     * @param cellpadding  Cellpadding for the table cells.
-     * @param cellspacing  Cellspacing for the table cells.
-     */
-    public void table(int border, int cellpadding, int cellspacing) {
-        println(DocletConstants.NL +
-                "<TABLE BORDER=\"" + border +
-                "\" CELLPADDING=\"" + cellpadding +
-                "\" CELLSPACING=\"" + cellspacing +
-                "\" SUMMARY=\"\">");
-    }
-
-    /**
-     * Print HTML &lt;TABLE BORDER="border" CELLPADDING="cellpadding"
-     * CELLSPACING="cellspacing" SUMMARY="summary"&gt; tag.
-     *
-     * @param border       Border size.
-     * @param cellpadding  Cellpadding for the table cells.
-     * @param cellspacing  Cellspacing for the table cells.
-     * @param summary      Table summary.
-     */
-    public void table(int border, int cellpadding, int cellspacing, String summary) {
-        println(DocletConstants.NL +
-                "<TABLE BORDER=\"" + border +
-                "\" CELLPADDING=\"" + cellpadding +
-                "\" CELLSPACING=\"" + cellspacing +
-                "\" SUMMARY=\"" + summary + "\">");
-    }
-
-    /**
-     * Print HTML &lt;TABLE BORDER="border" WIDTH="width"&gt;
-     *
-     * @param border       Border size.
-     * @param width        Width of the table.
-     */
-    public void table(int border, String width) {
-        println(DocletConstants.NL +
-                "<TABLE BORDER=\"" + border +
-                "\" WIDTH=\"" + width +
-                "\" SUMMARY=\"\">");
-    }
-
-    /**
-     * Print the HTML table tag with border size 0 and width 100%.
-     */
-    public void table() {
-        table(0, "100%");
-    }
-
-    /**
-     * Print &lt;/TABLE&gt; tag. Add a newline character at the end.
-     */
-    public void tableEnd() {
-        println("</TABLE>");
-    }
-
-    /**
-     * Print &lt;TR&gt; tag. Add a newline character at the end.
-     */
-    public void tr() {
-        println("<TR>");
-    }
-
-    /**
-     * Print &lt;/TR&gt; tag. Add a newline character at the end.
-     */
-    public void trEnd() {
-        println("</TR>");
-    }
-
-    /**
-     * Print &lt;TD&gt; tag.
-     */
-    public void td() {
-        print("<TD>");
-    }
-
-    /**
-     * Print &lt;TD NOWRAP&gt; tag.
-     */
-    public void tdNowrap() {
-        print("<TD NOWRAP>");
-    }
-
-    /**
-     * Print &lt;TD WIDTH="width"&gt; tag.
-     *
-     * @param width String width.
-     */
-    public void tdWidth(String width) {
-        print("<TD WIDTH=\"" + width + "\">");
-    }
-
-    /**
-     * Print &lt;/TD&gt; tag. Add a newline character at the end.
-     */
-    public void tdEnd() {
-        println("</TD>");
-    }
-
-    /**
-     * Print &lt;LINK str&gt; tag.
-     *
-     * @param str String.
-     */
-    public void link(String str) {
-        println("<LINK " + str + ">");
-    }
-
-    /**
-     * Print "&lt;!-- " comment start string.
-     */
-    public void commentStart() {
-         print("<!-- ");
-    }
-
-    /**
-     * Print "--&gt;" comment end string. Add a newline character at the end.
-     */
-    public void commentEnd() {
-         println("-->");
-    }
-
-    /**
-     * Print &lt;CAPTION CLASS="stylename"&gt; tag. Adds a newline character
-     * at the end.
-     *
-     * @param stylename style to be applied.
-     */
-    public void captionStyle(String stylename) {
-        println("<CAPTION CLASS=\"" + stylename + "\">");
-    }
-
-    /**
-     * Print &lt;/CAPTION&gt; tag. Add a newline character at the end.
-     */
-    public void captionEnd() {
-        println("</CAPTION>");
-    }
-
-    /**
-     * Print &lt;TR BGCOLOR="color" CLASS="stylename"&gt; tag. Adds a newline character
-     * at the end.
-     *
-     * @param color String color.
-     * @param stylename String stylename.
-     */
-    public void trBgcolorStyle(String color, String stylename) {
-        println("<TR BGCOLOR=\"" + color + "\" CLASS=\"" + stylename + "\">");
-    }
-
-    /**
-     * Print &lt;TR BGCOLOR="color"&gt; tag. Adds a newline character at the end.
-     *
-     * @param color String color.
-     */
-    public void trBgcolor(String color) {
-        println("<TR BGCOLOR=\"" + color + "\">");
-    }
-
-    /**
-     * Print &lt;TR ALIGN="align" VALIGN="valign"&gt; tag. Adds a newline character
-     * at the end.
-     *
-     * @param align String align.
-     * @param valign String valign.
-     */
-    public void trAlignVAlign(String align, String valign) {
-        println("<TR ALIGN=\"" + align + "\" VALIGN=\"" + valign + "\">");
-    }
-
-    /**
-     * Print &lt;TH ALIGN="align"&gt; tag.
-     *
-     * @param align the align attribute.
-     */
-    public void thAlign(String align) {
-        print("<TH ALIGN=\"" + align + "\">");
-    }
-
-    /**
-     * Print &lt;TH CLASS="stylename" SCOPE="scope" NOWRAP&gt; tag.
-     *
-     * @param stylename style to be applied.
-     * @param scope the scope attribute.
-     */
-    public void thScopeNoWrap(String stylename, String scope) {
-        print("<TH CLASS=\"" + stylename + "\" SCOPE=\"" + scope + "\" NOWRAP>");
-    }
-
     /*
      * Returns a header for Modifier and Type column of a table.
      */
     public String getModifierTypeHeader() {
         return modifierTypeHeader;
     }
-
-    /**
-     * Print &lt;TH align="align" COLSPAN=i&gt; tag.
-     *
-     * @param align the align attribute.
-     * @param i integer.
-     */
-    public void thAlignColspan(String align, int i) {
-        print("<TH ALIGN=\"" + align + "\" COLSPAN=\"" + i + "\">");
-    }
-
-    /**
-     * Print &lt;TH align="align" NOWRAP&gt; tag.
-     *
-     * @param align the align attribute.
-     */
-    public void thAlignNowrap(String align) {
-        print("<TH ALIGN=\"" + align + "\" NOWRAP>");
-    }
-
-    /**
-     * Print &lt;/TH&gt; tag. Add a newline character at the end.
-     */
-    public void thEnd() {
-        println("</TH>");
-    }
-
-    /**
-     * Print &lt;TD COLSPAN=i&gt; tag.
-     *
-     * @param i integer.
-     */
-    public void tdColspan(int i) {
-        print("<TD COLSPAN=" + i + ">");
-    }
-
-    /**
-     * Print &lt;TD BGCOLOR="color" CLASS="stylename"&gt; tag.
-     *
-     * @param color String color.
-     * @param stylename String stylename.
-     */
-    public void tdBgcolorStyle(String color, String stylename) {
-        print("<TD BGCOLOR=\"" + color + "\" CLASS=\"" + stylename + "\">");
-    }
-
-    /**
-     * Print &lt;TD COLSPAN=i BGCOLOR="color" CLASS="stylename"&gt; tag.
-     *
-     * @param i integer.
-     * @param color String color.
-     * @param stylename String stylename.
-     */
-    public void tdColspanBgcolorStyle(int i, String color, String stylename) {
-        print("<TD COLSPAN=" + i + " BGCOLOR=\"" + color + "\" CLASS=\"" +
-              stylename + "\">");
-    }
-
-    /**
-     * Print &lt;TD ALIGN="align"&gt; tag. Adds a newline character
-     * at the end.
-     *
-     * @param align String align.
-     */
-    public void tdAlign(String align) {
-        print("<TD ALIGN=\"" + align + "\">");
-    }
-
-    /**
-     * Print &lt;TD ALIGN="align" CLASS="stylename"&gt; tag.
-     *
-     * @param align        String align.
-     * @param stylename    String stylename.
-     */
-    public void tdVAlignClass(String align, String stylename) {
-        print("<TD VALIGN=\"" + align + "\" CLASS=\"" + stylename + "\">");
-    }
-
-    /**
-     * Print &lt;TD VALIGN="valign"&gt; tag.
-     *
-     * @param valign String valign.
-     */
-    public void tdVAlign(String valign) {
-        print("<TD VALIGN=\"" + valign + "\">");
-    }
-
-    /**
-     * Print &lt;TD ALIGN="align" VALIGN="valign"&gt; tag.
-     *
-     * @param align   String align.
-     * @param valign  String valign.
-     */
-    public void tdAlignVAlign(String align, String valign) {
-        print("<TD ALIGN=\"" + align + "\" VALIGN=\"" + valign + "\">");
-    }
-
-    /**
-     * Print &lt;TD ALIGN="align" ROWSPAN=rowspan&gt; tag.
-     *
-     * @param align    String align.
-     * @param rowspan  integer rowspan.
-     */
-    public void tdAlignRowspan(String align, int rowspan) {
-        print("<TD ALIGN=\"" + align + "\" ROWSPAN=" + rowspan + ">");
-    }
-
-    /**
-     * Print &lt;TD ALIGN="align" VALIGN="valign" ROWSPAN=rowspan&gt; tag.
-     *
-     * @param align    String align.
-     * @param valign  String valign.
-     * @param rowspan  integer rowspan.
-     */
-    public void tdAlignVAlignRowspan(String align, String valign,
-                                     int rowspan) {
-        print("<TD ALIGN=\"" + align + "\" VALIGN=\"" + valign
-                + "\" ROWSPAN=" + rowspan + ">");
-    }
-
-    /**
-     * Print &lt;BLOCKQUOTE&gt; tag. Add a newline character at the end.
-     */
-    public void blockquote() {
-        println("<BLOCKQUOTE>");
-    }
-
-    /**
-     * Print &lt;/BLOCKQUOTE&gt; tag. Add a newline character at the end.
-     */
-    public void blockquoteEnd() {
-        println("</BLOCKQUOTE>");
-    }
-
-    /**
-     * Get the "&lt;code&gt;" string.
-     *
-     * @return String Return String "&lt;code&gt;";
-     */
-    public String getCode() {
-        return "<code>";
-    }
-
-    /**
-     * Get the "&lt;/code&gt;" string.
-     *
-     * @return String Return String "&lt;/code&gt;";
-     */
-    public String getCodeEnd() {
-        return "</code>";
-    }
-
-    /**
-     * Print &lt;NOFRAMES&gt; tag. Add a newline character at the end.
-     */
-    public void noFrames() {
-        println("<NOFRAMES>");
-    }
-
-    /**
-     * Print &lt;/NOFRAMES&gt; tag. Add a newline character at the end.
-     */
-    public void noFramesEnd() {
-        println("</NOFRAMES>");
-    }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,12 +25,20 @@
 
 package com.sun.tools.doclets.formats.html.markup;
 
+import java.io.IOException;
+import java.io.Writer;
+
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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{
@@ -82,7 +90,16 @@
     /**
      * {@inheritDoc}
      */
-    public void write(StringBuilder contentBuilder) {
-        contentBuilder.append(rawHtmlContent);
+    public String toString() {
+        return rawHtmlContent;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        out.write(rawHtmlContent);
+        return rawHtmlContent.endsWith(DocletConstants.NL);
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,12 +25,20 @@
 
 package com.sun.tools.doclets.formats.html.markup;
 
+import java.io.IOException;
+import java.io.Writer;
+
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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{
@@ -93,7 +101,10 @@
     /**
      * {@inheritDoc}
      */
-    public void write(StringBuilder contentBuilder) {
-        contentBuilder.append(stringContent);
+    @Override
+    public boolean write(Writer out, boolean atNewline) throws IOException {
+        String s = stringContent.toString();
+        out.write(s);
+        return s.endsWith(DocletConstants.NL);
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,18 +25,19 @@
 
 package com.sun.tools.doclets.internal.toolkit;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.builders.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
-import java.util.*;
-import java.io.*;
+import java.io.File;
+import java.util.StringTokenizer;
 
 /**
  * An abstract implementation of a Doclet.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API.
+ *  <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
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,9 +30,10 @@
 /**
  * The interface for writing annotation type optional member output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,9 +31,11 @@
 /**
  * The interface for writing annotation type required member output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -32,9 +32,10 @@
 /**
  * The interface for writing annotation type output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API.
+ *  <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)
@@ -152,7 +153,7 @@
      *
      * @param contentTree content tree that will be printed as a document
      */
-    public void printDocument(Content contentTree);
+    public void printDocument(Content contentTree) throws IOException;
 
     /**
      * Close the writer.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -32,9 +32,10 @@
 /**
  * The interface for writing class output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -179,7 +180,7 @@
      *
      * @param contentTree content tree that will be printed as a document
      */
-    public void printDocument(Content contentTree);
+    public void printDocument(Content contentTree) throws IOException;
 
     /**
      * Close the writer.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu Oct 25 20:33:49 2012 -0700
@@ -25,12 +25,13 @@
 
 package com.sun.tools.doclets.internal.toolkit;
 
+import java.io.*;
+import java.util.*;
+
+import com.sun.javadoc.*;
+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.builders.BuilderFactory;
-import com.sun.javadoc.*;
-import java.util.*;
-import java.io.*;
 
 /**
  * Configure the output based on the options. Doclets should sub-class
@@ -38,9 +39,10 @@
  * all user options which are supported by the 1.1 doclet and the standard
  * doclet.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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.
@@ -463,7 +465,7 @@
                     tagletManager.addNewSimpleCustomTag(tagName, null, "");
                 } else {
                     //Create a simple tag with the heading that has the same name as the tag.
-                    StringBuffer heading = new StringBuffer(tagName + ":");
+                    StringBuilder heading = new StringBuilder(tagName + ":");
                     heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0)));
                     tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a");
                 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,16 +25,18 @@
 
 package com.sun.tools.doclets.internal.toolkit;
 
+import java.io.*;
 import java.util.*;
-import java.io.*;
+
 import com.sun.javadoc.*;
 
 /**
  * The interface for writing constants summary output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -137,6 +139,6 @@
      *
      * @param contentTree content tree which should be printed
      */
-    public abstract void printDocument(Content contentTree);
+    public abstract void printDocument(Content contentTree) throws IOException;
 
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,9 +31,10 @@
 /**
  * The interface for writing constructor output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -25,11 +25,20 @@
 
 package com.sun.tools.doclets.internal.toolkit;
 
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
 /**
  * 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 {
@@ -39,10 +48,16 @@
      *
      * @return string representation of the content
      */
+    @Override
     public String toString() {
-        StringBuilder contentBuilder = new StringBuilder();
-        write(contentBuilder);
-        return contentBuilder.toString();
+        StringWriter out = new StringWriter();
+        try {
+            write(out, true);
+        } catch (IOException e) {
+            // cannot happen from StringWriter
+            throw new DocletAbortException();
+        }
+        return out.toString();
     }
 
     /**
@@ -60,10 +75,10 @@
     public abstract void addContent(String stringContent);
 
     /**
-     * Writes content to a StringBuilder.
+     * Writes content to a writer.
      *
      */
-    public abstract void write(StringBuilder contentBuilder);
+    public abstract boolean write(Writer writer, boolean atNewline) throws IOException ;
 
     /**
      * Returns true if the content is empty.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,9 +31,10 @@
 /**
  * The interface for writing enum constant output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -56,7 +57,7 @@
      * Get the enum constants documentation tree header.
      *
      * @param enumConstant the enum constant being documented
-     * @param enumConstantDetailsTree the content tree representing enum constant details
+     * @param enumConstantsDetailsTree the content tree representing enum constant details
      * @return content tree for the enum constant documentation header
      */
     public Content getEnumConstantsTreeHeader(FieldDoc enumConstant,
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,9 +31,10 @@
 /**
  * The interface for writing field output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -32,9 +32,10 @@
 /**
  * The interface for writing member summary output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,9 +31,10 @@
 /**
  * The interface for writing method output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,9 +30,10 @@
 /**
  * The interface for writing class output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,15 +25,17 @@
 
 package com.sun.tools.doclets.internal.toolkit;
 
+import java.io.*;
+
 import com.sun.javadoc.*;
-import java.io.*;
 
 /**
  * The interface for writing package summary output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -113,7 +115,7 @@
      *
      * @param contentTree the content tree that will be printed
      */
-    public abstract void printDocument(Content contentTree);
+    public abstract void printDocument(Content contentTree) throws IOException;
 
     /**
      * Close the writer.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -32,9 +32,10 @@
 /**
  * The interface for writing serialized form output.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.5
@@ -150,7 +151,7 @@
      *
      * @param serializedTree the content tree that will be printed
      */
-    public abstract void printDocument(Content serializedTree);
+    public abstract void printDocument(Content serializedTree) throws IOException;
 
     /**
      * Write the serialized form for a given field.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,15 +25,16 @@
 
 package com.sun.tools.doclets.internal.toolkit;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
 
 /**
  * The interface for a factory creates writers.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,12 +25,13 @@
 
 package com.sun.tools.doclets.internal.toolkit.builders;
 
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import java.io.*;
 import java.lang.reflect.*;
 import java.util.*;
 
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
 /**
  * The superclass for all builders.  A builder is a class that provides
  * the structure and content of API documentation.  A builder is completely
@@ -41,9 +42,10 @@
  * do is implement the ConstantsSummaryWriter interface and pass it to the
  * builder using a WriterFactory.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.5
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,16 +27,16 @@
 
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.util.*;
 
 /**
  * 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.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.5
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,16 +27,18 @@
 
 import java.io.*;
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds the summary for a given annotation type.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -177,7 +179,7 @@
      * @param annotationInfoTree the content tree to which the documentation will be added
      */
     public void buildAnnotationTypeSignature(XMLNode node, Content annotationInfoTree) {
-        StringBuffer modifiers = new StringBuffer(
+        StringBuilder modifiers = new StringBuilder(
                 annotationTypeDoc.modifiers() + " ");
         writer.addAnnotationTypeSignature(Util.replaceText(
                 modifiers.toString(), "interface", "@interface"), annotationInfoTree);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds documentation for optional annotation type members.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds documentation for required annotation type members.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,16 +25,17 @@
 
 package com.sun.tools.doclets.internal.toolkit.builders;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
 
 /**
  * The factory for constructing builders.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -27,16 +27,18 @@
 
 import java.io.*;
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds the summary for a given class.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -280,18 +282,18 @@
      * @param classInfoTree the content tree to which the documentation will be added
      */
     public void buildClassSignature(XMLNode node, Content classInfoTree) {
-        StringBuffer modifiers = new StringBuffer(classDoc.modifiers() + " ");
+        StringBuilder modifiers = new StringBuilder(classDoc.modifiers() + " ");
         if (isEnum) {
             modifiers.append("enum ");
             int index;
             if ((index = modifiers.indexOf("abstract")) >= 0) {
-                modifiers.delete(index, index + (new String("abstract")).length());
-                modifiers = new StringBuffer(
+                modifiers.delete(index, index + "abstract".length());
+                modifiers = new StringBuilder(
                         Util.replaceText(modifiers.toString(), "  ", " "));
             }
             if ((index = modifiers.indexOf("final")) >= 0) {
-                modifiers.delete(index, index + (new String("final")).length());
-                modifiers = new StringBuffer(
+                modifiers.delete(index, index + "final".length());
+                modifiers = new StringBuilder(
                         Util.replaceText(modifiers.toString(), "  ", " "));
             }
         //} else if (classDoc.isAnnotationType()) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,16 +27,18 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
 
 /**
  * Builds the Constants Summary Page.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -345,7 +347,6 @@
 
         /**
          * Return the list of visible constant fields for the given classdoc.
-         * @param cd the classdoc to examine.
          * @return the list of visible constant fields for the given classdoc.
          */
         protected List<FieldDoc> members() {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds documentation for a constructor.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds documentation for a enum constants.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds documentation for a field.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -24,18 +24,26 @@
  */
 package com.sun.tools.doclets.internal.toolkit.builders;
 
+import java.io.*;
+import java.util.*;
+
+import javax.xml.parsers.*;
+
+import org.xml.sax.*;
+import org.xml.sax.helpers.DefaultHandler;
+
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.io.*;
-import java.util.*;
-import org.xml.sax.*;
-import org.xml.sax.helpers.DefaultHandler;
-import javax.xml.parsers.*;
 
 /**
  * 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
  * @since 1.5
  * @see SAXParser
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds the member summary.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -165,7 +167,6 @@
      * This information can be used for doclet specific documentation
      * generation.
      *
-     * @param classDoc the {@link ClassDoc} we want to check.
      * @param type the type of members to return.
      * @return a list of methods that will be documented.
      * @see VisibleMemberMap
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 
 /**
  * Builds documentation for a method.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -26,16 +26,18 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.io.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
 
 /**
  * Builds the summary for a given package.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -27,16 +27,18 @@
 
 import java.io.*;
 import java.util.*;
+
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
 
 /**
  * Builds the serialized form.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -32,6 +32,11 @@
 
 /**
  * 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) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseExecutableMemberTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseExecutableMemberTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -29,9 +29,10 @@
  * An abstract class for that implements the {@link Taglet} interface
  * for tags in <code>ExecutableMembers</code>.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API.
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseInlineTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseInlineTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -28,9 +28,10 @@
 /**
  * An abstract inline taglet that outputs HTML.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,15 +25,15 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
-import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.javadoc.*;
 
 /**
  * An abstract class for that implements the {@link Taglet} interface.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -40,6 +40,11 @@
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,9 +30,10 @@
 /**
  * A taglet that represents the @deprecated tag.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.5
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DocRootTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DocRootTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -32,9 +32,10 @@
  * used to get the relative path to the document's root output
  * directory.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -33,9 +33,10 @@
  * be used with a method.  It is used to inherit documentation from overriden
  * and implemented methods.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritableTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritableTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,6 +31,11 @@
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LegacyTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LegacyTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -36,9 +36,10 @@
  * This taglet is able to wrap most most legacy taglets because
  * the standard doclet is the only known doclet to use legacy taglets.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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>
  *
  * @since 1.5
  * @author Jamie Ho
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -38,6 +38,11 @@
  * 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
  * @since 1.5
  */
@@ -79,7 +84,7 @@
      * Replace occurrences of the following characters:  < > &
      */
     protected static String textToString(String text) {
-           StringBuffer buf = new StringBuffer();
+           StringBuilder buf = new StringBuilder();
            for (int i = 0; i < text.length(); i++) {
                char c = text.charAt(i);
                switch (c) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,16 +25,18 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.util.*;
 
 /**
  * A taglet that represents the @param tag.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
@@ -182,7 +184,7 @@
      * Given an array of <code>ParamTag</code>s,return its string representation.
      * Try to inherit the param tags that are missing.
      *
-     * @param doc               the doc that holds the param tags.
+     * @param holder            the doc 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.
@@ -255,7 +257,7 @@
      *        been documented.
      * @param rankMap a {@link java.util.Map} which holds ordering
      *                    information about the parameters.
-     * @param nameMap a {@link java.util.Map} which holds a mapping
+     * @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.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ReturnTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ReturnTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,15 +25,16 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
 
 /**
  * A taglet that represents the @return tag.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SeeTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SeeTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,15 +25,16 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
 
 /**
  * A taglet that represents the @see tag.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -30,9 +30,10 @@
 /**
  * A simple single argument custom tag.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Thu Oct 25 20:33:49 2012 -0700
@@ -25,20 +25,21 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
-import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
 import java.io.*;
 import java.lang.reflect.*;
 import java.net.*;
 import java.util.*;
 
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
 /**
  * Manages the<code>Taglet</code>s used by doclets.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
@@ -448,7 +449,7 @@
             //This known tag is excluded.
             return;
         }
-        StringBuffer combined_locations = new StringBuffer();
+        StringBuilder combined_locations = new StringBuilder();
         for (int i = 0; i < locations.length; i++) {
             if (i > 0) {
                 combined_locations.append(", ");
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,6 +30,11 @@
  * different doclets work with different formats of output.  A single taglet can
  * work with any doclet that provides an implementation of taglet 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,13 +25,18 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
 
 /**
  * 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>
+ *
  * @since 1.5
  * @author Jamie Ho
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ThrowsTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ThrowsTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,16 +25,18 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.util.*;
 
 /**
  * A taglet that represents the @throws tag.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -25,10 +25,11 @@
 
 package com.sun.tools.doclets.internal.toolkit.taglets;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.Configuration;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.util.*;
 
 /**
  * An inline Taglet representing the value tag. This tag should only be used with
@@ -39,9 +40,10 @@
  * 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].
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
@@ -107,7 +109,7 @@
      * @param config the current configuration of the doclet.
      * @param tag the value tag.
      * @param name the name of the field to search for.  The name should be in
-     * <qualified class name>#<field name> format. If the class name is omitted,
+     * {@code <qualified class name>#<field name>} format. If the class name is omitted,
      * it is assumed that the field is in the current class.
      *
      * @return the corresponding FieldDoc. If the name is null or empty string,
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 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
@@ -36,9 +36,10 @@
  * those classes so that we can retrieve all of the classes from a particular
  * package later.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.4
@@ -184,7 +185,7 @@
       /**
        * Return all of the classes specified on the command-line that
        * belong to the given package.
-       * @param packageDoc the package to return the classes for.
+       * @param pkgDoc the package to return the classes for.
        */
       public ClassDoc[] allClasses(PackageDoc pkgDoc) {
           return pkgDoc.isIncluded() ?
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,17 +25,19 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
-import java.util.*;
 
 /**
  * Build Class Hierarchy for all the Classes. This class builds the Class
  * Tree and the Interface Tree separately.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,15 +25,17 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
-import java.util.*;
 
 /**
  * Map all class uses for a given class.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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>
  *
  * @since 1.2
  * @author Robert G. Field
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/CommentedMethodFinder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/CommentedMethodFinder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -30,9 +30,10 @@
 /**
  * Find a commented method.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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 CommentedMethodFinder extends MethodFinder {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,13 +25,19 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
-import java.util.*;
 import com.sun.tools.doclets.internal.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 {
@@ -145,7 +151,7 @@
     /**
      * Return the list of deprecated Doc objects of a given type.
      *
-     * @param the constant representing the type of list being returned.
+     * @param type the constant representing the type of list being returned.
      */
     public List<Doc> getList(int type) {
         return deprecatedLists.get(type);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -119,7 +119,7 @@
         if (packageName == null || packageName.length() == 0) {
             return "";
         }
-        StringBuffer pathstr = new StringBuffer();
+        StringBuilder pathstr = new StringBuilder();
         for (int i = 0; i < packageName.length(); i++) {
             char ch = packageName.charAt(i);
             if (ch == '.') {
@@ -151,7 +151,7 @@
         if (name == null || name.length() == 0) {
             return "";
         }
-        StringBuffer pathstr = new StringBuffer();
+        StringBuilder pathstr = new StringBuilder();
         for (int i = 0; i < name.length(); i++) {
             char ch = name.charAt(i);
             if (ch == '.') {
@@ -181,7 +181,7 @@
      * @see          #getPath(String)
      */
     public static String getRelativePath(String from, String to) {
-        StringBuffer pathstr = new StringBuffer();
+        StringBuilder pathstr = new StringBuilder();
         pathstr.append(getRelativePath(from));
         pathstr.append(getPath(to));
         pathstr.append(URL_FILE_SEPARATOR);
@@ -222,7 +222,7 @@
         if (from == null || from.length() == 0) {
             return "";
         }
-        StringBuffer pathstr = new StringBuffer();
+        StringBuilder pathstr = new StringBuilder();
         for (int i = 0; i < from.length(); i++) {
             char ch = from.charAt(i);
             if (ch == '.') {
@@ -293,7 +293,7 @@
      * @param filename   File name to be appended to the path of the package.
      */
     public static String getPathToPackage(PackageDoc pd, String filename) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         String pathstr = createPathString(pd);
         if (pathstr.length() > 0) {
             buf.append(pathstr);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFinder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFinder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -25,13 +25,19 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import java.util.*;
 
 /**
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -25,6 +25,12 @@
 
 package com.sun.tools.doclets.internal.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;
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -29,9 +29,10 @@
  * Stores all constants for a Doclet.  Extend this class if you have doclet
  * specific constants to add.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.5
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,13 +25,13 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
-import com.sun.tools.doclets.internal.toolkit.*;
+import java.io.*;
+import java.net.*;
+import java.util.HashMap;
+import java.util.Map;
 
 import com.sun.javadoc.*;
-import java.util.Map;
-import java.util.HashMap;
-import java.io.*;
-import java.net.*;
+import com.sun.tools.doclets.internal.toolkit.*;
 
 /**
  * Process and manage "-link" and "-linkoffline" to external packages. The
@@ -40,9 +40,10 @@
  * documented) file in the current or the destination directory, while
  * generating the documentation.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
@@ -91,7 +92,7 @@
          * 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 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.
@@ -179,7 +180,7 @@
     /**
      * Get the Extern Item object associated with this package name.
      *
-     * @param pkgname Package name.
+     * @param pkgName Package name.
      */
     private Item findPackageItem(String pkgName) {
         if (packageToItemMap == null) {
@@ -276,7 +277,7 @@
                                 boolean relative)
                          throws IOException {
         BufferedReader in = new BufferedReader(new InputStreamReader(input));
-        StringBuffer strbuf = new StringBuffer();
+        StringBuilder strbuf = new StringBuilder();
         try {
             int c;
             while ((c = in.read()) >= 0) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,9 +25,10 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
-import java.util.*;
 
 /**
  * Process and manage grouping of packages, as specified by "-group" option on
@@ -48,9 +49,10 @@
  * will put the package java.lang in the group "Lang" and not in group "Core".
  * </p>
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,17 +25,19 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.Configuration;
-import java.util.*;
 
 /**
  * For a given class method, build an array of interface methods which it
  * implements.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,9 +25,10 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
-import java.util.*;
 
 /**
  * Build the mapping of each Unicode character with it's member lists
@@ -35,9 +36,10 @@
  * Unicode characters which start a member name. Member name is
  * classkind or field or method or constructor name.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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>
  *
  * @since 1.2
  * @see java.lang.Character
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -24,18 +24,20 @@
  */
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.text.MessageFormat;
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.Configuration;
-import java.util.*;
-import java.text.MessageFormat;
 
 
 /**
  * Retrieve and format messages stored in a resource.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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>
  *
  * @since 1.2
  * @author Atul M Dambalkar
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 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
@@ -25,9 +25,10 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
+import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
-import java.util.*;
 
 /**
  * Provides methods for creating an array of class, method and
@@ -35,9 +36,10 @@
  * of class pages.  These keywords improve search results
  * on browsers that look for keywords.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodFinder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodFinder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -33,9 +33,10 @@
  * superclasses and interfaces(subsequently super-interfaces also)
  * recursively.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API.
+ *  <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 MethodFinder {
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 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
@@ -25,17 +25,19 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
 
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
 /**
  * Write out the package index.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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 com.sun.javadoc.PackageDoc
  * @author Atul M Dambalkar
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TaggedMethodFinder.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TaggedMethodFinder.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -30,9 +30,10 @@
 /**
  * Find a tagged method.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TextTag.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TextTag.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,9 +30,10 @@
  * A tag that holds nothing but plain text.  This is useful for passing
  * text to methods that only accept inline tags as a parameter.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
  * @since 1.5
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -34,9 +34,10 @@
 /**
  * Utilities Class for Doclets.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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
@@ -366,7 +367,13 @@
                     while((n = in.read(buf))>0) out.write(buf,0,n);
                 } else {
                     BufferedReader reader = new BufferedReader(new InputStreamReader(in));
-                    BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(out));
+                    BufferedWriter writer;
+                    if (configuration.docencoding == null) {
+                        writer = new BufferedWriter(new OutputStreamWriter(out));
+                    } else {
+                        writer = new BufferedWriter(new OutputStreamWriter(out,
+                            configuration.docencoding));
+                    }
                     try {
                         String line;
                         while ((line = reader.readLine()) != null) {
@@ -643,9 +650,9 @@
             fos = new FileOutputStream(filename);
         }
         if (docencoding == null) {
-            return new OutputStreamWriter(fos);
+            return new BufferedWriter(new OutputStreamWriter(fos));
         } else {
-            return new OutputStreamWriter(fos, docencoding);
+            return new BufferedWriter(new OutputStreamWriter(fos, docencoding));
         }
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,9 +25,10 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
+
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.internal.toolkit.*;
-import java.util.*;
 
 /**
  * A data structure that encapsulates the visible members of a particular
@@ -36,9 +37,10 @@
  * 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.
  *
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *  <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)
@@ -125,7 +127,7 @@
      * Return the package private members inherited by the class.  Only return
      * if parent is package private and not documented.
      *
-     * @param configuation the current configuration of the doclet.
+     * @param configuration the current configuration of the doclet.
      * @return the package private members inherited by the class.
      */
     private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) {
@@ -148,7 +150,7 @@
      * 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 configuation the current configuration of the doclet.
+     * @param configuration the current configuration of the doclet.
      */
     public List<ProgramElementDoc> getLeafClassMembers(Configuration configuration) {
         List<ProgramElementDoc> result = getMembersFor(classdoc);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkFactory.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkFactory.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -30,6 +30,11 @@
 /**
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -31,6 +31,11 @@
 /**
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkOutput.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkOutput.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -28,6 +28,11 @@
 /**
  * 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
  * @since 1.5
  */
--- a/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,6 +26,7 @@
 package com.sun.tools.javac.api;
 
 import java.io.IOException;
+import java.util.Collection;
 import java.util.Locale;
 
 import javax.annotation.processing.Processor;
@@ -43,7 +44,6 @@
 import com.sun.tools.javac.model.JavacTypes;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.util.Context;
-import java.util.Collection;
 
 /**
  * Provides basic functionality for implementations of JavacTask.
--- a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -138,7 +138,7 @@
         /**
          * Configure the set of diagnostic parts that should be displayed
          * by the formatter.
-         * @param options options to set
+         * @param visibleParts the parts to be set
          */
         public void setVisible(Set<DiagnosticPart> visibleParts);
 
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -66,7 +66,7 @@
      * Constructor used by service provider mechanism.  The recommended way to
      * obtain an instance of this class is by using {@link #create} or the
      * service provider mechanism.
-     * @see javax.tools.JavaCompilerTool
+     * @see javax.tools.JavaCompiler
      * @see javax.tools.ToolProvider
      * @see #create
      */
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu Oct 25 20:33:49 2012 -0700
@@ -60,8 +60,8 @@
 import com.sun.tools.javac.comp.MemberEnter;
 import com.sun.tools.javac.comp.Resolve;
 import com.sun.tools.javac.model.JavacElements;
+import com.sun.tools.javac.processing.JavacProcessingEnvironment;
 import com.sun.tools.javac.tree.EndPosTable;
-import com.sun.tools.javac.processing.JavacProcessingEnvironment;
 import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.tree.TreeCopier;
--- a/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -31,8 +31,9 @@
 import java.util.Collections;
 import java.util.List;
 import java.util.Set;
+
+import javax.tools.*;
 import javax.tools.JavaFileObject.Kind;
-import javax.tools.*;
 
 /**
  * Wraps all calls to a given file manager.  Subclasses of this class
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,18 +26,18 @@
 package com.sun.tools.javac.code;
 
 import java.util.Map;
+
 import javax.tools.JavaFileObject;
 
 import com.sun.tools.javac.comp.Annotate;
 import com.sun.tools.javac.comp.AttrContext;
 import com.sun.tools.javac.comp.Env;
+import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.Log;
 import com.sun.tools.javac.util.Pair;
-
 import static com.sun.tools.javac.code.Kinds.PCK;
-import com.sun.tools.javac.util.*;
 
 /**
  * Container for all annotations (attributes in javac) on a Symbol.
--- a/langtools/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 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
@@ -30,8 +30,8 @@
 
 import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.Context;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 import com.sun.tools.javac.util.ListBuffer;
-import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
 /**
  *
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java	Thu Oct 25 20:33:49 2012 -0700
@@ -25,10 +25,11 @@
 
 package com.sun.tools.javac.code;
 
+import java.util.Collections;
 import java.util.EnumSet;
-import java.util.Collections;
 import java.util.Map;
 import java.util.Set;
+
 import javax.lang.model.element.Modifier;
 
 /** Access flags and other modifiers for Java classes and members.
@@ -66,6 +67,7 @@
         if ((mask&NATIVE) != 0) flags.add(Flag.NATIVE);
         if ((mask&INTERFACE) != 0) flags.add(Flag.INTERFACE);
         if ((mask&ABSTRACT) != 0) flags.add(Flag.ABSTRACT);
+        if ((mask&DEFAULT) != 0) flags.add(Flag.DEFAULT);
         if ((mask&STRICTFP) != 0) flags.add(Flag.STRICTFP);
         if ((mask&BRIDGE) != 0) flags.add(Flag.BRIDGE);
         if ((mask&SYNTHETIC) != 0) flags.add(Flag.SYNTHETIC);
@@ -251,6 +253,11 @@
      */
     public static final long CLASH = 1L<<42;
 
+    /**
+     * Flag that marks either a default method or an interface containing default methods
+     */
+    public static final long DEFAULT = 1L<<43;
+
     /** Modifier masks.
      */
     public static final int
@@ -266,7 +273,10 @@
         MethodFlags           = AccessFlags | ABSTRACT | STATIC | NATIVE |
                                 SYNCHRONIZED | FINAL | STRICTFP;
     public static final long
-        LocalVarFlags         = FINAL | PARAMETER;
+        ExtendedStandardFlags       = (long)StandardFlags | DEFAULT,
+        InterfaceDefaultMethodMask  = ABSTRACT | PUBLIC | STRICTFP | SYNCHRONIZED | DEFAULT,
+        LocalVarFlags               = FINAL | PARAMETER;
+
 
     public static Set<Modifier> asModifierSet(long flags) {
         Set<Modifier> modifiers = modifierSets.get(flags);
@@ -319,6 +329,7 @@
         NATIVE("native"),
         INTERFACE("interface"),
         ABSTRACT("abstract"),
+        DEFAULT("default"),
         STRICTFP("strictfp"),
         BRIDGE("bridge"),
         SYNTHETIC("synthetic"),
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -31,9 +31,8 @@
 import com.sun.source.tree.MemberReferenceTree;
 import com.sun.tools.javac.api.Formattable;
 import com.sun.tools.javac.api.Messages;
-
+import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.TypeTags.*;
-import static com.sun.tools.javac.code.Flags.*;
 
 /** Internal symbol kinds, which distinguish between elements of
  *  different subclasses of Symbol. Symbol kinds are organized so they can be
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -28,18 +28,13 @@
 import java.util.Locale;
 
 import com.sun.tools.javac.api.Messages;
+import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Type.*;
-import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.comp.DeferredAttr.DeferredType;
-import com.sun.tools.javac.tree.JCTree;
-import com.sun.tools.javac.tree.Pretty;
-import com.sun.tools.javac.util.Assert;
 import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.util.ListBuffer;
-
-import static com.sun.tools.javac.code.TypeTags.*;
 import static com.sun.tools.javac.code.BoundKind.*;
 import static com.sun.tools.javac.code.Flags.*;
+import static com.sun.tools.javac.code.TypeTags.*;
 
 /**
  * A combined type/symbol visitor for generating non-trivial localized string
@@ -129,7 +124,7 @@
     /**
      * Get a localized string represenation for a given type.
      *
-     * @param ts type to be displayed
+     * @param t type to be displayed
      * @param locale the locale in which the string is to be rendered
      * @return localized string representation
      */
@@ -140,7 +135,7 @@
     /**
      * Get a localized string represenation for a given symbol.
      *
-     * @param ts symbol to be displayed
+     * @param s symbol to be displayed
      * @param locale the locale in which the string is to be rendered
      * @return localized string representation
      */
@@ -187,7 +182,7 @@
 
     @Override
     public String visitClassType(ClassType t, Locale locale) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         if (t.getEnclosingType().tag == CLASS && t.tsym.owner.kind == Kinds.TYP) {
             buf.append(visit(t.getEnclosingType(), locale));
             buf.append(".");
@@ -215,7 +210,7 @@
 
     @Override
     public String visitWildcardType(WildcardType t, Locale locale) {
-        StringBuffer s = new StringBuffer();
+        StringBuilder s = new StringBuilder();
         s.append(t.kind);
         if (t.kind != UNBOUND) {
             s.append(visit(t.type, locale));
@@ -253,7 +248,7 @@
     protected String className(ClassType t, boolean longform, Locale locale) {
         Symbol sym = t.tsym;
         if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) {
-            StringBuffer s = new StringBuffer(visit(t.supertype_field, locale));
+            StringBuilder s = new StringBuilder(visit(t.supertype_field, locale));
             for (List<Type> is = t.interfaces_field; is.nonEmpty(); is = is.tail) {
                 s.append("&");
                 s.append(visit(is.head, locale));
@@ -292,7 +287,7 @@
         if (!varArgs) {
             return visitTypes(args, locale);
         } else {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             while (args.tail.nonEmpty()) {
                 buf.append(visit(args.head, locale));
                 args = args.tail;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -25,8 +25,9 @@
 
 package com.sun.tools.javac.code;
 
+import java.util.Iterator;
+
 import com.sun.tools.javac.util.*;
-import java.util.Iterator;
 
 /** A scope represents an area of visibility in a Java program. The
  *  Scope class is a container for symbols which provides
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,12 +26,12 @@
 package com.sun.tools.javac.code;
 
 import java.util.*;
+
 import javax.lang.model.SourceVersion;
 import static javax.lang.model.SourceVersion.*;
 
+import com.sun.tools.javac.jvm.Target;
 import com.sun.tools.javac.util.*;
-import com.sun.tools.javac.jvm.Target;
-
 import static com.sun.tools.javac.main.Option.*;
 
 /** The source language version accepted.
@@ -203,6 +203,9 @@
     public boolean allowMethodReferences() {
         return compareTo(JDK1_8) >= 0;
     }
+    public boolean allowDefaultMethods() {
+        return compareTo(JDK1_8) >= 0;
+    }
     public boolean allowEffectivelyFinalInInnerClasses() {
         return compareTo(JDK1_8) >= 0;
     }
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Oct 25 20:33:49 2012 -0700
@@ -27,11 +27,10 @@
 
 import java.util.Set;
 import java.util.concurrent.Callable;
+
 import javax.lang.model.element.*;
 import javax.tools.JavaFileObject;
 
-import com.sun.tools.javac.util.*;
-import com.sun.tools.javac.util.Name;
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.comp.Attr;
 import com.sun.tools.javac.comp.AttrContext;
@@ -39,7 +38,8 @@
 import com.sun.tools.javac.jvm.*;
 import com.sun.tools.javac.model.*;
 import com.sun.tools.javac.tree.JCTree;
-
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.Name;
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.*;
 import static com.sun.tools.javac.code.TypeTags.*;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,17 +26,17 @@
 package com.sun.tools.javac.code;
 
 import java.util.*;
+
+import javax.lang.model.element.ElementVisitor;
 import javax.lang.model.type.TypeVisitor;
-import javax.lang.model.element.ElementVisitor;
 
-import com.sun.tools.javac.util.*;
-import com.sun.tools.javac.util.List;
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Type.*;
 import com.sun.tools.javac.jvm.*;
-
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.List;
+import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.jvm.ByteCodes.*;
-import static com.sun.tools.javac.code.Flags.*;
 
 /** A class that defines all predefined constants and operators
  *  as well as special classes such as java.lang.Object, which need
@@ -301,7 +301,7 @@
     }
 
     /** Enter a class into symbol table.
-     *  @param    The name of the class.
+     *  @param s The name of the class.
      */
     private Type enterClass(String s) {
         return reader.enterClass(names.fromString(s)).type;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -25,11 +25,11 @@
 
 package com.sun.tools.javac.code;
 
-import static com.sun.tools.javac.code.TargetType.TargetAttribute.*;
-
 import java.util.EnumSet;
 import java.util.Set;
 
+import static com.sun.tools.javac.code.TargetType.TargetAttribute.*;
+
 /**
  * Describes the type of program element an extended annotation (or extended
  * compound attribute) targets.
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,10 +26,6 @@
 package com.sun.tools.javac.code;
 
 import java.util.Collections;
-
-import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.util.*;
-
 import java.util.EnumMap;
 import java.util.EnumSet;
 import java.util.Map;
@@ -37,6 +33,8 @@
 
 import javax.lang.model.type.*;
 
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.util.*;
 import static com.sun.tools.javac.code.BoundKind.*;
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.*;
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -106,7 +106,7 @@
      */
     public static final int DEFERRED = FORALL+1;
 
-    /** The tag of the bottom type <null>.
+    /** The tag of the bottom type {@code <null>}.
      */
     public static final int BOT = DEFERRED+1;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Oct 25 20:33:49 2012 -0700
@@ -28,21 +28,19 @@
 import java.lang.ref.SoftReference;
 import java.util.*;
 
-import com.sun.tools.javac.util.*;
-import com.sun.tools.javac.util.List;
-
-import com.sun.tools.javac.jvm.ClassReader;
 import com.sun.tools.javac.code.Attribute.RetentionPolicy;
 import com.sun.tools.javac.code.Lint.LintCategory;
 import com.sun.tools.javac.code.Type.UndetVar.InferenceBound;
 import com.sun.tools.javac.comp.Check;
-
+import com.sun.tools.javac.jvm.ClassReader;
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.List;
+import static com.sun.tools.javac.code.BoundKind.*;
+import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Scope.*;
+import static com.sun.tools.javac.code.Symbol.*;
 import static com.sun.tools.javac.code.Type.*;
 import static com.sun.tools.javac.code.TypeTags.*;
-import static com.sun.tools.javac.code.Symbol.*;
-import static com.sun.tools.javac.code.Flags.*;
-import static com.sun.tools.javac.code.BoundKind.*;
 import static com.sun.tools.javac.util.ListBuffer.lb;
 
 /**
@@ -1429,8 +1427,8 @@
      * conservative in that it is allowed to say that two types are
      * not disjoint, even though they actually are.
      *
-     * The type C<X> is castable to C<Y> exactly if X and Y are not
-     * disjoint.
+     * The type {@code C<X>} is castable to {@code C<Y>} exactly if
+     * {@code X} and {@code Y} are not disjoint.
      */
     public boolean disjointType(Type t, Type s) {
         return disjointType.visit(t, s);
@@ -1525,7 +1523,7 @@
      * something of type `t' can be a subtype of `s'? This is
      * different from the question "is `t' not a subtype of `s'?"
      * when type variables are involved: Integer is not a subtype of T
-     * where <T extends Number> but it is not true that Integer cannot
+     * where {@code <T extends Number>} but it is not true that Integer cannot
      * possibly be a subtype of T.
      */
     public boolean notSoftSubtype(Type t, Type s) {
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Oct 25 20:33:49 2012 -0700
@@ -25,34 +25,32 @@
 
 package com.sun.tools.javac.comp;
 
-import com.sun.tools.javac.code.*;
-import com.sun.tools.javac.comp.DeferredAttr.AttrMode;
-import com.sun.tools.javac.comp.Infer.InferenceContext;
-import com.sun.tools.javac.comp.Infer.InferenceContext.FreeTypeListener;
-import com.sun.tools.javac.jvm.*;
-import com.sun.tools.javac.tree.*;
-import com.sun.tools.javac.util.*;
-import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
-import com.sun.tools.javac.util.List;
-
-import com.sun.tools.javac.jvm.Target;
-import com.sun.tools.javac.code.Lint.LintCategory;
-import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.tree.JCTree.*;
-import com.sun.tools.javac.code.Type.*;
-import com.sun.tools.javac.comp.Check.CheckContext;
+import java.util.*;
+import java.util.Set;
+
+import javax.lang.model.element.ElementKind;
+import javax.tools.JavaFileObject;
 
 import com.sun.source.tree.IdentifierTree;
 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 import com.sun.source.tree.MemberSelectTree;
 import com.sun.source.tree.TreeVisitor;
 import com.sun.source.util.SimpleTreeVisitor;
-
-import java.util.*;
-import java.util.Set;
-import javax.lang.model.element.ElementKind;
-import javax.tools.JavaFileObject;
-
+import com.sun.tools.javac.code.*;
+import com.sun.tools.javac.code.Lint.LintCategory;
+import com.sun.tools.javac.code.Symbol.*;
+import com.sun.tools.javac.code.Type.*;
+import com.sun.tools.javac.comp.Check.CheckContext;
+import com.sun.tools.javac.comp.DeferredAttr.AttrMode;
+import com.sun.tools.javac.comp.Infer.InferenceContext;
+import com.sun.tools.javac.comp.Infer.InferenceContext.FreeTypeListener;
+import com.sun.tools.javac.jvm.*;
+import com.sun.tools.javac.jvm.Target;
+import com.sun.tools.javac.tree.*;
+import com.sun.tools.javac.tree.JCTree.*;
+import com.sun.tools.javac.util.*;
+import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
+import com.sun.tools.javac.util.List;
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Flags.ANNOTATION;
 import static com.sun.tools.javac.code.Flags.BLOCK;
@@ -742,7 +740,7 @@
      *  @param env         The env for the const value
      *  @param initializer The initializer for the const value
      *  @param type        The expected type, or null
-     *  @see VarSymbol#setlazyConstValue
+     *  @see VarSymbol#setLazyConstValue
      */
     public Object attribLazyConstantValue(Env<AttrContext> env,
                                       JCTree.JCExpression initializer,
@@ -875,6 +873,7 @@
 
     public void visitMethodDef(JCMethodDecl tree) {
         MethodSymbol m = tree.sym;
+        boolean isDefaultMethod = (m.flags() & DEFAULT) != 0;
 
         Lint lint = env.info.lint.augment(m.annotations, m.flags());
         Lint prevLint = chk.setLint(lint);
@@ -954,8 +953,8 @@
                 // Empty bodies are only allowed for
                 // abstract, native, or interface methods, or for methods
                 // in a retrofit signature class.
-                if ((owner.flags() & INTERFACE) == 0 &&
-                    (tree.mods.flags & (ABSTRACT | NATIVE)) == 0 &&
+                if (isDefaultMethod || ((owner.flags() & INTERFACE) == 0 &&
+                    (tree.mods.flags & (ABSTRACT | NATIVE)) == 0) &&
                     !relax)
                     log.error(tree.pos(), "missing.meth.body.or.decl.abstract");
                 if (tree.defaultValue != null) {
@@ -963,7 +962,7 @@
                         log.error(tree.pos(),
                                   "default.allowed.in.intf.annotation.member");
                 }
-            } else if ((owner.flags() & INTERFACE) != 0) {
+            } else if ((owner.flags() & INTERFACE) != 0 && !isDefaultMethod) {
                 log.error(tree.body.pos(), "intf.meth.cant.have.body");
             } else if ((tree.mods.flags & ABSTRACT) != 0) {
                 log.error(tree.pos(), "abstract.meth.cant.have.body");
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Oct 25 20:33:49 2012 -0700
@@ -230,7 +230,6 @@
 
     /** Warn about unsafe vararg method decl.
      *  @param pos        Position to be used for error reporting.
-     *  @param sym        The deprecated symbol.
      */
     void warnUnsafeVararg(DiagnosticPosition pos, String key, Object... args) {
         if (lint.isEnabled(LintCategory.VARARGS) && allowSimplifiedVarargs)
@@ -397,7 +396,7 @@
  **************************************************************************/
 
     /** Return name of local class.
-     *  This is of the form    <enclClass> $ n <classname>
+     *  This is of the form   {@code <enclClass> $ n <classname> }
      *  where
      *    enclClass is the flat name of the enclosing class,
      *    classname is the simple name of the local class
@@ -600,11 +599,10 @@
 
     /** Check that a type is within some bounds.
      *
-     *  Used in TypeApply to verify that, e.g., X in V<X> is a valid
+     *  Used in TypeApply to verify that, e.g., X in {@code V<X>} is a valid
      *  type argument.
-     *  @param pos           Position to be used for error reporting.
      *  @param a             The type that should be bounded by bs.
-     *  @param bs            The bound.
+     *  @param bound         The bound.
      */
     private boolean checkExtends(Type a, Type bound) {
          if (a.isUnbound()) {
@@ -1123,8 +1121,14 @@
                     mask = PRIVATE;
                 } else
                     mask = ConstructorFlags;
-            }  else if ((sym.owner.flags_field & INTERFACE) != 0)
-                mask = implicit = InterfaceMethodFlags;
+            }  else if ((sym.owner.flags_field & INTERFACE) != 0) {
+                if ((flags & DEFAULT) != 0) {
+                    mask = InterfaceDefaultMethodMask;
+                    implicit = PUBLIC;
+                } else {
+                    mask = implicit = InterfaceMethodFlags;
+                }
+            }
             else {
                 mask = MethodFlags;
             }
@@ -1171,7 +1175,7 @@
         default:
             throw new AssertionError();
         }
-        long illegal = flags & StandardFlags & ~mask;
+        long illegal = flags & ExtendedStandardFlags & ~mask;
         if (illegal != 0) {
             if ((illegal & INTERFACE) != 0) {
                 log.error(pos, "intf.not.allowed.here");
@@ -1187,7 +1191,7 @@
                   // in the presence of inner classes. Should it be deleted here?
                   checkDisjoint(pos, flags,
                                 ABSTRACT,
-                                PRIVATE | STATIC))
+                                PRIVATE | STATIC | DEFAULT))
                  &&
                  checkDisjoint(pos, flags,
                                ABSTRACT | INTERFACE,
@@ -1211,7 +1215,7 @@
                                 STRICTFP))) {
             // skip
         }
-        return flags & (mask | ~StandardFlags) | implicit;
+        return flags & (mask | ~ExtendedStandardFlags) | implicit;
     }
 
 
@@ -1262,8 +1266,10 @@
      *  their bounds. This must be done in a second phase after type attributon
      *  since a class might have a subclass as type parameter bound. E.g:
      *
+     *  <pre>{@code
      *  class B<A extends C> { ... }
      *  class C extends B<C> { ... }
+     *  }</pre>
      *
      *  and we can't make sure that the bound is already attributed because
      *  of possible cycles.
@@ -2574,7 +2580,7 @@
      * 'pos'.
      *
      * @param s The (annotation)type declaration annotated with a @ContainedBy
-     * @param containerAnno the @ContainedBy on 's'
+     * @param containedBy the @ContainedBy on 's'
      * @param pos where to report errors
      */
     public void validateContainedBy(TypeSymbol s, Attribute.Compound containedBy, DiagnosticPosition pos) {
@@ -3181,7 +3187,6 @@
      *  @param pos           Position for error reporting.
      *  @param sym           The symbol.
      *  @param s             The scope
-     *  @param staticImport  Whether or not this was a static import
      */
     boolean checkUniqueStaticImport(DiagnosticPosition pos, Symbol sym, Scope s) {
         return checkUniqueImport(pos, sym, s, true);
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Thu Oct 25 20:33:49 2012 -0700
@@ -46,7 +46,6 @@
 
 import static com.sun.tools.javac.code.TypeTags.*;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
-import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
 /**
  * This is an helper class that is used to perform deferred type-analysis.
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Oct 25 20:33:49 2012 -0700
@@ -148,7 +148,7 @@
  *  exception to this [no pun intended] is that checked exceptions that
  *  are known to be caught or declared to be caught in the enclosing
  *  method are not recorded in the queue, but instead are recorded in a
- *  global variable "Set<Type> thrown" that records the type of all
+ *  global variable "{@code Set<Type> thrown}" that records the type of all
  *  exceptions that can be thrown.
  *
  *  <p>Other minor issues the treatment of members of other classes
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Oct 25 20:33:49 2012 -0700
@@ -41,7 +41,6 @@
 
 import java.util.HashMap;
 import java.util.Map;
-import java.util.Set;
 
 import static com.sun.tools.javac.code.TypeTags.*;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Oct 25 20:33:49 2012 -0700
@@ -671,7 +671,7 @@
     };
 
     /** Look up a synthetic name in a given scope.
-     *  @param scope        The scope.
+     *  @param s            The scope.
      *  @param name         The name.
      */
     private Symbol lookupSynthetic(Name name, Scope s) {
@@ -747,7 +747,7 @@
      *  This numbering scheme is used by the backend to decide whether
      *  to issue an invokevirtual or invokespecial call.
      *
-     *  @see Gen.visitSelect(Select tree)
+     *  @see Gen#visitSelect(JCFieldAccess tree)
      */
     private static final int
         DEREFcode = 0,
@@ -1945,7 +1945,7 @@
      *  @param sig      The signature of type T.
      */
     private Name cacheName(String sig) {
-        StringBuffer buf = new StringBuffer();
+        StringBuilder buf = new StringBuilder();
         if (sig.startsWith("[")) {
             buf = buf.append("array");
             while (sig.startsWith("[")) {
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -128,8 +128,7 @@
     /** Import all classes of a class or package on demand.
      *  @param pos           Position to be used for error reporting.
      *  @param tsym          The class or package the members of which are imported.
-     *  @param toScope   The (import) scope in which imported classes
-     *               are entered.
+     *  @param env           The env in which the imported classes will be entered.
      */
     private void importAll(int pos,
                            final TypeSymbol tsym,
@@ -150,8 +149,7 @@
     /** Import all static members of a class or package on demand.
      *  @param pos           Position to be used for error reporting.
      *  @param tsym          The class or package the members of which are imported.
-     *  @param toScope   The (import) scope in which imported classes
-     *               are entered.
+     *  @param env           The env in which the imported classes will be entered.
      */
     private void importStaticAll(int pos,
                                  final TypeSymbol tsym,
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Oct 25 20:33:49 2012 -0700
@@ -27,8 +27,6 @@
 
 import java.util.*;
 
-import javax.lang.model.element.ElementKind;
-
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.tree.*;
@@ -134,17 +132,21 @@
      *  Then, coerce to some given target type unless target type is null.
      *  This operation is used in situations like the following:
      *
+     *  <pre>{@code
      *  class Cell<A> { A value; }
      *  ...
      *  Cell<Integer> cell;
      *  Integer x = cell.value;
+     *  }</pre>
      *
      *  Since the erasure of Cell.value is Object, but the type
      *  of cell.value in the assignment is Integer, we need to
      *  adjust the original type of cell.value to Object, and insert
      *  a cast to Integer. That is, the last assignment becomes:
      *
+     *  <pre>{@code
      *  Integer x = (Integer)cell.value;
+     *  }</pre>
      *
      *  @param tree       The expression tree whose type might need adjustment.
      *  @param erasedType The expression's type after erasure.
--- a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -805,8 +805,8 @@
     }
 
     /**
-     * Enforces the specification of a "relative" URI as used in
-     * {@linkplain #getFileForInput(Location,String,URI)
+     * Enforces the specification of a "relative" name as used in
+     * {@linkplain #getFileForInput(Location,String,String)
      * getFileForInput}.  This method must follow the rules defined in
      * that method, do not make any changes without consulting the
      * specification.
--- a/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java	Thu Oct 25 20:33:49 2012 -0700
@@ -53,13 +53,14 @@
 import com.sun.tools.javac.util.Options;
 
 import javax.tools.JavaFileManager;
+import javax.tools.StandardJavaFileManager;
 import static javax.tools.StandardLocation.*;
 import static com.sun.tools.javac.main.Option.*;
 
 /** This class converts command line arguments, environment variables
  *  and system properties (in File.pathSeparator-separated String form)
  *  into a boot class path, user class path, and source path (in
- *  Collection<String> form).
+ *  {@code Collection<String>} 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.
@@ -342,11 +343,11 @@
             }
         }
 
-        /** @see JavaFileManager#handleOption. */
+        /** @see JavaFileManager#handleOption */
         abstract boolean handleOption(Option option, String value);
-        /** @see JavaFileManager#getLocation. */
+        /** @see StandardJavaFileManager#getLocation */
         abstract Collection<File> getLocation();
-        /** @see JavaFileManager#setLocation. */
+        /** @see StandardJavaFileManager#setLocation */
         abstract void setLocation(Iterable<? extends File> files) throws IOException;
     }
 
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Oct 25 20:33:49 2012 -0700
@@ -38,7 +38,6 @@
 import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -60,7 +59,7 @@
  * the command line.)
  *
  * Location where to look for/generate optimized zip index files can be
- * provided using "-XDcachezipindexdir=<directory>". If this flag is not
+ * provided using "{@code -XDcachezipindexdir=<directory>}". If this flag is not
  * provided, the default location is the value of the "java.io.tmpdir" system
  * property.
  *
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Thu Oct 25 20:33:49 2012 -0700
@@ -446,7 +446,7 @@
  * Normalizing class-members.
  *************************************************************************/
 
-    /** Distribute member initializer code into constructors and <clinit>
+    /** Distribute member initializer code into constructors and {@code <clinit>}
      *  method.
      *  @param defs         The list of class member declarations.
      *  @param c            The enclosing class.
@@ -689,7 +689,7 @@
      *  should be emitted, if so, put a new entry into CRTable
      *  and call method to generate bytecode.
      *  If not, just call method to generate bytecode.
-     *  @see    #genStat(Tree, Env)
+     *  @see    #genStat(JCTree, Env)
      *
      *  @param  tree     The tree to be visited.
      *  @param  env      The environment to use.
@@ -756,7 +756,7 @@
      *  should be emitted, if so, put a new entry into CRTable
      *  and call method to generate bytecode.
      *  If not, just call method to generate bytecode.
-     *  @see    #genCond(Tree,boolean)
+     *  @see    #genCond(JCTree,boolean)
      *
      *  @param  tree     The tree to be visited.
      *  @param  crtFlags The CharacterRangeTable flags
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Oct 25 20:33:49 2012 -0700
@@ -607,7 +607,7 @@
 
     /** Parse contents of input stream.
      *  @param filename     The name of the file from which input stream comes.
-     *  @param input        The input stream to be parsed.
+     *  @param content      The characters to be parsed.
      */
     protected JCCompilationUnit parse(JavaFileObject filename, CharSequence content) {
         long msec = now();
@@ -755,8 +755,6 @@
     /** Complete compiling a source file that has been accessed
      *  by the class file reader.
      *  @param c          The class the source file of which needs to be compiled.
-     *  @param filename   The name of the source file.
-     *  @param f          An input stream that reads the source file.
      */
     public void complete(ClassSymbol c) throws CompletionFailure {
 //      System.err.println("completing " + c);//DEBUG
--- a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java	Thu Oct 25 20:33:49 2012 -0700
@@ -25,9 +25,8 @@
 
 package com.sun.tools.javac.model;
 
-import com.sun.tools.javac.util.*;
+import java.io.IOException;
 import java.io.ObjectInputStream;
-import java.io.IOException;
 import java.lang.annotation.*;
 import java.lang.reflect.Array;
 import java.lang.reflect.Method;
@@ -35,12 +34,14 @@
 import java.util.Map;
 import sun.reflect.annotation.*;
 
-import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.MirroredTypeException;
 import javax.lang.model.type.MirroredTypesException;
+import javax.lang.model.type.TypeMirror;
+
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Symbol.*;
 import com.sun.tools.javac.code.Type.ArrayType;
+import com.sun.tools.javac.util.*;
 
 
 /**
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -27,13 +27,14 @@
 
 import java.io.IOException;
 import java.nio.file.FileSystem;
+import java.nio.file.FileSystems;
 import java.nio.file.Path;
 import javax.tools.FileObject;
 import javax.tools.JavaFileManager;
 import javax.tools.JavaFileObject;
 
 /**
- *  File manager based on {@linkplain File java.nio.file.Path}.
+ *  File manager based on {@link java.nio.file.Path}.
  *
  *  Eventually, this should be moved to javax.tools.
  *  Also, JavaCompiler might reasonably provide a method getPathFileManager,
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 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
@@ -39,7 +39,6 @@
 import java.nio.file.Files;
 import java.nio.file.LinkOption;
 import java.nio.file.Path;
-import java.nio.file.attribute.BasicFileAttributes;
 import javax.lang.model.element.Modifier;
 import javax.lang.model.element.NestingKind;
 import javax.tools.JavaFileObject;
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java	Thu Oct 25 20:33:49 2012 -0700
@@ -108,8 +108,7 @@
      * {@code input[input.length -1]} is a white space character.
      *
      * @param fac the factory which created this Scanner
-     * @param input the input, might be modified
-     * @param inputLength the size of the input.
+     * @param buf the input, might be modified
      * Must be positive and less than or equal to input.length.
      */
     protected JavaTokenizer(ScannerFactory fac, CharBuffer buf) {
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Oct 25 20:33:49 2012 -0700
@@ -116,6 +116,8 @@
                 fac.options.isSet("allowLambda"); //pre-lambda guard
         this.allowMethodReferences = source.allowMethodReferences() &&
                 fac.options.isSet("allowMethodReferences"); //pre-lambda guard
+        this.allowDefaultMethods = source.allowDefaultMethods() &&
+                fac.options.isSet("allowDefaultMethods"); //pre-lambda guard
         this.keepDocComments = keepDocComments;
         docComments = newDocCommentTable(keepDocComments);
         this.keepLineMap = keepLineMap;
@@ -185,6 +187,10 @@
      */
     boolean allowMethodReferences;
 
+    /** Switch: should we allow default methods in interfaces?
+     */
+    boolean allowDefaultMethods;
+
     /** Switch: should we keep docComments?
      */
     boolean keepDocComments;
@@ -806,7 +812,7 @@
         t = odStack[0];
 
         if (t.hasTag(JCTree.Tag.PLUS)) {
-            StringBuffer buf = foldStrings(t);
+            StringBuilder buf = foldStrings(t);
             if (buf != null) {
                 t = toP(F.at(startPos).Literal(TypeTags.CLASS, buf.toString()));
             }
@@ -833,7 +839,7 @@
         /** If tree is a concatenation of string literals, replace it
          *  by a single literal representing the concatenated string.
          */
-        protected StringBuffer foldStrings(JCTree tree) {
+        protected StringBuilder foldStrings(JCTree tree) {
             if (!allowStringFolding)
                 return null;
             List<String> buf = List.nil();
@@ -841,8 +847,8 @@
                 if (tree.hasTag(LITERAL)) {
                     JCLiteral lit = (JCLiteral) tree;
                     if (lit.typetag == TypeTags.CLASS) {
-                        StringBuffer sbuf =
-                            new StringBuffer((String)lit.value);
+                        StringBuilder sbuf =
+                            new StringBuilder((String)lit.value);
                         while (buf.nonEmpty()) {
                             sbuf.append(buf.head);
                             buf = buf.tail;
@@ -2311,6 +2317,7 @@
             case SYNCHRONIZED: flag = Flags.SYNCHRONIZED; break;
             case STRICTFP    : flag = Flags.STRICTFP; break;
             case MONKEYS_AT  : flag = Flags.ANNOTATION; break;
+            case DEFAULT     : checkDefaultMethods(); flag = Flags.DEFAULT; break;
             case ERROR       : flag = 0; nextToken(); break;
             default: break loop;
             }
@@ -3361,6 +3368,12 @@
             allowMethodReferences = true;
         }
     }
+    void checkDefaultMethods() {
+        if (!allowDefaultMethods) {
+            log.error(token.pos, "default.methods.not.supported.in.source", source.name);
+            allowDefaultMethods = true;
+        }
+    }
 
     /*
      * a functional source tree and end position mappings
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -66,8 +66,7 @@
      * {@code input[input.length -1]} is a white space character.
      *
      * @param fac the factory which created this Scanner
-     * @param input the input, might be modified
-     * @param inputLength the size of the input.
+     * @param buf the input, might be modified
      * Must be positive and less than or equal to input.length.
      */
     protected Scanner(ScannerFactory fac, CharBuffer buf) {
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java	Thu Oct 25 20:33:49 2012 -0700
@@ -77,9 +77,8 @@
      * that {@code inputLength < input.length} or
      * {@code input[input.length -1]} is a white space character.
      *
-     * @param fac the factory which created this Scanner
-     * @param input the input, might be modified
-     * @param inputLength the size of the input.
+     * @param sf the factory which created this Scanner
+     * @param buffer the input, might be modified
      * Must be positive and less than or equal to input.length.
      */
     protected UnicodeReader(ScannerFactory sf, CharBuffer buffer) {
@@ -255,16 +254,16 @@
 
     /**
      * Returns a copy of a character array subset of the input buffer.
-     * The returned array begins at the <code>beginIndex</code> and
-     * extends to the character at index <code>endIndex - 1</code>.
-     * Thus the length of the substring is <code>endIndex-beginIndex</code>.
+     * The returned array begins at the {@code beginIndex} and
+     * extends to the character at index {@code endIndex - 1}.
+     * Thus the length of the substring is {@code endIndex-beginIndex}.
      * This behavior is like
-     * <code>String.substring(beginIndex, endIndex)</code>.
+     * {@code String.substring(beginIndex, endIndex)}.
      * Unicode escape sequences are not translated.
      *
      * @param beginIndex the beginning index, inclusive.
      * @param endIndex the ending index, exclusive.
-     * @throws IndexOutOfBounds if either offset is outside of the
+     * @throws ArrayIndexOutOfBoundsException if either offset is outside of the
      *         array bounds
      */
     public char[] getRawCharacters(int beginIndex, int endIndex) {
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -105,7 +105,7 @@
      * Only type elements <i>included</i> in this round of annotation
      * processing, or declarations of members, parameters, or type
      * parameters declared within those, are returned.  Included type
-     * elements are {@linkplain #getSpecifiedTypeElements specified
+     * elements are {@linkplain #getRootElements specified
      * types} and any types nested within them.
      *
      * @param a  annotation type being requested
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 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
@@ -72,7 +72,7 @@
      *         The service class for which providers are being sought;
      *         used to construct error detail strings
      *
-     * @param  url
+     * @param  u
      *         The URL naming the configuration file to be parsed
      *
      * @return true if the name of a service is found
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu Oct 25 20:33:49 2012 -0700
@@ -2174,6 +2174,11 @@
     method references are not supported in -source {0}\n\
     (use -source 8 or higher to enable method references)
 
+# 0: string
+compiler.err.default.methods.not.supported.in.source=\
+    default methods are not supported in -source {0}\n\
+    (use -source 8 or higher to enable default methods)
+
 ########################################
 # Diagnostics for verbose resolution
 # used by Resolve (debug only)
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java	Thu Oct 25 20:33:49 2012 -0700
@@ -464,32 +464,29 @@
     }
 
     /**
-     * Everything in one source file is kept in a TopLevel structure.
-     * @param pid              The tree representing the package clause.
-     * @param sourcefile       The source file name.
-     * @param defs             All definitions in this file (ClassDef, Import, and Skip)
-     * @param packge           The package it belongs to.
-     * @param namedImportScope A scope for all named imports.
-     * @param starImportScope  A scope for all import-on-demands.
-     * @param lineMap          Line starting positions, defined only
-     *                         if option -g is set.
-     * @param docComments      A hashtable that stores all documentation comments
-     *                         indexed by the tree nodes they refer to.
-     *                         defined only if option -s is set.
-     * @param endPositions     An object encapsulating ending positions of source
-     *                         ranges indexed by the tree nodes they belong to.
-     *                         Defined only if option -Xjcov is set.
+     * Everything in one source file is kept in a {@linkplain JCCompilationUnit} structure.
      */
     public static class JCCompilationUnit extends JCTree implements CompilationUnitTree {
         public List<JCAnnotation> packageAnnotations;
+        /** The tree representing the package clause. */
         public JCExpression pid;
+        /** All definitions in this file (ClassDef, Import, and Skip) */
         public List<JCTree> defs;
+        /* The source file name. */
         public JavaFileObject sourcefile;
+        /** The package to which this compilation unit belongs. */
         public PackageSymbol packge;
+        /** A scope for all named imports. */
         public ImportScope namedImportScope;
+        /** A scope for all import-on-demands. */
         public StarImportScope starImportScope;
+        /** Line starting positions, defined only if option -g is set. */
         public Position.LineMap lineMap = null;
+        /** A table that stores all documentation comments indexed by the tree
+         * nodes they refer to. defined only if option -s is set. */
         public DocCommentTable docComments = null;
+        /* An object encapsulating ending positions of source ranges indexed by
+         * the tree nodes they belong to. Defined only if option -Xjcov is set. */
         public EndPosTable endPositions = null;
         protected JCCompilationUnit(List<JCAnnotation> packageAnnotations,
                         JCExpression pid,
@@ -550,10 +547,10 @@
 
     /**
      * An import clause.
-     * @param qualid    The imported class(es).
      */
     public static class JCImport extends JCTree implements ImportTree {
         public boolean staticImport;
+        /** The imported class(es). */
         public JCTree qualid;
         protected JCImport(JCTree qualid, boolean importStatic) {
             this.qualid = qualid;
@@ -605,21 +602,21 @@
 
     /**
      * A class definition.
-     * @param modifiers the modifiers
-     * @param name the name of the class
-     * @param typarams formal class parameters
-     * @param extending the classes this class extends
-     * @param implementing the interfaces implemented by this class
-     * @param defs all variables and methods defined in this class
-     * @param sym the symbol
      */
     public static class JCClassDecl extends JCStatement implements ClassTree {
+        /** the modifiers */
         public JCModifiers mods;
+        /** the name of the class */
         public Name name;
+        /** formal class parameters */
         public List<JCTypeParameter> typarams;
+        /** the classes this class extends */
         public JCExpression extending;
+        /** the interfaces implemented by this class */
         public List<JCExpression> implementing;
+        /** all variables and methods defined in this class */
         public List<JCTree> defs;
+        /** the symbol */
         public ClassSymbol sym;
         protected JCClassDecl(JCModifiers mods,
                            Name name,
@@ -676,24 +673,25 @@
 
     /**
      * A method definition.
-     * @param modifiers method modifiers
-     * @param name method name
-     * @param restype type of method return value
-     * @param typarams type parameters
-     * @param params value parameters
-     * @param thrown exceptions thrown by this method
-     * @param stats statements in the method
-     * @param sym method symbol
      */
     public static class JCMethodDecl extends JCTree implements MethodTree {
+        /** method modifiers */
         public JCModifiers mods;
+        /** method name */
         public Name name;
+        /** type of method return value */
         public JCExpression restype;
+        /** type parameters */
         public List<JCTypeParameter> typarams;
+        /** value parameters */
         public List<JCVariableDecl> params;
+        /** exceptions thrown by this method */
         public List<JCExpression> thrown;
+        /** statements in the method */
         public JCBlock body;
-        public JCExpression defaultValue; // for annotation types
+        /** default value, for annotation types */
+        public JCExpression defaultValue;
+        /** method symbol */
         public MethodSymbol sym;
         protected JCMethodDecl(JCModifiers mods,
                             Name name,
@@ -748,17 +746,17 @@
 
     /**
      * A variable definition.
-     * @param modifiers variable modifiers
-     * @param name variable name
-     * @param vartype type of the variable
-     * @param init variables initial value
-     * @param sym symbol
      */
     public static class JCVariableDecl extends JCStatement implements VariableTree {
+        /** variable modifiers */
         public JCModifiers mods;
+        /** variable name */
         public Name name;
+        /** type of the variable */
         public JCExpression vartype;
+        /** variable's initial value */
         public JCExpression init;
+        /** symbol */
         public VarSymbol sym;
         protected JCVariableDecl(JCModifiers mods,
                          Name name,
@@ -815,11 +813,11 @@
 
     /**
      * A statement block.
-     * @param stats statements
-     * @param flags flags
      */
     public static class JCBlock extends JCStatement implements BlockTree {
+        /** flags */
         public long flags;
+        /** statements */
         public List<JCStatement> stats;
         /** Position of closing brace, optional. */
         public int endpos = Position.NOPOS;
@@ -1206,9 +1204,9 @@
 
     /**
      * an expression statement
-     * @param expr expression structure
      */
     public static class JCExpressionStatement extends JCStatement implements ExpressionStatementTree {
+        /** expression structure */
         public JCExpression expr;
         protected JCExpressionStatement(JCExpression expr)
         {
@@ -1776,13 +1774,13 @@
 
     /**
      * Selects through packages and classes
-     * @param selected selected Tree hierarchie
-     * @param selector name of field to select thru
-     * @param sym symbol of the selected class
      */
     public static class JCFieldAccess extends JCExpression implements MemberSelectTree {
+        /** selected Tree hierarchy */
         public JCExpression selected;
+        /** name of field to select thru */
         public Name name;
+        /** symbol of the selected class */
         public Symbol sym;
         protected JCFieldAccess(JCExpression selected, Name name, Symbol sym) {
             this.selected = selected;
@@ -1885,11 +1883,11 @@
 
     /**
      * An identifier
-     * @param idname the name
-     * @param sym the symbol
      */
     public static class JCIdent extends JCExpression implements IdentifierTree {
+        /** the name */
         public Name name;
+        /** the symbol */
         public Symbol sym;
         protected JCIdent(Name name, Symbol sym) {
             this.name = name;
@@ -1912,10 +1910,10 @@
 
     /**
      * A constant value given literally.
-     * @param value value representation
      */
     public static class JCLiteral extends JCExpression implements LiteralTree {
         public int typetag;
+        /** value representation */
         public Object value;
         protected JCLiteral(int typetag, Object value) {
             this.typetag = typetag;
@@ -1978,10 +1976,10 @@
 
     /**
      * Identifies a basic type.
-     * @param tag the basic type id
      * @see TypeTags
      */
     public static class JCPrimitiveTypeTree extends JCExpression implements PrimitiveTypeTree {
+        /** the basic type id */
         public int typetag;
         protected JCPrimitiveTypeTree(int typetag) {
             this.typetag = typetag;
@@ -2105,11 +2103,11 @@
 
     /**
      * A formal class parameter.
-     * @param name name
-     * @param bounds bounds
      */
     public static class JCTypeParameter extends JCTree implements TypeParameterTree {
+        /** name */
         public Name name;
+        /** bounds */
         public List<JCExpression> bounds;
         protected JCTypeParameter(Name name, List<JCExpression> bounds) {
             this.name = name;
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java	Thu Oct 25 20:33:49 2012 -0700
@@ -26,12 +26,10 @@
 package com.sun.tools.javac.tree;
 
 import java.io.*;
-import java.util.*;
 
 import com.sun.source.tree.MemberReferenceTree.ReferenceMode;
 import com.sun.tools.javac.code.*;
 import com.sun.tools.javac.code.Symbol.*;
-import com.sun.tools.javac.parser.Tokens.Comment;
 import com.sun.tools.javac.tree.JCTree.*;
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.util.List;
@@ -250,7 +248,7 @@
     public void printFlags(long flags) throws IOException {
         if ((flags & SYNTHETIC) != 0) print("/*synthetic*/ ");
         print(TreeInfo.flagNames(flags));
-        if ((flags & StandardFlags) != 0) print(" ");
+        if ((flags & ExtendedStandardFlags) != 0) print(" ");
         if ((flags & ANNOTATION) != 0) print("@");
     }
 
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java	Thu Oct 25 20:33:49 2012 -0700
@@ -790,8 +790,8 @@
      *  pre: flags != 0
      */
     public static long firstFlag(long flags) {
-        int flag = 1;
-        while ((flag & StandardFlags) != 0 && (flag & flags) == 0)
+        long flag = 1;
+        while ((flag & flags & ExtendedStandardFlags) == 0)
             flag = flag << 1;
         return flag;
     }
@@ -799,7 +799,7 @@
     /** Return flags as a string, separated by " ".
      */
     public static String flagNames(long flags) {
-        return Flags.toString(flags & StandardFlags).trim();
+        return Flags.toString(flags & ExtendedStandardFlags).trim();
     }
 
     /** Operator precedences values.
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 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
@@ -484,7 +484,7 @@
         /**
          * Tells whether the caret display is active or not.
          *
-         * @param caretEnabled if true the caret is enabled
+         * @return true if the caret is enabled
          */
         public boolean isCaretEnabled() {
             return caretEnabled;
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -132,7 +132,6 @@
 
     /** Report a warning, unless suppressed by the  -nowarn option or the
      *  maximum number of warnings has been reached.
-     *  @param pos    The source position at which to report the warning.
      *  @param key    The key for the localized warning message.
      *  @param args   Fields of the warning message.
      */
--- a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -69,7 +69,7 @@
     /**
      * Create a basic formatter based on the supplied options.
      *
-     * @param opts list of command-line options
+     * @param options list of command-line options
      * @param msgs JavacMessages object used for i18n
      */
     public BasicDiagnosticFormatter(Options options, JavacMessages msgs) {
@@ -329,7 +329,7 @@
          * Set the indentation level for various element of a given diagnostic -
          * this might lead to more readable diagnostics
          *
-         * @param indentationKind kind of indentation to be set
+         * @param diagPart
          * @param nSpaces amount of spaces for the specified diagnostic part
          */
         public void setIndentation(DiagnosticPart diagPart, int nSpaces) {
@@ -384,7 +384,7 @@
         /**
          * Get a metachar string for a specific format
          *
-         * @param sourcePos a positioning value for source line
+         * @param kind the format kind for which to get the metachar string
          */
         public String getFormat(BasicFormatKind kind) {
             return availableFormats.get(kind);
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java	Thu Oct 25 20:33:49 2012 -0700
@@ -44,7 +44,7 @@
  * instance method that is overridden in extended components.  A base
  * phase supporting extension would look something like this:
  *
- * <p><pre>
+ * <p><pre>{@code
  * public class Phase {
  *     protected static final Context.Key<Phase> phaseKey =
  *         new Context.Key<Phase>();
@@ -62,7 +62,7 @@
  *         // other intitialization follows...
  *     }
  * }
- * </pre>
+ * }</pre>
  *
  * <p>In the compiler, we simply use Phase.instance(context) to get
  * the reference to the phase.  But in extensions of the compiler, we
@@ -70,7 +70,7 @@
  * and this must be done before any reference to the phase is accessed
  * using Phase.instance().  An extended phase might be declared thus:
  *
- * <p><pre>
+ * <p><pre>{@code
  * public class NewPhase extends Phase {
  *     protected NewPhase(Context context) {
  *         super(context);
@@ -83,7 +83,7 @@
  *         });
  *     }
  * }
- * </pre>
+ * }</pre>
  *
  * <p>And is registered early in the extended compiler like this
  *
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -260,7 +260,7 @@
         while (i < len) {
             char ch = s.charAt(i);
             if (ch > 255) {
-                StringBuffer buf = new StringBuffer();
+                StringBuilder buf = new StringBuilder();
                 buf.append(s.substring(0, i));
                 while (i < len) {
                     ch = s.charAt(i);
--- a/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java	Thu Oct 25 20:33:49 2012 -0700
@@ -28,12 +28,10 @@
 import java.io.IOException;
 import java.lang.ref.SoftReference;
 import java.nio.CharBuffer;
-import java.util.Map;
 import javax.tools.JavaFileObject;
 
 import com.sun.tools.javac.file.JavacFileManager;
 import com.sun.tools.javac.tree.EndPosTable;
-import com.sun.tools.javac.tree.JCTree;
 
 import static com.sun.tools.javac.util.LayoutCharacters.*;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java	Thu Oct 25 20:33:49 2012 -0700
@@ -27,7 +27,6 @@
 
 import java.util.EnumSet;
 import java.util.Locale;
-import java.util.Map;
 import java.util.Set;
 
 import javax.tools.Diagnostic;
@@ -214,7 +213,6 @@
          * Create a new diagnostic of the given kind, which is not mandatory and which has
          * no lint category.
          *  @param kind        The diagnostic kind
-         *  @param ls          The lint category, if applicable, or null
          *  @param source      The source of the compilation unit, if any, in which to report the message.
          *  @param pos         The source position at which to report the message.
          *  @param key         The key for the localized message.
@@ -229,7 +227,7 @@
          * Create a new diagnostic of the given kind.
          *  @param kind        The diagnostic kind
          *  @param lc          The lint category, if applicable, or null
-         *  @param isMandatory is diagnostic mandatory?
+         *  @param flags       The set of flags for the diagnostic
          *  @param source      The source of the compilation unit, if any, in which to report the message.
          *  @param pos         The source position at which to report the message.
          *  @param key         The key for the localized message.
@@ -364,7 +362,7 @@
 
     /**
      * Create a diagnostic object.
-     * @param fomatter the formatter to use for the diagnostic
+     * @param formatter the formatter to use for the diagnostic
      * @param dt the type of diagnostic
      * @param lc     the lint category for the diagnostic
      * @param source the name of the source file, or null if none.
--- a/langtools/src/share/classes/com/sun/tools/javac/util/List.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/List.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -287,7 +287,7 @@
         if (isEmpty()) {
             return "";
         } else {
-            StringBuffer buf = new StringBuffer();
+            StringBuilder buf = new StringBuilder();
             buf.append(head);
             for (List<A> l = tail; l.nonEmpty(); l = l.tail) {
                 buf.append(sep);
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Position.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Position.java	Thu Oct 25 20:33:49 2012 -0700
@@ -80,11 +80,11 @@
 
     /** Encode line and column numbers in an integer as:
      *  {@code line-number << LINESHIFT + column-number }.
-     *  {@link Position.NOPOS} represents an undefined position.
+     *  {@link Position#NOPOS} represents an undefined position.
      *
      * @param  line  number of line (first is 1)
      * @param  col   number of character on line (first is 1)
-     * @return       an encoded position or {@link Position.NOPOS}
+     * @return       an encoded position or {@link Position#NOPOS}
      *               if the line or column number is too big to
      *               represent in the encoded format
      * @throws IllegalArgumentException if line or col is less than 1
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Oct 25 09:54:41 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java	Thu Oct 25 20:33:49 2012 -0700
@@ -1,5 +1,5 @@