1 22 package org.aspectj.tools.doclets.standard; 23 24 import org.aspectj.tools.ajdoc.Access; 25 26 import com.sun.javadoc.RootDoc; 27 import com.sun.tools.doclets.DocletAbortException; 28 29 import java.io.IOException ; 30 import java.util.List ; 31 32 public class DeprecatedListWriter 33 extends com.sun.tools.doclets.standard.DeprecatedListWriter 34 { 35 36 protected DeprecatedAPIListBuilder builder; 37 38 public DeprecatedListWriter(String filename, 39 DeprecatedAPIListBuilder builder) 40 throws IOException { 41 super(filename); 42 this.builder = builder; 43 } 44 45 public static void generate(RootDoc root) throws DocletAbortException { 46 String filename = "deprecated-list.html"; 47 DeprecatedListWriter dw = null; 48 try { 49 (dw = new DeprecatedListWriter(filename, 50 new DeprecatedAPIListBuilder(root))). 51 generateDeprecatedListFile(); 52 } catch (IOException e) { 53 Standard.configuration(). 54 standardmessage.error("doclet.exception_encountered", 55 e+"", filename); 56 throw new DocletAbortException(); 57 } finally { 58 if (dw != null) dw.close(); 59 } 60 } 61 62 protected void generateDeprecatedListFile() throws IOException { 63 generateDeprecatedListFile(builder); 64 } 65 66 protected void printDeprecatedFooter() { 67 printRestOfDeprecatedListFile(); 68 super.printDeprecatedFooter(); 69 } 70 71 protected void printRestOfDeprecatedListFile() { 72 deprecatedListFile(new AdviceSubWriter(this), 73 builder.getDeprecatedAdivce()); 74 deprecatedListFile(new PointcutSubWriter(this), 75 builder.getDeprecatedPointcuts()); 76 deprecatedListFile(new FieldIntroductionSubWriter(this), 77 builder.getDeprecatedFieldIntroductions()); 78 deprecatedListFile(new MethodIntroductionSubWriter(this), 79 builder.getDeprecatedMethodIntroductions()); 80 deprecatedListFile(new ConstructorIntroductionSubWriter(this), 81 builder.getDeprecatedConstructorIntroductions()); 82 deprecatedListFile(new SuperIntroductionSubWriter(this), 83 builder.getDeprecatedSuperIntroductions()); 84 85 86 } 87 88 protected final void deprecatedListFile(AbstractSubWriter mw, 89 List list) { 90 Access.printDeprecatedAPI(mw, list, 91 "doclet.Deprecated_" + 92 mw.keyName() + "s"); 93 } 94 } 95 | Popular Tags |