author | ksrini |
Sun, 15 Jun 2014 08:41:57 -0700 | |
changeset 25454 | 376a52c9540c |
parent 22163 | 3651128c74eb |
permissions | -rw-r--r-- |
10 | 1 |
/* |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
22163
diff
changeset
|
2 |
* Copyright (c) 2003, 2014, 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.internal.toolkit.builders; |
|
27 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
28 |
import java.util.*; |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
29 |
import java.text.MessageFormat; |
14258 | 30 |
|
31 |
import com.sun.javadoc.*; |
|
10 | 32 |
import com.sun.tools.doclets.internal.toolkit.*; |
14258 | 33 |
import com.sun.tools.doclets.internal.toolkit.util.*; |
10 | 34 |
|
35 |
/** |
|
36 |
* Builds the member summary. |
|
37 |
* |
|
14260
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
38 |
* <p><b>This is NOT part of any supported API. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
39 |
* If you write code that depends on this, you do so at your own risk. |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
40 |
* This code and its internal interfaces are subject to change or |
727a84636f12
8000665: fix "internal API" comments on javadoc files
jjg
parents:
14259
diff
changeset
|
41 |
* deletion without notice.</b> |
10 | 42 |
* |
43 |
* @author Jamie Ho |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
44 |
* @author Bhavesh Patel (Modified) |
10 | 45 |
* @since 1.5 |
46 |
*/ |
|
47 |
public class MemberSummaryBuilder extends AbstractMemberBuilder { |
|
48 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
49 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
50 |
* The XML root for this builder. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
51 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
52 |
public static final String NAME = "MemberSummary"; |
10 | 53 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
54 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
55 |
* The visible members for the given class. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
56 |
*/ |
14542 | 57 |
private final VisibleMemberMap[] visibleMemberMaps; |
10 | 58 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
59 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
60 |
* The member summary writers for the given class. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
61 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
62 |
private MemberSummaryWriter[] memberSummaryWriters; |
10 | 63 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
64 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
65 |
* The type being documented. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
66 |
*/ |
14542 | 67 |
private final ClassDoc classDoc; |
10 | 68 |
|
14542 | 69 |
/** |
70 |
* Construct a new MemberSummaryBuilder. |
|
71 |
* |
|
72 |
* @param classWriter the writer for the class whose members are being |
|
73 |
* summarized. |
|
74 |
* @param context the build context. |
|
75 |
*/ |
|
76 |
private MemberSummaryBuilder(Context context, ClassDoc classDoc) { |
|
77 |
super(context); |
|
78 |
this.classDoc = classDoc; |
|
79 |
visibleMemberMaps = |
|
80 |
new VisibleMemberMap[VisibleMemberMap.NUM_MEMBER_TYPES]; |
|
81 |
for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { |
|
82 |
visibleMemberMaps[i] = |
|
83 |
new VisibleMemberMap( |
|
84 |
classDoc, |
|
85 |
i, |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
86 |
configuration); |
14542 | 87 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
88 |
} |
10 | 89 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
90 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
91 |
* Construct a new MemberSummaryBuilder. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
92 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
93 |
* @param classWriter the writer for the class whose members are being |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
94 |
* summarized. |
14542 | 95 |
* @param context the build context. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
96 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
97 |
public static MemberSummaryBuilder getInstance( |
14542 | 98 |
ClassWriter classWriter, Context context) |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
99 |
throws Exception { |
14542 | 100 |
MemberSummaryBuilder builder = new MemberSummaryBuilder(context, |
101 |
classWriter.getClassDoc()); |
|
102 |
builder.memberSummaryWriters = |
|
103 |
new MemberSummaryWriter[VisibleMemberMap.NUM_MEMBER_TYPES]; |
|
104 |
WriterFactory wf = context.configuration.getWriterFactory(); |
|
105 |
for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { |
|
106 |
builder.memberSummaryWriters[i] = |
|
107 |
builder.visibleMemberMaps[i].noVisibleMembers() ? |
|
108 |
null : |
|
109 |
wf.getMemberSummaryWriter(classWriter, i); |
|
110 |
} |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
111 |
return builder; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
112 |
} |
10 | 113 |
|
114 |
/** |
|
115 |
* Construct a new MemberSummaryBuilder. |
|
116 |
* |
|
117 |
* @param annotationTypeWriter the writer for the class whose members are |
|
118 |
* being summarized. |
|
119 |
* @param configuration the current configuration of the doclet. |
|
120 |
*/ |
|
121 |
public static MemberSummaryBuilder getInstance( |
|
14542 | 122 |
AnnotationTypeWriter annotationTypeWriter, Context context) |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
123 |
throws Exception { |
14542 | 124 |
MemberSummaryBuilder builder = new MemberSummaryBuilder(context, |
125 |
annotationTypeWriter.getAnnotationTypeDoc()); |
|
126 |
builder.memberSummaryWriters = |
|
127 |
new MemberSummaryWriter[VisibleMemberMap.NUM_MEMBER_TYPES]; |
|
128 |
WriterFactory wf = context.configuration.getWriterFactory(); |
|
10 | 129 |
for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { |
14542 | 130 |
builder.memberSummaryWriters[i] = |
131 |
builder.visibleMemberMaps[i].noVisibleMembers()? |
|
132 |
null : |
|
133 |
wf.getMemberSummaryWriter( |
|
134 |
annotationTypeWriter, i); |
|
10 | 135 |
} |
14542 | 136 |
return builder; |
10 | 137 |
} |
138 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
139 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
140 |
* {@inheritDoc} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
141 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
142 |
public String getName() { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
143 |
return NAME; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
144 |
} |
10 | 145 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
146 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
147 |
* Return the specified visible member map. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
148 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
149 |
* @param type the type of visible member map to return. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
150 |
* @return the specified visible member map. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
151 |
* @throws ArrayIndexOutOfBoundsException when the type is invalid. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
152 |
* @see VisibleMemberMap |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
153 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
154 |
public VisibleMemberMap getVisibleMemberMap(int type) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
155 |
return visibleMemberMaps[type]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
156 |
} |
10 | 157 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
158 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
159 |
* Return the specified member summary writer. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
160 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
161 |
* @param type the type of member summary writer to return. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
162 |
* @return the specified member summary writer. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
163 |
* @throws ArrayIndexOutOfBoundsException when the type is invalid. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
164 |
* @see VisibleMemberMap |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
165 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
166 |
public MemberSummaryWriter getMemberSummaryWriter(int type) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
167 |
return memberSummaryWriters[type]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
168 |
} |
10 | 169 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
170 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
171 |
* Returns a list of methods that will be documented for the given class. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
172 |
* This information can be used for doclet specific documentation |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
173 |
* generation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
174 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
175 |
* @param type the type of members to return. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
176 |
* @return a list of methods that will be documented. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
177 |
* @see VisibleMemberMap |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
178 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
179 |
public List<ProgramElementDoc> members(int type) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
180 |
return visibleMemberMaps[type].getLeafClassMembers(configuration); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
181 |
} |
10 | 182 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
183 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
184 |
* Return true it there are any members to summarize. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
185 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
186 |
* @return true if there are any members to summarize. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
187 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
188 |
public boolean hasMembersToDocument() { |
10 | 189 |
if (classDoc instanceof AnnotationTypeDoc) { |
190 |
return ((AnnotationTypeDoc) classDoc).elements().length > 0; |
|
191 |
} |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
192 |
for (int i = 0; i < VisibleMemberMap.NUM_MEMBER_TYPES; i++) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
193 |
VisibleMemberMap members = visibleMemberMaps[i]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
194 |
if (!members.noVisibleMembers()) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
195 |
return true; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
196 |
} |
10 | 197 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
198 |
return false; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
199 |
} |
10 | 200 |
|
201 |
/** |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
202 |
* Build the summary for the enum constants. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
203 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
204 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
205 |
* @param memberSummaryTree the content tree to which the documentation will be added |
10 | 206 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
207 |
public void buildEnumConstantsSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
208 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
209 |
memberSummaryWriters[VisibleMemberMap.ENUM_CONSTANTS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
210 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
211 |
visibleMemberMaps[VisibleMemberMap.ENUM_CONSTANTS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
212 |
addSummary(writer, visibleMemberMap, false, memberSummaryTree); |
10 | 213 |
} |
214 |
||
215 |
/** |
|
20237
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
216 |
* Build the summary for fields. |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
217 |
* |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
218 |
* @param node the XML element that specifies which components to document |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
219 |
* @param memberSummaryTree the content tree to which the documentation will be added |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
220 |
*/ |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
221 |
public void buildAnnotationTypeFieldsSummary(XMLNode node, Content memberSummaryTree) { |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
222 |
MemberSummaryWriter writer = |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
223 |
memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_FIELDS]; |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
224 |
VisibleMemberMap visibleMemberMap = |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
225 |
visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_FIELDS]; |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
226 |
addSummary(writer, visibleMemberMap, false, memberSummaryTree); |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
227 |
} |
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
228 |
|
b6d89903c867
8015249: javadoc fails to document static final fields in annotation types
bpatel
parents:
18659
diff
changeset
|
229 |
/** |
10 | 230 |
* Build the summary for the optional members. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
231 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
232 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
233 |
* @param memberSummaryTree the content tree to which the documentation will be added |
10 | 234 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
235 |
public void buildAnnotationTypeOptionalMemberSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
236 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
237 |
memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
238 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
239 |
visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
240 |
addSummary(writer, visibleMemberMap, false, memberSummaryTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
241 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
242 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
243 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
244 |
* Build the summary for the optional members. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
245 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
246 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
247 |
* @param memberSummaryTree the content tree to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
248 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
249 |
public void buildAnnotationTypeRequiredMemberSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
250 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
251 |
memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
252 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
253 |
visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
254 |
addSummary(writer, visibleMemberMap, false, memberSummaryTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
255 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
256 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
257 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
258 |
* Build the summary for the fields. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
259 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
260 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
261 |
* @param memberSummaryTree the content tree to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
262 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
263 |
public void buildFieldsSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
264 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
265 |
memberSummaryWriters[VisibleMemberMap.FIELDS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
266 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
267 |
visibleMemberMaps[VisibleMemberMap.FIELDS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
268 |
addSummary(writer, visibleMemberMap, true, memberSummaryTree); |
10 | 269 |
} |
270 |
||
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
271 |
/** |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
272 |
* Build the summary for the fields. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
273 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
274 |
public void buildPropertiesSummary(XMLNode node, Content memberSummaryTree) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
275 |
MemberSummaryWriter writer = |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
276 |
memberSummaryWriters[VisibleMemberMap.PROPERTIES]; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
277 |
VisibleMemberMap visibleMemberMap = |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
278 |
visibleMemberMaps[VisibleMemberMap.PROPERTIES]; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
279 |
addSummary(writer, visibleMemberMap, true, memberSummaryTree); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
280 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
281 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
282 |
/** |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
283 |
* Build the summary for the nested classes. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
284 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
285 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
286 |
* @param memberSummaryTree the content tree to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
287 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
288 |
public void buildNestedClassesSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
289 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
290 |
memberSummaryWriters[VisibleMemberMap.INNERCLASSES]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
291 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
292 |
visibleMemberMaps[VisibleMemberMap.INNERCLASSES]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
293 |
addSummary(writer, visibleMemberMap, true, memberSummaryTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
294 |
} |
10 | 295 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
296 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
297 |
* Build the method summary. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
298 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
299 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
300 |
* @param memberSummaryTree the content tree to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
301 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
302 |
public void buildMethodsSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
303 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
304 |
memberSummaryWriters[VisibleMemberMap.METHODS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
305 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
306 |
visibleMemberMaps[VisibleMemberMap.METHODS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
307 |
addSummary(writer, visibleMemberMap, true, memberSummaryTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
308 |
} |
10 | 309 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
310 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
311 |
* Build the constructor summary. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
312 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
313 |
* @param node the XML element that specifies which components to document |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
314 |
* @param memberSummaryTree the content tree to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
315 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
316 |
public void buildConstructorsSummary(XMLNode node, Content memberSummaryTree) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
317 |
MemberSummaryWriter writer = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
318 |
memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
319 |
VisibleMemberMap visibleMemberMap = |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
320 |
visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS]; |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
321 |
addSummary(writer, visibleMemberMap, false, memberSummaryTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
322 |
} |
10 | 323 |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
324 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
325 |
* Build the member summary for the given members. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
326 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
327 |
* @param writer the summary writer to write the output. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
328 |
* @param visibleMemberMap the given members to summarize. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
329 |
* @param summaryTreeList list of content trees to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
330 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
331 |
private void buildSummary(MemberSummaryWriter writer, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
332 |
VisibleMemberMap visibleMemberMap, LinkedList<Content> summaryTreeList) { |
22163 | 333 |
List<ProgramElementDoc> members = new ArrayList<>(visibleMemberMap.getLeafClassMembers( |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
334 |
configuration)); |
10 | 335 |
if (members.size() > 0) { |
336 |
Collections.sort(members); |
|
22163 | 337 |
List<Content> tableContents = new LinkedList<>(); |
10 | 338 |
for (int i = 0; i < members.size(); i++) { |
868 | 339 |
ProgramElementDoc member = members.get(i); |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
340 |
final ProgramElementDoc propertyDoc = |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
341 |
visibleMemberMap.getPropertyMemberDoc(member); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
342 |
if (propertyDoc != null) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
343 |
processProperty(visibleMemberMap, member, propertyDoc); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
344 |
} |
10 | 345 |
Tag[] firstSentenceTags = member.firstSentenceTags(); |
346 |
if (member instanceof MethodDoc && firstSentenceTags.length == 0) { |
|
347 |
//Inherit comments from overriden or implemented method if |
|
348 |
//necessary. |
|
349 |
DocFinder.Output inheritedDoc = |
|
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
22163
diff
changeset
|
350 |
DocFinder.search(configuration, new DocFinder.Input((MethodDoc) member)); |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14542
diff
changeset
|
351 |
if (inheritedDoc.holder != null |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14542
diff
changeset
|
352 |
&& inheritedDoc.holder.firstSentenceTags().length > 0) { |
10 | 353 |
firstSentenceTags = inheritedDoc.holder.firstSentenceTags(); |
354 |
} |
|
355 |
} |
|
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14542
diff
changeset
|
356 |
writer.addMemberSummary(classDoc, member, firstSentenceTags, |
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14542
diff
changeset
|
357 |
tableContents, i); |
10 | 358 |
} |
14549
0599d73bf1da
8002304: Group methods by types in methods summary section
bpatel
parents:
14542
diff
changeset
|
359 |
summaryTreeList.add(writer.getSummaryTableTree(classDoc, tableContents)); |
10 | 360 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
361 |
} |
10 | 362 |
|
363 |
/** |
|
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
364 |
* Process the property method, property setter and/or property getter |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
365 |
* comment text so that it contains the documentation from |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
366 |
* the property field. The method adds the leading sentence, |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
367 |
* copied documentation including the defaultValue tag and |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
368 |
* the see tags if the appropriate property getter and setter are |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
369 |
* available. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
370 |
* |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
371 |
* @param visibleMemberMap the members information. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
372 |
* @param member the member which is to be augmented. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
373 |
* @param propertyDoc the original property documentation. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
374 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
375 |
private void processProperty(VisibleMemberMap visibleMemberMap, |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
376 |
ProgramElementDoc member, |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
377 |
ProgramElementDoc propertyDoc) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
378 |
StringBuilder commentTextBuilder = new StringBuilder(); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
379 |
final boolean isSetter = isSetter(member); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
380 |
final boolean isGetter = isGetter(member); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
381 |
if (isGetter || isSetter) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
382 |
//add "[GS]ets the value of the property PROPERTY_NAME." |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
383 |
if (isSetter) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
384 |
commentTextBuilder.append( |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
385 |
MessageFormat.format( |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
386 |
configuration.getText("doclet.PropertySetterWithName"), |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
22163
diff
changeset
|
387 |
utils.propertyNameFromMethodName(configuration, member.name()))); |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
388 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
389 |
if (isGetter) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
390 |
commentTextBuilder.append( |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
391 |
MessageFormat.format( |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
392 |
configuration.getText("doclet.PropertyGetterWithName"), |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
22163
diff
changeset
|
393 |
utils.propertyNameFromMethodName(configuration, member.name()))); |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
394 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
395 |
if (propertyDoc.commentText() != null |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
396 |
&& !propertyDoc.commentText().isEmpty()) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
397 |
commentTextBuilder.append(" \n @propertyDescription "); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
398 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
399 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
400 |
commentTextBuilder.append(propertyDoc.commentText()); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
401 |
|
18659
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
402 |
// copy certain tags |
22163 | 403 |
List<Tag> allTags = new LinkedList<>(); |
18659
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
404 |
String[] tagNames = {"@defaultValue", "@since"}; |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
405 |
for (String tagName: tagNames) { |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
406 |
Tag[] tags = propertyDoc.tags(tagName); |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
407 |
if (tags != null) { |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
408 |
allTags.addAll(Arrays.asList(tags)); |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
409 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
410 |
} |
18659
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
411 |
for (Tag tag: allTags) { |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
412 |
commentTextBuilder.append("\n") |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
413 |
.append(tag.name()) |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
414 |
.append(" ") |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
415 |
.append(tag.text()); |
5fe5650da7f9
8015720: since tag isn't copied while generating JavaFX documentation
janvalenta
parents:
16319
diff
changeset
|
416 |
} |
16319
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
417 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
418 |
//add @see tags |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
419 |
if (!isGetter && !isSetter) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
420 |
MethodDoc getter = (MethodDoc) visibleMemberMap.getGetterForProperty(member); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
421 |
MethodDoc setter = (MethodDoc) visibleMemberMap.getSetterForProperty(member); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
422 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
423 |
if ((null != getter) |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
424 |
&& (commentTextBuilder.indexOf("@see #" + getter.name()) == -1)) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
425 |
commentTextBuilder.append("\n @see #") |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
426 |
.append(getter.name()) |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
427 |
.append("() "); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
428 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
429 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
430 |
if ((null != setter) |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
431 |
&& (commentTextBuilder.indexOf("@see #" + setter.name()) == -1)) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
432 |
String typeName = setter.parameters()[0].typeName(); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
433 |
// Removal of type parameters and package information. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
434 |
typeName = typeName.split("<")[0]; |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
435 |
if (typeName.contains(".")) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
436 |
typeName = typeName.substring(typeName.lastIndexOf(".") + 1); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
437 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
438 |
commentTextBuilder.append("\n @see #").append(setter.name()); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
439 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
440 |
if (setter.parameters()[0].type().asTypeVariable() == null) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
441 |
commentTextBuilder.append("(").append(typeName).append(")"); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
442 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
443 |
commentTextBuilder.append(" \n"); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
444 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
445 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
446 |
member.setRawCommentText(commentTextBuilder.toString()); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
447 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
448 |
/** |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
449 |
* Test whether the method is a getter. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
450 |
* @param ped property method documentation. Needs to be either property |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
451 |
* method, property getter, or property setter. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
452 |
* @return true if the given documentation belongs to a getter. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
453 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
454 |
private boolean isGetter(ProgramElementDoc ped) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
455 |
final String pedName = ped.name(); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
456 |
return pedName.startsWith("get") || pedName.startsWith("is"); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
457 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
458 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
459 |
/** |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
460 |
* Test whether the method is a setter. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
461 |
* @param ped property method documentation. Needs to be either property |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
462 |
* method, property getter, or property setter. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
463 |
* @return true if the given documentation belongs to a setter. |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
464 |
*/ |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
465 |
private boolean isSetter(ProgramElementDoc ped) { |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
466 |
return ped.name().startsWith("set"); |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
467 |
} |
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
468 |
|
e586bfeb39c5
7112427: The doclet needs to be able to generate JavaFX documentation.
jjg
parents:
14549
diff
changeset
|
469 |
/** |
10 | 470 |
* Build the inherited member summary for the given methods. |
471 |
* |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
472 |
* @param writer the writer for this member summary. |
10 | 473 |
* @param visibleMemberMap the map for the members to document. |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
474 |
* @param summaryTreeList list of content trees to which the documentation will be added |
10 | 475 |
*/ |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
476 |
private void buildInheritedSummary(MemberSummaryWriter writer, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
477 |
VisibleMemberMap visibleMemberMap, LinkedList<Content> summaryTreeList) { |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
22153
diff
changeset
|
478 |
for (ClassDoc inhclass : visibleMemberMap.getVisibleClassesList()) { |
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
22153
diff
changeset
|
479 |
if (!(inhclass.isPublic() || |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
22163
diff
changeset
|
480 |
utils.isLinkable(inhclass, configuration))) { |
10 | 481 |
continue; |
482 |
} |
|
483 |
if (inhclass == classDoc) { |
|
484 |
continue; |
|
485 |
} |
|
868 | 486 |
List<ProgramElementDoc> inhmembers = visibleMemberMap.getMembersFor(inhclass); |
10 | 487 |
if (inhmembers.size() > 0) { |
488 |
Collections.sort(inhmembers); |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
489 |
Content inheritedTree = writer.getInheritedSummaryHeader(inhclass); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
490 |
Content linksTree = writer.getInheritedSummaryLinksTree(); |
10 | 491 |
for (int j = 0; j < inhmembers.size(); ++j) { |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
492 |
writer.addInheritedMemberSummary( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
493 |
inhclass.isPackagePrivate() && |
25454
376a52c9540c
8039028: [javadoc] refactor the usage of Util.java
ksrini
parents:
22163
diff
changeset
|
494 |
!utils.isLinkable(inhclass, configuration) ? |
10 | 495 |
classDoc : inhclass, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
496 |
inhmembers.get(j), |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
497 |
j == 0, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
498 |
j == inhmembers.size() - 1, linksTree); |
10 | 499 |
} |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
500 |
inheritedTree.addContent(linksTree); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
501 |
summaryTreeList.add(writer.getMemberTree(inheritedTree)); |
10 | 502 |
} |
503 |
} |
|
504 |
} |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
505 |
|
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
506 |
/** |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
507 |
* Add the summary for the documentation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
508 |
* |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
509 |
* @param writer the writer for this member summary. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
510 |
* @param visibleMemberMap the map for the members to document. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
511 |
* @param showInheritedSummary true if inherited summary should be documented |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
512 |
* @param memberSummaryTree the content tree to which the documentation will be added |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
513 |
*/ |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
514 |
private void addSummary(MemberSummaryWriter writer, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
515 |
VisibleMemberMap visibleMemberMap, boolean showInheritedSummary, |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
516 |
Content memberSummaryTree) { |
22163 | 517 |
LinkedList<Content> summaryTreeList = new LinkedList<>(); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
518 |
buildSummary(writer, visibleMemberMap, summaryTreeList); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
519 |
if (showInheritedSummary) |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
520 |
buildInheritedSummary(writer, visibleMemberMap, summaryTreeList); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
521 |
if (!summaryTreeList.isEmpty()) { |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
522 |
Content memberTree = writer.getMemberSummaryHeader( |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
523 |
classDoc, memberSummaryTree); |
22159
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
22153
diff
changeset
|
524 |
for (Content aSummaryTreeList : summaryTreeList) { |
682da512ec17
8030253: Update langtools to use strings-in-switch
briangoetz
parents:
22153
diff
changeset
|
525 |
memberTree.addContent(aSummaryTreeList); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
526 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
527 |
memberSummaryTree.addContent(writer.getMemberTree(memberTree)); |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
528 |
} |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5855
diff
changeset
|
529 |
} |
10 | 530 |
} |