langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
changeset 1789 7ac8c0815000
parent 1787 1aa079321cd2
child 2086 cca2603eab0b
equal deleted inserted replaced
1788:ced0a1a7ec80 1789:7ac8c0815000
  1726      * @param indent the number of extra spaces to indent the annotations.
  1726      * @param indent the number of extra spaces to indent the annotations.
  1727      * @param doc the doc to write annotations for.
  1727      * @param doc the doc to write annotations for.
  1728      * @param descList the array of {@link AnnotationDesc}.
  1728      * @param descList the array of {@link AnnotationDesc}.
  1729      */
  1729      */
  1730     private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
  1730     private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
  1731         List annotations = getAnnotations(indent, descList, lineBreak);
  1731         List<String> annotations = getAnnotations(indent, descList, lineBreak);
  1732         if (annotations.size() == 0) {
  1732         if (annotations.size() == 0) {
  1733             return false;
  1733             return false;
  1734         }
  1734         }
  1735         fontNoNewLine("-1");
  1735         fontNoNewLine("-1");
  1736         for (Iterator iter = annotations.iterator(); iter.hasNext();) {
  1736         for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
  1737             print((String) iter.next());
  1737             print(iter.next());
  1738         }
  1738         }
  1739         fontEnd();
  1739         fontEnd();
  1740         return true;
  1740         return true;
  1741     }
  1741     }
  1742 
  1742 
  1790                         }
  1790                         }
  1791                     } else {
  1791                     } else {
  1792                         annotationTypeValues.add(annotationValue);
  1792                         annotationTypeValues.add(annotationValue);
  1793                     }
  1793                     }
  1794                     annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
  1794                     annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
  1795                     for (Iterator iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
  1795                     for (Iterator<AnnotationValue> iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
  1796                         annotation.append(annotationValueToString((AnnotationValue) iter.next()));
  1796                         annotation.append(annotationValueToString(iter.next()));
  1797                         annotation.append(iter.hasNext() ? "," : "");
  1797                         annotation.append(iter.hasNext() ? "," : "");
  1798                     }
  1798                     }
  1799                     annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
  1799                     annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
  1800                 }
  1800                 }
  1801                 annotation.append(")");
  1801                 annotation.append(")");
  1818                 return getLink(linkInfo);
  1818                 return getLink(linkInfo);
  1819             } else {
  1819             } else {
  1820                 return type.typeName() + type.dimension() + ".class";
  1820                 return type.typeName() + type.dimension() + ".class";
  1821             }
  1821             }
  1822         } else if (annotationValue.value() instanceof AnnotationDesc) {
  1822         } else if (annotationValue.value() instanceof AnnotationDesc) {
  1823             List list = getAnnotations(0,
  1823             List<String> list = getAnnotations(0,
  1824                 new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
  1824                 new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
  1825                     false);
  1825                     false);
  1826             StringBuffer buf = new StringBuffer();
  1826             StringBuffer buf = new StringBuffer();
  1827             for (Iterator iter = list.iterator(); iter.hasNext(); ) {
  1827             for (Iterator<String> iter = list.iterator(); iter.hasNext(); ) {
  1828                 buf.append(iter.next());
  1828                 buf.append(iter.next());
  1829             }
  1829             }
  1830             return buf.toString();
  1830             return buf.toString();
  1831         } else if (annotationValue.value() instanceof MemberDoc) {
  1831         } else if (annotationValue.value() instanceof MemberDoc) {
  1832             return getDocLink(LinkInfoImpl.CONTEXT_ANNOTATION,
  1832             return getDocLink(LinkInfoImpl.CONTEXT_ANNOTATION,