|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdiff.RootDocToXML
public class RootDocToXML
Converts a Javadoc RootDoc object into a representation in an XML file. See the file LICENSE.txt for copyright details.
Field Summary | |
---|---|
static java.lang.String |
apiIdentifier
The identifier of the API being written out in XML, e.g. |
static java.lang.String |
baseURI
The base URI for locating necessary DTDs and Schemas. |
static java.lang.String |
classVisibilityLevel
Do not display a class with a lower level of visibility than this. |
static boolean |
doExclude
If set, exclude program elements marked with whatever the exclude tag is specified as, e.g. |
static java.lang.String |
excludeTag
Exclude program elements marked with this String, e.g. |
static java.lang.String |
memberVisibilityLevel
Do not display a member with a lower level of visibility than this. |
static java.lang.String |
outputDirectory
The name of the directory where the XML representing the API will be stored. |
static java.lang.String |
outputFileName
The name of the file where the XML representing the API will be stored. |
static boolean |
saveAllDocs
If set, then save the entire contents of a doc block comment in the API file. |
Constructor Summary | |
---|---|
RootDocToXML()
Default constructor. |
Method Summary | |
---|---|
void |
addCommonModifiers(ProgramElementDoc ped,
int indent)
Add qualifiers for the program element as attributes. |
void |
addDocumentation(ProgramElementDoc ped,
int indent)
Add at least the first sentence from a doc block to the API. |
void |
addPkgDocumentation(RootDoc root,
PackageDoc pd,
int indent)
Add at least the first sentence from a doc block for a package to the API. |
void |
addSourcePosition(ProgramElementDoc ped,
int indent)
Insert the source code details, if available. |
void |
emitType(com.sun.javadoc.Type type)
Emit the type name. |
void |
emitXMLFooter()
Emit the XML footer. |
void |
emitXMLHeader()
Emit the XML header. |
static int |
endOfFirstSentence(java.lang.String text)
Find the index of the end of the first sentence in the given text, when writing out to an XML file. |
static int |
endOfFirstSentence(java.lang.String text,
boolean writingToXML)
Find the index of the end of the first sentence in the given text. |
boolean |
inRange(int val,
int min,
int max)
Return true if val is in the range [min|max], inclusive. |
void |
logOptions()
Write the options which were used to generate this XML file out as XML comments. |
static int |
minIndex(int i,
int j)
Return the minimum of two indexes if > -1, and return -1 only if both indexes = -1. |
void |
processClasses(ClassDoc[] cd,
java.lang.String pkgName)
Process classes and interfaces. |
void |
processConstructors(ConstructorDoc[] ct)
Process the constructors in the class. |
void |
processExceptions(ClassDoc[] cd)
Process all exceptions thrown by a constructor or method. |
void |
processFields(FieldDoc[] fd)
Process the fields in the class. |
void |
processInterfaces(ClassDoc[] ifaces)
Process the interfaces implemented by the class. |
void |
processMethods(ClassDoc cd,
MethodDoc[] md)
Process the methods in the class. |
void |
processPackages(RootDoc root)
Process each package and the classes/interfaces within it. |
boolean |
shownElement(Doc doc,
java.lang.String visLevel)
Determine if the program element is shown, according to the given level of visibility. |
java.lang.String |
stripNonPrintingChars(java.lang.String s,
Doc doc)
Strip out non-printing characters, replacing them with a character which will not change where the end of the first sentence is found. |
static boolean |
writeXML(RootDoc root)
Write the XML representation of the API to a file. |
static void |
writeXSD()
Write the XML Schema file used for validation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String outputFileName
public static java.lang.String apiIdentifier
public static java.lang.String outputDirectory
public static java.lang.String classVisibilityLevel
public static java.lang.String memberVisibilityLevel
public static boolean saveAllDocs
public static boolean doExclude
public static java.lang.String excludeTag
public static java.lang.String baseURI
Constructor Detail |
---|
public RootDocToXML()
Method Detail |
---|
public static boolean writeXML(RootDoc root)
root
- the RootDoc object passed by Javadoc
public static void writeXSD()
public void logOptions()
public void processPackages(RootDoc root)
pd
- an array of PackageDoc objectspublic void processClasses(ClassDoc[] cd, java.lang.String pkgName)
cd
- An array of ClassDoc objects.public void addCommonModifiers(ProgramElementDoc ped, int indent)
ped
- The given program element.public void addSourcePosition(ProgramElementDoc ped, int indent)
ped
- The given program element.public void processInterfaces(ClassDoc[] ifaces)
ifaces
- An array of ClassDoc objectspublic void processConstructors(ConstructorDoc[] ct)
ct
- An array of ConstructorDoc objectspublic void processExceptions(ClassDoc[] cd)
cd
- An array of ClassDoc objectspublic void processMethods(ClassDoc cd, MethodDoc[] md)
md
- An array of MethodDoc objectspublic void processFields(FieldDoc[] fd)
fd
- An array of FieldDoc objectspublic void emitType(com.sun.javadoc.Type type)
type
- A Type object.public void emitXMLHeader()
public void emitXMLFooter()
public boolean shownElement(Doc doc, java.lang.String visLevel)
ped
- The given program element.visLevel
- The desired visibility level; "public", "protected",
"package" or "private". If null, only check for an exclude tag.
public java.lang.String stripNonPrintingChars(java.lang.String s, Doc doc)
public boolean inRange(int val, int min, int max)
public void addDocumentation(ProgramElementDoc ped, int indent)
public void addPkgDocumentation(RootDoc root, PackageDoc pd, int indent)
public static int endOfFirstSentence(java.lang.String text)
text
- The text to be searched.
public static int endOfFirstSentence(java.lang.String text, boolean writingToXML)
text
- The text to be searched.writingToXML
- Set to true when writing out XML.
public static int minIndex(int i, int j)
i
- an int indexj
- an int index
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |