Package com.sun.tools.doclets.formats.html

Examples of com.sun.tools.doclets.formats.html.HtmlDoclet


     * Start parsing using the standard HTML doclet
     * @param root the root of the document tree
     * @return true if the parsing is successful, or false if there is an error
     */
    public static boolean start(RootDoc root) {
        HtmlDoclet doclet = new HtmlDoclet();
       
        // get the APIs from the arguments
        String[][] options = root.options();
        String[] types = null;
        for (String[] option : options) {
            if (option[0].toLowerCase().equals("-wonderlandapi")) {
                types = option[1].split(",");
               
                // convert to internal names
                for (int i = 0; i < types.length; i++) {
                    types[i] = API_MAP.get(types[i].toLowerCase());
                }
            }
        }
       
        try {
            // wrap the root object
            ClassLoader loader = WonderlandDoclet.class.getClassLoader();
            Class<?>[] interfaces = new Class<?>[] { RootDoc.class };
            RootDocWrapper handler = new RootDocWrapper(root, types);
            RootDoc wrapper =
                    (RootDoc) Proxy.newProxyInstance(loader, interfaces, handler);
       
            // overwrite the configuration used by the standard doclet to
            // return our wrapped classes
            doclet.configuration.root = wrapper;
            doclet.configuration.packages = handler.wrappedPackages;
           
            // parse using the standard HTML doclet
            doclet.start(doclet, wrapper);
        } catch (Exception exc) {
            exc.printStackTrace();
            return false;
        }
        return true;
View Full Code Here

TOP

Related Classes of com.sun.tools.doclets.formats.html.HtmlDoclet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.