|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.sun.javadoc.Doclet
|
+--org.znerd.javadoxml.JavadoXML
Doclet that generates XML output.
This doclet recognizes the following options:
-outapidocs.xml.-indent-newlinestrue or yes if newlines should be used, and
false or no if no newlines should be used. The
default is no.-encodingUTF-8.
| Field Summary | |
private String |
_destdir
The parent directory for the output file. |
private String |
_encoding
The encoding to use for the output file. |
private String |
_filename
The name of the file to write the output to. |
private String |
_indent
The indentation to use. |
private boolean |
_newlines
Flag that indicates if newlines should be output. |
private XMLOutputter |
_outputter
The XMLOutputter that is used to generate XML with. |
private com.sun.javadoc.RootDoc |
_root
The starting point for this Javadoc run. |
private boolean |
_running
Flag that indicates if this doclet is currently running. |
private static String |
DEFAULT_DESTDIR
The default destination directory. |
private static String |
DEFAULT_ENCODING
The default encoding. |
private static String |
DEFAULT_FILENAME
The default output filename. |
private static String |
DEFAULT_INDENT
The default indentation. |
private static boolean |
DEFAULT_NEWLINES
The default setting for newlines. |
| Constructor Summary | |
private |
JavadoXML()
Constructs a new JavadoXML object. |
| Method Summary | |
private void |
attribute(String attribute,
boolean cond)
|
private void |
createDocument()
Writes the XML document. |
private void |
handle(com.sun.javadoc.ClassDoc c)
|
private void |
handle(com.sun.javadoc.ClassDoc[] classes)
Creates XML output for the specified classes. |
private void |
handle(com.sun.javadoc.ConstructorDoc c)
|
private void |
handle(com.sun.javadoc.ConstructorDoc[] constructors)
Creates XML output for the specified constructors. |
private void |
handle(com.sun.javadoc.FieldDoc f)
|
private void |
handle(com.sun.javadoc.FieldDoc[] fields)
Creates XML output for the specified fields. |
private void |
handle(com.sun.javadoc.MethodDoc m)
|
private void |
handle(com.sun.javadoc.MethodDoc[] methods)
Creates XML output for the specified methods. |
private void |
handle(com.sun.javadoc.PackageDoc p)
Creates XML output for an individual package. |
private void |
handle(com.sun.javadoc.PackageDoc[] packages)
Creates XML output for the specified packages. |
private void |
handle(com.sun.javadoc.Parameter p)
|
private void |
handle(com.sun.javadoc.Tag tag)
|
private void |
handleDoc(com.sun.javadoc.Doc doc)
|
private void |
handleParameters(com.sun.javadoc.ExecutableMemberDoc d)
|
private void |
handleProgramElement(com.sun.javadoc.ProgramElementDoc p)
|
private void |
interpretOptions()
Interprets the options. |
static int |
optionLength(String option)
Checks a doclet option. |
boolean |
run(com.sun.javadoc.RootDoc root)
Runs this doclet. |
private boolean |
runImpl()
|
static boolean |
start(com.sun.javadoc.RootDoc root)
Generates the XML API documentation. |
| Methods inherited from class com.sun.javadoc.Doclet |
validOptions |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private static final String DEFAULT_FILENAME
private static final String DEFAULT_DESTDIR
".", the current directory.private static final String DEFAULT_INDENT
"",
the empty string.private static final boolean DEFAULT_NEWLINES
private static final String DEFAULT_ENCODING
"UTF-8".private transient boolean _running
private transient com.sun.javadoc.RootDoc _root
run(RootDoc).private String _filename
destination directory.
The default is DEFAULT_FILENAME.
private String _destdir
The default is DEFAULT_DESTDIR.
private String _indent
The default is DEFAULT_INDENT.
private boolean _newlines
The default is DEFAULT_NEWLINES.
private String _encoding
The default is DEFAULT_ENCODING.
private XMLOutputter _outputter
XMLOutputter that is used to generate XML with.| Constructor Detail |
private JavadoXML()
JavadoXML object.| Method Detail |
public static int optionLength(String option)
throws IllegalArgumentException
option - the doclet option to check, not null.0 (zero) if
the argument is unknown, or a negative value in case of an error.IllegalArgumentException - if option == null.
public static boolean start(com.sun.javadoc.RootDoc root)
throws IllegalArgumentException
root - the packages and/or classes to document, not null.true on success, false otherwise.IllegalArgumentException - if root == null.
public boolean run(com.sun.javadoc.RootDoc root)
throws IllegalArgumentException,
IllegalStateException
root - the packages and/or classes to document, not null.true on success, false otherwise.IllegalArgumentException - if root == null.IllegalStateException - if this doclet is currently already running.private boolean runImpl()
private void interpretOptions()
private void createDocument()
throws IOException
IOException - if there was an I/O error.
private void handle(com.sun.javadoc.PackageDoc[] packages)
throws IOException
This method delegates to handle(PackageDoc).
packages - the packages to be processed, can be null.IOException - if there was an I/O error.
private void handle(com.sun.javadoc.PackageDoc p)
throws IOException
packages - the package to be processed, not null.
private void handleDoc(com.sun.javadoc.Doc doc)
throws IOException
private void handle(com.sun.javadoc.Tag tag)
throws IOException
private void handle(com.sun.javadoc.ClassDoc[] classes)
throws IOException
This method delegates to
handle(ClassDoc).
classes - the classes to be processed, can be null.
private void handle(com.sun.javadoc.ClassDoc c)
throws IOException
private void handle(com.sun.javadoc.ConstructorDoc[] constructors)
throws IOException
This method delegates to
handle(ConstructorDoc).
constructors - the constructors to be processed, can be null.
private void handle(com.sun.javadoc.ConstructorDoc c)
throws IOException
private void handle(com.sun.javadoc.MethodDoc[] methods)
throws IOException
This method delegates to
handle(MethodDoc).
methods - the methods to be processed, can be null.
private void handle(com.sun.javadoc.MethodDoc m)
throws IOException
private void handle(com.sun.javadoc.FieldDoc[] fields)
throws IOException
This method delegates to
handle(MethodDoc).
fields - the fields to be processed, can be null.
private void handle(com.sun.javadoc.FieldDoc f)
throws IOException
private void handleProgramElement(com.sun.javadoc.ProgramElementDoc p)
throws IOException
private void handleParameters(com.sun.javadoc.ExecutableMemberDoc d)
throws IOException
private void handle(com.sun.javadoc.Parameter p)
throws IOException
private void attribute(String attribute,
boolean cond)
throws IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||