530 |
return node; |
return node; |
531 |
} |
} |
532 |
|
|
533 |
private void printPackageTreeRec(HtmlPage output, TreeNode node) |
private void printPackageTreeRec(HtmlPage output, TreeNode node, TreeNode parentNode) |
534 |
{ |
{ |
535 |
output.beginElement("li"); |
output.beginElement("li"); |
536 |
if (node.classDoc.isIncluded()) { |
if (node.classDoc.isIncluded()) { |
544 |
output.print(possiblyQualifiedName(node.classDoc)); |
output.print(possiblyQualifiedName(node.classDoc)); |
545 |
} |
} |
546 |
ClassDoc[] interfaces = node.classDoc.interfaces(); |
ClassDoc[] interfaces = node.classDoc.interfaces(); |
547 |
if (interfaces.length > 0) { |
ClassDoc parentClassDoc = null; |
548 |
output.print(" (implements "); |
if (null != parentNode) { |
549 |
|
parentClassDoc = parentNode.classDoc; |
550 |
|
} |
551 |
|
if (interfaces.length > 0 |
552 |
|
&& !interfaces[0].equals(parentClassDoc)) { |
553 |
|
if (node.classDoc.isInterface()) { |
554 |
|
output.print(" (also implements "); |
555 |
|
} |
556 |
|
else { |
557 |
|
output.print(" (implements "); |
558 |
|
} |
559 |
|
|
560 |
|
boolean firstItem = true; |
561 |
for (int i=0; i<interfaces.length; ++i) { |
for (int i=0; i<interfaces.length; ++i) { |
562 |
ClassDoc implemented = interfaces[i]; |
ClassDoc implemented = interfaces[i]; |
563 |
if (i > 0) { |
if (!implemented.equals(parentClassDoc)) { |
564 |
output.print(", "); |
if (!firstItem) { |
565 |
} |
output.print(", "); |
566 |
if (implemented.isIncluded()) { |
} |
567 |
output.print(implemented.containingPackage().name()); |
firstItem = false; |
568 |
output.print("."); |
if (implemented.isIncluded()) { |
569 |
printType(output, implemented); |
output.print(implemented.containingPackage().name()); |
570 |
} |
output.print("."); |
571 |
else { |
printType(output, implemented); |
572 |
output.print(possiblyQualifiedName(implemented)); |
} |
573 |
|
else { |
574 |
|
output.print(possiblyQualifiedName(implemented)); |
575 |
|
} |
576 |
} |
} |
577 |
} |
} |
578 |
output.print(" )"); |
output.print(")"); |
579 |
} |
} |
580 |
|
|
581 |
output.endElement("li"); |
output.endElement("li"); |
583 |
Iterator it = node.children.iterator(); |
Iterator it = node.children.iterator(); |
584 |
while (it.hasNext()) { |
while (it.hasNext()) { |
585 |
TreeNode child = (TreeNode)it.next(); |
TreeNode child = (TreeNode)it.next(); |
586 |
printPackageTreeRec(output, child); |
printPackageTreeRec(output, child, node); |
587 |
} |
} |
588 |
output.endElement("ul"); |
output.endElement("ul"); |
589 |
} |
} |
603 |
if (null != root) { |
if (null != root) { |
604 |
output.div(CssClass.PACKAGE_TREE_SECTION_TITLE, "Class Hierarchy"); |
output.div(CssClass.PACKAGE_TREE_SECTION_TITLE, "Class Hierarchy"); |
605 |
output.beginElement("ul"); |
output.beginElement("ul"); |
606 |
printPackageTreeRec(output, root); |
printPackageTreeRec(output, root, null); |
607 |
output.endElement("ul"); |
output.endElement("ul"); |
608 |
} |
} |
609 |
} |
} |
627 |
output.beginElement("ul"); |
output.beginElement("ul"); |
628 |
while (it.hasNext()) { |
while (it.hasNext()) { |
629 |
TreeNode node = (TreeNode)it.next(); |
TreeNode node = (TreeNode)it.next(); |
630 |
printPackageTreeRec(output, node); |
printPackageTreeRec(output, node, null); |
631 |
} |
} |
632 |
output.endElement("ul"); |
output.endElement("ul"); |
633 |
} |
} |