1 22 package org.aspectj.tools.doclets.standard; 23 24 import org.aspectj.ajdoc.IntroducedDoc; 25 26 import com.sun.javadoc.ClassDoc; 27 import com.sun.javadoc.ProgramElementDoc; 28 import com.sun.tools.doclets.VisibleMemberMap; 29 30 public class FieldSubWriter extends AbstractSubWriter { 31 32 public static class Del extends com.sun.tools.doclets.standard.FieldSubWriter { 33 protected FieldSubWriter mw; 34 public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer, 35 ClassDoc classdoc) 36 { 37 super(writer, classdoc); 38 } 39 public Del(com.sun.tools.doclets.standard.SubWriterHolderWriter writer) 40 { 41 super(writer); 42 } 43 public void printMembersSummary() { 44 mw.printMembersSummary(); 45 mw.printIntroducedMembersSummary(); 46 } 47 public void printMembers() { 48 if (writer instanceof ClassWriter) { 49 ((ClassWriter)writer).printAspectJDetail(); 50 } 51 mw.printMembers(); 52 } 53 protected void navSummaryLink() { 54 mw.navSummaryLink(); 55 } 56 protected void navDetailLink() { 57 if (writer instanceof ClassWriter) { 58 ((ClassWriter)writer).navstate++; 59 } 60 mw.navDetailLink(); 61 } 62 public void setDelegator(FieldSubWriter mw) { this.mw = mw; } 63 public void printSummaryMember(ClassDoc cd, ProgramElementDoc member) { 64 mw.printSummaryMember(cd, member); 65 } 66 } 67 68 protected Class delegateClass() { 69 return Del.class; 70 } 71 72 public FieldSubWriter 73 (com.sun.tools.doclets.standard.SubWriterHolderWriter writer, 74 ClassDoc classdoc) 75 { 76 super(writer, classdoc); 77 } 78 79 public FieldSubWriter 80 (com.sun.tools.doclets.standard.SubWriterHolderWriter writer) 81 { 82 super(writer); 83 } 84 85 public int getMemberKind() { 86 return VisibleMemberMap.FIELDS; 88 } 89 90 protected String propertyName() { return "Field"; } 91 92 public void printIntroducedSummaryLink(ClassDoc cd, 93 ProgramElementDoc member) { 94 writer.printClassLink(cd, member.name(), member.name(), false); 95 } 96 97 public void printCrosscuts(ClassDoc cd, ProgramElementDoc member) { 98 org.aspectj.ajdoc.FieldDoc field = (org.aspectj.ajdoc.FieldDoc)member; 99 IntroducedDoc intro = field.introduced(); 100 if (intro != null) { 101 writer.dt(); 102 writer.boldText("doclet.Introduced_from"); 103 writer.dd(); 104 writer.printClassLink(intro.containingClass(), 105 Statics.where(intro.member())); 106 } 107 } 108 109 public void printSummaryCrosscuts(ClassDoc cd, ProgramElementDoc member) {} 110 111 public boolean hasCrosscuts(ClassDoc classDoc, ProgramElementDoc member) { 112 return true || ((org.aspectj.ajdoc.MemberDoc)member).introduced() != null; 113 } 114 } 115 116 117 | Popular Tags |