1 22 package org.aspectj.tools.doclets.standard; 23 24 import com.sun.javadoc.MemberDoc; 25 26 import com.sun.javadoc.ClassDoc; 27 import com.sun.tools.doclets.DocletAbortException; 28 import com.sun.tools.doclets.IndexBuilder; 29 30 import java.io.IOException ; 31 32 public class SingleIndexWriter 33 extends com.sun.tools.doclets.standard.SingleIndexWriter 34 { 35 36 protected class Del extends AbstractIndexWriter { 37 public Del(String s, IndexBuilder i) throws IOException { 38 super(s, i); 39 } 40 public void print(String s) { 41 SingleIndexWriter.this.print(s); 42 } 43 } 44 final protected Del del; 45 { 46 Standard.quiet(); 47 Del d = null; 48 try { 49 d = new Del(filename, indexbuilder); 50 } catch (Exception e) { 51 Standard.configuration().standardmessage. 52 error("doclet.exception_encountered", 53 e+"", filename); 54 } finally { 55 del = d; 56 Standard.speak(); 57 } 58 } 59 protected void printMemberDesc(MemberDoc member) { 60 del.printMemberDesc(member); 61 } 62 protected void printClassInfo(ClassDoc cd) { 63 del.printClassInfo(cd); 64 } 65 66 public SingleIndexWriter(String filename, 67 IndexBuilder indexbuilder) throws IOException { 68 super(filename, indexbuilder); 69 } 70 71 public static void generate(IndexBuilder indexbuilder) 72 throws DocletAbortException { 73 SingleIndexWriter sw = null; 74 String filename = "index-all.html"; 75 try { 76 (sw = new SingleIndexWriter(filename, indexbuilder)). 77 generateIndexFile(); 78 } catch (IOException e) { 79 Standard.configuration().standardmessage.error 80 ("doclet.exception_encountered", 81 e+"", filename); 82 throw new DocletAbortException(); 83 } finally { 84 if (sw != null) sw.close(); 85 } 86 } 87 } 88 | Popular Tags |