1 22 package org.aspectj.tools.doclets.standard; 23 24 import org.aspectj.ajdoc.AspectDoc; 25 import org.aspectj.ajdoc.IntroducedDoc; 26 27 import com.sun.javadoc.ClassDoc; 28 import com.sun.javadoc.MemberDoc; 29 import com.sun.tools.doclets.IndexBuilder; 30 31 import java.io.IOException ; 32 33 public class AbstractIndexWriter 34 extends com.sun.tools.doclets.standard.AbstractIndexWriter 35 { 36 37 protected AbstractIndexWriter(String path, 38 String filename, 39 String relativePath, 40 IndexBuilder indexbuilder) 41 throws IOException { 42 super(path, filename, relativePath, indexbuilder); 43 } 44 45 protected AbstractIndexWriter(String filename, 46 IndexBuilder indexbuilder) 47 throws IOException { 48 super(filename, indexbuilder); 49 } 50 51 protected void printClassInfo(ClassDoc cd) { 52 if (cd instanceof AspectDoc) { 53 print("aspect "); 54 printPreQualifiedClassLink(cd); 55 print('.'); 56 } else { 57 super.printClassInfo(cd); 58 } 59 } 60 61 protected void printMemberDesc(MemberDoc member) { 62 String classdesc = Statics.type(member.containingClass()) + " " + 63 getPreQualifiedClassLink(member.containingClass()); 64 if (member instanceof org.aspectj.ajdoc.MemberDoc) { 65 org.aspectj.ajdoc.MemberDoc md = (org.aspectj.ajdoc.MemberDoc)member; 66 if (md.isAdvice()) { 67 printText("doclet.Advice_in", classdesc); 68 } else if (md.isPointcut()) { 69 printText("doclet.Pointcut_in", classdesc); 70 } 71 } else { 72 super.printMemberDesc(member); 73 } 74 if (member instanceof org.aspectj.ajdoc.MemberDoc) { 75 IntroducedDoc intro = 76 ((org.aspectj.ajdoc.MemberDoc)member).introduced(); 77 if (intro != null) { 78 print(' '); 79 printText("doclet.introduced_by", 80 Statics.type(intro.containingClass()) + " " + 81 getPreQualifiedClassLink(intro.containingClass())); 82 } 83 } 84 } 85 } 86 | Popular Tags |