1 22 package org.aspectj.tools.doclets.standard; 23 24 import org.aspectj.ajdoc.AdviceDoc; 25 26 import com.sun.javadoc.ClassDoc; 27 import com.sun.javadoc.ExecutableMemberDoc; 28 import com.sun.javadoc.MethodDoc; 29 import com.sun.javadoc.ProgramElementDoc; 30 import com.sun.tools.doclets.VisibleMemberMap; 31 32 public class MethodSubWriter extends ExecutableMemberSubWriter { 33 34 public static class Del 35 extends com.sun.tools.doclets.standard.MethodSubWriter { 36 protected MethodSubWriter mw; 37 public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, 38 ClassDoc classdoc) 39 { 40 super(writer, classdoc); 41 } 42 public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) 43 { 44 super(writer); 45 } 46 public void printMembersSummary() { 47 mw.printMembersSummary(); 48 mw.printIntroducedMembersSummary(); 49 } 50 public void printMembers() { 51 mw.printMembers(); 52 } 53 protected void navSummaryLink() { 54 mw.navSummaryLink(); 55 } 56 protected void navDetailLink() { 57 mw.navDetailLink(); 58 } 59 public void setDelegator(MethodSubWriter mw) { this.mw = mw; } 60 public void printSummaryMember(ClassDoc cd, ProgramElementDoc member) { 61 mw.printSummaryMember(cd, member); 62 } 63 } 64 65 protected Class delegateClass() { return Del.class; } 66 67 public MethodSubWriter 68 (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, 69 ClassDoc classdoc) 70 { 71 super(writer, classdoc); 72 } 73 74 public MethodSubWriter 75 (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) 76 { 77 super(writer); 78 } 79 80 public int getMemberKind() { 81 return VisibleMemberMap.METHODS; 83 } 84 85 protected void printSummaryType(ProgramElementDoc member) { 88 if (member instanceof MethodDoc) { 89 MethodDoc meth = (MethodDoc)member; 91 printModifierAndType(meth, meth.returnType()); 92 } else if (member instanceof AdviceDoc) { 93 AdviceDoc advice = (AdviceDoc)member; 94 printModifierAndType(advice, advice.returnType()); 95 } 96 } 97 protected void printSignature(ExecutableMemberDoc member) { 98 writer.displayLength = 0; 99 writer.pre(); 100 printModifiers(member); 101 bold(member.name()); 103 writer.preEnd(); 106 } 107 109 protected String propertyName() { return "Method"; } 110 } 111 112 113 | Popular Tags |