src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java

changeset 1735
8ea30d59ac41
parent 1410
bfec2a1cc869
child 1736
74cd21f2c2fe
equal deleted inserted replaced
1734:8dd528992c15 1735:8ea30d59ac41
1 /* 1 /*
2 * Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 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 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
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 String classlink = (cd.isPublic() || cd.isProtected()) ?
188 getLink(new LinkInfoImpl(configuration, 188 getLink(new LinkInfoImpl(configuration,
189 LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, cd, false)) : 189 LinkInfoImpl.Kind.CONSTANT_SUMMARY, cd, false)) :
190 cd.qualifiedName(); 190 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 return getClassName(name + "." + classlink);
194 } else { 194 } else {
259 Content modifier = new StringContent(mods.nextToken()); 259 Content modifier = new StringContent(mods.nextToken());
260 code.addContent(modifier); 260 code.addContent(modifier);
261 code.addContent(getSpace()); 261 code.addContent(getSpace());
262 } 262 }
263 Content type = new RawHtml(getLink(new LinkInfoImpl(configuration, 263 Content type = new RawHtml(getLink(new LinkInfoImpl(configuration,
264 LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, member.type()))); 264 LinkInfoImpl.Kind.CONSTANT_SUMMARY, member.type())));
265 code.addContent(type); 265 code.addContent(type);
266 tdType.addContent(code); 266 tdType.addContent(code);
267 return tdType; 267 return tdType;
268 } 268 }
269 269
273 * @param member the field to be documented. 273 * @param member the field to be documented.
274 * @return the name column of the constant table row 274 * @return the name column of the constant table row
275 */ 275 */
276 private Content getNameColumn(FieldDoc member) { 276 private Content getNameColumn(FieldDoc member) {
277 Content nameContent = new RawHtml(getDocLink( 277 Content nameContent = new RawHtml(getDocLink(
278 LinkInfoImpl.CONTEXT_CONSTANT_SUMMARY, member, member.name(), false)); 278 LinkInfoImpl.Kind.CONSTANT_SUMMARY, member, member.name(), false));
279 Content code = HtmlTree.CODE(nameContent); 279 Content code = HtmlTree.CODE(nameContent);
280 return HtmlTree.TD(code); 280 return HtmlTree.TD(code);
281 } 281 }
282 282
283 /** 283 /**

mercurial