author | mcimadamore |
Tue, 13 Jan 2009 13:27:14 +0000 | |
changeset 1789 | 7ac8c0815000 |
parent 1787 | 1aa079321cd2 |
child 2216 | b124d5c924eb |
permissions | -rw-r--r-- |
10 | 1 |
/* |
2 |
* Copyright 2003-2004 Sun Microsystems, Inc. All Rights Reserved. |
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
|
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Sun designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Sun in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
|
22 |
* CA 95054 USA or visit www.sun.com if you need additional information or |
|
23 |
* have any questions. |
|
24 |
*/ |
|
25 |
||
26 |
package com.sun.tools.doclets.formats.html; |
|
27 |
||
28 |
import com.sun.tools.doclets.internal.toolkit.*; |
|
29 |
import com.sun.javadoc.*; |
|
30 |
||
31 |
import java.io.*; |
|
32 |
||
33 |
/** |
|
34 |
* Writes annotation type optional member documentation in HTML format. |
|
35 |
* |
|
36 |
* @author Jamie Ho |
|
37 |
*/ |
|
38 |
public class AnnotationTypeOptionalMemberWriterImpl extends |
|
39 |
AnnotationTypeRequiredMemberWriterImpl |
|
40 |
implements AnnotationTypeOptionalMemberWriter, MemberSummaryWriter { |
|
41 |
||
42 |
/** |
|
43 |
* Construct a new AnnotationTypeOptionalMemberWriterImpl. |
|
44 |
* |
|
45 |
* @param writer the writer that will write the output. |
|
46 |
* @param annotationType the AnnotationType that holds this member. |
|
47 |
*/ |
|
48 |
public AnnotationTypeOptionalMemberWriterImpl(SubWriterHolderWriter writer, |
|
49 |
AnnotationTypeDoc annotationType) { |
|
50 |
super(writer, annotationType); |
|
51 |
} |
|
52 |
||
53 |
/** |
|
54 |
* {@inheritDoc} |
|
55 |
*/ |
|
56 |
public void writeMemberSummaryHeader(ClassDoc classDoc) { |
|
57 |
writer.println("<!-- =========== ANNOTATION TYPE OPTIONAL MEMBER SUMMARY =========== -->"); |
|
58 |
writer.println(); |
|
59 |
writer.printSummaryHeader(this, classDoc); |
|
60 |
} |
|
61 |
||
62 |
/** |
|
63 |
* {@inheritDoc} |
|
64 |
*/ |
|
65 |
public void writeDefaultValueInfo(MemberDoc member) { |
|
66 |
writer.dl(); |
|
67 |
writer.dt(); |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
68 |
writer.strong(ConfigurationImpl.getInstance(). |
10 | 69 |
getText("doclet.Default")); |
70 |
writer.dd(); |
|
71 |
writer.print(((AnnotationTypeElementDoc) member).defaultValue()); |
|
72 |
writer.ddEnd(); |
|
73 |
writer.dlEnd(); |
|
74 |
} |
|
75 |
||
76 |
/** |
|
77 |
* {@inheritDoc} |
|
78 |
*/ |
|
79 |
public void close() throws IOException { |
|
80 |
writer.close(); |
|
81 |
} |
|
82 |
||
83 |
/** |
|
84 |
* {@inheritDoc} |
|
85 |
*/ |
|
86 |
public void printSummaryLabel(ClassDoc cd) { |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
87 |
writer.strongText("doclet.Annotation_Type_Optional_Member_Summary"); |
10 | 88 |
} |
89 |
||
90 |
/** |
|
91 |
* {@inheritDoc} |
|
92 |
*/ |
|
93 |
public void printSummaryAnchor(ClassDoc cd) { |
|
94 |
writer.anchor("annotation_type_optional_element_summary"); |
|
95 |
} |
|
96 |
||
97 |
/** |
|
98 |
* {@inheritDoc} |
|
99 |
*/ |
|
100 |
protected void printNavSummaryLink(ClassDoc cd, boolean link) { |
|
101 |
if (link) { |
|
102 |
writer.printHyperLink("", "annotation_type_optional_element_summary", |
|
103 |
configuration().getText("doclet.navAnnotationTypeOptionalMember")); |
|
104 |
} else { |
|
105 |
writer.printText("doclet.navAnnotationTypeOptionalMember"); |
|
106 |
} |
|
107 |
} |
|
108 |
} |