182 * @param cd classdoc to be documented |
182 * @param cd classdoc to be documented |
183 * @return constant members header content |
183 * @return constant members header content |
184 */ |
184 */ |
185 public Content getConstantMembersHeader(ClassDoc cd) { |
185 public Content getConstantMembersHeader(ClassDoc cd) { |
186 //generate links backward only to public classes. |
186 //generate links backward only to public classes. |
187 String classlink = (cd.isPublic() || cd.isProtected()) ? |
187 Content classlink = (cd.isPublic() || cd.isProtected()) ? |
188 getLink(new LinkInfoImpl(configuration, |
188 getLink(new LinkInfoImpl(configuration, |
189 LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd)).toString() : |
189 LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd)) : |
190 cd.qualifiedName(); |
190 new StringContent(cd.qualifiedName()); |
191 String name = cd.containingPackage().name(); |
191 String name = cd.containingPackage().name(); |
192 if (name.length() > 0) { |
192 if (name.length() > 0) { |
193 return getClassName(name + "." + classlink); |
193 Content cb = new ContentBuilder(); |
|
194 cb.addContent(name); |
|
195 cb.addContent("."); |
|
196 cb.addContent(classlink); |
|
197 return getClassName(cb); |
194 } else { |
198 } else { |
195 return getClassName(classlink); |
199 return getClassName(classlink); |
196 } |
200 } |
197 } |
201 } |
198 |
202 |
200 * Get the class name in the table caption and the table header. |
204 * Get the class name in the table caption and the table header. |
201 * |
205 * |
202 * @param classStr the class name to print. |
206 * @param classStr the class name to print. |
203 * @return the table caption and header |
207 * @return the table caption and header |
204 */ |
208 */ |
205 protected Content getClassName(String classStr) { |
209 protected Content getClassName(Content classStr) { |
206 Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary, |
210 Content table = HtmlTree.TABLE(0, 3, 0, constantsTableSummary, |
207 getTableCaption(classStr)); |
211 getTableCaption(classStr)); |
208 table.addContent(getSummaryTableHeader(constantsTableHeader, "col")); |
212 table.addContent(getSummaryTableHeader(constantsTableHeader, "col")); |
209 return table; |
213 return table; |
210 } |
214 } |