Tue, 25 Dec 2012 17:23:59 -0800
8004893: the javadoc/doclet needs to be updated to accommodate lambda changes
Reviewed-by: jjg
1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
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 *
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.
24 */
26 package com.sun.tools.doclets.formats.html;
28 import java.lang.reflect.Modifier;
29 import java.util.*;
31 import com.sun.javadoc.*;
32 import com.sun.tools.doclets.formats.html.markup.*;
33 import com.sun.tools.doclets.internal.toolkit.*;
34 import com.sun.tools.doclets.internal.toolkit.taglets.*;
35 import com.sun.tools.doclets.internal.toolkit.util.*;
37 /**
38 * The base class for member writers.
39 *
40 * <p><b>This is NOT part of any supported API.
41 * If you write code that depends on this, you do so at your own risk.
42 * This code and its internal interfaces are subject to change or
43 * deletion without notice.</b>
44 *
45 * @author Robert Field
46 * @author Atul M Dambalkar
47 * @author Jamie Ho (Re-write)
48 * @author Bhavesh Patel (Modified)
49 */
50 public abstract class AbstractMemberWriter {
52 protected final ConfigurationImpl configuration;
53 protected final SubWriterHolderWriter writer;
54 protected final ClassDoc classdoc;
55 protected Map<String,Integer> typeMap = new LinkedHashMap<String,Integer>();
56 protected Set<MethodTypes> methodTypes = EnumSet.noneOf(MethodTypes.class);
57 private int methodTypesOr = 0;
58 public final boolean nodepr;
60 protected boolean printedSummaryHeader = false;
62 public AbstractMemberWriter(SubWriterHolderWriter writer, ClassDoc classdoc) {
63 this.configuration = writer.configuration;
64 this.writer = writer;
65 this.nodepr = configuration.nodeprecated;
66 this.classdoc = classdoc;
67 }
69 public AbstractMemberWriter(SubWriterHolderWriter writer) {
70 this(writer, null);
71 }
73 /*** abstracts ***/
75 /**
76 * Add the summary label for the member.
77 *
78 * @param memberTree the content tree to which the label will be added
79 */
80 public abstract void addSummaryLabel(Content memberTree);
82 /**
83 * Get the summary for the member summary table.
84 *
85 * @return a string for the table summary
86 */
87 public abstract String getTableSummary();
89 /**
90 * Get the caption for the member summary table.
91 *
92 * @return a string for the table caption
93 */
94 public abstract String getCaption();
96 /**
97 * Get the summary table header for the member.
98 *
99 * @param member the member to be documented
100 * @return the summary table header
101 */
102 public abstract String[] getSummaryTableHeader(ProgramElementDoc member);
104 /**
105 * Add inherited summary lable for the member.
106 *
107 * @param cd the class doc to which to link to
108 * @param inheritedTree the content tree to which the inherited summary label will be added
109 */
110 public abstract void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree);
112 /**
113 * Add the anchor for the summary section of the member.
114 *
115 * @param cd the class doc to be documented
116 * @param memberTree the content tree to which the summary anchor will be added
117 */
118 public abstract void addSummaryAnchor(ClassDoc cd, Content memberTree);
120 /**
121 * Add the anchor for the inherited summary section of the member.
122 *
123 * @param cd the class doc to be documented
124 * @param inheritedTree the content tree to which the inherited summary anchor will be added
125 */
126 public abstract void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree);
128 /**
129 * Add the summary type for the member.
130 *
131 * @param member the member to be documented
132 * @param tdSummaryType the content tree to which the type will be added
133 */
134 protected abstract void addSummaryType(ProgramElementDoc member,
135 Content tdSummaryType);
137 /**
138 * Add the summary link for the member.
139 *
140 * @param cd the class doc to be documented
141 * @param member the member to be documented
142 * @param tdSummary the content tree to which the link will be added
143 */
144 protected void addSummaryLink(ClassDoc cd, ProgramElementDoc member,
145 Content tdSummary) {
146 addSummaryLink(LinkInfoImpl.CONTEXT_MEMBER, cd, member, tdSummary);
147 }
149 /**
150 * Add the summary link for the member.
151 *
152 * @param context the id of the context where the link will be printed
153 * @param cd the class doc to be documented
154 * @param member the member to be documented
155 * @param tdSummary the content tree to which the summary link will be added
156 */
157 protected abstract void addSummaryLink(int context,
158 ClassDoc cd, ProgramElementDoc member, Content tdSummary);
160 /**
161 * Add the inherited summary link for the member.
162 *
163 * @param cd the class doc to be documented
164 * @param member the member to be documented
165 * @param linksTree the content tree to which the inherited summary link will be added
166 */
167 protected abstract void addInheritedSummaryLink(ClassDoc cd,
168 ProgramElementDoc member, Content linksTree);
170 /**
171 * Get the deprecated link.
172 *
173 * @param member the member being linked to
174 * @return a content tree representing the link
175 */
176 protected abstract Content getDeprecatedLink(ProgramElementDoc member);
178 /**
179 * Get the navigation summary link.
180 *
181 * @param cd the class doc to be documented
182 * @param link true if its a link else the label to be printed
183 * @return a content tree for the navigation summary link.
184 */
185 protected abstract Content getNavSummaryLink(ClassDoc cd, boolean link);
187 /**
188 * Add the navigation detail link.
189 *
190 * @param link true if its a link else the label to be printed
191 * @param liNav the content tree to which the navigation detail link will be added
192 */
193 protected abstract void addNavDetailLink(boolean link, Content liNav);
195 /**
196 * Add the member name to the content tree and modifies the display length.
197 *
198 * @param name the member name to be added to the content tree.
199 * @param htmltree the content tree to which the name will be added.
200 */
201 protected void addName(String name, Content htmltree) {
202 htmltree.addContent(name);
203 writer.displayLength += name.length();
204 }
206 /**
207 * Return a string describing the access modifier flags.
208 * Don't include native or synchronized.
209 *
210 * The modifier names are returned in canonical order, as
211 * specified by <em>The Java Language Specification</em>.
212 */
213 protected String modifierString(MemberDoc member) {
214 int ms = member.modifierSpecifier();
215 int no = Modifier.NATIVE | Modifier.SYNCHRONIZED;
216 return Modifier.toString(ms & ~no);
217 }
219 protected String typeString(MemberDoc member) {
220 String type = "";
221 if (member instanceof MethodDoc) {
222 type = ((MethodDoc)member).returnType().toString();
223 } else if (member instanceof FieldDoc) {
224 type = ((FieldDoc)member).type().toString();
225 }
226 return type;
227 }
229 /**
230 * Add the modifier for the member.
231 *
232 * @param member the member for which teh modifier will be added.
233 * @param htmltree the content tree to which the modifier information will be added.
234 */
235 protected void addModifiers(MemberDoc member, Content htmltree) {
236 String mod = modifierString(member);
237 // According to JLS, we should not be showing public modifier for
238 // interface methods.
239 if ((member.isField() || member.isMethod()) &&
240 writer instanceof ClassWriterImpl &&
241 ((ClassWriterImpl) writer).getClassDoc().isInterface()) {
242 // This check for isDefault() and the default modifier needs to be
243 // added for it to appear on the method details section. Once the
244 // default modifier is added to the Modifier list on DocEnv and once
245 // it is updated to use the javax.lang.model.element.Modifier, we
246 // will need to remove this.
247 mod = (member.isMethod() && ((MethodDoc)member).isDefault()) ?
248 Util.replaceText(mod, "public", "default").trim() :
249 Util.replaceText(mod, "public", "").trim();
250 }
251 if(mod.length() > 0) {
252 htmltree.addContent(mod);
253 htmltree.addContent(writer.getSpace());
254 }
255 }
257 protected String makeSpace(int len) {
258 if (len <= 0) {
259 return "";
260 }
261 StringBuilder sb = new StringBuilder(len);
262 for(int i = 0; i < len; i++) {
263 sb.append(' ');
264 }
265 return sb.toString();
266 }
268 /**
269 * Add the modifier and type for the member in the member summary.
270 *
271 * @param member the member to add the type for
272 * @param type the type to add
273 * @param tdSummaryType the content tree to which the modified and type will be added
274 */
275 protected void addModifierAndType(ProgramElementDoc member, Type type,
276 Content tdSummaryType) {
277 HtmlTree code = new HtmlTree(HtmlTag.CODE);
278 addModifier(member, code);
279 if (type == null) {
280 if (member.isClass()) {
281 code.addContent("class");
282 } else {
283 code.addContent("interface");
284 }
285 code.addContent(writer.getSpace());
286 } else {
287 if (member instanceof ExecutableMemberDoc &&
288 ((ExecutableMemberDoc) member).typeParameters().length > 0) {
289 //Code to avoid ugly wrapping in member summary table.
290 int displayLength = ((AbstractExecutableMemberWriter) this).addTypeParameters(
291 (ExecutableMemberDoc) member, code);
292 if (displayLength > 10) {
293 code.addContent(new HtmlTree(HtmlTag.BR));
294 }
295 code.addContent(new RawHtml(
296 writer.getLink(new LinkInfoImpl(configuration,
297 LinkInfoImpl.CONTEXT_SUMMARY_RETURN_TYPE, type))));
298 } else {
299 code.addContent(new RawHtml(
300 writer.getLink(new LinkInfoImpl(configuration,
301 LinkInfoImpl.CONTEXT_SUMMARY_RETURN_TYPE, type))));
302 }
304 }
305 tdSummaryType.addContent(code);
306 }
308 /**
309 * Add the modifier for the member.
310 *
311 * @param member the member to add the type for
312 * @param code the content tree to which the modified will be added
313 */
314 private void addModifier(ProgramElementDoc member, Content code) {
315 if (member.isProtected()) {
316 code.addContent("protected ");
317 } else if (member.isPrivate()) {
318 code.addContent("private ");
319 } else if (!member.isPublic()) { // Package private
320 code.addContent(configuration.getText("doclet.Package_private"));
321 code.addContent(" ");
322 }
323 if (member.isMethod()) {
324 if (((MethodDoc)member).isAbstract()) {
325 code.addContent("abstract ");
326 }
327 // This check for isDefault() and the default modifier needs to be
328 // added for it to appear on the "Modifier and Type" column in the
329 // method summary section. Once the default modifier is added
330 // to the Modifier list on DocEnv and once it is updated to use the
331 // javax.lang.model.element.Modifier, we will need to remove this.
332 else if (((MethodDoc)member).isDefault()) {
333 code.addContent("default ");
334 }
335 }
336 if (member.isStatic()) {
337 code.addContent("static ");
338 }
339 }
341 /**
342 * Add the deprecated information for the given member.
343 *
344 * @param member the member being documented.
345 * @param contentTree the content tree to which the deprecated information will be added.
346 */
347 protected void addDeprecatedInfo(ProgramElementDoc member, Content contentTree) {
348 String output = (new DeprecatedTaglet()).getTagletOutput(member,
349 writer.getTagletWriterInstance(false)).toString().trim();
350 if (!output.isEmpty()) {
351 Content deprecatedContent = new RawHtml(output);
352 Content div = HtmlTree.DIV(HtmlStyle.block, deprecatedContent);
353 contentTree.addContent(div);
354 }
355 }
357 /**
358 * Add the comment for the given member.
359 *
360 * @param member the member being documented.
361 * @param htmltree the content tree to which the comment will be added.
362 */
363 protected void addComment(ProgramElementDoc member, Content htmltree) {
364 if (member.inlineTags().length > 0) {
365 writer.addInlineComment(member, htmltree);
366 }
367 }
369 protected String name(ProgramElementDoc member) {
370 return member.name();
371 }
373 /**
374 * Get the header for the section.
375 *
376 * @param member the member being documented.
377 * @return a header content for the section.
378 */
379 protected Content getHead(MemberDoc member) {
380 Content memberContent = new RawHtml(member.name());
381 Content heading = HtmlTree.HEADING(HtmlConstants.MEMBER_HEADING, memberContent);
382 return heading;
383 }
385 /**
386 * Return true if the given <code>ProgramElement</code> is inherited
387 * by the class that is being documented.
388 *
389 * @param ped The <code>ProgramElement</code> being checked.
390 * return true if the <code>ProgramElement</code> is being inherited and
391 * false otherwise.
392 */
393 protected boolean isInherited(ProgramElementDoc ped){
394 if(ped.isPrivate() || (ped.isPackagePrivate() &&
395 ! ped.containingPackage().equals(classdoc.containingPackage()))){
396 return false;
397 }
398 return true;
399 }
401 /**
402 * Add deprecated information to the documentation tree
403 *
404 * @param deprmembers list of deprecated members
405 * @param headingKey the caption for the deprecated members table
406 * @param tableSummary the summary for the deprecated members table
407 * @param tableHeader table headers for the deprecated members table
408 * @param contentTree the content tree to which the deprecated members table will be added
409 */
410 protected void addDeprecatedAPI(List<Doc> deprmembers, String headingKey,
411 String tableSummary, String[] tableHeader, Content contentTree) {
412 if (deprmembers.size() > 0) {
413 Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
414 writer.getTableCaption(configuration.getText(headingKey)));
415 table.addContent(writer.getSummaryTableHeader(tableHeader, "col"));
416 Content tbody = new HtmlTree(HtmlTag.TBODY);
417 for (int i = 0; i < deprmembers.size(); i++) {
418 ProgramElementDoc member =(ProgramElementDoc)deprmembers.get(i);
419 HtmlTree td = HtmlTree.TD(HtmlStyle.colOne, getDeprecatedLink(member));
420 if (member.tags("deprecated").length > 0)
421 writer.addInlineDeprecatedComment(member,
422 member.tags("deprecated")[0], td);
423 HtmlTree tr = HtmlTree.TR(td);
424 if (i%2 == 0)
425 tr.addStyle(HtmlStyle.altColor);
426 else
427 tr.addStyle(HtmlStyle.rowColor);
428 tbody.addContent(tr);
429 }
430 table.addContent(tbody);
431 Content li = HtmlTree.LI(HtmlStyle.blockList, table);
432 Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
433 contentTree.addContent(ul);
434 }
435 }
437 /**
438 * Add use information to the documentation tree.
439 *
440 * @param mems list of program elements for which the use information will be added
441 * @param heading the section heading
442 * @param tableSummary the summary for the use table
443 * @param contentTree the content tree to which the use information will be added
444 */
445 protected void addUseInfo(List<? extends ProgramElementDoc> mems,
446 String heading, String tableSummary, Content contentTree) {
447 if (mems == null) {
448 return;
449 }
450 List<? extends ProgramElementDoc> members = mems;
451 boolean printedUseTableHeader = false;
452 if (members.size() > 0) {
453 Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
454 writer.getTableCaption(heading));
455 Content tbody = new HtmlTree(HtmlTag.TBODY);
456 Iterator<? extends ProgramElementDoc> it = members.iterator();
457 for (int i = 0; it.hasNext(); i++) {
458 ProgramElementDoc pgmdoc = it.next();
459 ClassDoc cd = pgmdoc.containingClass();
460 if (!printedUseTableHeader) {
461 table.addContent(writer.getSummaryTableHeader(
462 this.getSummaryTableHeader(pgmdoc), "col"));
463 printedUseTableHeader = true;
464 }
465 HtmlTree tr = new HtmlTree(HtmlTag.TR);
466 if (i % 2 == 0) {
467 tr.addStyle(HtmlStyle.altColor);
468 } else {
469 tr.addStyle(HtmlStyle.rowColor);
470 }
471 HtmlTree tdFirst = new HtmlTree(HtmlTag.TD);
472 tdFirst.addStyle(HtmlStyle.colFirst);
473 writer.addSummaryType(this, pgmdoc, tdFirst);
474 tr.addContent(tdFirst);
475 HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
476 tdLast.addStyle(HtmlStyle.colLast);
477 if (cd != null && !(pgmdoc instanceof ConstructorDoc)
478 && !(pgmdoc instanceof ClassDoc)) {
479 HtmlTree name = new HtmlTree(HtmlTag.SPAN);
480 name.addStyle(HtmlStyle.strong);
481 name.addContent(cd.name() + ".");
482 tdLast.addContent(name);
483 }
484 addSummaryLink(pgmdoc instanceof ClassDoc ?
485 LinkInfoImpl.CONTEXT_CLASS_USE : LinkInfoImpl.CONTEXT_MEMBER,
486 cd, pgmdoc, tdLast);
487 writer.addSummaryLinkComment(this, pgmdoc, tdLast);
488 tr.addContent(tdLast);
489 tbody.addContent(tr);
490 }
491 table.addContent(tbody);
492 contentTree.addContent(table);
493 }
494 }
496 /**
497 * Add the navigation detail link.
498 *
499 * @param members the members to be linked
500 * @param liNav the content tree to which the navigation detail link will be added
501 */
502 protected void addNavDetailLink(List<?> members, Content liNav) {
503 addNavDetailLink(members.size() > 0 ? true : false, liNav);
504 }
506 /**
507 * Add the navigation summary link.
508 *
509 * @param members members to be linked
510 * @param visibleMemberMap the visible inherited members map
511 * @param liNav the content tree to which the navigation summary link will be added
512 */
513 protected void addNavSummaryLink(List<?> members,
514 VisibleMemberMap visibleMemberMap, Content liNav) {
515 if (members.size() > 0) {
516 liNav.addContent(getNavSummaryLink(null, true));
517 return;
518 }
519 ClassDoc icd = classdoc.superclass();
520 while (icd != null) {
521 List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
522 if (inhmembers.size() > 0) {
523 liNav.addContent(getNavSummaryLink(icd, true));
524 return;
525 }
526 icd = icd.superclass();
527 }
528 liNav.addContent(getNavSummaryLink(null, false));
529 }
531 protected void serialWarning(SourcePosition pos, String key, String a1, String a2) {
532 if (configuration.serialwarn) {
533 configuration.getDocletSpecificMsg().warning(pos, key, a1, a2);
534 }
535 }
537 public ProgramElementDoc[] eligibleMembers(ProgramElementDoc[] members) {
538 return nodepr? Util.excludeDeprecatedMembers(members): members;
539 }
541 /**
542 * Add the member summary for the given class.
543 *
544 * @param classDoc the class that is being documented
545 * @param member the member being documented
546 * @param firstSentenceTags the first sentence tags to be added to the summary
547 * @param tableContents the list of contents to which the documentation will be added
548 * @param counter the counter for determining id and style for the table row
549 */
550 public void addMemberSummary(ClassDoc classDoc, ProgramElementDoc member,
551 Tag[] firstSentenceTags, List<Content> tableContents, int counter) {
552 HtmlTree tdSummaryType = new HtmlTree(HtmlTag.TD);
553 tdSummaryType.addStyle(HtmlStyle.colFirst);
554 writer.addSummaryType(this, member, tdSummaryType);
555 HtmlTree tdSummary = new HtmlTree(HtmlTag.TD);
556 setSummaryColumnStyle(tdSummary);
557 addSummaryLink(classDoc, member, tdSummary);
558 writer.addSummaryLinkComment(this, member, firstSentenceTags, tdSummary);
559 HtmlTree tr = HtmlTree.TR(tdSummaryType);
560 tr.addContent(tdSummary);
561 if (member instanceof MethodDoc && !member.isAnnotationTypeElement()) {
562 int methodType = (member.isStatic()) ? MethodTypes.STATIC.value() :
563 MethodTypes.INSTANCE.value();
564 methodType = (classdoc.isInterface() || ((MethodDoc)member).isAbstract()) ?
565 methodType | MethodTypes.ABSTRACT.value() :
566 methodType | MethodTypes.CONCRETE.value();
567 if (((MethodDoc)member).isDefault()) {
568 methodType = methodType | MethodTypes.DEFAULT.value();
569 }
570 if (Util.isDeprecated(member) || Util.isDeprecated(classdoc)) {
571 methodType = methodType | MethodTypes.DEPRECATED.value();
572 }
573 methodTypesOr = methodTypesOr | methodType;
574 String tableId = "i" + counter;
575 typeMap.put(tableId, methodType);
576 tr.addAttr(HtmlAttr.ID, tableId);
577 }
578 if (counter%2 == 0)
579 tr.addStyle(HtmlStyle.altColor);
580 else
581 tr.addStyle(HtmlStyle.rowColor);
582 tableContents.add(tr);
583 }
585 /**
586 * Generate the method types set and return true if the method summary table
587 * needs to show tabs.
588 *
589 * @return true if the table should show tabs
590 */
591 public boolean showTabs() {
592 int value;
593 for (MethodTypes type : EnumSet.allOf(MethodTypes.class)) {
594 value = type.value();
595 if ((value & methodTypesOr) == value) {
596 methodTypes.add(type);
597 }
598 }
599 boolean showTabs = methodTypes.size() > 1;
600 if (showTabs) {
601 methodTypes.add(MethodTypes.ALL);
602 }
603 return showTabs;
604 }
606 /**
607 * Set the style for the summary column.
608 *
609 * @param tdTree the column for which the style will be set
610 */
611 public void setSummaryColumnStyle(HtmlTree tdTree) {
612 tdTree.addStyle(HtmlStyle.colLast);
613 }
615 /**
616 * Add inherited member summary for the given class and member.
617 *
618 * @param classDoc the class the inherited member belongs to
619 * @param nestedClass the inherited member that is summarized
620 * @param isFirst true if this is the first member in the list
621 * @param isLast true if this is the last member in the list
622 * @param linksTree the content tree to which the summary will be added
623 */
624 public void addInheritedMemberSummary(ClassDoc classDoc,
625 ProgramElementDoc nestedClass, boolean isFirst, boolean isLast,
626 Content linksTree) {
627 writer.addInheritedMemberSummary(this, classDoc, nestedClass, isFirst,
628 linksTree);
629 }
631 /**
632 * Get the inherited summary header for the given class.
633 *
634 * @param classDoc the class the inherited member belongs to
635 * @return a content tree for the inherited summary header
636 */
637 public Content getInheritedSummaryHeader(ClassDoc classDoc) {
638 Content inheritedTree = writer.getMemberTreeHeader();
639 writer.addInheritedSummaryHeader(this, classDoc, inheritedTree);
640 return inheritedTree;
641 }
643 /**
644 * Get the inherited summary links tree.
645 *
646 * @return a content tree for the inherited summary links
647 */
648 public Content getInheritedSummaryLinksTree() {
649 return new HtmlTree(HtmlTag.CODE);
650 }
652 /**
653 * Get the summary table tree for the given class.
654 *
655 * @param classDoc the class for which the summary table is generated
656 * @param tableContents list of contents to be displayed in the summary table
657 * @return a content tree for the summary table
658 */
659 public Content getSummaryTableTree(ClassDoc classDoc, List<Content> tableContents) {
660 return writer.getSummaryTableTree(this, classDoc, tableContents, showTabs());
661 }
663 /**
664 * Get the member tree to be documented.
665 *
666 * @param memberTree the content tree of member to be documented
667 * @return a content tree that will be added to the class documentation
668 */
669 public Content getMemberTree(Content memberTree) {
670 return writer.getMemberTree(memberTree);
671 }
673 /**
674 * Get the member tree to be documented.
675 *
676 * @param memberTree the content tree of member to be documented
677 * @param isLastContent true if the content to be added is the last content
678 * @return a content tree that will be added to the class documentation
679 */
680 public Content getMemberTree(Content memberTree, boolean isLastContent) {
681 if (isLastContent)
682 return HtmlTree.UL(HtmlStyle.blockListLast, memberTree);
683 else
684 return HtmlTree.UL(HtmlStyle.blockList, memberTree);
685 }
686 }