1 22 package org.aspectj.tools.doclets.standard; 23 24 import org.aspectj.ajdoc.AspectDoc; 25 26 import com.sun.javadoc.ClassDoc; 27 import com.sun.javadoc.ProgramElementDoc; 28 import com.sun.javadoc.Type; 29 import com.sun.tools.doclets.VisibleMemberMap; 30 31 public class ClassSubWriter extends AbstractSubWriter { 32 33 public static class Del extends com.sun.tools.doclets.standard.ClassSubWriter { 34 protected ClassSubWriter mw; 35 public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, 36 ClassDoc classdoc) 37 { 38 super(writer, classdoc); 39 } 40 public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) 41 { 42 super(writer); 43 } 44 public void printMembersSummary() { 45 mw.printMembersSummary(); 46 mw.printIntroducedMembersSummary(); 47 if (writer instanceof ClassWriter) { 48 ((ClassWriter)writer).printAspectJSummary(); 49 } 50 } 51 public void printMembers() { 52 mw.printMembers(); 53 } 54 protected void navSummaryLink() { 55 mw.navSummaryLink(); 56 if (writer instanceof ClassWriter) { 57 ((ClassWriter)writer).navstate++; 58 } 59 } 60 protected void navDetailLink() { 61 mw.navDetailLink(); 62 } 63 public void setDelegator(ClassSubWriter mw) { this.mw = mw; } 64 } 65 66 protected Class delegateClass() { 67 return Del.class; 68 } 69 70 public ClassSubWriter 71 (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, 72 ClassDoc classdoc) 73 { 74 super(writer, classdoc); 75 } 76 77 public ClassSubWriter 78 (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) 79 { 80 super(writer); 81 } 82 83 public int getMemberKind() { 84 return VisibleMemberMap.INNERCLASSES; 86 } 87 88 protected void printSummaryType(ProgramElementDoc member) { 89 ClassDoc cd = (ClassDoc)member; 90 printModifierAndType(cd, null); 91 } 92 93 protected void printModifierAndType(ProgramElementDoc member, 94 Type type) { 95 writer.printTypeSummaryHeader(); 96 printModifier(member); 97 if (type == null) { 98 print(member instanceof AspectDoc ? 99 "aspect" : member.isClass() ? 100 "class" : 101 "interface"); 102 } else { 103 printTypeLink(type); 104 } 105 writer.printTypeSummaryFooter(); 106 } 107 } 108 109 110 | Popular Tags |