KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > oddjob > doclet > ManualDoclet


1 /*
2  * Copyright (c) 2005, Rob Gordon.
3  */

4 package org.oddjob.doclet;
5
6 import com.sun.javadoc.ClassDoc;
7 import com.sun.javadoc.RootDoc;
8
9 /**
10  *
11  * @author Rob Gordon.
12  */

13 public class ManualDoclet {
14
15     JobsAndTypes jats = new JobsAndTypes();
16     Archiver archiver = new Archiver(jats);
17     
18     public void process(ClassDoc cd) {
19         archiver.archive(cd);
20     }
21     
22     public void process(RootDoc rootDoc) {
23         ClassDoc[] cd = rootDoc.classes();
24         for (int i = 0; i < cd.length; ++i) {
25             process(cd[i]);
26         }
27         ManualWriter w = new ManualWriter();
28         w.createManual(archiver);
29     }
30     
31     public static boolean start(RootDoc rootDoc) {
32         ManualDoclet md = new ManualDoclet();
33         md.process(rootDoc);
34         return true;
35     }
36 }
37
Popular Tags