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

changeset 233
5240b1120530
parent 182
47a62d8d98b4
child 243
edd944553131
equal deleted inserted replaced
232:1fbc1cc6e260 233:5240b1120530
23 * have any questions. 23 * have any questions.
24 */ 24 */
25 25
26 package com.sun.tools.doclets.formats.html; 26 package com.sun.tools.doclets.formats.html;
27 27
28 import java.io.*;
29
30 import com.sun.javadoc.*;
28 import com.sun.tools.doclets.internal.toolkit.*; 31 import com.sun.tools.doclets.internal.toolkit.*;
29 import com.sun.tools.doclets.internal.toolkit.taglets.*;
30 import com.sun.tools.doclets.internal.toolkit.util.*; 32 import com.sun.tools.doclets.internal.toolkit.util.*;
31 import com.sun.javadoc.*;
32
33 import java.io.*;
34 33
35 /** 34 /**
36 * Writes field documentation in HTML format. 35 * Writes field documentation in HTML format.
37 * 36 *
38 * @author Robert Field 37 * @author Robert Field
154 writer.printSrcLink(field, field.name()); 153 writer.printSrcLink(field, field.name());
155 } else { 154 } else {
156 strong(field.name()); 155 strong(field.name());
157 } 156 }
158 writer.preEnd(); 157 writer.preEnd();
159 writer.dl(); 158 assert !writer.getMemberDetailsListPrinted();
160 } 159 }
161 160
162 /** 161 /**
163 * Write the deprecated output for the given field. 162 * Write the deprecated output for the given field.
164 * 163 *
165 * @param field the field being documented. 164 * @param field the field being documented.
166 */ 165 */
167 public void writeDeprecated(FieldDoc field) { 166 public void writeDeprecated(FieldDoc field) {
168 print(((TagletOutputImpl) 167 printDeprecated(field);
169 (new DeprecatedTaglet()).getTagletOutput(field,
170 writer.getTagletWriterInstance(false))).toString());
171 } 168 }
172 169
173 /** 170 /**
174 * Write the comments for the given field. 171 * Write the comments for the given field.
175 * 172 *
176 * @param field the field being documented. 173 * @param field the field being documented.
177 */ 174 */
178 public void writeComments(FieldDoc field) { 175 public void writeComments(FieldDoc field) {
179 ClassDoc holder = field.containingClass(); 176 ClassDoc holder = field.containingClass();
180 if (field.inlineTags().length > 0) { 177 if (field.inlineTags().length > 0) {
178 writer.printMemberDetailsListStartTag();
181 if (holder.equals(classdoc) || 179 if (holder.equals(classdoc) ||
182 (! (holder.isPublic() || Util.isLinkable(holder, configuration())))) { 180 (! (holder.isPublic() || Util.isLinkable(holder, configuration())))) {
183 writer.dd(); 181 writer.dd();
184 writer.printInlineComment(field); 182 writer.printInlineComment(field);
183 writer.ddEnd();
185 } else { 184 } else {
186 String classlink = writer.codeText( 185 String classlink = writer.codeText(
187 writer.getDocLink(LinkInfoImpl.CONTEXT_FIELD_DOC_COPY, 186 writer.getDocLink(LinkInfoImpl.CONTEXT_FIELD_DOC_COPY,
188 holder, field, 187 holder, field,
189 holder.isIncluded() ? 188 holder.isIncluded() ?
194 "doclet.Description_From_Class" : 193 "doclet.Description_From_Class" :
195 "doclet.Description_From_Interface", classlink)); 194 "doclet.Description_From_Interface", classlink));
196 writer.ddEnd(); 195 writer.ddEnd();
197 writer.dd(); 196 writer.dd();
198 writer.printInlineComment(field); 197 writer.printInlineComment(field);
198 writer.ddEnd();
199 } 199 }
200 } 200 }
201 } 201 }
202 202
203 /** 203 /**
211 211
212 /** 212 /**
213 * Write the field footer. 213 * Write the field footer.
214 */ 214 */
215 public void writeFieldFooter() { 215 public void writeFieldFooter() {
216 writer.dlEnd(); 216 printMemberFooter();
217 } 217 }
218 218
219 /** 219 /**
220 * Write the footer for the field documentation. 220 * Write the footer for the field documentation.
221 * 221 *

mercurial