Doclet Example : Doclet « Language Basics « Java






Doclet Example

import com.sun.javadoc.*;

public class ListClasses extends Doclet {
public static boolean start(RootDoc root) {
        ClassDoc[] classes = root.classes();

        for (ClassDoc cd : classes) {
            System.out.println("Class [" + cd + "] has the following methods");

            for(MemberDoc md : cd.methods()) {
               System.out.println("  " + md);
            }
        }

        return true;
    }}

           
       








Related examples in the same category

1.Doclet that prints out all members of the class