com.sun.tools.javadoc
Class DocletInvoker

java.lang.Object
  extended by com.sun.tools.javadoc.DocletInvoker

public class DocletInvoker
extends java.lang.Object

Class creates, controls and invokes doclets.


Nested Class Summary
private static class DocletInvoker.DocletInvokeException
           
 
Field Summary
private  java.lang.ClassLoader appClassLoader
           
private  java.lang.Class<?> docletClass
           
private  java.lang.String docletClassName
           
private  Messager messager
           
 
Constructor Summary
DocletInvoker(Messager messager, java.lang.String docletClassName, java.lang.String docletPath, java.lang.ClassLoader docletParentClassLoader)
           
 
Method Summary
private  java.lang.String appendPath(java.lang.String path1, java.lang.String path2)
           
(package private) static java.net.URL fileToURL(java.io.File file)
          Returns the directory or JAR file URL corresponding to the specified local file name.
private  java.lang.Object invoke(java.lang.String methodName, java.lang.Object returnValueIfNonExistent, java.lang.Class<?>[] paramTypes, java.lang.Object[] params)
          Utility method for calling doclet functionality
 LanguageVersion languageVersion()
          Return the language version supported by this doclet.
 int optionLength(java.lang.String option)
          Check for doclet added options here.
(package private) static java.net.URL[] pathToURLs(java.lang.String path)
          Utility method for converting a search path string to an array of directory and JAR file URLs.
 boolean start(RootDoc root)
          Generate documentation here.
 boolean validOptions(List<java.lang.String[]> optlist)
          Let doclet check that all options are OK.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

docletClass

private final java.lang.Class<?> docletClass

docletClassName

private final java.lang.String docletClassName

appClassLoader

private final java.lang.ClassLoader appClassLoader

messager

private final Messager messager
Constructor Detail

DocletInvoker

public DocletInvoker(Messager messager,
                     java.lang.String docletClassName,
                     java.lang.String docletPath,
                     java.lang.ClassLoader docletParentClassLoader)
Method Detail

appendPath

private java.lang.String appendPath(java.lang.String path1,
                                    java.lang.String path2)

start

public boolean start(RootDoc root)
Generate documentation here. Return true on success.


optionLength

public int optionLength(java.lang.String option)
Check for doclet added options here. Zero return means option not known. Positive value indicates number of arguments to option. Negative value means error occurred.


validOptions

public boolean validOptions(List<java.lang.String[]> optlist)
Let doclet check that all options are OK. Returning true means options are OK. If method does not exist, assume true.


languageVersion

public LanguageVersion languageVersion()
Return the language version supported by this doclet. If the method does not exist in the doclet, assume version 1.1.


invoke

private java.lang.Object invoke(java.lang.String methodName,
                                java.lang.Object returnValueIfNonExistent,
                                java.lang.Class<?>[] paramTypes,
                                java.lang.Object[] params)
                         throws DocletInvoker.DocletInvokeException
Utility method for calling doclet functionality

Throws:
DocletInvoker.DocletInvokeException

pathToURLs

static java.net.URL[] pathToURLs(java.lang.String path)
Utility method for converting a search path string to an array of directory and JAR file URLs.

Parameters:
path - the search path string
Returns:
the resulting array of directory and JAR file URLs

fileToURL

static java.net.URL fileToURL(java.io.File file)
Returns the directory or JAR file URL corresponding to the specified local file name.

Parameters:
file - the File object
Returns:
the resulting directory or JAR file URL, or null if unknown