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

changeset 1735
8ea30d59ac41
parent 1410
bfec2a1cc869
child 1736
74cd21f2c2fe
equal deleted inserted replaced
1734:8dd528992c15 1735:8ea30d59ac41
1 /* 1 /*
2 * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 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
100 public Content getSignature(FieldDoc enumConstant) { 100 public Content getSignature(FieldDoc enumConstant) {
101 Content pre = new HtmlTree(HtmlTag.PRE); 101 Content pre = new HtmlTree(HtmlTag.PRE);
102 writer.addAnnotationInfo(enumConstant, pre); 102 writer.addAnnotationInfo(enumConstant, pre);
103 addModifiers(enumConstant, pre); 103 addModifiers(enumConstant, pre);
104 Content enumConstantLink = new RawHtml(writer.getLink(new LinkInfoImpl( 104 Content enumConstantLink = new RawHtml(writer.getLink(new LinkInfoImpl(
105 configuration, LinkInfoImpl.CONTEXT_MEMBER, enumConstant.type()))); 105 configuration, LinkInfoImpl.Kind.MEMBER, enumConstant.type())));
106 pre.addContent(enumConstantLink); 106 pre.addContent(enumConstantLink);
107 pre.addContent(" "); 107 pre.addContent(" ");
108 if (configuration.linksource) { 108 if (configuration.linksource) {
109 Content enumConstantName = new StringContent(enumConstant.name()); 109 Content enumConstantName = new StringContent(enumConstant.name());
110 writer.addSrcLink(enumConstant, enumConstantName, pre); 110 writer.addSrcLink(enumConstant, enumConstantName, pre);
218 } 218 }
219 219
220 /** 220 /**
221 * {@inheritDoc} 221 * {@inheritDoc}
222 */ 222 */
223 protected void addSummaryLink(int context, ClassDoc cd, ProgramElementDoc member, 223 protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
224 Content tdSummary) { 224 Content tdSummary) {
225 Content strong = HtmlTree.STRONG(new RawHtml( 225 Content strong = HtmlTree.STRONG(new RawHtml(
226 writer.getDocLink(context, (MemberDoc) member, member.name(), false))); 226 writer.getDocLink(context, (MemberDoc) member, member.name(), false)));
227 Content code = HtmlTree.CODE(strong); 227 Content code = HtmlTree.CODE(strong);
228 tdSummary.addContent(code); 228 tdSummary.addContent(code);
252 252
253 /** 253 /**
254 * {@inheritDoc} 254 * {@inheritDoc}
255 */ 255 */
256 protected Content getDeprecatedLink(ProgramElementDoc member) { 256 protected Content getDeprecatedLink(ProgramElementDoc member) {
257 return writer.getDocLink(LinkInfoImpl.CONTEXT_MEMBER, 257 return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
258 (MemberDoc) member, ((FieldDoc)member).qualifiedName()); 258 (MemberDoc) member, ((FieldDoc)member).qualifiedName());
259 } 259 }
260 260
261 /** 261 /**
262 * {@inheritDoc} 262 * {@inheritDoc}

mercurial