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