|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object doc.doclets.PtDoclet
public class PtDoclet
Generate PtDoc output. See ptolemy/vergil/basic/DocML_1.dtd for the dtd.
If javadoc is called with -d directoryName, then
documentation will be generated in directoryName.
If the KEPLER property is set, then for a class named
foo.bar.Baz
, the generated file is named
Baz.doc.xml
. If the KEPLER property is not
set, then the generated file is named foo/bar/Baz.xml
.
This doclet writes the names of all the classes for which documentation was generated in a file called allNamedObjs.txt
Field Summary | |
---|---|
private static java.lang.String |
_header
Header string for XML PtDoc output. |
private static java.lang.String |
_outputDirectory
Directory to which the output is to be written. |
Constructor Summary | |
---|---|
PtDoclet()
|
Method Summary | |
---|---|
private static java.lang.String |
_customTagCommentText(com.sun.javadoc.ProgramElementDoc programElementDoc)
Process customTags and return text that contains links to the javadoc output. |
private static java.lang.StringBuffer |
_generateClassLevelDocumentation(com.sun.javadoc.ClassDoc classDoc)
Generate the classLevel documentation for a class |
private static java.lang.String |
_generateFieldDocumentation(com.sun.javadoc.ClassDoc classDoc,
java.lang.Class fieldBaseClass,
java.lang.String element)
Generate documentation for all fields that are derived from a specific base class. |
private static java.lang.String |
_getOutputDirectory(java.lang.String[][] options)
Process the doclet command line arguments and return the value of the -d parameter, if any. |
private static java.lang.String |
_inlineTagCommentText(com.sun.javadoc.ProgramElementDoc programElementDoc)
Process inlineTags and return text that contains links to the javadoc output. |
private static java.lang.String |
_relativizePath(java.lang.String baseDirectory,
java.lang.String destinationClassName,
com.sun.javadoc.ProgramElementDoc programElementDoc,
boolean isIncluded)
Given two dot separated classpath names, return a relative path to the corresponding doc file. |
private static void |
_writeDoc(java.lang.String className,
java.lang.String documentation)
Write the output to a file. |
static int |
optionLength(java.lang.String option)
Given a command line option, return the number of command line arguments needed by that option. |
static boolean |
start(com.sun.javadoc.RootDoc root)
Process the java files and generate PtDoc XML. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.lang.String _outputDirectory
private static java.lang.String _header
Constructor Detail |
---|
public PtDoclet()
Method Detail |
---|
public static int optionLength(java.lang.String option)
option
- The command line option
public static boolean start(com.sun.javadoc.RootDoc root) throws java.io.IOException, java.lang.ClassNotFoundException
root
- The root of the java doc tree.
java.io.IOException
- If there is a problem writing the documentation.
java.lang.ClassNotFoundException
- If there is a problem finding
the class of one of the fields.private static java.lang.String _customTagCommentText(com.sun.javadoc.ProgramElementDoc programElementDoc)
programElementDoc
- The class for which we are generating
documentation.private static java.lang.String _inlineTagCommentText(com.sun.javadoc.ProgramElementDoc programElementDoc)
programElementDoc
- The class for which we are generating
documentation.private static java.lang.StringBuffer _generateClassLevelDocumentation(com.sun.javadoc.ClassDoc classDoc)
classDoc
- The class for which we are generating documentation.private static java.lang.String _generateFieldDocumentation(com.sun.javadoc.ClassDoc classDoc, java.lang.Class fieldBaseClass, java.lang.String element) throws java.lang.ClassNotFoundException
classDoc
- The ClassDoc for the class we are documenting.fieldBaseClass
- The base class for the field we are documenting.element
- The XML element that is generated.
java.lang.ClassNotFoundException
- If the class of a field cannot
be found.private static java.lang.String _getOutputDirectory(java.lang.String[][] options)
options
- The command line options.
private static java.lang.String _relativizePath(java.lang.String baseDirectory, java.lang.String destinationClassName, com.sun.javadoc.ProgramElementDoc programElementDoc, boolean isIncluded)
baseDirectory
- The top level directory where the classes are written.destinationClassName
- The dot separated fully qualified class name.programElementDoc
- The documentation for the base class.isIncluded
- True if the destination class is included in the
set of classes we are documenting. If isIncluded is true,
we create a link to the .xml file. If isIncluded is false, we
create a linke to the javadoc .html file.
private static void _writeDoc(java.lang.String className, java.lang.String documentation) throws java.io.IOException
className
- The dot separated fully qualified classname,
which is used to specify the directory and filename to which
the documentation is written.documentation
- The documentation that is written.
java.io.IOException
- If there is a problem writing the documentation.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |