8012183: replace some uses of Configuration.getText with Configuration.getResource

Tue, 14 May 2013 10:14:55 -0700

author
jjg
date
Tue, 14 May 2013 10:14:55 -0700
changeset 1747
df4f44800923
parent 1746
bd51ca92c013
child 1748
051b728cfe90

8012183: replace some uses of Configuration.getText with Configuration.getResource
Reviewed-by: darcy

src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Tue May 14 10:14:55 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Tue May 14 10:14:55 2013 -0700
     1.3 @@ -91,7 +91,7 @@
     1.4       *
     1.5       * @return a string for the table caption
     1.6       */
     1.7 -    public abstract String getCaption();
     1.8 +    public abstract Content getCaption();
     1.9  
    1.10      /**
    1.11       * Get the summary table header for the member.
    1.12 @@ -415,7 +415,7 @@
    1.13              String tableSummary, String[] tableHeader, Content contentTree) {
    1.14          if (deprmembers.size() > 0) {
    1.15              Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
    1.16 -                writer.getTableCaption(configuration.getText(headingKey)));
    1.17 +                writer.getTableCaption(configuration.getResource(headingKey)));
    1.18              table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
    1.19              Content tbody = new HtmlTree(HtmlTag.TBODY);
    1.20              for (int i = 0; i < deprmembers.size(); i++) {
    1.21 @@ -447,7 +447,7 @@
    1.22       * @param contentTree the content tree to which the use information will be added
    1.23       */
    1.24      protected void addUseInfo(List<? extends ProgramElementDoc> mems,
    1.25 -            String heading, String tableSummary, Content contentTree) {
    1.26 +            Content heading, String tableSummary, Content contentTree) {
    1.27          if (mems == null) {
    1.28              return;
    1.29          }
     2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java	Tue May 14 10:14:55 2013 -0700
     2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractPackageIndexWriter.java	Tue May 14 10:14:55 2013 -0700
     2.3 @@ -158,10 +158,10 @@
     2.4              }
     2.5              body.addContent(div);
     2.6              if (configuration.showProfiles) {
     2.7 -                String profileSummary = configuration.getText("doclet.Profiles");
     2.8 -                String profilesTableSummary = configuration.getText("doclet.Member_Table_Summary",
     2.9 -                configuration.getText("doclet.Profile_Summary"),
    2.10 -                configuration.getText("doclet.profiles"));
    2.11 +                Content profileSummary = configuration.getResource("doclet.Profiles");
    2.12 +                Content profilesTableSummary = configuration.getResource("doclet.Member_Table_Summary",
    2.13 +                        configuration.getResource("doclet.Profile_Summary"),
    2.14 +                        configuration.getResource("doclet.profiles"));
    2.15                  addProfilesList(profileSummary, profilesTableSummary, body);
    2.16              }
    2.17              addPackagesList(packages, text, tableSummary, body);
    2.18 @@ -217,7 +217,7 @@
    2.19       * @param profilesTableSummary the profiles table summary information
    2.20       * @param body the content tree to which the profiles list will be added
    2.21       */
    2.22 -    protected void addProfilesList(String profileSummary, String profilesTableSummary,
    2.23 +    protected void addProfilesList(Content profileSummary, Content profilesTableSummary,
    2.24              Content body) {
    2.25      }
    2.26  }
     3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -111,8 +111,8 @@
    3.11      /**
    3.12       * {@inheritDoc}
    3.13       */
    3.14 -    public String getCaption() {
    3.15 -        return configuration.getText("doclet.Annotation_Type_Optional_Members");
    3.16 +    public Content getCaption() {
    3.17 +        return configuration.getResource("doclet.Annotation_Type_Optional_Members");
    3.18      }
    3.19  
    3.20      /**
     4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     4.3 @@ -183,8 +183,8 @@
     4.4      /**
     4.5       * {@inheritDoc}
     4.6       */
     4.7 -    public String getCaption() {
     4.8 -        return configuration.getText("doclet.Annotation_Type_Required_Members");
     4.9 +    public Content getCaption() {
    4.10 +        return configuration.getResource("doclet.Annotation_Type_Required_Members");
    4.11      }
    4.12  
    4.13      /**
     5.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 14 10:14:55 2013 -0700
     5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 14 10:14:55 2013 -0700
     5.3 @@ -256,10 +256,10 @@
     5.4       */
     5.5      protected void addPackageList(Content contentTree) throws IOException {
     5.6          Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
     5.7 -                getTableCaption(configuration.getText(
     5.8 +                getTableCaption(configuration.getResource(
     5.9                  "doclet.ClassUse_Packages.that.use.0",
    5.10                  getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc
    5.11 -                )).toString())));
    5.12 +                )))));
    5.13          table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
    5.14          Content tbody = new HtmlTree(HtmlTag.TBODY);
    5.15          Iterator<PackageDoc> it = pkgSet.iterator();
    5.16 @@ -291,10 +291,10 @@
    5.17              return;
    5.18          }
    5.19          Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
    5.20 -                getTableCaption(configuration.getText(
    5.21 +                getTableCaption(configuration.getResource(
    5.22                  "doclet.ClassUse_PackageAnnotation",
    5.23                  getLink(new LinkInfoImpl(configuration,
    5.24 -                        LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)).toString())));
    5.25 +                        LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)))));
    5.26          table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
    5.27          Content tbody = new HtmlTree(HtmlTag.TBODY);
    5.28          Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
    5.29 @@ -367,71 +367,71 @@
    5.30       * @param contentTree the content tree to which the class use information will be added
    5.31       */
    5.32      protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException {
    5.33 -        String classLink = getLink(new LinkInfoImpl(configuration,
    5.34 -            LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc)).toString();
    5.35 -        String pkgLink = getPackageLink(pkg, Util.getPackageName(pkg)).toString();
    5.36 +        Content classLink = getLink(new LinkInfoImpl(configuration,
    5.37 +            LinkInfoImpl.Kind.CLASS_USE_HEADER, classdoc));
    5.38 +        Content pkgLink = getPackageLink(pkg, Util.getPackageName(pkg));
    5.39          classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()),
    5.40 -                configuration.getText("doclet.ClassUse_Annotation", classLink,
    5.41 +                configuration.getResource("doclet.ClassUse_Annotation", classLink,
    5.42                  pkgLink), classUseTableSummary, contentTree);
    5.43          classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg.name()),
    5.44 -                configuration.getText("doclet.ClassUse_TypeParameter", classLink,
    5.45 +                configuration.getResource("doclet.ClassUse_TypeParameter", classLink,
    5.46                  pkgLink), classUseTableSummary, contentTree);
    5.47          classSubWriter.addUseInfo(pkgToSubclass.get(pkg.name()),
    5.48 -                configuration.getText("doclet.ClassUse_Subclass", classLink,
    5.49 +                configuration.getResource("doclet.ClassUse_Subclass", classLink,
    5.50                  pkgLink), subclassUseTableSummary, contentTree);
    5.51          classSubWriter.addUseInfo(pkgToSubinterface.get(pkg.name()),
    5.52 -                configuration.getText("doclet.ClassUse_Subinterface", classLink,
    5.53 +                configuration.getResource("doclet.ClassUse_Subinterface", classLink,
    5.54                  pkgLink), subinterfaceUseTableSummary, contentTree);
    5.55          classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg.name()),
    5.56 -                configuration.getText("doclet.ClassUse_ImplementingClass", classLink,
    5.57 +                configuration.getResource("doclet.ClassUse_ImplementingClass", classLink,
    5.58                  pkgLink), classUseTableSummary, contentTree);
    5.59          fieldSubWriter.addUseInfo(pkgToField.get(pkg.name()),
    5.60 -                configuration.getText("doclet.ClassUse_Field", classLink,
    5.61 +                configuration.getResource("doclet.ClassUse_Field", classLink,
    5.62                  pkgLink), fieldUseTableSummary, contentTree);
    5.63          fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg.name()),
    5.64 -                configuration.getText("doclet.ClassUse_FieldAnnotations", classLink,
    5.65 +                configuration.getResource("doclet.ClassUse_FieldAnnotations", classLink,
    5.66                  pkgLink), fieldUseTableSummary, contentTree);
    5.67          fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg.name()),
    5.68 -                configuration.getText("doclet.ClassUse_FieldTypeParameter", classLink,
    5.69 +                configuration.getResource("doclet.ClassUse_FieldTypeParameter", classLink,
    5.70                  pkgLink), fieldUseTableSummary, contentTree);
    5.71          methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg.name()),
    5.72 -                configuration.getText("doclet.ClassUse_MethodAnnotations", classLink,
    5.73 +                configuration.getResource("doclet.ClassUse_MethodAnnotations", classLink,
    5.74                  pkgLink), methodUseTableSummary, contentTree);
    5.75          methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()),
    5.76 -                configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink,
    5.77 +                configuration.getResource("doclet.ClassUse_MethodParameterAnnotations", classLink,
    5.78                  pkgLink), methodUseTableSummary, contentTree);
    5.79          methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg.name()),
    5.80 -                configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink,
    5.81 +                configuration.getResource("doclet.ClassUse_MethodTypeParameter", classLink,
    5.82                  pkgLink), methodUseTableSummary, contentTree);
    5.83          methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg.name()),
    5.84 -                configuration.getText("doclet.ClassUse_MethodReturn", classLink,
    5.85 +                configuration.getResource("doclet.ClassUse_MethodReturn", classLink,
    5.86                  pkgLink), methodUseTableSummary, contentTree);
    5.87          methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()),
    5.88 -                configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink,
    5.89 +                configuration.getResource("doclet.ClassUse_MethodReturnTypeParameter", classLink,
    5.90                  pkgLink), methodUseTableSummary, contentTree);
    5.91          methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg.name()),
    5.92 -                configuration.getText("doclet.ClassUse_MethodArgs", classLink,
    5.93 +                configuration.getResource("doclet.ClassUse_MethodArgs", classLink,
    5.94                  pkgLink), methodUseTableSummary, contentTree);
    5.95          methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()),
    5.96 -                configuration.getText("doclet.ClassUse_MethodArgsTypeParameters", classLink,
    5.97 +                configuration.getResource("doclet.ClassUse_MethodArgsTypeParameters", classLink,
    5.98                  pkgLink), methodUseTableSummary, contentTree);
    5.99          methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg.name()),
   5.100 -                configuration.getText("doclet.ClassUse_MethodThrows", classLink,
   5.101 +                configuration.getResource("doclet.ClassUse_MethodThrows", classLink,
   5.102                  pkgLink), methodUseTableSummary, contentTree);
   5.103          constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg.name()),
   5.104 -                configuration.getText("doclet.ClassUse_ConstructorAnnotations", classLink,
   5.105 +                configuration.getResource("doclet.ClassUse_ConstructorAnnotations", classLink,
   5.106                  pkgLink), constructorUseTableSummary, contentTree);
   5.107          constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()),
   5.108 -                configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
   5.109 +                configuration.getResource("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
   5.110                  pkgLink), constructorUseTableSummary, contentTree);
   5.111          constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg.name()),
   5.112 -                configuration.getText("doclet.ClassUse_ConstructorArgs", classLink,
   5.113 +                configuration.getResource("doclet.ClassUse_ConstructorArgs", classLink,
   5.114                  pkgLink), constructorUseTableSummary, contentTree);
   5.115          constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()),
   5.116 -                configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
   5.117 +                configuration.getResource("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
   5.118                  pkgLink), constructorUseTableSummary, contentTree);
   5.119          constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg.name()),
   5.120 -                configuration.getText("doclet.ClassUse_ConstructorThrows", classLink,
   5.121 +                configuration.getResource("doclet.ClassUse_ConstructorThrows", classLink,
   5.122                  pkgLink), constructorUseTableSummary, contentTree);
   5.123      }
   5.124  
     6.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Tue May 14 10:14:55 2013 -0700
     6.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Tue May 14 10:14:55 2013 -0700
     6.3 @@ -565,7 +565,7 @@
     6.4      }
     6.5  
     6.6      @Override
     6.7 -    public Content getContentForResource() {
     6.8 +    public Content newContent() {
     6.9          return new ContentBuilder();
    6.10      }
    6.11  }
     7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     7.3 @@ -184,13 +184,17 @@
     7.4       */
     7.5      public Content getConstantMembersHeader(ClassDoc cd) {
     7.6          //generate links backward only to public classes.
     7.7 -        String classlink = (cd.isPublic() || cd.isProtected()) ?
     7.8 +        Content classlink = (cd.isPublic() || cd.isProtected()) ?
     7.9              getLink(new LinkInfoImpl(configuration,
    7.10 -                    LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd)).toString() :
    7.11 -            cd.qualifiedName();
    7.12 +                    LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd)) :
    7.13 +            new StringContent(cd.qualifiedName());
    7.14          String name = cd.containingPackage().name();
    7.15          if (name.length() > 0) {
    7.16 -            return getClassName(name + "." + classlink);
    7.17 +            Content cb = new ContentBuilder();
    7.18 +            cb.addContent(name);
    7.19 +            cb.addContent(".");
    7.20 +            cb.addContent(classlink);
    7.21 +            return getClassName(cb);
    7.22          } else {
    7.23              return getClassName(classlink);
    7.24          }
    7.25 @@ -202,7 +206,7 @@
    7.26       * @param classStr the class name to print.
    7.27       * @return the table caption and header
    7.28       */
    7.29 -    protected Content getClassName(String classStr) {
    7.30 +    protected Content getClassName(Content classStr) {
    7.31          Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary,
    7.32                  getTableCaption(classStr));
    7.33          table.addContent(getSummaryTableHeader(constantsTableHeader, "col"));
     8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     8.3 @@ -225,8 +225,8 @@
     8.4      /**
     8.5       * {@inheritDoc}
     8.6       */
     8.7 -    public String getCaption() {
     8.8 -        return configuration.getText("doclet.Constructors");
     8.9 +    public Content getCaption() {
    8.10 +        return configuration.getResource("doclet.Constructors");
    8.11      }
    8.12  
    8.13      /**
     9.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     9.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Tue May 14 10:14:55 2013 -0700
     9.3 @@ -182,8 +182,8 @@
     9.4      /**
     9.5       * {@inheritDoc}
     9.6       */
     9.7 -    public String getCaption() {
     9.8 -        return configuration.getText("doclet.Enum_Constants");
     9.9 +    public Content getCaption() {
    9.10 +        return configuration.getResource("doclet.Enum_Constants");
    9.11      }
    9.12  
    9.13      /**
    10.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    10.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    10.3 @@ -203,8 +203,8 @@
    10.4      /**
    10.5       * {@inheritDoc}
    10.6       */
    10.7 -    public String getCaption() {
    10.8 -        return configuration.getText("doclet.Fields");
    10.9 +    public Content getCaption() {
   10.10 +        return configuration.getResource("doclet.Fields");
   10.11      }
   10.12  
   10.13      /**
    11.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 14 10:14:55 2013 -0700
    11.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 14 10:14:55 2013 -0700
    11.3 @@ -350,7 +350,7 @@
    11.4              int profileValue) {
    11.5          if(classes.length > 0) {
    11.6              Arrays.sort(classes);
    11.7 -            Content caption = getTableCaption(label);
    11.8 +            Content caption = getTableCaption(new RawHtml(label));
    11.9              Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
   11.10                      tableSummary, caption);
   11.11              table.addContent(getSummaryTableHeader(tableHeader, "col"));
   11.12 @@ -869,8 +869,7 @@
   11.13       * @param rawText the caption for the table which could be raw Html
   11.14       * @return a content tree for the caption
   11.15       */
   11.16 -    public Content getTableCaption(String rawText) {
   11.17 -        Content title = new RawHtml(rawText);
   11.18 +    public Content getTableCaption(Content title) {
   11.19          Content captionSpan = HtmlTree.SPAN(title);
   11.20          Content space = getSpace();
   11.21          Content tabSpan = HtmlTree.SPAN(HtmlStyle.tabEnd, space);
   11.22 @@ -938,7 +937,7 @@
   11.23              String tableSummary, String[] tableHeader, Content contentTree) {
   11.24          if (deprPkgs.size() > 0) {
   11.25              Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
   11.26 -                    getTableCaption(configuration.getText(headingKey)));
   11.27 +                    getTableCaption(configuration.getResource(headingKey)));
   11.28              table.addContent(getSummaryTableHeader(tableHeader, "col"));
   11.29              Content tbody = new HtmlTree(HtmlTag.TBODY);
   11.30              for (int i = 0; i < deprPkgs.size(); i++) {
   11.31 @@ -1573,7 +1572,7 @@
   11.32       */
   11.33      public Content commentTagsToContent(Tag holderTag, Doc doc, Tag[] tags,
   11.34              boolean isFirstSentence) {
   11.35 -        ContentBuilder result = new ContentBuilder();
   11.36 +        Content result = new ContentBuilder();
   11.37          boolean textTagChange = false;
   11.38          // Array of all possible inline tags for this javadoc run
   11.39          configuration.tagletManager.checkTags(doc, tags, true);
   11.40 @@ -1890,7 +1889,7 @@
   11.41      }
   11.42  
   11.43      /**
   11.44 -     * Adds the annotatation types for the given doc.
   11.45 +     * Adds the annotation types for the given doc.
   11.46       *
   11.47       * @param indent the number of extra spaces to indent the annotations.
   11.48       * @param doc the doc to write annotations for.
   11.49 @@ -1900,16 +1899,14 @@
   11.50       */
   11.51      private boolean addAnnotationInfo(int indent, Doc doc,
   11.52              AnnotationDesc[] descList, boolean lineBreak, Content htmltree) {
   11.53 -        List<String> annotations = getAnnotations(indent, descList, lineBreak);
   11.54 +        List<Content> annotations = getAnnotations(indent, descList, lineBreak);
   11.55          String sep ="";
   11.56 -        if (annotations.size() == 0) {
   11.57 +        if (annotations.isEmpty()) {
   11.58              return false;
   11.59          }
   11.60 -        Content annotationContent;
   11.61 -        for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
   11.62 +        for (Content annotation: annotations) {
   11.63              htmltree.addContent(sep);
   11.64 -            annotationContent = new RawHtml(iter.next());
   11.65 -            htmltree.addContent(annotationContent);
   11.66 +            htmltree.addContent(annotation);
   11.67              sep = " ";
   11.68          }
   11.69          return true;
   11.70 @@ -1925,7 +1922,7 @@
   11.71       * @return an array of strings representing the annotations being
   11.72       *         documented.
   11.73       */
   11.74 -    private List<String> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak) {
   11.75 +    private List<Content> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak) {
   11.76          return getAnnotations(indent, descList, linkBreak, true);
   11.77      }
   11.78  
   11.79 @@ -1944,10 +1941,10 @@
   11.80       * @return an array of strings representing the annotations being
   11.81       *         documented.
   11.82       */
   11.83 -    public List<String> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak,
   11.84 +    public List<Content> getAnnotations(int indent, AnnotationDesc[] descList, boolean linkBreak,
   11.85              boolean isJava5DeclarationLocation) {
   11.86 -        List<String> results = new ArrayList<String>();
   11.87 -        StringBuilder annotation;
   11.88 +        List<Content> results = new ArrayList<Content>();
   11.89 +        ContentBuilder annotation;
   11.90          for (int i = 0; i < descList.length; i++) {
   11.91              AnnotationTypeDoc annotationDoc = descList[i].annotationType();
   11.92              // If an annotation is not documented, do not add it to the list. If
   11.93 @@ -1964,7 +1961,7 @@
   11.94              if  (Util.isDeclarationAnnotation(annotationDoc, isJava5DeclarationLocation)) {
   11.95                  continue;
   11.96              }*/
   11.97 -            annotation = new StringBuilder();
   11.98 +            annotation = new ContentBuilder();
   11.99              isAnnotationDocumented = false;
  11.100              LinkInfoImpl linkInfo = new LinkInfoImpl(configuration,
  11.101                  LinkInfoImpl.Kind.ANNOTATION, annotationDoc);
  11.102 @@ -1983,8 +1980,8 @@
  11.103                      }
  11.104                      String sep = "";
  11.105                      for (AnnotationValue av : annotationTypeValues) {
  11.106 -                        annotation.append(sep);
  11.107 -                        annotation.append(annotationValueToString(av));
  11.108 +                        annotation.addContent(sep);
  11.109 +                        annotation.addContent(annotationValueToContent(av));
  11.110                          sep = " ";
  11.111                      }
  11.112                  }
  11.113 @@ -2000,8 +1997,8 @@
  11.114                      annotationTypeValues.addAll(Arrays.asList(annotationArray));
  11.115                      String sep = "";
  11.116                      for (AnnotationValue av : annotationTypeValues) {
  11.117 -                        annotation.append(sep);
  11.118 -                        annotation.append(annotationValueToString(av));
  11.119 +                        annotation.addContent(sep);
  11.120 +                        annotation.addContent(annotationValueToContent(av));
  11.121                          sep = " ";
  11.122                      }
  11.123                  }
  11.124 @@ -2016,8 +2013,8 @@
  11.125                  addAnnotations(annotationDoc, linkInfo, annotation, pairs,
  11.126                          indent, linkBreak);
  11.127              }
  11.128 -            annotation.append(linkBreak ? DocletConstants.NL : "");
  11.129 -            results.add(annotation.toString());
  11.130 +            annotation.addContent(linkBreak ? DocletConstants.NL : "");
  11.131 +            results.add(annotation);
  11.132          }
  11.133          return results;
  11.134      }
  11.135 @@ -2033,26 +2030,26 @@
  11.136       * @param linkBreak if true, add new line between each member value
  11.137       */
  11.138      private void addAnnotations(AnnotationTypeDoc annotationDoc, LinkInfoImpl linkInfo,
  11.139 -            StringBuilder annotation, AnnotationDesc.ElementValuePair[] pairs,
  11.140 +            ContentBuilder annotation, AnnotationDesc.ElementValuePair[] pairs,
  11.141              int indent, boolean linkBreak) {
  11.142          linkInfo.label = new StringContent("@" + annotationDoc.name());
  11.143 -        annotation.append(getLink(linkInfo));
  11.144 +        annotation.addContent(getLink(linkInfo));
  11.145          if (pairs.length > 0) {
  11.146 -            annotation.append('(');
  11.147 +            annotation.addContent("(");
  11.148              for (int j = 0; j < pairs.length; j++) {
  11.149                  if (j > 0) {
  11.150 -                    annotation.append(",");
  11.151 +                    annotation.addContent(",");
  11.152                      if (linkBreak) {
  11.153 -                        annotation.append(DocletConstants.NL);
  11.154 +                        annotation.addContent(DocletConstants.NL);
  11.155                          int spaces = annotationDoc.name().length() + 2;
  11.156                          for (int k = 0; k < (spaces + indent); k++) {
  11.157 -                            annotation.append(' ');
  11.158 +                            annotation.addContent(" ");
  11.159                          }
  11.160                      }
  11.161                  }
  11.162 -                annotation.append(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
  11.163 +                annotation.addContent(getDocLink(LinkInfoImpl.Kind.ANNOTATION,
  11.164                          pairs[j].element(), pairs[j].element().name(), false));
  11.165 -                annotation.append('=');
  11.166 +                annotation.addContent("=");
  11.167                  AnnotationValue annotationValue = pairs[j].value();
  11.168                  List<AnnotationValue> annotationTypeValues = new ArrayList<AnnotationValue>();
  11.169                  if (annotationValue.value() instanceof AnnotationValue[]) {
  11.170 @@ -2062,17 +2059,17 @@
  11.171                  } else {
  11.172                      annotationTypeValues.add(annotationValue);
  11.173                  }
  11.174 -                annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
  11.175 +                annotation.addContent(annotationTypeValues.size() == 1 ? "" : "{");
  11.176                  String sep = "";
  11.177                  for (AnnotationValue av : annotationTypeValues) {
  11.178 -                    annotation.append(sep);
  11.179 -                    annotation.append(annotationValueToString(av));
  11.180 +                    annotation.addContent(sep);
  11.181 +                    annotation.addContent(annotationValueToContent(av));
  11.182                      sep = ",";
  11.183                  }
  11.184 -                annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
  11.185 +                annotation.addContent(annotationTypeValues.size() == 1 ? "" : "}");
  11.186                  isContainerDocumented = false;
  11.187              }
  11.188 -            annotation.append(")");
  11.189 +            annotation.addContent(")");
  11.190          }
  11.191      }
  11.192  
  11.193 @@ -2107,7 +2104,7 @@
  11.194          return false;
  11.195      }
  11.196  
  11.197 -    private String annotationValueToString(AnnotationValue annotationValue) {
  11.198 +    private Content annotationValueToContent(AnnotationValue annotationValue) {
  11.199          if (annotationValue.value() instanceof Type) {
  11.200              Type type = (Type) annotationValue.value();
  11.201              if (type.asClassDoc() != null) {
  11.202 @@ -2116,25 +2113,25 @@
  11.203                  linkInfo.label = new StringContent((type.asClassDoc().isIncluded() ?
  11.204                      type.typeName() :
  11.205                      type.qualifiedTypeName()) + type.dimension() + ".class");
  11.206 -                return getLink(linkInfo).toString();
  11.207 +                return getLink(linkInfo);
  11.208              } else {
  11.209 -                return type.typeName() + type.dimension() + ".class";
  11.210 +                return new StringContent(type.typeName() + type.dimension() + ".class");
  11.211              }
  11.212          } else if (annotationValue.value() instanceof AnnotationDesc) {
  11.213 -            List<String> list = getAnnotations(0,
  11.214 +            List<Content> list = getAnnotations(0,
  11.215                  new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
  11.216                      false);
  11.217 -            StringBuilder buf = new StringBuilder();
  11.218 -            for (String s: list) {
  11.219 -                buf.append(s);
  11.220 +            ContentBuilder buf = new ContentBuilder();
  11.221 +            for (Content c: list) {
  11.222 +                buf.addContent(c);
  11.223              }
  11.224 -            return buf.toString();
  11.225 +            return buf;
  11.226          } else if (annotationValue.value() instanceof MemberDoc) {
  11.227              return getDocLink(LinkInfoImpl.Kind.ANNOTATION,
  11.228                  (MemberDoc) annotationValue.value(),
  11.229 -                ((MemberDoc) annotationValue.value()).name(), false).toString();
  11.230 +                ((MemberDoc) annotationValue.value()).name(), false);
  11.231           } else {
  11.232 -            return annotationValue.toString();
  11.233 +            return new StringContent(annotationValue.toString());
  11.234           }
  11.235      }
  11.236  
    12.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java	Tue May 14 10:14:55 2013 -0700
    12.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/LinkFactoryImpl.java	Tue May 14 10:14:55 2013 -0700
    12.3 @@ -149,14 +149,14 @@
    12.4          if (annotations.length == 0)
    12.5              return links;
    12.6  
    12.7 -        List<String> annos = m_writer.getAnnotations(0, annotations, false, linkInfo.isJava5DeclarationLocation);
    12.8 +        List<Content> annos = m_writer.getAnnotations(0, annotations, false, linkInfo.isJava5DeclarationLocation);
    12.9  
   12.10          boolean isFirst = true;
   12.11 -        for (String anno : annos) {
   12.12 +        for (Content anno : annos) {
   12.13              if (!isFirst) {
   12.14                  links.addContent(" ");
   12.15              }
   12.16 -            links.addContent(new RawHtml(anno));
   12.17 +            links.addContent(anno);
   12.18              isFirst = false;
   12.19          }
   12.20          if (!annos.isEmpty()) {
    13.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    13.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    13.3 @@ -223,8 +223,8 @@
    13.4      /**
    13.5       * {@inheritDoc}
    13.6       */
    13.7 -    public String getCaption() {
    13.8 -        return configuration.getText("doclet.Methods");
    13.9 +    public Content getCaption() {
   13.10 +        return configuration.getResource("doclet.Methods");
   13.11      }
   13.12  
   13.13      /**
    14.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    14.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    14.3 @@ -100,8 +100,8 @@
    14.4      /**
    14.5       * {@inheritDoc}
    14.6       */
    14.7 -    public String getCaption() {
    14.8 -        return configuration.getText("doclet.Nested_Classes");
    14.9 +    public Content getCaption() {
   14.10 +        return configuration.getResource("doclet.Nested_Classes");
   14.11      }
   14.12  
   14.13      /**
    15.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    15.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    15.3 @@ -166,7 +166,7 @@
    15.4              Arrays.sort(arr);
    15.5              boolean printedHeader = false;
    15.6              HtmlTree ul = new HtmlTree(HtmlTag.UL);
    15.7 -            ul.addAttr(HtmlAttr.TITLE, labelContent.toString());
    15.8 +            ul.setTitle(labelContent);
    15.9              for (int i = 0; i < arr.length; i++) {
   15.10                  if (documentedClasses != null &&
   15.11                          !documentedClasses.contains(arr[i])) {
    16.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    16.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    16.3 @@ -84,7 +84,7 @@
    16.4                  packagesLabel);
    16.5          Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
    16.6          HtmlTree ul = new HtmlTree(HtmlTag.UL);
    16.7 -        ul.addAttr(HtmlAttr.TITLE, packagesLabel.toString());
    16.8 +        ul.setTitle(packagesLabel);
    16.9          for(int i = 0; i < packages.length; i++) {
   16.10              // Do not list the package if -nodeprecated option is set and the
   16.11              // package is marked as deprecated.
    17.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Tue May 14 10:14:55 2013 -0700
    17.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Tue May 14 10:14:55 2013 -0700
    17.3 @@ -123,7 +123,7 @@
    17.4      /**
    17.5       * {@inheritDoc}
    17.6       */
    17.7 -    protected void addProfilesList(String profileSummary, String profilesTableSummary,
    17.8 +    protected void addProfilesList(Content profileSummary, String profilesTableSummary,
    17.9              Content body) {
   17.10          Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, profilesTableSummary,
   17.11                  getTableCaption(profileSummary));
   17.12 @@ -141,7 +141,7 @@
   17.13      protected void addPackagesList(PackageDoc[] packages, String text,
   17.14              String tableSummary, Content body) {
   17.15          Content table = HtmlTree.TABLE(HtmlStyle.overviewSummary, 0, 3, 0, tableSummary,
   17.16 -                getTableCaption(text));
   17.17 +                getTableCaption(new RawHtml(text)));
   17.18          table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
   17.19          Content tbody = new HtmlTree(HtmlTag.TBODY);
   17.20          addPackagesList(packages, tbody);
    18.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 14 10:14:55 2013 -0700
    18.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 14 10:14:55 2013 -0700
    18.3 @@ -152,9 +152,9 @@
    18.4       */
    18.5      protected void addPackageList(Content contentTree) throws IOException {
    18.6          Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
    18.7 -                getTableCaption(configuration.getText(
    18.8 +                getTableCaption(configuration.getResource(
    18.9                  "doclet.ClassUse_Packages.that.use.0",
   18.10 -                getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)).toString())));
   18.11 +                getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)))));
   18.12          table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
   18.13          Content tbody = new HtmlTree(HtmlTag.TBODY);
   18.14          Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
   18.15 @@ -197,10 +197,10 @@
   18.16              String tableSummary = configuration.getText("doclet.Use_Table_Summary",
   18.17                      configuration.getText("doclet.classes"));
   18.18              Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
   18.19 -                    getTableCaption(configuration.getText(
   18.20 +                    getTableCaption(configuration.getResource(
   18.21                      "doclet.ClassUse_Classes.in.0.used.by.1",
   18.22 -                    getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)).toString(),
   18.23 -                    getPackageLink(usingPackage, Util.getPackageName(usingPackage)).toString())));
   18.24 +                    getPackageLink(pkgdoc, Util.getPackageName(pkgdoc)),
   18.25 +                    getPackageLink(usingPackage, Util.getPackageName(usingPackage)))));
   18.26              table.addContent(getSummaryTableHeader(classTableHeader, "col"));
   18.27              Content tbody = new HtmlTree(HtmlTag.TBODY);
   18.28              Iterator<ClassDoc> itc =
    19.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    19.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    19.3 @@ -168,7 +168,7 @@
    19.4              String tableSummary, String[] tableHeader, Content summaryContentTree) {
    19.5          if(classes.length > 0) {
    19.6              Arrays.sort(classes);
    19.7 -            Content caption = getTableCaption(label);
    19.8 +            Content caption = getTableCaption(new RawHtml(label));
    19.9              Content table = HtmlTree.TABLE(HtmlStyle.packageSummary, 0, 3, 0,
   19.10                      tableSummary, caption);
   19.11              table.addContent(getSummaryTableHeader(tableHeader, "col"));
    20.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    20.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfileIndexFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    20.3 @@ -87,7 +87,7 @@
    20.4                  profilesLabel);
    20.5          Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
    20.6          HtmlTree ul = new HtmlTree(HtmlTag.UL);
    20.7 -        ul.addAttr(HtmlAttr.TITLE, profilesLabel.toString());
    20.8 +        ul.setTitle(profilesLabel);
    20.9          for (int i = 1; i < profiles.getProfileCount(); i++) {
   20.10              ul.addContent(getProfile(i));
   20.11          }
    21.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    21.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    21.3 @@ -158,7 +158,7 @@
    21.4              Arrays.sort(arr);
    21.5              boolean printedHeader = false;
    21.6              HtmlTree ul = new HtmlTree(HtmlTag.UL);
    21.7 -            ul.addAttr(HtmlAttr.TITLE, labelContent.toString());
    21.8 +            ul.setTitle(labelContent);
    21.9              for (int i = 0; i < arr.length; i++) {
   21.10                  if (!isTypeInProfile(arr[i], profileValue)) {
   21.11                      continue;
    22.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    22.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageIndexFrameWriter.java	Tue May 14 10:14:55 2013 -0700
    22.3 @@ -91,7 +91,7 @@
    22.4          heading.addContent(packagesLabel);
    22.5          Content div = HtmlTree.DIV(HtmlStyle.indexContainer, heading);
    22.6          HtmlTree ul = new HtmlTree(HtmlTag.UL);
    22.7 -        ul.addAttr(HtmlAttr.TITLE, packagesLabel.toString());
    22.8 +        ul.setTitle(packagesLabel);
    22.9          PackageDoc[] packages = configuration.profilePackages.get(profileName);
   22.10          for (int i = 0; i < packages.length; i++) {
   22.11              if ((!(configuration.nodeprecated && Util.isDeprecated(packages[i])))) {
    23.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    23.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    23.3 @@ -199,8 +199,8 @@
    23.4      /**
    23.5       * {@inheritDoc}
    23.6       */
    23.7 -    public String getCaption() {
    23.8 -        return configuration.getText("doclet.Properties");
    23.9 +    public Content getCaption() {
   23.10 +        return configuration.getResource("doclet.Properties");
   23.11      }
   23.12  
   23.13      /**
    24.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    24.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/SerializedFormWriterImpl.java	Tue May 14 10:14:55 2013 -0700
    24.3 @@ -133,23 +133,22 @@
    24.4              new StringContent(classDoc.qualifiedName());
    24.5          Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(
    24.6                  classDoc.qualifiedName()));
    24.7 -        String superClassLink =
    24.8 +        Content superClassLink =
    24.9              classDoc.superclassType() != null ?
   24.10                  getLink(new LinkInfoImpl(configuration,
   24.11                          LinkInfoImpl.Kind.SERIALIZED_FORM,
   24.12 -                        classDoc.superclassType())).toString() :
   24.13 +                        classDoc.superclassType())) :
   24.14                  null;
   24.15  
   24.16          //Print the heading.
   24.17 -        String className = superClassLink == null ?
   24.18 -            configuration.getText(
   24.19 -            "doclet.Class_0_implements_serializable", classLink.toString()) :
   24.20 -            configuration.getText(
   24.21 -            "doclet.Class_0_extends_implements_serializable", classLink.toString(),
   24.22 +        Content className = superClassLink == null ?
   24.23 +            configuration.getResource(
   24.24 +            "doclet.Class_0_implements_serializable", classLink) :
   24.25 +            configuration.getResource(
   24.26 +            "doclet.Class_0_extends_implements_serializable", classLink,
   24.27              superClassLink);
   24.28 -        Content classNameContent = new RawHtml(className);
   24.29          li.addContent(HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
   24.30 -                classNameContent));
   24.31 +                className));
   24.32          return li;
   24.33      }
   24.34  
    25.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Tue May 14 10:14:55 2013 -0700
    25.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Tue May 14 10:14:55 2013 -0700
    25.3 @@ -78,27 +78,6 @@
    25.4      /**
    25.5       * Get Html Hyper Link string.
    25.6       *
    25.7 -     * @param link       String name of the file.
    25.8 -     * @param label      Tag for the link.
    25.9 -     * @param strong       Boolean that sets label to strong.
   25.10 -     * @param stylename  String style of text defined in style sheet.
   25.11 -     * @return String    Hyper Link.
   25.12 -     */
   25.13 -    public String getHyperLinkString(DocPath link,
   25.14 -                               String label, boolean strong,
   25.15 -                               String stylename) {
   25.16 -        return getHyperLinkString(link, label, strong, stylename, "", "");
   25.17 -    }
   25.18 -
   25.19 -    public String getHyperLinkString(DocLink link,
   25.20 -                               String label, boolean strong,
   25.21 -                               String stylename) {
   25.22 -        return getHyperLinkString(link, label, strong, stylename, "", "");
   25.23 -    }
   25.24 -
   25.25 -    /**
   25.26 -     * Get Html Hyper Link string.
   25.27 -     *
   25.28       * @param where      Position of the link in the file. Character '#' is not
   25.29       *                   needed.
   25.30       * @param label      Tag for the link.
   25.31 @@ -124,55 +103,6 @@
   25.32          return getHyperLink(link, label, "", "");
   25.33      }
   25.34  
   25.35 -    /**
   25.36 -     * Get Html Hyper Link string.
   25.37 -     *
   25.38 -     * @param link       String name of the file.
   25.39 -     * @param label      Tag for the link.
   25.40 -     * @param strong       Boolean that sets label to strong.
   25.41 -     * @param stylename  String style of text defined in style sheet.
   25.42 -     * @param title      String that describes the links content for accessibility.
   25.43 -     * @param target     Target frame.
   25.44 -     * @return String    Hyper Link.
   25.45 -     */
   25.46 -    public String getHyperLinkString(DocPath link,
   25.47 -                               String label, boolean strong,
   25.48 -                               String stylename, String title, String target) {
   25.49 -        return getHyperLinkString(new DocLink(link), label, strong,
   25.50 -                stylename, title, target);
   25.51 -    }
   25.52 -
   25.53 -    public String getHyperLinkString(DocLink link,
   25.54 -                               String label, boolean strong,
   25.55 -                               String stylename, String title, String target) {
   25.56 -        StringBuilder retlink = new StringBuilder();
   25.57 -        retlink.append("<a href=\"").append(link).append('"');
   25.58 -        if (title != null && title.length() != 0) {
   25.59 -            retlink.append(" title=\"").append(title).append('"');
   25.60 -        }
   25.61 -        if (target != null && target.length() != 0) {
   25.62 -            retlink.append(" target=\"").append(target).append('"');
   25.63 -        }
   25.64 -        retlink.append(">");
   25.65 -        if (stylename != null && stylename.length() != 0) {
   25.66 -            retlink.append("<FONT CLASS=\"");
   25.67 -            retlink.append(stylename);
   25.68 -            retlink.append("\">");
   25.69 -        }
   25.70 -        if (strong) {
   25.71 -            retlink.append("<span class=\"strong\">");
   25.72 -        }
   25.73 -        retlink.append(label);
   25.74 -        if (strong) {
   25.75 -            retlink.append("</span>");
   25.76 -        }
   25.77 -        if (stylename != null && stylename.length() != 0) {
   25.78 -            retlink.append("</FONT>");
   25.79 -        }
   25.80 -        retlink.append("</a>");
   25.81 -        return retlink.toString();
   25.82 -    }
   25.83 -
   25.84      public Content getHyperLink(DocPath link,
   25.85                                 Content label, boolean strong,
   25.86                                 String stylename, String title, String target) {
    26.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Tue May 14 10:14:55 2013 -0700
    26.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Tue May 14 10:14:55 2013 -0700
    26.3 @@ -82,6 +82,10 @@
    26.4          attrs.put(nullCheck(attrName), escapeHtmlChars(attrValue));
    26.5      }
    26.6  
    26.7 +    public void setTitle(Content body) {
    26.8 +        addAttr(HtmlAttr.TITLE, stripHtml(body));
    26.9 +    }
   26.10 +
   26.11      /**
   26.12       * Adds a style for the HTML tag.
   26.13       *
   26.14 @@ -353,7 +357,7 @@
   26.15              HtmlStyle styleClass, Content body) {
   26.16          HtmlTree htmltree = new HtmlTree(headingTag, nullCheck(body));
   26.17          if (printTitle)
   26.18 -            htmltree.addAttr(HtmlAttr.TITLE, stripHtml(body));
   26.19 +            htmltree.setTitle(body);
   26.20          if (styleClass != null)
   26.21              htmltree.addStyle(styleClass);
   26.22          return htmltree;
   26.23 @@ -838,7 +842,7 @@
   26.24          out.write(tagString);
   26.25          Iterator<HtmlAttr> iterator = attrs.keySet().iterator();
   26.26          HtmlAttr key;
   26.27 -        String value = "";
   26.28 +        String value;
   26.29          while (iterator.hasNext()) {
   26.30              key = iterator.next();
   26.31              value = attrs.get(key);
    27.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Tue May 14 10:14:55 2013 -0700
    27.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Tue May 14 10:14:55 2013 -0700
    27.3 @@ -827,7 +827,7 @@
    27.4          }
    27.5      }
    27.6  
    27.7 -    public abstract Content getContentForResource();
    27.8 +    public abstract Content newContent();
    27.9  
   27.10      /**
   27.11       * Get the configuration string as a content.
   27.12 @@ -836,7 +836,7 @@
   27.13       * @return a content tree for the text
   27.14       */
   27.15      public Content getResource(String key) {
   27.16 -        Content c = getContentForResource();
   27.17 +        Content c = newContent();
   27.18          c.addContent(getText(key));
   27.19          return c;
   27.20      }
   27.21 @@ -872,7 +872,7 @@
   27.22       * @return a content tree for the text
   27.23       */
   27.24      public Content getResource(String key, Object o0, Object o1, Object o2) {
   27.25 -        Content c = getContentForResource();
   27.26 +        Content c = newContent();
   27.27          Pattern p = Pattern.compile("\\{([012])\\}");
   27.28          String text = getText(key);
   27.29          Matcher m = p.matcher(text);

mercurial