diff --git a/langtools/src/share/classes/com/sun/javadoc/Tag.java b/langtools/src/share/classes/com/sun/javadoc/Tag.java
index 96faac5a39d..2e129f50505 100644
--- a/langtools/src/share/classes/com/sun/javadoc/Tag.java
+++ b/langtools/src/share/classes/com/sun/javadoc/Tag.java
@@ -70,14 +70,14 @@ public interface Tag {
* than one tag of a given kind:
*
*
- *
kind()
name()
- *
@throws
@throws
- *
@throws
@exception
- *
@see
@see
- *
@see
@link
- *
@see
@linkplain
- *
@serial
@serial
- *
@serial
@serialData
+ *
kind()
name()
+ *
@throws
@throws
+ *
@throws
@exception
+ *
@see
@see
+ *
@see
@link
+ *
@see
@linkplain
+ *
@serial
@serial
+ *
@serial
@serialData
*
*/
String kind();
diff --git a/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java b/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java
index 66b585cf347..e6ff1aad67c 100644
--- a/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/CompilationUnitTree.java
@@ -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 @@ package com.sun.source.tree;
import java.util.List;
import javax.tools.JavaFileObject;
-import com.sun.source.tree.LineMap;
/**
* Represents the abstract syntax tree for compilation units (source
diff --git a/langtools/src/share/classes/com/sun/source/tree/Scope.java b/langtools/src/share/classes/com/sun/source/tree/Scope.java
index 441f337f836..5d86fc8bf24 100644
--- a/langtools/src/share/classes/com/sun/source/tree/Scope.java
+++ b/langtools/src/share/classes/com/sun/source/tree/Scope.java
@@ -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
diff --git a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
index 7f4514964f7..9ade21f229d 100644
--- a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
+++ b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
@@ -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.
*
diff --git a/langtools/src/share/classes/com/sun/source/util/TreePath.java b/langtools/src/share/classes/com/sun/source/util/TreePath.java
index 103f6240567..eef400abc2e 100644
--- a/langtools/src/share/classes/com/sun/source/util/TreePath.java
+++ b/langtools/src/share/classes/com/sun/source/util/TreePath.java
@@ -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,9 +25,10 @@
package com.sun.source.util;
-import com.sun.source.tree.*;
import java.util.Iterator;
+import com.sun.source.tree.*;
+
/**
* A path of tree nodes, typically used to represent the sequence of ancestor
* nodes of a tree node up to the top level CompilationUnitTree node.
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.java
index 38043332030..69d034788cc 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/BootstrapMethods_attribute.java
@@ -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 @@ package com.sun.tools.classfile;
import java.io.IOException;
/**
- * See JVMS
- * 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
*
*
This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java
index f40a8d5e6e9..6a5bd8ccf86 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java
@@ -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_NameAndType_info;
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.
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java b/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java
index cffa7780350..a33964369fc 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Dependencies.java
@@ -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.Map;
import java.util.Set;
import java.util.regex.Pattern;
-import com.sun.tools.classfile.Dependency.Finder;
import com.sun.tools.classfile.Dependency.Filter;
+import com.sun.tools.classfile.Dependency.Finder;
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.MethodType;
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 @@ public class Dependencies {
* 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)
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java b/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java
index 28db3312188..7cbc3481264 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java
@@ -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 @@ public class Descriptor {
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;
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java b/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java
index a2d36f5dc25..aafb9861994 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java
@@ -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 @@ public class Instruction {
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);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java
index 191b392937e..6633b78dc82 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Print method and constructor info.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Robert Field
* @author Atul M Dambalkar
* @author Bhavesh Patel (Modified)
@@ -81,7 +86,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* 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 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
/**
* 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 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* 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 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
*
* @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 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* @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++) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
index 0284f8a1f9f..2e902b39e77 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
@@ -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.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 Index for all the Member Names with Indexing in
@@ -39,6 +39,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
* {@link SplitIndexWriter}. It uses the functionality from
* {@link HtmlDocletWriter} to generate the Index Contents.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @see IndexBuilder
* @author Atul M Dambalkar
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
index 27ca14fab60..df2e8af8d79 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
@@ -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.util.*;
import java.lang.reflect.Modifier;
+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.taglets.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* The base class for member writers.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Robert Field
* @author Atul M Dambalkar
* @author Jamie Ho (Re-write)
@@ -181,23 +187,6 @@ public abstract class AbstractMemberWriter {
*/
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 @@ public abstract class AbstractMemberWriter {
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 @@ public abstract class AbstractMemberWriter {
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 @@ public abstract class AbstractMemberWriter {
* 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) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
index ef407dfb206..9667b0f1477 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.*;
* Frame and Non-Frame format. This will be sub-classed by to
* generate overview-frame.html as well as overview-summary.html.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
* @author Bhavesh Patel (Modified)
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java
index 2b1b352942c..ccf82cf6be9 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java
@@ -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 @@ package com.sun.tools.doclets.formats.html;
import java.io.*;
import java.util.*;
-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.*;
+import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Abstract class to print the class hierarchy page for all the Classes. This
@@ -38,6 +39,11 @@ import com.sun.javadoc.*;
* generate the Package Tree and global Tree(for all the classes and packages)
* pages.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
*/
public abstract class AbstractTreeWriter extends HtmlDocletWriter {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
index b68af0445cc..adef39e1415 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
@@ -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.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 file with list of all the classes in this run. This page will be
@@ -39,6 +39,11 @@ import com.sun.tools.doclets.formats.html.markup.*;
* the left-hand top frame. The name of the generated file is
* "allclasses-frame.html".
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
* @author Doug Kramer
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
index 77f23279071..66c51aa2696 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.*;
/**
* Writes annotation type optional member documentation in HTML format.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
index f2418e5143d..baa725d1809 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.*;
/**
* Writes annotation type required member documentation in HTML format.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
index 83886defa9c..bb228d2cb2a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
@@ -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.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.builders.*;
import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.builders.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Generate the Class Information Page.
+ *
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @see com.sun.javadoc.ClassDoc
* @see java.util.Collections
* @see java.util.List
@@ -187,7 +195,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
/**
* {@inheritDoc}
*/
- public void printDocument(Content contentTree) {
+ public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType),
true, contentTree);
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
index d0cea943d6a..69edcde9796 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html;
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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Robert G. Field
* @author Bhavesh Patel (Modified)
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
index cc8411ee7cd..5db9e65b8dd 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
@@ -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.
+ *
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @see com.sun.javadoc.ClassDoc
* @see java.util.Collections
* @see java.util.List
@@ -196,7 +203,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
/**
* {@inheritDoc}
*/
- public void printDocument(Content contentTree) {
+ public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(configuration.metakeywords.getMetaKeywords(classDoc),
true, contentTree);
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
index 7985d9341dd..7c214429b7d 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java
@@ -25,13 +25,13 @@
package com.sun.tools.doclets.formats.html;
-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.*;
+import java.util.*;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Configure the output based on the command line options.
@@ -188,8 +188,8 @@ public class ConfigurationImpl extends Configuration {
// 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,
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
index 4d38ad9778c..d6902610c02 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
@@ -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 @@ package com.sun.tools.doclets.formats.html;
import java.io.*;
import java.util.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.formats.html.markup.*;
/**
* Write the Constants Summary Page in HTML format.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
* @since 1.4
@@ -297,7 +303,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
/**
* {@inheritDoc}
*/
- public void printDocument(Content contentTree) {
+ public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(null, true, contentTree);
}
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
index 6db2b0d23c3..22a52a41409 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Writes constructor documentation.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Robert Field
* @author Atul M Dambalkar
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java
index ed9805b58c1..5d852171964 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java
@@ -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.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.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Generate File to list all the deprecated classes and class members with the
* appropriate links.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @see java.util.List
* @author Atul M Dambalkar
* @author Bhavesh Patel (Modified)
@@ -208,7 +213,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
*
* @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)) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
index f567aae7ae1..7e1a977ddb9 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Writes enum constant documentation in HTML format.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
index ed442aaf731..3f00063060d 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Writes field documentation in HTML format.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Robert Field
* @author Atul M Dambalkar
* @author Jamie Ho (rewrite)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
index 1d7ac273338..006e8e2a1c7 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FrameOutputWriter.java
@@ -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.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Generate the documentation in the Html "frame" format in the browser. The
@@ -40,6 +41,11 @@ import com.sun.tools.doclets.formats.html.markup.*;
* right-hand frame will have overview or package summary or class file. Also
* take care of browsers which do not support Html frames.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
*/
public class FrameOutputWriter extends HtmlDocletWriter {
@@ -89,7 +95,7 @@ public class FrameOutputWriter extends HtmlDocletWriter {
* 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,
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
index 7f15c842276..b5e6ac3bb2d 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HelpWriter.java
@@ -26,14 +26,20 @@
package com.sun.tools.doclets.formats.html;
import java.io.*;
-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.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Generate the Help File for the generated API documentation. The help file
* contents are helpful for browsing the generated documentation.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
*/
public class HelpWriter extends HtmlDocletWriter {
@@ -73,7 +79,7 @@ public class HelpWriter extends HtmlDocletWriter {
/**
* 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);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
index 89af9ab5d80..ef5bb2477de 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java
@@ -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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
* @author Robert Field
* @author Jamie Ho
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
index 59d776106d1..c5bd281e82f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
@@ -32,14 +32,19 @@ 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.taglets.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Class for the Html Format Code Generation specific to JavaDoc.
* This Class contains methods related to the Html Code Generation which
* are used extensively while generating the entire documentation.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @since 1.2
* @author Atul M Dambalkar
* @author Robert Field
@@ -200,33 +205,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return buf.toString();
}
- /**
- * 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(" ");
- scriptEnd();
- noScript();
- println(" " + getHyperLinkString(link, where, label, strong, "", "", target));
- noScriptEnd();
- println(DocletConstants.NL);
- }
-
/**
* Get the script to show or hide the All classes link.
*
@@ -324,14 +302,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return new TagletWriterImpl(this, isFirstSentence);
}
- protected void printTagsInfoHeader() {
- dl();
- }
-
- protected void printTagsInfoFooter() {
- dlEnd();
- }
-
/**
* Get Package link, with target frame.
*
@@ -345,66 +315,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return getHyperLink(pathString(pd, "package-summary.html"), "", label, "", target);
}
- /**
- * Print the html file header. Also print Html page title and stylesheet
- * default properties.
- *
- * @param title String window title to go in the <TITLE> 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("");
- println("");
- html();
- head();
- if (! configuration.notimestamp) {
- print("");
- }
- if (configuration.charset.length() > 0) {
- println("");
- }
- 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("");
- }
- if ( metakeywords != null ) {
- for ( int i=0; i < metakeywords.length; i++ ) {
- println("");
- }
- }
- 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.
*
@@ -416,13 +326,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
* @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 @@ public class HtmlDocletWriter extends HtmlDocWriter {
head, body);
Content htmlDocument = new HtmlDocument(htmlDocType,
htmlComment, htmlTree);
- print(htmlDocument.toString());
+ write(htmlDocument);
}
/**
@@ -463,26 +372,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return title;
}
- /**
- * 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.
*
@@ -505,14 +394,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return em;
}
- /**
- * Print the user specified top.
- */
- public void printTop() {
- print(replaceDocRootDir(configuration.top));
- hr();
- }
-
/**
* Adds the user specified top.
*
@@ -523,14 +404,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
body.addContent(top);
}
- /**
- * Print the user specified bottom.
- */
- public void printBottom() {
- hr();
- print(replaceDocRootDir(configuration.bottom));
- }
-
/**
* Adds the user specified bottom.
*
@@ -543,128 +416,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
body.addContent(p);
}
- /**
- * 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 + "");
- anchor("navbar_top");
- println();
- print(getHyperLinkString("", "skip-navbar_top", "", false, "",
- configuration.getText("doclet.Skip_navigation_links"), ""));
- } else {
- println(DocletConstants.NL + "");
- 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 + "");
- } else {
- aName("skip-navbar_bottom");
- aEnd();
- println(DocletConstants.NL + "");
- }
- println("");
- }
- }
-
/**
* Adds the navigation bar for the Html page at the top and and the bottom.
*
@@ -756,14 +507,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
}
}
- /**
- * 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.
@@ -774,14 +517,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return getNavLinkNext(null);
}
- /**
- * 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.
@@ -792,28 +527,12 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return getNavLinkPrevious(null);
}
- /**
- * 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.
*
@@ -826,46 +545,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -879,18 +558,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -901,18 +568,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -923,20 +578,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -953,21 +594,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
@@ -985,16 +611,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -1008,13 +624,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -1024,16 +633,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return getNavShowLists(relativePath + "index.html");
}
- /**
- * 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.
*
@@ -1046,25 +645,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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
@@ -1101,18 +681,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -1123,16 +691,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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.
*
@@ -1145,17 +703,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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
@@ -1170,20 +717,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
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.
@@ -1199,27 +732,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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
@@ -1243,87 +755,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
return li;
}
- /**
- * 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
}
- */
- 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
- * <TD ALIGN="right" VALIGN="top" WIDTH="1%">.
- */
- public void tdIndex() {
- print("
");
- }
-
- /**
- * 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.
*
@@ -1407,7 +838,7 @@ public class HtmlDocletWriter extends HtmlDocWriter {
/**
* 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) {
@@ -1452,144 +883,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
}
}
- /**
- * 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
");
- }
-
- /**
- * Print anchor <A NAME="name"> tag.
- *
- * @param name Name String.
- */
- public void aName(String name) {
- print("");
- }
-
- /**
- * Print </A> tag.
- */
- public void aEnd() {
- print("");
- }
-
- /**
- * Print <I> tag.
- */
- public void italic() {
- print("");
- }
-
- /**
- * Print </I> tag.
- */
- public void italicEnd() {
- print("");
- }
-
- /**
- * Print contents within anchor <A NAME="name"> tags.
- *
- * @param name String name.
- * @param content String contents.
- */
- public void anchor(String name, String content) {
- aName(name);
- print(content);
- aEnd();
- }
-
- /**
- * Print anchor <A NAME="name"> and </A>tags. Print comment string
- * "<!-- -->" within those tags.
- *
- * @param name String name.
- */
- public void anchor(String name) {
- anchor(name, "");
- }
-
- /**
- * Print newline and then print <P> tag. Add a newline character at the
- * end.
- */
- public void p() {
- println();
- println("
");
- }
-
- /**
- * Print newline and then print </P> tag. Add a newline character at the
- * end.
- */
- public void pEnd() {
- println();
- println("
");
- }
-
- /**
- * Print newline and then print <BR> tag. Add a newline character at the
- * end.
- */
- public void br() {
- println();
- println(" ");
- }
-
- /**
- * Print <ADDRESS> tag. Add a newline character at the end.
- */
- public void address() {
- println("");
- }
-
- /**
- * Print </ADDRESS> tag. Add a newline character at the end.
- */
- public void addressEnd() {
- println("");
- }
-
- /**
- * Print <HEAD> tag. Add a newline character at the end.
- */
- public void head() {
- println("");
- }
-
- /**
- * Print </HEAD> tag. Add a newline character at the end.
- */
- public void headEnd() {
- println("");
- }
-
- /**
- * Print <CODE> tag.
- */
- public void code() {
- print("");
- }
-
- /**
- * Print </CODE> tag.
- */
- public void codeEnd() {
- print("");
- }
-
- /**
- * Print <EM> tag. Add a newline character at the end.
- */
- public void em() {
- println("");
- }
-
- /**
- * Print </EM> tag. Add a newline character at the end.
- */
- public void emEnd() {
- println("");
- }
-
- /**
- * Print HTML <TABLE BORDER="border" WIDTH="width"
- * CELLPADDING="cellpadding" CELLSPACING="cellspacing"> 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 +
- "
");
- }
-
- /**
- * Print HTML <TABLE BORDER="border" WIDTH="width"
- * CELLPADDING="cellpadding" CELLSPACING="cellspacing" SUMMARY="summary"> 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 +
- "
");
- }
-
- /**
- * Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding"
- * CELLSPACING="cellspacing"> 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 +
- "
");
- }
-
- /**
- * Print HTML <TABLE BORDER="border" CELLPADDING="cellpadding"
- * CELLSPACING="cellspacing" SUMMARY="summary"> 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 +
- "
");
- }
-
- /**
- * Print <BLOCKQUOTE> tag. Add a newline character at the end.
- */
- public void blockquote() {
- println("
");
- }
-
- /**
- * Print </BLOCKQUOTE> tag. Add a newline character at the end.
- */
- public void blockquoteEnd() {
- println("
");
- }
-
- /**
- * Get the "<code>" string.
- *
- * @return String Return String "<code>";
- */
- public String getCode() {
- return "";
- }
-
- /**
- * Get the "</code>" string.
- *
- * @return String Return String "</code>";
- */
- public String getCodeEnd() {
- return "";
- }
-
- /**
- * Print <NOFRAMES> tag. Add a newline character at the end.
- */
- public void noFrames() {
- println("");
- }
-
- /**
- * Print </NOFRAMES> tag. Add a newline character at the end.
- */
- public void noFramesEnd() {
- println("");
- }
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java
index 56c23965534..8ad3c404023 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/RawHtml.java
@@ -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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Bhavesh Patel
*/
public class RawHtml extends Content{
@@ -82,7 +90,16 @@ public class RawHtml extends Content{
/**
* {@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);
}
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java
index 2bf4437fb31..adddb32f993 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/StringContent.java
@@ -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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Bhavesh Patel
*/
public class StringContent extends Content{
@@ -93,7 +101,10 @@ public class StringContent extends Content{
/**
* {@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);
}
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
index 39f3af891a8..7f38f38564c 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AbstractDoclet.java
@@ -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.
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.java
index 64f4b34e10b..18ada19f80b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeOptionalMemberWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java
index fb83c2a5688..28a18f9eaad 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java
index 9ef63b50258..b65740edf87 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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.
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -152,7 +153,7 @@ public interface AnnotationTypeWriter {
*
* @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.
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java
index c5bfb13e41b..f5904b3aef3 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ClassWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -179,7 +180,7 @@ public interface ClassWriter {
*
* @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.
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
index e3d15ebd768..d3cf97c5c4e 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
@@ -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 @@ import java.io.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Robert Field.
* @author Atul Dambalkar.
@@ -463,7 +465,7 @@ public abstract class Configuration {
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");
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java
index a2eab1b46ec..1318a130177 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java
@@ -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.util.*;
import java.io.*;
+import java.util.*;
+
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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -137,6 +139,6 @@ public interface ConstantsSummaryWriter {
*
* @param contentTree content tree which should be printed
*/
- public abstract void printDocument(Content contentTree);
+ public abstract void printDocument(Content contentTree) throws IOException;
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.java
index 8ad48246377..f784b4ae4ec 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstructorWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java
index a7bdf96e0f0..836f7cf9e5f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Content.java
@@ -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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Bhavesh Patel
*/
public abstract class Content {
@@ -39,10 +48,16 @@ public abstract class Content {
*
* @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 class Content {
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.
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.java
index 8b14267880c..987c52f07ad 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/EnumConstantWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -56,7 +57,7 @@ public interface EnumConstantWriter {
* 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,
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.java
index c17ac269b32..554f1999e27 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/FieldWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java
index 76baf59a1cd..53e0b5b260f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MemberSummaryWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java
index 1864bf94364..ce4b90e1956 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/MethodWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.java
index a5a023a3f8e..4aea9097955 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/NestedClassWriter.java
@@ -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 @@ import java.io.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java
index eb8bf7be0d0..001335168fa 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/PackageSummaryWriter.java
@@ -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 com.sun.javadoc.*;
import java.io.*;
+import com.sun.javadoc.*;
+
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -113,7 +115,7 @@ public interface PackageSummaryWriter {
*
* @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.
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java
index 84454acdf24..89add8a363a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.5
@@ -150,7 +151,7 @@ public interface SerializedFormWriter {
*
* @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.
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java
index 252a54c561d..6c2fb5bd0f9 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java
@@ -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.tools.doclets.internal.toolkit.util.*;
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
index c016775a546..ef7b0d99ee3 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
@@ -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 @@ import java.util.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.5
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
index 6a4be60532a..b7454d96879 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
@@ -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 @@ 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.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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.5
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
index a92ea569bcd..dbb7e4ab8d0 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.builders;
import java.io.*;
import java.util.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -177,7 +179,7 @@ public class AnnotationTypeBuilder extends AbstractBuilder {
* @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);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
index b0abbc305dd..edcfbe2094f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
index ec9c4f2a961..733eac39aa7 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java
index e35be117bb5..71fb5a36b1b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
index d050cab700e..9f5d095edf4 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
@@ -27,16 +27,18 @@ package com.sun.tools.doclets.internal.toolkit.builders;
import java.io.*;
import java.util.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -280,18 +282,18 @@ public class ClassBuilder extends AbstractBuilder {
* @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()) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
index bded1e85e09..6de9f78920f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.builders;
import java.io.*;
import java.util.*;
+
import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -345,7 +347,6 @@ public class ConstantsSummaryBuilder extends AbstractBuilder {
/**
* 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 members() {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
index 68efe8c124b..20f93081562 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
index 868297bc034..36f5d397441 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
index 0416ba98555..4f05027f672 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
index 3445d9617af..f6e2f339dda 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
@@ -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 com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
import java.io.*;
import java.util.*;
+
+import javax.xml.parsers.*;
+
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
-import javax.xml.parsers.*;
+
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* Parse the XML that specified the order of operation for the builders. This
* Parser uses SAX parsing.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
* @see SAXParser
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
index 8ad4c58f527..2d81a4caefd 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
@@ -165,7 +167,6 @@ public class MemberSummaryBuilder extends AbstractMemberBuilder {
* 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
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
index 0a28d8928ea..ed933351fe1 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
@@ -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.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.*;
+
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
index 3f4494ae3c8..b6dcab6c97c 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
@@ -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.util.*;
import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
index 013120b439b..66e8478d940 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.builders;
import java.io.*;
import java.util.*;
+
import com.sun.javadoc.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Bhavesh Patel (Modified)
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java
index 4b414dadd52..ae335b99cd9 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java
@@ -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 @@ import java.util.Map;
/**
* Simple class to represent the attribute and elements of an XML node.
+ *
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*/
public class XMLNode {
XMLNode(XMLNode parent, String qname) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseExecutableMemberTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseExecutableMemberTaglet.java
index a3b53f32aa4..ce15461cc99 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseExecutableMemberTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseExecutableMemberTaglet.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.taglets;
* An abstract class for that implements the {@link Taglet} interface
* for tags in ExecutableMembers.
*
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API.
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseInlineTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseInlineTaglet.java
index 2dff8417c3c..24383b8a0c2 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseInlineTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseInlineTaglet.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.taglets;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseTaglet.java
index c0c6bff552e..e83ac8303a1 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/BaseTaglet.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java
index 444771be25c..4fec56505d8 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java
@@ -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 @@ import com.sun.tools.doclets.Taglet;
* displays as:
*
The type {@code List
}
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Scott Seligman
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java
index b2035b31890..fc7fc2451b0 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.5
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DocRootTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DocRootTaglet.java
index f895b676683..8998f26121f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DocRootTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DocRootTaglet.java
@@ -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 @@ import com.sun.javadoc.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @author Doug Kramer
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java
index 554756b5633..e737f9c7698 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritableTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritableTaglet.java
index 20a265d208f..89518e8f002 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritableTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritableTaglet.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.util.DocFinder;
* A taglet should implement this interface if it supports the inheritDoc
* tag or is automatically inherited if it is missing.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LegacyTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LegacyTaglet.java
index b8cfa6fcaec..2955406575c 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LegacyTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LegacyTaglet.java
@@ -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 @@ import com.sun.javadoc.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @since 1.5
* @author Jamie Ho
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java
index 7a465e33bf0..75cc3cf6ec2 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java
@@ -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 @@ import com.sun.tools.doclets.Taglet;
* displays as:
*
{@literal ac}
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Scott Seligman
* @since 1.5
*/
@@ -79,7 +84,7 @@ public class LiteralTaglet implements Taglet {
* 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) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java
index 449bc1fb15d..ad4bf8bebdb 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
@@ -182,7 +184,7 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
* Given an array of ParamTags,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 @@ public class ParamTaglet extends BaseTaglet implements InheritableTaglet {
* 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.
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ReturnTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ReturnTaglet.java
index f5e90c8f0e3..9d98a9691b7 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ReturnTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ReturnTaglet.java
@@ -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.tools.doclets.internal.toolkit.util.*;
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SeeTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SeeTaglet.java
index bca2707f20c..4e3e8107c05 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SeeTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SeeTaglet.java
@@ -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.tools.doclets.internal.toolkit.util.*;
import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java
index 3051503ba45..4b21cbd4172 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/SimpleTaglet.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
index 70cee399648..040c9ea2368 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
@@ -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 theTaglets 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
@@ -448,7 +449,7 @@ public class TagletManager {
//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(", ");
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java
index e0dabc2b0c4..c7bbef457c1 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.taglets;
* different doclets work with different formats of output. A single taglet can
* work with any doclet that provides an implementation of taglet output.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java
index b26845c27e0..2e594db8e77 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java
@@ -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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @since 1.5
* @author Jamie Ho
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ThrowsTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ThrowsTaglet.java
index d25618aa119..7b8b365b165 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ThrowsTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ThrowsTaglet.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java
index e07bc1500a6..90794bff625 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java
@@ -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 @@ import java.util.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
@@ -107,7 +109,7 @@ public class ValueTaglet extends BaseInlineTaglet {
* @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
- * # format. If the class name is omitted,
+ * {@code #} 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,
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java
index 529d4fc4432..9e83edffc0b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.Configuration;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.4
@@ -184,7 +185,7 @@ import com.sun.tools.doclets.internal.toolkit.Configuration;
/**
* 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() ?
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
index 5da917e2c27..39f9adf765f 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
@@ -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.util.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @see java.util.HashMap
* @see java.util.List
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java
index 017ed72833f..a7eb4f660f6 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java
@@ -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 com.sun.javadoc.*;
import java.util.*;
+import com.sun.javadoc.*;
+
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @since 1.2
* @author Robert G. Field
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/CommentedMethodFinder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/CommentedMethodFinder.java
index d74c08ee742..5c8821450fd 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/CommentedMethodFinder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/CommentedMethodFinder.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
*/
public class CommentedMethodFinder extends MethodFinder {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java
index 5c64a8f19aa..8f8a096e019 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java
@@ -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 com.sun.javadoc.*;
import java.util.*;
+
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.Configuration;
/**
* Build list of all the deprecated packages, classes, constructors, fields and methods.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Atul M Dambalkar
*/
public class DeprecatedAPIListBuilder {
@@ -145,7 +151,7 @@ public class DeprecatedAPIListBuilder {
/**
* 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 getList(int type) {
return deprecatedLists.get(type);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java
index fd50d8f0501..a91a1b72e06 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DirectoryManager.java
@@ -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 @@ public class DirectoryManager {
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 @@ public class DirectoryManager {
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 @@ public class DirectoryManager {
* @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 @@ public class DirectoryManager {
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 @@ public class DirectoryManager {
* @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);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFinder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFinder.java
index b23e5db3505..a0e4015d045 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFinder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocFinder.java
@@ -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.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java
index c93d5bc1093..6261caec4ed 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletAbortException.java
@@ -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;
+/**
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ */
public class DocletAbortException extends RuntimeException {
private static final long serialVersionUID = -9131058909576418984L;
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
index f962080e4d5..8f0fd4c446e 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.util;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.5
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
index 32a4a0dcf69..5c1cf1bec24 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Extern.java
@@ -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 com.sun.javadoc.*;
-import java.util.Map;
-import java.util.HashMap;
import java.io.*;
import java.net.*;
+import java.util.HashMap;
+import java.util.Map;
+
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
/**
* Process and manage "-link" and "-linkoffline" to external packages. The
@@ -40,9 +40,10 @@ import java.net.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Atul M Dambalkar
* @author Robert Field
@@ -91,7 +92,7 @@ public class Extern {
* 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 @@ public class Extern {
/**
* 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 @@ public class Extern {
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) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java
index 5893f302e40..be5284e91da 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java
@@ -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,10 +25,11 @@
package com.sun.tools.doclets.internal.toolkit.util;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
import java.util.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
/**
* Process and manage grouping of packages, as specified by "-group" option on
* the command line.
@@ -48,9 +49,10 @@ import java.util.*;
* will put the package java.lang in the group "Lang" and not in group "Core".
*
*
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Atul M Dambalkar
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java
index 37834420aa1..c2bfc1359e6 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Atul M Dambalkar
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
index 7e62722f513..e6958217be0 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
@@ -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,19 +25,21 @@
package com.sun.tools.doclets.internal.toolkit.util;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
import java.util.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
/**
* Build the mapping of each Unicode character with it's member lists
* containing members names starting with it. Also build a list for all the
* Unicode characters which start a member name. Member name is
* classkind or field or method or constructor name.
*
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @since 1.2
* @see java.lang.Character
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
index 7e264c8b47b..d761cfebc69 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MessageRetriever.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @since 1.2
* @author Atul M Dambalkar
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
index e9fd61e19dc..2f814252c2b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MetaKeywords.java
@@ -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,19 +25,21 @@
package com.sun.tools.doclets.internal.toolkit.util;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
import java.util.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
/**
* Provides methods for creating an array of class, method and
* field names to be included as meta keywords in the HTML header
* of class pages. These keywords improve search results
* on browsers that look for keywords.
*
- * This code is not part of an API.
- * It is implementation that is subject to change.
- * Do not use it as an API
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Doug Kramer
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodFinder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodFinder.java
index a19e8c1ce1d..68e082701a1 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodFinder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/MethodFinder.java
@@ -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 @@ import com.sun.javadoc.*;
* 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.
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*/
public abstract class MethodFinder {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java
index a32f04890e9..4586deea9ce 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java
@@ -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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @see com.sun.javadoc.PackageDoc
* @author Atul M Dambalkar
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TaggedMethodFinder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TaggedMethodFinder.java
index e4c7fbc3b3d..2854b493f1a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TaggedMethodFinder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TaggedMethodFinder.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Atul M Dambalkar
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TextTag.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TextTag.java
index a9e2aa0f0ac..074718f7979 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TextTag.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/TextTag.java
@@ -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 @@ import com.sun.javadoc.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Jamie Ho
* @since 1.5
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
index 25b8db94733..c01ac3e58f5 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.*;
/**
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Atul M Dambalkar
* @author Jamie Ho
@@ -366,7 +367,13 @@ public class Util {
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 @@ public class Util {
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));
}
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
index 4d88a7e1734..e8004c1af72 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
@@ -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 @@ import java.util.*;
* 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
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
*
* @author Atul M Dambalkar
* @author Jamie Ho (rewrite)
@@ -125,7 +127,7 @@ public class VisibleMemberMap {
* 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 getInheritedPackagePrivateMethods(Configuration configuration) {
@@ -148,7 +150,7 @@ public class VisibleMemberMap {
* 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 getLeafClassMembers(Configuration configuration) {
List result = getMembersFor(classdoc);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkFactory.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkFactory.java
index 37855ae2181..e9539a44e15 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkFactory.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkFactory.java
@@ -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 @@ import com.sun.javadoc.*;
/**
* A factory that constructs links from given link information.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java
index 4e3517d91f2..53acdd5e5ee 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkInfo.java
@@ -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 @@ import com.sun.tools.doclets.internal.toolkit.Configuration;
/**
* Encapsulates information about a link.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkOutput.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkOutput.java
index 156a0094a9c..cb58ae4667a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkOutput.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/links/LinkOutput.java
@@ -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 @@ package com.sun.tools.doclets.internal.toolkit.util.links;
/**
* Stores output of a link.
*
+ *
This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
+ * This code and its internal interfaces are subject to change or
+ * deletion without notice.
+ *
* @author Jamie Ho
* @since 1.5
*/
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java b/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java
index 01838e9c196..e485804e124 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/BasicJavacTask.java
@@ -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.JavacElements;
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.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java
index 18aafee6a15..fab0adae508 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java
@@ -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 @@ public interface DiagnosticFormatter> {
/**
* 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 visibleParts);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
index 0be82fb8a27..0a7a4617250 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
@@ -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 @@ public final class JavacTool implements JavaCompiler {
* 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
*/
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java
index c446e0a9947..174b3ffa971 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java
@@ -60,8 +60,8 @@ import com.sun.tools.javac.comp.Env;
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.tree.EndPosTable;
import com.sun.tools.javac.processing.JavacProcessingEnvironment;
+import com.sun.tools.javac.tree.EndPosTable;
import com.sun.tools.javac.tree.JCTree;
import com.sun.tools.javac.tree.JCTree.*;
import com.sun.tools.javac.tree.TreeCopier;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java
index 41d987480f5..247283440ed 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java
@@ -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.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
-import javax.tools.JavaFileObject.Kind;
+
import javax.tools.*;
+import javax.tools.JavaFileObject.Kind;
/**
* Wraps all calls to a given file manager. Subclasses of this class
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java b/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java
index 486e9b6a4a4..84d9108b5d3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Annotations.java
@@ -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.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java b/langtools/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java
index 3d8f00eb67f..022681bd8f6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java
@@ -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 java.util.Map;
import com.sun.tools.javac.util.Assert;
import com.sun.tools.javac.util.Context;
-import com.sun.tools.javac.util.ListBuffer;
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
+import com.sun.tools.javac.util.ListBuffer;
/**
*
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java
index f9dfc13e970..d1601572998 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java
@@ -25,10 +25,11 @@
package com.sun.tools.javac.code;
-import java.util.EnumSet;
import java.util.Collections;
+import java.util.EnumSet;
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 @@ public class Flags {
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 class Flags {
*/
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 @@ public class Flags {
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 asModifierSet(long flags) {
Set modifiers = modifierSets.get(flags);
@@ -319,6 +329,7 @@ public class Flags {
NATIVE("native"),
INTERFACE("interface"),
ABSTRACT("abstract"),
+ DEFAULT("default"),
STRICTFP("strictfp"),
BRIDGE("bridge"),
SYNTHETIC("synthetic"),
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
index 9495ddf1be4..dc0d52f34b6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
@@ -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 java.util.Locale;
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.TypeTags.*;
import static com.sun.tools.javac.code.Flags.*;
+import static com.sun.tools.javac.code.TypeTags.*;
/** Internal symbol kinds, which distinguish between elements of
* different subclasses of Symbol. Symbol kinds are organized so they can be
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
index 644955c646a..5d7e430ffeb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
@@ -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 @@ package com.sun.tools.javac.code;
import java.util.Locale;
import com.sun.tools.javac.api.Messages;
-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.code.Type.*;
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 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi
/**
* 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 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi
/**
* 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 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi
@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 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi
@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 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi
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 is = t.interfaces_field; is.nonEmpty(); is = is.tail) {
s.append("&");
s.append(visit(is.head, locale));
@@ -292,7 +287,7 @@ public abstract class Printer implements Type.Visitor, Symbol.Vi
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;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java b/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java
index db96649e99a..e8153da2703 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java
@@ -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,9 +25,10 @@
package com.sun.tools.javac.code;
-import com.sun.tools.javac.util.*;
import java.util.Iterator;
+import com.sun.tools.javac.util.*;
+
/** A scope represents an area of visibility in a Java program. The
* Scope class is a container for symbols which provides
* efficient access to symbols given their names. Scopes are implemented
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
index f83823af270..04a59cec522 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
@@ -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.util.*;
import com.sun.tools.javac.jvm.Target;
-
+import com.sun.tools.javac.util.*;
import static com.sun.tools.javac.main.Option.*;
/** The source language version accepted.
@@ -203,6 +203,9 @@ public enum Source {
public boolean allowMethodReferences() {
return compareTo(JDK1_8) >= 0;
}
+ public boolean allowDefaultMethods() {
+ return compareTo(JDK1_8) >= 0;
+ }
public boolean allowEffectivelyFinalInInnerClasses() {
return compareTo(JDK1_8) >= 0;
}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
index 010d441cb71..328cfcf6bfe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
@@ -27,11 +27,10 @@ package com.sun.tools.javac.code;
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.comp.Env;
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.*;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
index c09d31eb083..29ce859361d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
@@ -26,17 +26,17 @@
package com.sun.tools.javac.code;
import java.util.*;
-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 javax.lang.model.element.ElementVisitor;
+import javax.lang.model.type.TypeVisitor;
+
import com.sun.tools.javac.code.Symbol.*;
import com.sun.tools.javac.code.Type.*;
import com.sun.tools.javac.jvm.*;
-
-import static com.sun.tools.javac.jvm.ByteCodes.*;
+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.*;
/** 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 @@ public class Symtab {
}
/** 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;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java b/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java
index 6c242879c57..573f6275ddd 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java
@@ -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.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
index eefbf90c85d..362bb426488 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
@@ -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 java.util.Set;
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.*;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
index d46286ade81..aecf93bb74f 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
@@ -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 class TypeTags {
*/
public static final int DEFERRED = FORALL+1;
- /** The tag of the bottom type .
+ /** The tag of the bottom type {@code }.
*/
public static final int BOT = DEFERRED+1;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
index 0cb2b07b248..9bc13e56bbb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
@@ -28,21 +28,19 @@ package com.sun.tools.javac.code;
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 @@ public class Types {
* conservative in that it is allowed to say that two types are
* not disjoint, even though they actually are.
*
- * The type C is castable to C exactly if X and Y are not
- * disjoint.
+ * The type {@code C} is castable to {@code C} 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 @@ public class Types {
* 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 but it is not true that Integer cannot
+ * where {@code } but it is not true that Integer cannot
* possibly be a subtype of T.
*/
public boolean notSoftSubtype(Type t, Type s) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
index e11297309c3..1274431269d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
@@ -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 java.util.*;
+import java.util.Set;
-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 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 @@ public class Attr extends JCTree.Visitor {
* @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 env,
JCTree.JCExpression initializer,
@@ -875,6 +873,7 @@ public class Attr extends JCTree.Visitor {
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 @@ public class Attr extends JCTree.Visitor {
// 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 @@ public class Attr extends JCTree.Visitor {
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");
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
index 87651481548..d1679293569 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
@@ -230,7 +230,6 @@ public class Check {
/** 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 @@ public class Check {
**************************************************************************/
/** Return name of local class.
- * This is of the form $ n
+ * This is of the form {@code $ n }
* where
* enclClass is the flat name of the enclosing class,
* classname is the simple name of the local class
@@ -600,11 +599,10 @@ public class Check {
/** Check that a type is within some bounds.
*
- * Used in TypeApply to verify that, e.g., X in V is a valid
+ * Used in TypeApply to verify that, e.g., X in {@code V} 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 @@ public class Check {
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 @@ public class Check {
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 @@ public class Check {
// 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 @@ public class Check {
STRICTFP))) {
// skip
}
- return flags & (mask | ~StandardFlags) | implicit;
+ return flags & (mask | ~ExtendedStandardFlags) | implicit;
}
@@ -1262,8 +1266,10 @@ public class Check {
* 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:
*
+ *
*
* and we can't make sure that the bound is already attributed because
* of possible cycles.
@@ -2574,7 +2580,7 @@ public class Check {
* '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 @@ public class Check {
* @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);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
index 7405ca109a3..2b6d0d72e51 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java
@@ -46,7 +46,6 @@ import java.util.WeakHashMap;
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.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
index 55e2e7144f1..e616097e4f0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
@@ -148,7 +148,7 @@ import static com.sun.tools.javac.tree.JCTree.Tag.*;
* 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 thrown" that records the type of all
+ * global variable "{@code Set thrown}" that records the type of all
* exceptions that can be thrown.
*
*
Other minor issues the treatment of members of other classes
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
index 548bb9d8479..bfd3c4eefeb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
@@ -41,7 +41,6 @@ import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
import java.util.HashMap;
import java.util.Map;
-import java.util.Set;
import static com.sun.tools.javac.code.TypeTags.*;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
index 57604cbe557..120c429e4ef 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
@@ -671,7 +671,7 @@ public class Lower extends TreeTranslator {
};
/** 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 @@ public class Lower extends TreeTranslator {
* 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 @@ public class Lower extends TreeTranslator {
* @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("[")) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
index a57f3ba8019..85397fc91b4 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
@@ -128,8 +128,7 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
/** 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 @@ public class MemberEnter extends JCTree.Visitor implements Completer {
/** 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,
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
index e3afbb757e5..36f3a25f243 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
@@ -27,8 +27,6 @@ package com.sun.tools.javac.comp;
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 @@ public class TransTypes extends TreeTranslator {
* Then, coerce to some given target type unless target type is null.
* This operation is used in situations like the following:
*
+ *
*
* 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:
*
+ *
{@code
* Integer x = (Integer)cell.value;
+ * }
*
* @param tree The expression tree whose type might need adjustment.
* @param erasedType The expression's type after erasure.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
index 78774566915..87bbfbcf2c8 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
@@ -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 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil
}
/**
- * 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.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java b/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java
index 1e29f916742..6e0472c97dc 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/Locations.java
@@ -53,13 +53,14 @@ import com.sun.tools.javac.util.Log;
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 form).
+ * {@code Collection} form).
*
*
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 @@ public class Locations {
}
}
- /** @see JavaFileManager#handleOption. */
+ /** @see JavaFileManager#handleOption */
abstract boolean handleOption(Option option, String value);
- /** @see JavaFileManager#getLocation. */
+ /** @see StandardJavaFileManager#getLocation */
abstract Collection getLocation();
- /** @see JavaFileManager#setLocation. */
+ /** @see StandardJavaFileManager#setLocation */
abstract void setLocation(Iterable extends File> files) throws IOException;
}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
index 1ca860e95d4..dbb9f68a91f 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
@@ -38,7 +38,6 @@ import java.util.Calendar;
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 @@ import com.sun.tools.javac.file.RelativePath.RelativeFile;
* the command line.)
*
* Location where to look for/generate optimized zip index files can be
- * provided using "-XDcachezipindexdir=". If this flag is not
+ * provided using "{@code -XDcachezipindexdir=}". If this flag is not
* provided, the default location is the value of the "java.io.tmpdir" system
* property.
*
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
index 9a59e0de5b6..9f99fb6d66f 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
@@ -446,7 +446,7 @@ public class Gen extends JCTree.Visitor {
* Normalizing class-members.
*************************************************************************/
- /** Distribute member initializer code into constructors and
+ /** Distribute member initializer code into constructors and {@code }
* method.
* @param defs The list of class member declarations.
* @param c The enclosing class.
@@ -689,7 +689,7 @@ public class Gen extends JCTree.Visitor {
* 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 @@ public class Gen extends JCTree.Visitor {
* 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
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
index 65c16f08522..150746a571d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
@@ -607,7 +607,7 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
/** 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 @@ public class JavaCompiler implements ClassReader.SourceCompleter {
/** 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
diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
index 92e1c1790e1..dd86ec20978 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
@@ -25,9 +25,8 @@
package com.sun.tools.javac.model;
-import com.sun.tools.javac.util.*;
-import java.io.ObjectInputStream;
import java.io.IOException;
+import java.io.ObjectInputStream;
import java.lang.annotation.*;
import java.lang.reflect.Array;
import java.lang.reflect.Method;
@@ -35,12 +34,14 @@ import java.util.LinkedHashMap;
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.*;
/**
diff --git a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
index 4aff5616231..762b8ed21fe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
@@ -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 @@ package com.sun.tools.javac.nio;
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,
diff --git a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
index a46e639ae16..357fc77f40b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
@@ -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.charset.CharsetDecoder;
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;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
index 7b6ca57cc34..f6ddfcbeb99 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavaTokenizer.java
@@ -108,8 +108,7 @@ public class JavaTokenizer {
* {@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) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
index aac80c53fe2..616f023dc1f 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -116,6 +116,8 @@ public class JavacParser implements Parser {
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 @@ public class JavacParser implements Parser {
*/
boolean allowMethodReferences;
+ /** Switch: should we allow default methods in interfaces?
+ */
+ boolean allowDefaultMethods;
+
/** Switch: should we keep docComments?
*/
boolean keepDocComments;
@@ -806,7 +812,7 @@ public class JavacParser implements Parser {
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 @@ public class JavacParser implements Parser {
/** 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 buf = List.nil();
@@ -841,8 +847,8 @@ public class JavacParser implements Parser {
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 @@ public class JavacParser implements Parser {
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 @@ public class JavacParser implements Parser {
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
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java
index 93b2e8adecf..20c49e6cfc2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java
@@ -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 @@ public class Scanner implements Lexer {
* {@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) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java b/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java
index 07b8c5cda8b..84e6792cdd1 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/UnicodeReader.java
@@ -77,9 +77,8 @@ public class UnicodeReader {
* 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 @@ public class UnicodeReader {
/**
* Returns a copy of a character array subset of the input buffer.
- * The returned array begins at the beginIndex and
- * extends to the character at index endIndex - 1.
- * Thus the length of the substring is endIndex-beginIndex.
+ * 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
- * String.substring(beginIndex, endIndex).
+ * {@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) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
index 18779a25ceb..157f7eb0125 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
@@ -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 @@ public class JavacRoundEnvironment implements RoundEnvironment {
* Only type elements included 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
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
index e3cd7ade45a..ea6d9a07dae 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
@@ -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 @@ class ServiceProxy {
* 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
diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
index 5140de268de..f3495045680 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -2174,6 +2174,11 @@ compiler.err.method.references.not.supported.in.source=\
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)
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
index 3494f3b52cf..d8008d716b6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
@@ -464,32 +464,29 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
}
/**
- * 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 packageAnnotations;
+ /** The tree representing the package clause. */
public JCExpression pid;
+ /** All definitions in this file (ClassDef, Import, and Skip) */
public List 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 packageAnnotations,
JCExpression pid,
@@ -550,10 +547,10 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 typarams;
+ /** the classes this class extends */
public JCExpression extending;
+ /** the interfaces implemented by this class */
public List implementing;
+ /** all variables and methods defined in this class */
public List defs;
+ /** the symbol */
public ClassSymbol sym;
protected JCClassDecl(JCModifiers mods,
Name name,
@@ -676,24 +673,25 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 typarams;
+ /** value parameters */
public List params;
+ /** exceptions thrown by this method */
public List 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* A statement block.
- * @param stats statements
- * @param flags flags
*/
public static class JCBlock extends JCStatement implements BlockTree {
+ /** flags */
public long flags;
+ /** statements */
public List stats;
/** Position of closing brace, optional. */
public int endpos = Position.NOPOS;
@@ -1206,9 +1204,9 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
/**
* 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 bounds;
protected JCTypeParameter(Name name, List bounds) {
this.name = name;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
index 04f4d47c3a9..c501f7a2e3a 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
@@ -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 class Pretty extends JCTree.Visitor {
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("@");
}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
index 120bf2ae434..3111b6af042 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
@@ -790,8 +790,8 @@ public class TreeInfo {
* 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 @@ public class TreeInfo {
/** 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.
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
index cec43bdd412..06e6e46d76c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
@@ -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 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
/**
* 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;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java
index ca25a5b3636..07f244a94d2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java
@@ -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 @@ public abstract class AbstractLog {
/** 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.
*/
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
index cec4b954b4e..7b12009695a 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
@@ -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 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter {
/**
* 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 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter {
* 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 @@ public class BasicDiagnosticFormatter extends AbstractDiagnosticFormatter {
/**
* 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);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java
index 91a4e6340ca..93026633f34 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java
@@ -44,7 +44,7 @@ import java.util.*;
* instance method that is overridden in extended components. A base
* phase supporting extension would look something like this:
*
- *
+ *
{@code
* public class Phase {
* protected static final Context.Key phaseKey =
* new Context.Key();
@@ -62,7 +62,7 @@ import java.util.*;
* // other intitialization follows...
* }
* }
- *
+ * }
*
*
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 @@ import java.util.*;
* and this must be done before any reference to the phase is accessed
* using Phase.instance(). An extended phase might be declared thus:
*
- *