author | jjg |
Thu, 15 Nov 2012 09:18:36 -0800 | |
changeset 14542 | 7062120649c2 |
parent 14357 | faf9cde2817b |
child 17558 | eee4ccf66cfd |
permissions | -rw-r--r-- |
10 | 1 |
/* |
14260 | 2 |
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
|
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
10 | 8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
10 | 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 |
* |
|
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
10 | 24 |
*/ |
25 |
||
26 |
package com.sun.tools.doclets.formats.html; |
|
27 |
||
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
28 |
import java.io.*; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
29 |
|
10 | 30 |
import com.sun.javadoc.*; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
31 |
import com.sun.tools.doclets.formats.html.markup.*; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
32 |
import com.sun.tools.doclets.internal.toolkit.*; |
10 | 33 |
|
34 |
/** |
|
35 |
* Writes annotation type required member documentation in HTML format. |
|
36 |
* |
|
14260 | 37 |
* <p><b>This is NOT part of any supported API. |
38 |
* If you write code that depends on this, you do so at your own risk. |
|
39 |
* This code and its internal interfaces are subject to change or |
|
40 |
* deletion without notice.</b> |
|
41 |
* |
|
10 | 42 |
* @author Jamie Ho |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
43 |
* @author Bhavesh Patel (Modified) |
10 | 44 |
*/ |
45 |
public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter |
|
46 |
implements AnnotationTypeRequiredMemberWriter, MemberSummaryWriter { |
|
47 |
||
48 |
/** |
|
49 |
* Construct a new AnnotationTypeRequiredMemberWriterImpl. |
|
50 |
* |
|
51 |
* @param writer the writer that will write the output. |
|
52 |
* @param annotationType the AnnotationType that holds this member. |
|
53 |
*/ |
|
54 |
public AnnotationTypeRequiredMemberWriterImpl(SubWriterHolderWriter writer, |
|
14542 | 55 |
AnnotationTypeDoc annotationType) { |
10 | 56 |
super(writer, annotationType); |
57 |
} |
|
58 |
||
59 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
60 |
* {@inheritDoc} |
10 | 61 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
62 |
public Content getMemberSummaryHeader(ClassDoc classDoc, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
63 |
Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
64 |
memberSummaryTree.addContent( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
65 |
HtmlConstants.START_OF_ANNOTATION_TYPE_REQUIRED_MEMBER_SUMMARY); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
66 |
Content memberTree = writer.getMemberTreeHeader(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
67 |
writer.addSummaryHeader(this, classDoc, memberTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
68 |
return memberTree; |
10 | 69 |
} |
70 |
||
71 |
/** |
|
72 |
* {@inheritDoc} |
|
73 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
74 |
public void addAnnotationDetailsTreeHeader(ClassDoc classDoc, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
75 |
Content memberDetailsTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
76 |
if (!writer.printedAnnotationHeading) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
77 |
memberDetailsTree.addContent(writer.getMarkerAnchor( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
78 |
"annotation_type_element_detail")); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
79 |
Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
80 |
writer.annotationTypeDetailsLabel); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
81 |
memberDetailsTree.addContent(heading); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
82 |
writer.printedAnnotationHeading = true; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
83 |
} |
10 | 84 |
} |
85 |
||
86 |
/** |
|
87 |
* {@inheritDoc} |
|
88 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
89 |
public Content getAnnotationDocTreeHeader(MemberDoc member, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
90 |
Content annotationDetailsTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
91 |
annotationDetailsTree.addContent( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
92 |
writer.getMarkerAnchor(member.name() + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
93 |
((ExecutableMemberDoc) member).signature())); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
94 |
Content annotationDocTree = writer.getMemberTreeHeader(); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
95 |
Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
96 |
heading.addContent(member.name()); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
97 |
annotationDocTree.addContent(heading); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
98 |
return annotationDocTree; |
10 | 99 |
} |
100 |
||
101 |
/** |
|
102 |
* {@inheritDoc} |
|
103 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
104 |
public Content getSignature(MemberDoc member) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
105 |
Content pre = new HtmlTree(HtmlTag.PRE); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
106 |
writer.addAnnotationInfo(member, pre); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
107 |
addModifiers(member, pre); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
108 |
Content link = new RawHtml( |
14542 | 109 |
writer.getLink(new LinkInfoImpl(configuration, |
110 |
LinkInfoImpl.CONTEXT_MEMBER, getType(member)))); |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
111 |
pre.addContent(link); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
112 |
pre.addContent(writer.getSpace()); |
14542 | 113 |
if (configuration.linksource) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
114 |
Content memberName = new StringContent(member.name()); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
115 |
writer.addSrcLink(member, memberName, pre); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
116 |
} else { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
117 |
addName(member.name(), pre); |
10 | 118 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
119 |
return pre; |
10 | 120 |
} |
121 |
||
122 |
/** |
|
123 |
* {@inheritDoc} |
|
124 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
125 |
public void addDeprecated(MemberDoc member, Content annotationDocTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
126 |
addDeprecatedInfo(member, annotationDocTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
127 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
128 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
129 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
130 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
131 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
132 |
public void addComments(MemberDoc member, Content annotationDocTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
133 |
addComment(member, annotationDocTree); |
10 | 134 |
} |
135 |
||
136 |
/** |
|
137 |
* {@inheritDoc} |
|
138 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
139 |
public void addTags(MemberDoc member, Content annotationDocTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
140 |
writer.addTagsInfo(member, annotationDocTree); |
10 | 141 |
} |
142 |
||
143 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
144 |
* {@inheritDoc} |
10 | 145 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
146 |
public Content getAnnotationDetails(Content annotationDetailsTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
147 |
return getMemberTree(annotationDetailsTree); |
10 | 148 |
} |
149 |
||
150 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
151 |
* {@inheritDoc} |
10 | 152 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
153 |
public Content getAnnotationDoc(Content annotationDocTree, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
154 |
boolean isLastContent) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
155 |
return getMemberTree(annotationDocTree, isLastContent); |
10 | 156 |
} |
157 |
||
158 |
/** |
|
159 |
* Close the writer. |
|
160 |
*/ |
|
161 |
public void close() throws IOException { |
|
162 |
writer.close(); |
|
163 |
} |
|
164 |
||
165 |
/** |
|
166 |
* {@inheritDoc} |
|
167 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
168 |
public void addSummaryLabel(Content memberTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
169 |
Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
170 |
writer.getResource("doclet.Annotation_Type_Required_Member_Summary")); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
171 |
memberTree.addContent(label); |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
172 |
} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
173 |
|
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
174 |
/** |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
175 |
* {@inheritDoc} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
176 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
177 |
public String getTableSummary() { |
14542 | 178 |
return configuration.getText("doclet.Member_Table_Summary", |
179 |
configuration.getText("doclet.Annotation_Type_Required_Member_Summary"), |
|
180 |
configuration.getText("doclet.annotation_type_required_members")); |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
181 |
} |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
182 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
183 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
184 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
185 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
186 |
public String getCaption() { |
14542 | 187 |
return configuration.getText("doclet.Annotation_Type_Required_Members"); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
188 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
189 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
190 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
191 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
192 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
193 |
public String[] getSummaryTableHeader(ProgramElementDoc member) { |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
194 |
String[] header = new String[] { |
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
195 |
writer.getModifierTypeHeader(), |
14542 | 196 |
configuration.getText("doclet.0_and_1", |
197 |
configuration.getText("doclet.Annotation_Type_Required_Member"), |
|
198 |
configuration.getText("doclet.Description")) |
|
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
2216
diff
changeset
|
199 |
}; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
200 |
return header; |
10 | 201 |
} |
202 |
||
203 |
/** |
|
204 |
* {@inheritDoc} |
|
205 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
206 |
public void addSummaryAnchor(ClassDoc cd, Content memberTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
207 |
memberTree.addContent(writer.getMarkerAnchor( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
208 |
"annotation_type_required_element_summary")); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
209 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
210 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
211 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
212 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
213 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
214 |
public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { |
10 | 215 |
} |
216 |
||
217 |
/** |
|
218 |
* {@inheritDoc} |
|
219 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
220 |
public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) { |
10 | 221 |
} |
222 |
||
223 |
/** |
|
224 |
* {@inheritDoc} |
|
225 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
226 |
protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
227 |
Content tdSummary) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
228 |
Content strong = HtmlTree.STRONG(new RawHtml( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
229 |
writer.getDocLink(context, (MemberDoc) member, member.name(), false))); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
230 |
Content code = HtmlTree.CODE(strong); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
231 |
tdSummary.addContent(code); |
10 | 232 |
} |
233 |
||
234 |
/** |
|
235 |
* {@inheritDoc} |
|
236 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
237 |
protected void addInheritedSummaryLink(ClassDoc cd, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
238 |
ProgramElementDoc member, Content linksTree) { |
10 | 239 |
//Not applicable. |
240 |
} |
|
241 |
||
242 |
/** |
|
243 |
* {@inheritDoc} |
|
244 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
245 |
protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) { |
10 | 246 |
MemberDoc m = (MemberDoc)member; |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
247 |
addModifierAndType(m, getType(m), tdSummaryType); |
10 | 248 |
} |
249 |
||
250 |
/** |
|
251 |
* {@inheritDoc} |
|
252 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
253 |
protected Content getDeprecatedLink(ProgramElementDoc member) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
254 |
return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
255 |
(MemberDoc) member, ((MemberDoc)member).qualifiedName()); |
10 | 256 |
} |
257 |
||
258 |
/** |
|
259 |
* {@inheritDoc} |
|
260 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
261 |
protected Content getNavSummaryLink(ClassDoc cd, boolean link) { |
10 | 262 |
if (link) { |
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14260
diff
changeset
|
263 |
return writer.getHyperLink("annotation_type_required_element_summary", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
264 |
writer.getResource("doclet.navAnnotationTypeRequiredMember")); |
10 | 265 |
} else { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
266 |
return writer.getResource("doclet.navAnnotationTypeRequiredMember"); |
10 | 267 |
} |
268 |
} |
|
269 |
||
270 |
/** |
|
271 |
* {@inheritDoc} |
|
272 |
*/ |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
273 |
protected void addNavDetailLink(boolean link, Content liNav) { |
10 | 274 |
if (link) { |
14357
faf9cde2817b
8000741: refactor javadoc to use abstraction to handle relative paths
jjg
parents:
14260
diff
changeset
|
275 |
liNav.addContent(writer.getHyperLink("annotation_type_element_detail", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
276 |
writer.getResource("doclet.navAnnotationTypeMember"))); |
10 | 277 |
} else { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
278 |
liNav.addContent(writer.getResource("doclet.navAnnotationTypeMember")); |
10 | 279 |
} |
280 |
} |
|
281 |
||
282 |
private Type getType(MemberDoc member) { |
|
283 |
if (member instanceof FieldDoc) { |
|
284 |
return ((FieldDoc) member).type(); |
|
285 |
} else { |
|
286 |
return ((MethodDoc) member).returnType(); |
|
287 |
} |
|
288 |
} |
|
289 |
} |