提交 cfa31ff3 编写于 作者: L lana

Merge

...@@ -70,14 +70,14 @@ public interface Tag { ...@@ -70,14 +70,14 @@ public interface Tag {
* than one tag of a given kind: * than one tag of a given kind:
* <p> * <p>
* <table border="1" cellpadding="4" cellspacing="0"> * <table border="1" cellpadding="4" cellspacing="0">
* <tr><th><tt> kind() </th> <th><tt> name() </th></tr> * <tr><th><tt> kind() </tt></th> <th><tt> name() </tt></th></tr>
* <tr><td><tt> @throws </td> <td><tt> @throws </td></tr> * <tr><td><tt> @throws </tt></td> <td><tt> @throws </tt></td></tr>
* <tr><td><tt> @throws </td> <td><tt> @exception </td></tr> * <tr><td><tt> @throws </tt></td> <td><tt> @exception </tt></td></tr>
* <tr><td><tt> @see </td> <td><tt> @see </td></tr> * <tr><td><tt> @see </tt></td> <td><tt> @see </tt></td></tr>
* <tr><td><tt> @see </td> <td><tt> @link </td></tr> * <tr><td><tt> @see </tt></td> <td><tt> @link </tt></td></tr>
* <tr><td><tt> @see </td> <td><tt> @linkplain </td></tr> * <tr><td><tt> @see </tt></td> <td><tt> @linkplain </tt></td></tr>
* <tr><td><tt> @serial </td> <td><tt> @serial </td></tr> * <tr><td><tt> @serial </tt></td> <td><tt> @serial </tt></td></tr>
* <tr><td><tt> @serial </td> <td><tt> @serialData </td></tr> * <tr><td><tt> @serial </tt></td> <td><tt> @serialData </tt></td></tr>
* </table> * </table>
*/ */
String kind(); String kind();
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,7 +27,6 @@ package com.sun.source.tree; ...@@ -27,7 +27,6 @@ package com.sun.source.tree;
import java.util.List; import java.util.List;
import javax.tools.JavaFileObject; import javax.tools.JavaFileObject;
import com.sun.source.tree.LineMap;
/** /**
* Represents the abstract syntax tree for compilation units (source * Represents the abstract syntax tree for compilation units (source
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,11 +25,9 @@ ...@@ -25,11 +25,9 @@
package com.sun.source.tree; package com.sun.source.tree;
import com.sun.source.tree.Tree;
import javax.lang.model.element.Element; import javax.lang.model.element.Element;
import javax.lang.model.element.ExecutableElement; import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement; import javax.lang.model.element.TypeElement;
import javax.lang.model.type.DeclaredType;
/** /**
* Interface for determining locally available program elements, such as * Interface for determining locally available program elements, such as
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,10 +25,11 @@ ...@@ -25,10 +25,11 @@
package com.sun.source.util; package com.sun.source.util;
import com.sun.source.tree.CompilationUnitTree;
import javax.lang.model.element.TypeElement; import javax.lang.model.element.TypeElement;
import javax.tools.JavaFileObject; import javax.tools.JavaFileObject;
import com.sun.source.tree.CompilationUnitTree;
/** /**
* Provides details about work that has been done by the JDK Java Compiler, javac. * Provides details about work that has been done by the JDK Java Compiler, javac.
* *
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,9 +25,10 @@ ...@@ -25,9 +25,10 @@
package com.sun.source.util; package com.sun.source.util;
import com.sun.source.tree.*;
import java.util.Iterator; import java.util.Iterator;
import com.sun.source.tree.*;
/** /**
* A path of tree nodes, typically used to represent the sequence of ancestor * 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. * nodes of a tree node up to the top level CompilationUnitTree node.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,8 +28,8 @@ package com.sun.tools.classfile; ...@@ -28,8 +28,8 @@ package com.sun.tools.classfile;
import java.io.IOException; import java.io.IOException;
/** /**
* See JVMS <TBD> * See JVMS 4.7.21
* http://cr.openjdk.java.net/~jrose/pres/indy-javadoc-mlvm/ * http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html#jvms-4.7.21
* *
* <p><b>This is NOT part of any supported API. * <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk. * If you write code that depends on this, you do so at your own risk.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
package com.sun.tools.classfile; 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_Class_info;
import com.sun.tools.classfile.ConstantPool.CONSTANT_Double_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Double_info;
import com.sun.tools.classfile.ConstantPool.CONSTANT_Fieldref_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Fieldref_info;
...@@ -40,7 +42,6 @@ import com.sun.tools.classfile.ConstantPool.CONSTANT_NameAndType_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_String_info;
import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info; import com.sun.tools.classfile.ConstantPool.CONSTANT_Utf8_info;
import com.sun.tools.classfile.ConstantPool.CPInfo; import com.sun.tools.classfile.ConstantPool.CPInfo;
import java.util.Map;
/** /**
* Rewrites a class file using a map of translations. * Rewrites a class file using a map of translations.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,8 +33,8 @@ import java.util.Map; ...@@ -33,8 +33,8 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.regex.Pattern; 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.Filter;
import com.sun.tools.classfile.Dependency.Finder;
import com.sun.tools.classfile.Dependency.Location; import com.sun.tools.classfile.Dependency.Location;
import com.sun.tools.classfile.Type.ArrayType; import com.sun.tools.classfile.Type.ArrayType;
import com.sun.tools.classfile.Type.ClassSigType; import com.sun.tools.classfile.Type.ClassSigType;
...@@ -43,7 +43,6 @@ import com.sun.tools.classfile.Type.MethodType; ...@@ -43,7 +43,6 @@ import com.sun.tools.classfile.Type.MethodType;
import com.sun.tools.classfile.Type.SimpleType; import com.sun.tools.classfile.Type.SimpleType;
import com.sun.tools.classfile.Type.TypeParamType; import com.sun.tools.classfile.Type.TypeParamType;
import com.sun.tools.classfile.Type.WildcardType; import com.sun.tools.classfile.Type.WildcardType;
import static com.sun.tools.classfile.ConstantPool.*; import static com.sun.tools.classfile.ConstantPool.*;
/** /**
...@@ -99,7 +98,7 @@ public class Dependencies { ...@@ -99,7 +98,7 @@ public class Dependencies {
* Get the ClassFile object for a specified class. * Get the ClassFile object for a specified class.
* @param className the name of the class to be returned. * @param className the name of the class to be returned.
* @return the ClassFile for the given class * @return the ClassFile for the given class
* @throws Dependencies#ClassFileNotFoundException if the classfile cannot be * @throws Dependencies.ClassFileNotFoundException if the classfile cannot be
* found * found
*/ */
public ClassFile getClassFile(String className) public ClassFile getClassFile(String className)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -114,7 +114,7 @@ public class Descriptor { ...@@ -114,7 +114,7 @@ public class Descriptor {
private String parse(String desc, int start, int end) private String parse(String desc, int start, int end)
throws InvalidDescriptor { throws InvalidDescriptor {
int p = start; int p = start;
StringBuffer sb = new StringBuffer(); StringBuilder sb = new StringBuilder();
int dims = 0; int dims = 0;
count = 0; count = 0;
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -103,7 +103,7 @@ public class Instruction { ...@@ -103,7 +103,7 @@ public class Instruction {
R visitConstantPoolRefAndValue(Instruction instr, int index, int value, P p); R visitConstantPoolRefAndValue(Instruction instr, int index, int value, P p);
/** See {@link Kind#LOCAL}. */ /** See {@link Kind#LOCAL}. */
R visitLocal(Instruction instr, int index, P p); 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); R visitLocalAndValue(Instruction instr, int index, int value, P p);
/** See {@link Kind#DYNAMIC}. */ /** See {@link Kind#DYNAMIC}. */
R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, P p); R visitLookupSwitch(Instruction instr, int default_, int npairs, int[] matches, int[] offsets, P p);
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.*; ...@@ -33,6 +33,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Print method and constructor info. * Print method and constructor info.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert Field * @author Robert Field
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
...@@ -81,7 +86,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite ...@@ -81,7 +86,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* Add the summary link for the member. * Add the summary link for the member.
* *
* @param context the id of the context where the link will be printed * @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 member the member being linked to
* @param tdSummary the content tree to which the link will be added * @param tdSummary the content tree to which the link will be added
*/ */
...@@ -101,7 +106,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite ...@@ -101,7 +106,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
/** /**
* Add the inherited summary link for the member. * 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 member the member being linked to
* @param linksTree the content tree to which the link will be added * @param linksTree the content tree to which the link will be added
*/ */
...@@ -138,7 +143,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite ...@@ -138,7 +143,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* Add all the parameters for the executable member. * Add all the parameters for the executable member.
* *
* @param member the member to write parameters for. * @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) { protected void addParameters(ExecutableMemberDoc member, Content htmltree) {
addParameters(member, true, htmltree); addParameters(member, true, htmltree);
...@@ -149,7 +154,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite ...@@ -149,7 +154,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* *
* @param member the member to write parameters for. * @param member the member to write parameters for.
* @param includeAnnotations true if annotation information needs to be added. * @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, protected void addParameters(ExecutableMemberDoc member,
boolean includeAnnotations, Content htmltree) { boolean includeAnnotations, Content htmltree) {
...@@ -276,7 +281,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite ...@@ -276,7 +281,7 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite
* @return the 1.4.x style anchor for the ExecutableMemberDoc. * @return the 1.4.x style anchor for the ExecutableMemberDoc.
*/ */
protected String getErasureAnchor(ExecutableMemberDoc emd) { protected String getErasureAnchor(ExecutableMemberDoc emd) {
StringBuffer buf = new StringBuffer(emd.name() + "("); StringBuilder buf = new StringBuilder(emd.name() + "(");
Parameter[] params = emd.parameters(); Parameter[] params = emd.parameters();
boolean foundTypeVariable = false; boolean foundTypeVariable = false;
for (int i = 0; i < params.length; i++) { for (int i = 0; i < params.length; i++) {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,9 +29,9 @@ import java.io.*; ...@@ -29,9 +29,9 @@ import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; 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 * Generate Index for all the Member Names with Indexing in
...@@ -39,6 +39,11 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -39,6 +39,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
* {@link SplitIndexWriter}. It uses the functionality from * {@link SplitIndexWriter}. It uses the functionality from
* {@link HtmlDocletWriter} to generate the Index Contents. * {@link HtmlDocletWriter} to generate the Index Contents.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see IndexBuilder * @see IndexBuilder
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,17 +25,23 @@ ...@@ -25,17 +25,23 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.util.*;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
import java.util.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; 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.taglets.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* The base class for member writers. * The base class for member writers.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert Field * @author Robert Field
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Jamie Ho (Re-write) * @author Jamie Ho (Re-write)
...@@ -181,23 +187,6 @@ public abstract class AbstractMemberWriter { ...@@ -181,23 +187,6 @@ public abstract class AbstractMemberWriter {
*/ */
protected abstract void addNavDetailLink(boolean link, Content liNav); 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. * Add the member name to the content tree and modifies the display length.
* *
...@@ -257,7 +246,7 @@ public abstract class AbstractMemberWriter { ...@@ -257,7 +246,7 @@ public abstract class AbstractMemberWriter {
if (len <= 0) { if (len <= 0) {
return ""; return "";
} }
StringBuffer sb = new StringBuffer(len); StringBuilder sb = new StringBuilder(len);
for(int i = 0; i < len; i++) { for(int i = 0; i < len; i++) {
sb.append(' '); sb.append(' ');
} }
...@@ -304,23 +293,6 @@ public abstract class AbstractMemberWriter { ...@@ -304,23 +293,6 @@ public abstract class AbstractMemberWriter {
tdSummaryType.addContent(code); 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. * Add the modifier for the member.
* *
...@@ -364,7 +336,7 @@ public abstract class AbstractMemberWriter { ...@@ -364,7 +336,7 @@ public abstract class AbstractMemberWriter {
* Add the comment for the given member. * Add the comment for the given member.
* *
* @param member the member being documented. * @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) { protected void addComment(ProgramElementDoc member, Content htmltree) {
if (member.inlineTags().length > 0) { if (member.inlineTags().length > 0) {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -36,6 +36,11 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -36,6 +36,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
* Frame and Non-Frame format. This will be sub-classed by to * Frame and Non-Frame format. This will be sub-classed by to
* generate overview-frame.html as well as overview-summary.html. * generate overview-frame.html as well as overview-summary.html.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,10 +27,11 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,10 +27,11 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; 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.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 * Abstract class to print the class hierarchy page for all the Classes. This
...@@ -38,6 +39,11 @@ import com.sun.javadoc.*; ...@@ -38,6 +39,11 @@ import com.sun.javadoc.*;
* generate the Package Tree and global Tree(for all the classes and packages) * generate the Package Tree and global Tree(for all the classes and packages)
* pages. * pages.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
*/ */
public abstract class AbstractTreeWriter extends HtmlDocletWriter { public abstract class AbstractTreeWriter extends HtmlDocletWriter {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,9 +29,9 @@ import java.io.*; ...@@ -29,9 +29,9 @@ import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*; 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 * 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.*; ...@@ -39,6 +39,11 @@ import com.sun.tools.doclets.formats.html.markup.*;
* the left-hand top frame. The name of the generated file is * the left-hand top frame. The name of the generated file is
* "allclasses-frame.html". * "allclasses-frame.html".
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Doug Kramer * @author Doug Kramer
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,11 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -34,6 +34,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
/** /**
* Writes annotation type optional member documentation in HTML format. * Writes annotation type optional member documentation in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,11 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -34,6 +34,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
/** /**
* Writes annotation type required member documentation in HTML format. * Writes annotation type required member documentation in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,14 +25,22 @@ ...@@ -25,14 +25,22 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.IOException;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.builders.*;
import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Generate the Class Information Page. * Generate the Class Information Page.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see com.sun.javadoc.ClassDoc * @see com.sun.javadoc.ClassDoc
* @see java.util.Collections * @see java.util.Collections
* @see java.util.List * @see java.util.List
...@@ -187,7 +195,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter ...@@ -187,7 +195,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printDocument(Content contentTree) { public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType), printHtmlDocument(configuration.metakeywords.getMetaKeywords(annotationType),
true, contentTree); true, contentTree);
} }
......
...@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Generate class usage information. * Generate class usage information.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert G. Field * @author Robert G. Field
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,17 +25,24 @@ ...@@ -25,17 +25,24 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.IOException;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.builders.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*; 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. * Generate the Class Information Page.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see com.sun.javadoc.ClassDoc * @see com.sun.javadoc.ClassDoc
* @see java.util.Collections * @see java.util.Collections
* @see java.util.List * @see java.util.List
...@@ -196,7 +203,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter ...@@ -196,7 +203,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printDocument(Content contentTree) { public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(configuration.metakeywords.getMetaKeywords(classDoc), printHtmlDocument(configuration.metakeywords.getMetaKeywords(classDoc),
true, contentTree); true, contentTree);
} }
......
...@@ -25,13 +25,13 @@ ...@@ -25,13 +25,13 @@
package com.sun.tools.doclets.formats.html; 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.io.*;
import java.net.*; 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. * Configure the output based on the command line options.
...@@ -188,8 +188,8 @@ public class ConfigurationImpl extends Configuration { ...@@ -188,8 +188,8 @@ public class ConfigurationImpl extends Configuration {
// ClassWriter. // ClassWriter.
/** /**
* Constructor. Initialises resource for the * Constructor. Initializes resource for the
* {@link com.sun.tools.doclets.MessageRetriever}. * {@link com.sun.tools.doclets.internal.toolkit.util.MessageRetriever MessageRetriever}.
*/ */
private ConfigurationImpl() { private ConfigurationImpl() {
standardmessage = new MessageRetriever(this, standardmessage = new MessageRetriever(this,
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Write the Constants Summary Page in HTML format. * Write the Constants Summary Page in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
* @since 1.4 * @since 1.4
...@@ -297,7 +303,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter ...@@ -297,7 +303,7 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printDocument(Content contentTree) { public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(null, true, contentTree); printHtmlDocument(null, true, contentTree);
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.*; ...@@ -36,6 +36,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Writes constructor documentation. * Writes constructor documentation.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert Field * @author Robert Field
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,15 +26,20 @@ ...@@ -26,15 +26,20 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.DeprecatedAPIListBuilder;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Generate File to list all the deprecated classes and class members with the * Generate File to list all the deprecated classes and class members with the
* appropriate links. * appropriate links.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see java.util.List * @see java.util.List
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
...@@ -208,7 +213,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter { ...@@ -208,7 +213,7 @@ public class DeprecatedListWriter extends SubWriterHolderWriter {
* *
* @param builder the deprecated list builder * @param builder the deprecated list builder
* @param type the type of list being documented * @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) { private void addAnchor(DeprecatedAPIListBuilder builder, int type, Content htmlTree) {
if (builder.hasDocumentation(type)) { if (builder.hasDocumentation(type)) {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.*; ...@@ -35,6 +35,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Writes enum constant documentation in HTML format. * Writes enum constant documentation in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.*; ...@@ -35,6 +35,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Writes field documentation in HTML format. * Writes field documentation in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert Field * @author Robert Field
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Jamie Ho (rewrite) * @author Jamie Ho (rewrite)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; 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.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 * Generate the documentation in the Html "frame" format in the browser. The
...@@ -40,6 +41,11 @@ import com.sun.tools.doclets.formats.html.markup.*; ...@@ -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 * right-hand frame will have overview or package summary or class file. Also
* take care of browsers which do not support Html frames. * take care of browsers which do not support Html frames.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
*/ */
public class FrameOutputWriter extends HtmlDocletWriter { public class FrameOutputWriter extends HtmlDocletWriter {
...@@ -89,7 +95,7 @@ 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 * Generate the contants in the "index.html" file. Print the frame details
* as well as warning if browser is not supporting the Html frames. * as well as warning if browser is not supporting the Html frames.
*/ */
protected void generateFrameFile() { protected void generateFrameFile() throws IOException {
Content frameset = getFrameDetails(); Content frameset = getFrameDetails();
if (configuration.windowtitle.length() > 0) { if (configuration.windowtitle.length() > 0) {
printFramesetDocument(configuration.windowtitle, configuration.notimestamp, printFramesetDocument(configuration.windowtitle, configuration.notimestamp,
......
...@@ -26,14 +26,20 @@ ...@@ -26,14 +26,20 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; 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.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 * Generate the Help File for the generated API documentation. The help file
* contents are helpful for browsing the generated documentation. * contents are helpful for browsing the generated documentation.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
*/ */
public class HelpWriter extends HtmlDocletWriter { public class HelpWriter extends HtmlDocletWriter {
...@@ -73,7 +79,7 @@ public class HelpWriter extends HtmlDocletWriter { ...@@ -73,7 +79,7 @@ public class HelpWriter extends HtmlDocletWriter {
/** /**
* Generate the help file contents. * Generate the help file contents.
*/ */
protected void generateHelpFile() { protected void generateHelpFile() throws IOException {
String title = configuration.getText("doclet.Window_Help_title"); String title = configuration.getText("doclet.Window_Help_title");
Content body = getBody(true, getWindowTitle(title)); Content body = getBody(true, getWindowTitle(title));
addTop(body); addTop(body);
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -24,17 +24,22 @@ ...@@ -24,17 +24,22 @@
*/ */
package com.sun.tools.doclets.formats.html; 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.*;
import com.sun.tools.doclets.internal.toolkit.builders.*; import com.sun.tools.doclets.internal.toolkit.builders.*;
import com.sun.tools.doclets.internal.toolkit.util.*; 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. * The class with "start" method, calls individual Writers.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Robert Field * @author Robert Field
* @author Jamie Ho * @author Jamie Ho
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,15 +28,20 @@ package com.sun.tools.doclets.formats.html; ...@@ -28,15 +28,20 @@ package com.sun.tools.doclets.formats.html;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.taglets.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Generate serialized form for serializable fields. * Generate serialized form for serializable fields.
* Documentation denoted by the tags <code>serial</code> and * Documentation denoted by the tags <code>serial</code> and
* <code>serialField</code> is processed. * <code>serialField</code> is processed.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Joe Fialli * @author Joe Fialli
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
...@@ -55,18 +60,6 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl ...@@ -55,18 +60,6 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
return Arrays.asList(cd.serializableFields()); return Arrays.asList(cd.serializableFields());
} }
protected void printTypeLinkNoDimension(Type type) {
ClassDoc cd = type.asClassDoc();
//Linking to package private classes in serialized for causes
//broken links. Don't link to them.
if (type.isPrimitive() || cd.isPackagePrivate()) {
print(type.typeName());
} else {
writer.printLink(new LinkInfoImpl(
LinkInfoImpl.CONTEXT_SERIAL_MEMBER, type));
}
}
/** /**
* Return the header for serializable fields section. * Return the header for serializable fields section.
* *
...@@ -121,10 +114,10 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl ...@@ -121,10 +114,10 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
/** /**
* Add the member header. * Add the member header.
* *
* @param fieldsType the class document to be listed * @param fieldType the class document to be listed
* @param fieldTypeStr the string for the filed type to be documented * @param fieldTypeStr the string for the field type to be documented
* @param fieldDimensions the dimensions of the field string to be added * @param fieldDimensions the dimensions of the field string to be added
* @param firldName name of the field to be added * @param fieldName name of the field to be added
* @param contentTree the content tree to which the member header will be added * @param contentTree the content tree to which the member header will be added
*/ */
public void addMemberHeader(ClassDoc fieldType, String fieldTypeStr, public void addMemberHeader(ClassDoc fieldType, String fieldTypeStr,
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,14 +26,19 @@ ...@@ -26,14 +26,19 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*; import com.sun.tools.doclets.internal.toolkit.taglets.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Generate serialized form for Serializable/Externalizable methods. * Generate serialized form for Serializable/Externalizable methods.
* Documentation denoted by the <code>serialData</code> tag is processed. * Documentation denoted by the <code>serialData</code> tag is processed.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Joe Fialli * @author Joe Fialli
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
...@@ -161,14 +166,4 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements ...@@ -161,14 +166,4 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
method.containingClass().qualifiedName(), method.name()); method.containingClass().qualifiedName(), method.name());
} }
} }
protected void printTypeLinkNoDimension(Type type) {
ClassDoc cd = type.asClassDoc();
if (type.isPrimitive() || cd.isPackagePrivate()) {
print(type.typeName());
} else {
writer.printLink(new LinkInfoImpl(
LinkInfoImpl.CONTEXT_SERIAL_MEMBER,type));
}
}
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,14 +25,19 @@ ...@@ -25,14 +25,19 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import com.sun.tools.doclets.internal.toolkit.util.links.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.util.links.*;
/** /**
* A factory that returns a link given the information about it. * A factory that returns a link given the information about it.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @since 1.5 * @since 1.5
*/ */
...@@ -66,7 +71,7 @@ public class LinkFactoryImpl extends LinkFactory { ...@@ -66,7 +71,7 @@ public class LinkFactoryImpl extends LinkFactory {
classLinkInfo.type != null && classLinkInfo.type != null &&
!classDoc.qualifiedTypeName().equals(classLinkInfo.type.qualifiedTypeName())) : !classDoc.qualifiedTypeName().equals(classLinkInfo.type.qualifiedTypeName())) :
""; "";
StringBuffer label = new StringBuffer( StringBuilder label = new StringBuilder(
classLinkInfo.getClassLinkLabel(m_writer.configuration)); classLinkInfo.getClassLinkLabel(m_writer.configuration));
classLinkInfo.displayLength += label.length(); classLinkInfo.displayLength += label.length();
Configuration configuration = ConfigurationImpl.getInstance(); Configuration configuration = ConfigurationImpl.getInstance();
...@@ -155,7 +160,6 @@ public class LinkFactoryImpl extends LinkFactory { ...@@ -155,7 +160,6 @@ public class LinkFactoryImpl extends LinkFactory {
* "../../java/lang/Object.html" * "../../java/lang/Object.html"
* *
* @param linkInfo the information about the link. * @param linkInfo the information about the link.
* @param fileName the file name, to which path string is.
*/ */
private String pathString(LinkInfoImpl linkInfo) { private String pathString(LinkInfoImpl linkInfo) {
if (linkInfo.context == LinkInfoImpl.PACKAGE_FRAME) { if (linkInfo.context == LinkInfoImpl.PACKAGE_FRAME) {
...@@ -163,7 +167,7 @@ public class LinkFactoryImpl extends LinkFactory { ...@@ -163,7 +167,7 @@ public class LinkFactoryImpl extends LinkFactory {
//with 1.4.2 output. //with 1.4.2 output.
return linkInfo.classDoc.name() + ".html"; return linkInfo.classDoc.name() + ".html";
} }
StringBuffer buf = new StringBuffer(m_writer.relativePath); StringBuilder buf = new StringBuilder(m_writer.relativePath);
buf.append(DirectoryManager.getPathToPackage( buf.append(DirectoryManager.getPathToPackage(
linkInfo.classDoc.containingPackage(), linkInfo.classDoc.containingPackage(),
linkInfo.classDoc.name() + ".html")); linkInfo.classDoc.name() + ".html"));
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,6 +30,12 @@ import com.sun.javadoc.*; ...@@ -30,6 +30,12 @@ import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.util.links.*; import com.sun.tools.doclets.internal.toolkit.util.links.*;
/**
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*/
public class LinkInfoImpl extends LinkInfo { public class LinkInfoImpl extends LinkInfo {
/** /**
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,6 +30,11 @@ import com.sun.tools.doclets.internal.toolkit.util.links.*; ...@@ -30,6 +30,11 @@ import com.sun.tools.doclets.internal.toolkit.util.links.*;
/** /**
* Stores output of a link. * Stores output of a link.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @since 1.5 * @since 1.5
*/ */
...@@ -38,13 +43,13 @@ public class LinkOutputImpl implements LinkOutput { ...@@ -38,13 +43,13 @@ public class LinkOutputImpl implements LinkOutput {
/** /**
* The output of the link. * The output of the link.
*/ */
public StringBuffer output; public StringBuilder output;
/** /**
* Construct a new LinkOutputImpl. * Construct a new LinkOutputImpl.
*/ */
public LinkOutputImpl() { public LinkOutputImpl() {
output = new StringBuffer(); output = new StringBuilder();
} }
/** /**
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.*; ...@@ -35,6 +35,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Writes method documentation in HTML format. * Writes method documentation in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert Field * @author Robert Field
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Jamie Ho (rewrite) * @author Jamie Ho (rewrite)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * 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.*; ...@@ -36,6 +36,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Writes nested class documentation in HTML format. * Writes nested class documentation in HTML format.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert Field * @author Robert Field
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Jamie Ho (rewrite) * @author Jamie Ho (rewrite)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,16 +27,22 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,16 +27,22 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
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.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class to generate file for each package contents in the left-hand bottom * Class to generate file for each package contents in the left-hand bottom
* frame. This will list all the Class Kinds in the package. A click on any * frame. This will list all the Class Kinds in the package. A click on any
* class-kind will update the right-hand frame with the clicked class-kind page. * class-kind will update the right-hand frame with the clicked class-kind page.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,16 +26,22 @@ ...@@ -26,16 +26,22 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Generate the package index for the left-hand frame in the generated output. * Generate the package index for the left-hand frame in the generated output.
* A click on the package name in this frame will update the page in the bottom * A click on the package name in this frame will update the page in the bottom
* left hand frame with the listing of contents of the clicked package. * left hand frame with the listing of contents of the clicked package.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
*/ */
public class PackageIndexFrameWriter extends AbstractPackageIndexWriter { public class PackageIndexFrameWriter extends AbstractPackageIndexWriter {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,16 +27,22 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,16 +27,22 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Generate the package index page "overview-summary.html" for the right-hand * Generate the package index page "overview-summary.html" for the right-hand
* frame. A click on the package name on this page will update the same frame * frame. A click on the package name on this page will update the same frame
* with the "pacakge-summary.html" file for the clicked package. * with the "pacakge-summary.html" file for the clicked package.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
...@@ -228,7 +234,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { ...@@ -228,7 +234,7 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter {
* Adds the lower navigation bar and the bottom text * Adds the lower navigation bar and the bottom text
* (from the -bottom option) at the bottom of page. * (from the -bottom option) at the bottom of page.
* *
* @param the documentation tree to which the navigation bar footer will be added * @param body the documentation tree to which the navigation bar footer will be added
*/ */
protected void addNavigationBarFooter(Content body) { protected void addNavigationBarFooter(Content body) {
addNavLinks(false, body); addNavLinks(false, body);
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,14 +28,19 @@ package com.sun.tools.doclets.formats.html; ...@@ -28,14 +28,19 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.javadoc.*; 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.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class to generate Tree page for a package. The name of the file generated is * Class to generate Tree page for a package. The name of the file generated is
* "package-tree.html" and it is generated in the respective package directory. * "package-tree.html" and it is generated in the respective package directory.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,14 +27,20 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Generate package usage information. * Generate package usage information.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Robert G. Field * @author Robert G. Field
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,16 +27,22 @@ package com.sun.tools.doclets.formats.html; ...@@ -27,16 +27,22 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Class to generate file for each package contents in the right-hand * Class to generate file for each package contents in the right-hand
* frame. This will list all the Class Kinds in the package. A click on any * frame. This will list all the Class Kinds in the package. A click on any
* class-kind will update the frame with the clicked class-kind page. * class-kind will update the frame with the clicked class-kind page.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
...@@ -248,7 +254,7 @@ public class PackageWriterImpl extends HtmlDocletWriter ...@@ -248,7 +254,7 @@ public class PackageWriterImpl extends HtmlDocletWriter
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printDocument(Content contentTree) { public void printDocument(Content contentTree) throws IOException {
printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageDoc), printHtmlDocument(configuration.metakeywords.getMetaKeywords(packageDoc),
true, contentTree); true, contentTree);
} }
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,14 +29,20 @@ import java.io.*; ...@@ -29,14 +29,20 @@ import java.io.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.DocletAbortException;
/** /**
* Generate the Serialized Form Information Page. * Generate the Serialized Form Information Page.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
*/ */
public class SerializedFormWriterImpl extends SubWriterHolderWriter public class SerializedFormWriterImpl extends SubWriterHolderWriter
implements com.sun.tools.doclets.internal.toolkit.SerializedFormWriter { implements SerializedFormWriter {
private static final String FILE_NAME = "serialized-form.html"; private static final String FILE_NAME = "serialized-form.html";
...@@ -48,23 +54,6 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter ...@@ -48,23 +54,6 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
super(ConfigurationImpl.getInstance(), FILE_NAME); super(ConfigurationImpl.getInstance(), FILE_NAME);
} }
/**
* Writes the given header.
*
* @param header the header to write.
*/
public void writeHeader(String header) {
printHtmlHeader(header, null, true);
printTop();
navLinks(true);
hr();
center();
h1();
print(header);
h1End();
centerEnd();
}
/** /**
* Get the given header. * Get the given header.
* *
...@@ -225,20 +214,10 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter ...@@ -225,20 +214,10 @@ public class SerializedFormWriterImpl extends SubWriterHolderWriter
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void printDocument(Content serializedTree) { public void printDocument(Content serializedTree) throws IOException {
printHtmlDocument(null, true, serializedTree); printHtmlDocument(null, true, serializedTree);
} }
private void tableHeader() {
tableIndexSummary();
trBgcolorStyle("#CCCCFF", "TableSubHeadingColor");
}
private void tableFooter() {
fontEnd();
thEnd(); trEnd(); tableEnd();
}
/** /**
* Return an instance of a SerialFieldWriter. * Return an instance of a SerialFieldWriter.
* *
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,15 +26,21 @@ ...@@ -26,15 +26,21 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Generate only one index file for all the Member Names with Indexing in * Generate only one index file for all the Member Names with Indexing in
* Unicode Order. The name of the generated file is "index-all.html" and it is * Unicode Order. The name of the generated file is "index-all.html" and it is
* generated in current or the destination directory. * generated in current or the destination directory.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see java.lang.Character * @see java.lang.Character
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,9 +35,10 @@ import com.sun.tools.doclets.formats.html.markup.*; ...@@ -35,9 +35,10 @@ import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* Converts Java Source Code to HTML. * Converts Java Source Code to HTML.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,15 +26,21 @@ ...@@ -26,15 +26,21 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*; import com.sun.tools.doclets.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Generate Separate Index Files for all the member names with Indexing in * Generate Separate Index Files for all the member names with Indexing in
* Unicode Order. This will create "index-files" directory in the current or * Unicode Order. This will create "index-files" directory in the current or
* destination directory and will generate separate file for each unicode index. * destination directory and will generate separate file for each unicode index.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see java.lang.Character * @see java.lang.Character
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -26,10 +26,11 @@ ...@@ -26,10 +26,11 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.javadoc.*; 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.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.formats.html.markup.*;
/** /**
* This abstract class exists to provide functionality needed in the * This abstract class exists to provide functionality needed in the
...@@ -39,6 +40,11 @@ import com.sun.tools.doclets.formats.html.markup.*; ...@@ -39,6 +40,11 @@ import com.sun.tools.doclets.formats.html.markup.*;
* can not be used effectively to change formatting. The concrete * can not be used effectively to change formatting. The concrete
* class subclass of this class can be subclassed to change formatting. * class subclass of this class can be subclassed to change formatting.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @see AbstractMemberWriter * @see AbstractMemberWriter
* @see ClassWriterImpl * @see ClassWriterImpl
* *
...@@ -60,18 +66,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { ...@@ -60,18 +66,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
super(configuration, path, filename, relpath); super(configuration, path, filename, relpath);
} }
public void printTypeSummaryHeader() {
tdIndex();
font("-1");
code();
}
public void printTypeSummaryFooter() {
codeEnd();
fontEnd();
tdEnd();
}
/** /**
* Add the summary header. * Add the summary header.
* *
...@@ -99,14 +93,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { ...@@ -99,14 +93,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
return table; return table;
} }
public void printTableHeadingBackground(String str) {
tableIndexDetail();
tableHeaderStart("#CCCCFF", 1);
strong(str);
tableHeaderEnd();
tableEnd();
}
/** /**
* Add the inherited summary header. * Add the inherited summary header.
* *
...@@ -120,19 +106,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { ...@@ -120,19 +106,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
mw.addInheritedSummaryLabel(cd, inheritedTree); mw.addInheritedSummaryLabel(cd, inheritedTree);
} }
public void printSummaryFooter(AbstractMemberWriter mw, ClassDoc cd) {
tableEnd();
space();
}
public void printInheritedSummaryFooter(AbstractMemberWriter mw, ClassDoc cd) {
codeEnd();
summaryRowEnd();
trEnd();
tableEnd();
space();
}
/** /**
* Add the index comment. * Add the index comment.
* *
...@@ -143,24 +116,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { ...@@ -143,24 +116,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
addIndexComment(member, member.firstSentenceTags(), contentTree); addIndexComment(member, member.firstSentenceTags(), contentTree);
} }
protected void printIndexComment(Doc member, Tag[] firstSentenceTags) {
Tag[] deprs = member.tags("deprecated");
if (Util.isDeprecated((ProgramElementDoc) member)) {
strongText("doclet.Deprecated");
space();
if (deprs.length > 0) {
printInlineDeprecatedComment(member, deprs[0]);
}
return;
} else {
ClassDoc cd = ((ProgramElementDoc)member).containingClass();
if (cd != null && Util.isDeprecated(cd)) {
strongText("doclet.Deprecated"); space();
}
}
printSummaryComment(member, firstSentenceTags);
}
/** /**
* Add the index comment. * Add the index comment.
* *
...@@ -217,18 +172,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { ...@@ -217,18 +172,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
addSummaryLinkComment(mw, member, member.firstSentenceTags(), contentTree); addSummaryLinkComment(mw, member, member.firstSentenceTags(), contentTree);
} }
public void printSummaryLinkComment(AbstractMemberWriter mw,
ProgramElementDoc member,
Tag[] firstSentenceTags) {
codeEnd();
println();
br();
printNbsps();
printIndexComment(member, firstSentenceTags);
summaryRowEnd();
trEnd();
}
/** /**
* Add the summary link comment. * Add the summary link comment.
* *
...@@ -259,13 +202,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter { ...@@ -259,13 +202,6 @@ public abstract class SubWriterHolderWriter extends HtmlDocletWriter {
mw.addInheritedSummaryLink(cd, member, linksTree); mw.addInheritedSummaryLink(cd, member, linksTree);
} }
public void printMemberHeader() {
hr();
}
public void printMemberFooter() {
}
/** /**
* Get the document content header tree * Get the document content header tree
* *
......
/* /*
* Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,13 +30,18 @@ import com.sun.tools.doclets.internal.toolkit.taglets.*; ...@@ -30,13 +30,18 @@ import com.sun.tools.doclets.internal.toolkit.taglets.*;
/** /**
* The output for HTML taglets. * The output for HTML taglets.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @since 1.5 * @since 1.5
* @author Jamie Ho * @author Jamie Ho
*/ */
public class TagletOutputImpl implements TagletOutput { public class TagletOutputImpl implements TagletOutput {
private StringBuffer output; private StringBuilder output;
public TagletOutputImpl(String o) { public TagletOutputImpl(String o) {
setOutput(o); setOutput(o);
...@@ -46,7 +51,7 @@ public class TagletOutputImpl implements TagletOutput { ...@@ -46,7 +51,7 @@ public class TagletOutputImpl implements TagletOutput {
* {@inheritDoc} * {@inheritDoc}
*/ */
public void setOutput (Object o) { public void setOutput (Object o) {
output = new StringBuffer(o == null ? "" : (String) o); output = new StringBuilder(o == null ? "" : (String) o);
} }
/** /**
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,6 +34,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*; ...@@ -34,6 +34,11 @@ import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* The taglet writer that writes HTML. * The taglet writer that writes HTML.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @since 1.5 * @since 1.5
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
...@@ -69,7 +74,7 @@ public class TagletWriterImpl extends TagletWriter { ...@@ -69,7 +74,7 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput deprecatedTagOutput(Doc doc) { public TagletOutput deprecatedTagOutput(Doc doc) {
StringBuffer output = new StringBuffer(); StringBuilder output = new StringBuilder();
Tag[] deprs = doc.tags("deprecated"); Tag[] deprs = doc.tags("deprecated");
if (doc instanceof ClassDoc) { if (doc instanceof ClassDoc) {
if (Util.isDeprecated((ProgramElementDoc) doc)) { if (Util.isDeprecated((ProgramElementDoc) doc)) {
...@@ -120,9 +125,9 @@ public class TagletWriterImpl extends TagletWriter { ...@@ -120,9 +125,9 @@ public class TagletWriterImpl extends TagletWriter {
* {@inheritDoc} * {@inheritDoc}
*/ */
public TagletOutput getParamHeader(String header) { public TagletOutput getParamHeader(String header) {
StringBuffer result = new StringBuffer(); StringBuilder result = new StringBuilder();
result.append("<dt>"); result.append("<dt>");
result.append("<span class=\"strong\">" + header + "</span></dt>"); result.append("<span class=\"strong\">").append(header).append("</span></dt>");
return new TagletOutputImpl(result.toString()); return new TagletOutputImpl(result.toString());
} }
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,9 +28,9 @@ package com.sun.tools.doclets.formats.html; ...@@ -28,9 +28,9 @@ package com.sun.tools.doclets.formats.html;
import java.io.*; import java.io.*;
import com.sun.javadoc.*; 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.formats.html.markup.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Generate Class Hierarchy page for all the Classes in this run. Use * Generate Class Hierarchy page for all the Classes in this run. Use
...@@ -38,6 +38,11 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -38,6 +38,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
* the generated file is "overview-tree.html" and it is generated in the * the generated file is "overview-tree.html" and it is generated in the
* current or the destination directory. * current or the destination directory.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,13 +25,18 @@ ...@@ -25,13 +25,18 @@
package com.sun.tools.doclets.formats.html; package com.sun.tools.doclets.formats.html;
import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.javadoc.*;
/** /**
* The factory that returns HTML writers. * The factory that returns HTML writers.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Jamie Ho * @author Jamie Ho
* @since 1.5 * @since 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,15 +25,23 @@ ...@@ -25,15 +25,23 @@
package com.sun.tools.doclets.formats.html.markup; 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.Content;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class for generating a comment for HTML pages of javadoc output. * Class for generating a comment for HTML pages of javadoc output.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class Comment extends Content{ public class Comment extends Content {
private String commentText; private String commentText;
...@@ -80,11 +88,13 @@ public class Comment extends Content{ ...@@ -80,11 +88,13 @@ public class Comment extends Content{
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void write(StringBuilder contentBuilder) { @Override
if (!endsWithNewLine(contentBuilder)) public boolean write(Writer out, boolean atNewline) throws IOException {
contentBuilder.append(DocletConstants.NL); if (!atNewline)
contentBuilder.append("<!-- "); out.write(DocletConstants.NL);
contentBuilder.append(commentText); out.write("<!-- ");
contentBuilder.append(" -->" + DocletConstants.NL); out.write(commentText);
out.write(" -->" + DocletConstants.NL);
return true;
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,12 +25,20 @@ ...@@ -25,12 +25,20 @@
package com.sun.tools.doclets.formats.html.markup; 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.Content;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class for generating document type for HTML pages of javadoc output. * Class for generating document type for HTML pages of javadoc output.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class DocType extends Content{ public class DocType extends Content{
...@@ -107,7 +115,9 @@ public class DocType extends Content{ ...@@ -107,7 +115,9 @@ public class DocType extends Content{
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void write(StringBuilder contentBuilder) { @Override
contentBuilder.append(docType); public boolean write(Writer out, boolean atNewline) throws IOException {
out.write(docType);
return true; // guaranteed by constructor
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,6 +28,11 @@ package com.sun.tools.doclets.formats.html.markup; ...@@ -28,6 +28,11 @@ package com.sun.tools.doclets.formats.html.markup;
/** /**
* Enum representing HTML tag attributes. * Enum representing HTML tag attributes.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public enum HtmlAttr { public enum HtmlAttr {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,6 +30,11 @@ import com.sun.tools.doclets.internal.toolkit.Content; ...@@ -30,6 +30,11 @@ import com.sun.tools.doclets.internal.toolkit.Content;
/** /**
* Stores constants for Html Doclet. * Stores constants for Html Doclet.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class HtmlConstants { public class HtmlConstants {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -29,6 +29,7 @@ import java.io.*; ...@@ -29,6 +29,7 @@ import java.io.*;
import java.util.*; import java.util.*;
import com.sun.javadoc.*; import com.sun.javadoc.*;
import com.sun.tools.doclets.formats.html.ConfigurationImpl;
import com.sun.tools.doclets.internal.toolkit.*; import com.sun.tools.doclets.internal.toolkit.*;
...@@ -38,6 +39,11 @@ import com.sun.tools.doclets.internal.toolkit.*; ...@@ -38,6 +39,11 @@ import com.sun.tools.doclets.internal.toolkit.*;
* are used by the Sub-Classes in the package com.sun.tools.doclets.standard * are used by the Sub-Classes in the package com.sun.tools.doclets.standard
* and com.sun.tools.doclets.oneone. * and com.sun.tools.doclets.oneone.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @since 1.2 * @since 1.2
* @author Atul M Dambalkar * @author Atul M Dambalkar
* @author Robert Field * @author Robert Field
...@@ -76,48 +82,6 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -76,48 +82,6 @@ public abstract class HtmlDocWriter extends HtmlWriter {
*/ */
public abstract Configuration configuration(); public abstract Configuration configuration();
/**
* Print Html Hyper Link.
*
* @param link String name of the file.
* @param where Position of the link in the file. Character '#' is not
* needed.
* @param label Tag for the link.
* @param strong Boolean that sets label to strong.
*/
public void printHyperLink(String link, String where,
String label, boolean strong) {
print(getHyperLinkString(link, where, label, strong, "", "", ""));
}
/**
* Print Html Hyper Link.
*
* @param link String name of the file.
* @param where Position of the link in the file. Character '#' is not
* needed.
* @param label Tag for the link.
*/
public void printHyperLink(String link, String where, String label) {
printHyperLink(link, where, label, false);
}
/**
* Print Html Hyper Link.
*
* @param link String name of the file.
* @param where Position of the link in the file. Character '#' is not
* needed.
* @param label Tag for the link.
* @param strong Boolean that sets label to strong.
* @param stylename String style of text defined in style sheet.
*/
public void printHyperLink(String link, String where,
String label, boolean strong,
String stylename) {
print(getHyperLinkString(link, where, label, strong, stylename, "", ""));
}
/** /**
* Return Html Hyper Link string. * Return Html Hyper Link string.
* *
...@@ -180,7 +144,7 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -180,7 +144,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
public String getHyperLinkString(String link, String where, public String getHyperLinkString(String link, String where,
String label, boolean strong, String label, boolean strong,
String stylename, String title, String target) { String stylename, String title, String target) {
StringBuffer retlink = new StringBuffer(); StringBuilder retlink = new StringBuilder();
retlink.append("<a href=\""); retlink.append("<a href=\"");
retlink.append(link); retlink.append(link);
if (where != null && where.length() != 0) { if (where != null && where.length() != 0) {
...@@ -189,10 +153,10 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -189,10 +153,10 @@ public abstract class HtmlDocWriter extends HtmlWriter {
} }
retlink.append("\""); retlink.append("\"");
if (title != null && title.length() != 0) { if (title != null && title.length() != 0) {
retlink.append(" title=\"" + title + "\""); retlink.append(" title=\"").append(title).append("\"");
} }
if (target != null && target.length() != 0) { if (target != null && target.length() != 0) {
retlink.append(" target=\"" + target + "\""); retlink.append(" target=\"").append(target).append("\"");
} }
retlink.append(">"); retlink.append(">");
if (stylename != null && stylename.length() != 0) { if (stylename != null && stylename.length() != 0) {
...@@ -262,15 +226,6 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -262,15 +226,6 @@ public abstract class HtmlDocWriter extends HtmlWriter {
return getHyperLinkString(link, "", label, false); return getHyperLinkString(link, "", label, false);
} }
/**
* Print the name of the package, this class is in.
*
* @param cd ClassDoc.
*/
public void printPkgName(ClassDoc cd) {
print(getPkgName(cd));
}
/** /**
* Get the name of the package, this class is in. * Get the name of the package, this class is in.
* *
...@@ -285,27 +240,6 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -285,27 +240,6 @@ public abstract class HtmlDocWriter extends HtmlWriter {
return ""; return "";
} }
/**
* Keep track of member details list. Print the definition list start tag
* if it is not printed yet.
*/
public void printMemberDetailsListStartTag () {
if (!getMemberDetailsListPrinted()) {
dl();
memberDetailsListPrinted = true;
}
}
/**
* Print the definition list end tag if the list start tag was printed.
*/
public void printMemberDetailsListEndTag () {
if (getMemberDetailsListPrinted()) {
dlEnd();
memberDetailsListPrinted = false;
}
}
public boolean getMemberDetailsListPrinted() { public boolean getMemberDetailsListPrinted() {
return memberDetailsListPrinted; return memberDetailsListPrinted;
} }
...@@ -319,12 +253,12 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -319,12 +253,12 @@ public abstract class HtmlDocWriter extends HtmlWriter {
* @param frameset the frameset to be added to the HTML document * @param frameset the frameset to be added to the HTML document
*/ */
public void printFramesetDocument(String title, boolean noTimeStamp, public void printFramesetDocument(String title, boolean noTimeStamp,
Content frameset) { Content frameset) throws IOException {
Content htmlDocType = DocType.Frameset(); Content htmlDocType = DocType.Frameset();
Content htmlComment = new Comment(configuration.getText("doclet.New_Page")); Content htmlComment = new Comment(configuration.getText("doclet.New_Page"));
Content head = new HtmlTree(HtmlTag.HEAD); Content head = new HtmlTree(HtmlTag.HEAD);
if (! noTimeStamp) { if (! noTimeStamp) {
Content headComment = new Comment("Generated by javadoc on " + today()); Content headComment = new Comment(getGeneratedByString());
head.addContent(headComment); head.addContent(headComment);
} }
if (configuration.charset.length() > 0) { if (configuration.charset.length() > 0) {
...@@ -339,7 +273,7 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -339,7 +273,7 @@ public abstract class HtmlDocWriter extends HtmlWriter {
head, frameset); head, frameset);
Content htmlDocument = new HtmlDocument(htmlDocType, Content htmlDocument = new HtmlDocument(htmlDocType,
htmlComment, htmlTree); htmlComment, htmlTree);
print(htmlDocument.toString()); write(htmlDocument);
} }
/** /**
...@@ -356,46 +290,9 @@ public abstract class HtmlDocWriter extends HtmlWriter { ...@@ -356,46 +290,9 @@ public abstract class HtmlDocWriter extends HtmlWriter {
return space; return space;
} }
/** protected String getGeneratedByString() {
* Print the closing &lt;/body&gt; and &lt;/html&gt; tags.
*/
public void printBodyHtmlEnd() {
println();
bodyEnd();
htmlEnd();
}
/**
* Calls {@link #printBodyHtmlEnd()} method.
*/
public void printFooter() {
printBodyHtmlEnd();
}
/**
* Print closing &lt;/html&gt; tag.
*/
public void printFrameFooter() {
htmlEnd();
}
/**
* Print ten non-breaking spaces("&#38;nbsp;").
*/
public void printNbsps() {
print("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");
}
/**
* Get the day and date information for today, depending upon user option.
*
* @return String Today.
* @see java.util.Calendar
* @see java.util.GregorianCalendar
* @see java.util.TimeZone
*/
public String today() {
Calendar calendar = new GregorianCalendar(TimeZone.getDefault()); Calendar calendar = new GregorianCalendar(TimeZone.getDefault());
return calendar.getTime().toString(); Date today = calendar.getTime();
return "Generated by javadoc ("+ ConfigurationImpl.BUILD_DATE + ") on " + today;
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,13 +25,21 @@ ...@@ -25,13 +25,21 @@
package com.sun.tools.doclets.formats.html.markup; package com.sun.tools.doclets.formats.html.markup;
import java.io.IOException;
import java.io.Writer;
import java.util.*; import java.util.*;
import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.Content;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class for generating an HTML document for javadoc output. * Class for generating an HTML document for javadoc output.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class HtmlDocument extends Content { public class HtmlDocument extends Content {
...@@ -69,7 +77,7 @@ public class HtmlDocument extends Content { ...@@ -69,7 +77,7 @@ public class HtmlDocument extends Content {
* *
* @param htmlContent html content to be added * @param htmlContent html content to be added
*/ */
public void addContent(Content htmlContent) { public final void addContent(Content htmlContent) {
if (htmlContent.isValid()) if (htmlContent.isValid())
docContent.add(htmlContent); docContent.add(htmlContent);
} }
...@@ -96,8 +104,9 @@ public class HtmlDocument extends Content { ...@@ -96,8 +104,9 @@ public class HtmlDocument extends Content {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void write(StringBuilder contentBuilder) { public boolean write(Writer out, boolean atNewline) throws IOException {
for (Content c : docContent) for (Content c : docContent)
c.write(contentBuilder); atNewline = c.write(out, atNewline);
return atNewline;
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,6 +28,11 @@ package com.sun.tools.doclets.formats.html.markup; ...@@ -28,6 +28,11 @@ package com.sun.tools.doclets.formats.html.markup;
/** /**
* Enum representing HTML styles. The name map to values in the CSS file. * Enum representing HTML styles. The name map to values in the CSS file.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public enum HtmlStyle { public enum HtmlStyle {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -28,6 +28,11 @@ package com.sun.tools.doclets.formats.html.markup; ...@@ -28,6 +28,11 @@ package com.sun.tools.doclets.formats.html.markup;
/** /**
* Enum representing HTML tags. * Enum representing HTML tags.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public enum HtmlTag { public enum HtmlTag {
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,13 +25,21 @@ ...@@ -25,13 +25,21 @@
package com.sun.tools.doclets.formats.html.markup; package com.sun.tools.doclets.formats.html.markup;
import java.io.IOException;
import java.io.Writer;
import java.util.*; import java.util.*;
import com.sun.tools.doclets.internal.toolkit.Content; import com.sun.tools.doclets.internal.toolkit.Content;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class for generating HTML tree for javadoc output. * Class for generating HTML tree for javadoc output.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class HtmlTree extends Content { public class HtmlTree extends Content {
...@@ -423,9 +431,9 @@ public class HtmlTree extends Content { ...@@ -423,9 +431,9 @@ public class HtmlTree extends Content {
/** /**
* Generates a META tag with the http-equiv, content and charset attributes. * Generates a META tag with the http-equiv, content and charset attributes.
* *
* @param http-equiv http equiv attribute for the META tag * @param httpEquiv http equiv attribute for the META tag
* @param content type of content * @param content type of content
* @param charset character set used * @param charSet character set used
* @return an HtmlTree object for the META tag * @return an HtmlTree object for the META tag
*/ */
public static HtmlTree META(String httpEquiv, String content, String charSet) { public static HtmlTree META(String httpEquiv, String content, String charSet) {
...@@ -751,35 +759,41 @@ public class HtmlTree extends Content { ...@@ -751,35 +759,41 @@ public class HtmlTree extends Content {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void write(StringBuilder contentBuilder) { @Override
if (!isInline() && !endsWithNewLine(contentBuilder)) public boolean write(Writer out, boolean atNewline) throws IOException {
contentBuilder.append(DocletConstants.NL); if (!isInline() && !atNewline)
out.write(DocletConstants.NL);
String tagString = htmlTag.toString(); String tagString = htmlTag.toString();
contentBuilder.append("<"); out.write("<");
contentBuilder.append(tagString); out.write(tagString);
Iterator<HtmlAttr> iterator = attrs.keySet().iterator(); Iterator<HtmlAttr> iterator = attrs.keySet().iterator();
HtmlAttr key; HtmlAttr key;
String value = ""; String value = "";
while (iterator.hasNext()) { while (iterator.hasNext()) {
key = iterator.next(); key = iterator.next();
value = attrs.get(key); value = attrs.get(key);
contentBuilder.append(" "); out.write(" ");
contentBuilder.append(key.toString()); out.write(key.toString());
if (!value.isEmpty()) { if (!value.isEmpty()) {
contentBuilder.append("=\""); out.write("=\"");
contentBuilder.append(value); out.write(value);
contentBuilder.append("\""); out.write("\"");
} }
} }
contentBuilder.append(">"); out.write(">");
boolean nl = false;
for (Content c : content) for (Content c : content)
c.write(contentBuilder); nl = c.write(out, nl);
if (htmlTag.endTagRequired()) { if (htmlTag.endTagRequired()) {
contentBuilder.append("</"); out.write("</");
contentBuilder.append(tagString); out.write(tagString);
contentBuilder.append(">"); out.write(">");
}
if (!isInline()) {
out.write(DocletConstants.NL);
return true;
} else {
return false;
} }
if (!isInline())
contentBuilder.append(DocletConstants.NL);
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,12 +25,20 @@ ...@@ -25,12 +25,20 @@
package com.sun.tools.doclets.formats.html.markup; 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.Content;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class for generating raw HTML content to be added to HTML pages of javadoc output. * Class for generating raw HTML content to be added to HTML pages of javadoc output.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class RawHtml extends Content{ public class RawHtml extends Content{
...@@ -82,7 +90,16 @@ public class RawHtml extends Content{ ...@@ -82,7 +90,16 @@ public class RawHtml extends Content{
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void write(StringBuilder contentBuilder) { public String toString() {
contentBuilder.append(rawHtmlContent); return rawHtmlContent;
}
/**
* {@inheritDoc}
*/
@Override
public boolean write(Writer out, boolean atNewline) throws IOException {
out.write(rawHtmlContent);
return rawHtmlContent.endsWith(DocletConstants.NL);
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,12 +25,20 @@ ...@@ -25,12 +25,20 @@
package com.sun.tools.doclets.formats.html.markup; 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.Content;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
/** /**
* Class for generating string content for HTML tags of javadoc output. * Class for generating string content for HTML tags of javadoc output.
* *
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.
* This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* @author Bhavesh Patel * @author Bhavesh Patel
*/ */
public class StringContent extends Content{ public class StringContent extends Content{
...@@ -93,7 +101,10 @@ public class StringContent extends Content{ ...@@ -93,7 +101,10 @@ public class StringContent extends Content{
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
public void write(StringBuilder contentBuilder) { @Override
contentBuilder.append(stringContent); public boolean write(Writer out, boolean atNewline) throws IOException {
String s = stringContent.toString();
out.write(s);
return s.endsWith(DocletConstants.NL);
} }
} }
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -25,18 +25,19 @@ ...@@ -25,18 +25,19 @@
package com.sun.tools.doclets.internal.toolkit; 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.builders.*;
import com.sun.tools.doclets.internal.toolkit.util.*; import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.javadoc.*; import java.io.File;
import java.util.*; import java.util.StringTokenizer;
import java.io.*;
/** /**
* An abstract implementation of a Doclet. * An abstract implementation of a Doclet.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API. * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Jamie Ho * @author Jamie Ho
*/ */
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -30,9 +30,10 @@ import com.sun.javadoc.*; ...@@ -30,9 +30,10 @@ import com.sun.javadoc.*;
/** /**
* The interface for writing annotation type optional member output. * The interface for writing annotation type optional member output.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -31,9 +31,11 @@ import com.sun.javadoc.*; ...@@ -31,9 +31,11 @@ import com.sun.javadoc.*;
/** /**
* The interface for writing annotation type required member output. * The interface for writing annotation type required member output.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
*
* *
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,9 +32,10 @@ import com.sun.javadoc.*; ...@@ -32,9 +32,10 @@ import com.sun.javadoc.*;
/** /**
* The interface for writing annotation type output. * The interface for writing annotation type output.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API. * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
...@@ -152,7 +153,7 @@ public interface AnnotationTypeWriter { ...@@ -152,7 +153,7 @@ public interface AnnotationTypeWriter {
* *
* @param contentTree content tree that will be printed as a document * @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. * Close the writer.
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -32,9 +32,10 @@ import com.sun.javadoc.*; ...@@ -32,9 +32,10 @@ import com.sun.javadoc.*;
/** /**
* The interface for writing class output. * The interface for writing class output.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
...@@ -179,7 +180,7 @@ public interface ClassWriter { ...@@ -179,7 +180,7 @@ public interface ClassWriter {
* *
* @param contentTree content tree that will be printed as a document * @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. * Close the writer.
......
...@@ -25,12 +25,13 @@ ...@@ -25,12 +25,13 @@
package com.sun.tools.doclets.internal.toolkit; 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.taglets.*;
import com.sun.tools.doclets.internal.toolkit.util.*; 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 * Configure the output based on the options. Doclets should sub-class
...@@ -38,9 +39,10 @@ import java.io.*; ...@@ -38,9 +39,10 @@ import java.io.*;
* all user options which are supported by the 1.1 doclet and the standard * all user options which are supported by the 1.1 doclet and the standard
* doclet. * doclet.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Robert Field. * @author Robert Field.
* @author Atul Dambalkar. * @author Atul Dambalkar.
...@@ -463,7 +465,7 @@ public abstract class Configuration { ...@@ -463,7 +465,7 @@ public abstract class Configuration {
tagletManager.addNewSimpleCustomTag(tagName, null, ""); tagletManager.addNewSimpleCustomTag(tagName, null, "");
} else { } else {
//Create a simple tag with the heading that has the same name as the tag. //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))); heading.setCharAt(0, Character.toUpperCase(tagName.charAt(0)));
tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a"); tagletManager.addNewSimpleCustomTag(tagName, heading.toString(), "a");
} }
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -31,9 +31,10 @@ import com.sun.javadoc.*; ...@@ -31,9 +31,10 @@ import com.sun.javadoc.*;
/** /**
* The interface for writing constructor output. * The interface for writing constructor output.
* *
* This code is not part of an API. * <p><b>This is NOT part of any supported API.
* It is implementation that is subject to change. * If you write code that depends on this, you do so at your own risk.
* Do not use it as an API * This code and its internal interfaces are subject to change or
* deletion without notice.</b>
* *
* @author Jamie Ho * @author Jamie Ho
* @author Bhavesh Patel (Modified) * @author Bhavesh Patel (Modified)
......
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册