|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjdiff.HTMLReportGenerator
Emit HTML based on the changes between two sets of APIs. See the file LICENSE.txt for copyright details.
Field Summary | |
static java.lang.String |
docTitle
The title used on the first page of the report. |
static boolean |
doStats
To generate statistical output, set this to true. |
static java.lang.String |
newDocPrefix
Define the prefix for HTML links to the existing set of Javadoc- generated documentation for the new API. |
static boolean |
noCommentsOnAdditions
If set, then do not suggest comments for additions from the first sentence of the doc block of the new API. |
static boolean |
noCommentsOnChanges
If set, then do not suggest comments for changes from the first sentence of the doc block of the new API. |
static boolean |
noCommentsOnRemovals
If set, then do not suggest comments for removals from the first sentence of the doc block of the old API. |
static java.lang.String |
oldDocPrefix
Define the prefix for HTML links to the existing set of Javadoc- generated documentation for the old API. |
static java.lang.String |
outputDir
The destination directory for output files. |
static boolean |
reportDocChanges
If set, then report changes in documentation (Javadoc comments) between the old and the new API. |
static java.lang.String |
windowTitle
The browser window title for the report. |
Constructor Summary | |
HTMLReportGenerator()
Default constructor. |
Method Summary | |
void |
emitChanges(jdiff.MemberDiff memberDiff,
int memberType)
Emit all changes associated with a MemberDiff as an entry in a table. |
void |
emitComment(java.lang.String commentID,
java.lang.String possibleComment,
int linkType)
Find any existing comment and emit it. |
void |
emitException(java.lang.String ex)
Emit a string which is an exception by surrounding it with <code> tags. |
void |
emitType(java.lang.String type)
Emit a string which is a type by surrounding it with <code> tags. |
static void |
emitTypeWithNoParens(java.lang.String type)
Emit a string which is a type by surrounding it with <code> tags. |
static void |
emitTypeWithParens(java.lang.String type)
Emit a string which is a type by surrounding it with <code> tags. |
static void |
emitTypeWithParens(java.lang.String type,
boolean addBreaks)
Emit a string which is a type by surrounding it with <code> tags. |
void |
generate(APIComparator comp,
Comments existingComments)
Generate the report. |
Comments |
getNewComments()
Accessor method for the freshly generated Comments object. |
void |
indent(int indent)
Emit some non-breaking space for indentation. |
java.lang.String |
makeTwoRows(java.lang.String name)
If a class or package name is considered to be too long for convenient display, insert in the middle of it at a period. |
void |
reportAllCtors(java.lang.String pkgName,
jdiff.ClassDiff classDiff)
Write out the details of constructors in a class. |
void |
reportAllFields(java.lang.String pkgName,
jdiff.ClassDiff classDiff)
Write out the details of fields in a class. |
void |
reportAllMethods(java.lang.String pkgName,
jdiff.ClassDiff classDiff)
Write out the details of methods in a class. |
void |
reportChangedClass(java.lang.String pkgName,
jdiff.ClassDiff[] classDiffs,
int classIndex)
Write out the details of a changed class in a separate file. |
void |
reportChangedPackage(jdiff.PackageDiff[] pkgDiffs,
int pkgIndex)
Write out the details of a changed package in a separate file. |
static java.lang.String |
simpleName(java.lang.String fqNames)
Return a String with the simple names of the classes in fqName. |
void |
writeClassTableEntry(java.lang.String pkgName,
java.lang.String className,
int linkType,
boolean isInterface,
java.lang.String possibleComment,
boolean useOld)
Write a table entry for a class or interface. |
void |
writeCtorChangedTableEntry(java.lang.String pkgName,
java.lang.String className,
jdiff.MemberDiff memberDiff)
Write a table entry for a changed constructor. |
void |
writeCtorTableEntry(java.lang.String pkgName,
java.lang.String className,
java.lang.String type,
int linkType,
java.lang.String possibleComment,
boolean useOld)
Write a table entry for a constructor. |
void |
writeFieldChangedTableEntry(java.lang.String pkgName,
java.lang.String className,
jdiff.MemberDiff memberDiff)
Write a table entry for a changed field. |
void |
writeFieldTableEntry(java.lang.String pkgName,
java.lang.String className,
jdiff.FieldAPI fieldAPI,
int linkType,
java.lang.String possibleComment,
boolean useOld)
Write a table entry for a field. |
void |
writeHTMLFooter()
Write the HTML footer. |
void |
writeHTMLTitle(java.lang.String title)
Write the HTML title |
void |
writeMethodChangedTableEntry(java.lang.String pkgName,
java.lang.String className,
jdiff.MemberDiff memberDiff)
Write a table entry for a changed method. |
void |
writeMethodTableEntry(java.lang.String pkgName,
java.lang.String className,
jdiff.MethodAPI methodAPI,
int linkType,
java.lang.String possibleComment,
boolean useOld)
Write a table entry for a method. |
void |
writeNavigationBar(java.lang.String pkgName,
java.lang.String prevElemLink,
java.lang.String nextElemLink,
java.lang.String className,
int level,
boolean upperNavigationBar,
boolean hasRemovals,
boolean hasAdditions,
boolean hasChanges)
Write a navigation bar section header. |
void |
writePackageTableEntry(java.lang.String pkgName,
int linkType,
java.lang.String possibleComment,
boolean useOld)
Write a table entry for a package, with support for links to Javadoc for removed packages. |
void |
writeReport(APIDiff apiDiff)
Write the HTML report. |
void |
writeSectionFooter(java.lang.String packageName,
java.lang.String prevElemLink,
java.lang.String nextElemLink,
java.lang.String className,
int level)
Write a section footer, which includes a navigation bar. |
void |
writeSectionHeader(java.lang.String title,
java.lang.String packageName,
java.lang.String prevElemLink,
java.lang.String nextElemLink,
java.lang.String className,
int level,
boolean hasRemovals,
boolean hasAdditions,
boolean hasChanges)
Write a section header, which includes a navigation bar. |
void |
writeStartHTMLHeader()
Write the start of the HTML header. |
void |
writeStartHTMLHeader(boolean addDate)
Write the start of the HTML header. |
void |
writeStartHTMLHeaderWithDate()
Write the start of the HTML header, together with the current date and time in an HTML comment. |
void |
writeStyleSheetRef()
Write the HTML style sheet reference for files in the subdirectory. |
void |
writeStyleSheetRef(boolean inSameDir)
Write the HTML style sheet reference. |
void |
writeTableEnd()
Write the end of a table. |
void |
writeTableStart(java.lang.String title,
int colSpan)
Write the start of a table. |
void |
writeText()
Write a newline out. |
void |
writeText(java.lang.String text)
Write some text out. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static boolean noCommentsOnRemovals
public static boolean noCommentsOnAdditions
public static boolean noCommentsOnChanges
public static boolean reportDocChanges
public static java.lang.String newDocPrefix
public static java.lang.String oldDocPrefix
public static boolean doStats
public static java.lang.String outputDir
public static java.lang.String docTitle
public static java.lang.String windowTitle
Constructor Detail |
public HTMLReportGenerator()
Method Detail |
public Comments getNewComments()
public void generate(APIComparator comp, Comments existingComments)
public void writeReport(APIDiff apiDiff)
public void reportChangedPackage(jdiff.PackageDiff[] pkgDiffs, int pkgIndex)
public void reportChangedClass(java.lang.String pkgName, jdiff.ClassDiff[] classDiffs, int classIndex)
public void reportAllCtors(java.lang.String pkgName, jdiff.ClassDiff classDiff)
public void reportAllMethods(java.lang.String pkgName, jdiff.ClassDiff classDiff)
public void reportAllFields(java.lang.String pkgName, jdiff.ClassDiff classDiff)
public void writeStartHTMLHeaderWithDate()
public void writeStartHTMLHeader()
public void writeStartHTMLHeader(boolean addDate)
public void writeHTMLTitle(java.lang.String title)
public void writeStyleSheetRef()
public void writeStyleSheetRef(boolean inSameDir)
public void writeHTMLFooter()
public void writeSectionHeader(java.lang.String title, java.lang.String packageName, java.lang.String prevElemLink, java.lang.String nextElemLink, java.lang.String className, int level, boolean hasRemovals, boolean hasAdditions, boolean hasChanges)
title
- Title of the header. Contains any links necessary.packageName
- The name of the current package, with no slashes or
links in it. May be nullprevElemLink
- An HTML link to the previous element (a package or
class). May be null.nextElemLink
- An HTML link to the next element (a package or
class). May be null.className
- The name of the current class, with no slashes or
links in it. May be null.level
- 0 = overview, 1 = package, 2 = class/interfacepublic void writeSectionFooter(java.lang.String packageName, java.lang.String prevElemLink, java.lang.String nextElemLink, java.lang.String className, int level)
packageName
- The name of the current package, with no slashes or
links in it. may be nullprevElemLink
- An HTML link to the previous element (a package or
class). May be null.nextElemLink
- An HTML link to the next element (a package or
class). May be null.className
- The name of the current class, with no slashes or
links in it. May be nulllevel
- 0 = overview, 1 = package, 2 = class/interfacepublic void writeNavigationBar(java.lang.String pkgName, java.lang.String prevElemLink, java.lang.String nextElemLink, java.lang.String className, int level, boolean upperNavigationBar, boolean hasRemovals, boolean hasAdditions, boolean hasChanges)
pkgName
- The name of the current package, with no slashes or
links in it.prevElemLink
- An HTML link to the previous element (a package or
class). May be null.nextElemLink
- An HTML link to the next element (a package or
class). May be null.className
- The name of the current class, with no slashes or
links in it. May be null.level
- 0 = overview, 1 = package, 2 = class/interfacepublic void writeTableStart(java.lang.String title, int colSpan)
public java.lang.String makeTwoRows(java.lang.String name)
public void writePackageTableEntry(java.lang.String pkgName, int linkType, java.lang.String possibleComment, boolean useOld)
public void writeClassTableEntry(java.lang.String pkgName, java.lang.String className, int linkType, boolean isInterface, java.lang.String possibleComment, boolean useOld)
public void writeCtorTableEntry(java.lang.String pkgName, java.lang.String className, java.lang.String type, int linkType, java.lang.String possibleComment, boolean useOld)
public void writeCtorChangedTableEntry(java.lang.String pkgName, java.lang.String className, jdiff.MemberDiff memberDiff)
public void writeMethodTableEntry(java.lang.String pkgName, java.lang.String className, jdiff.MethodAPI methodAPI, int linkType, java.lang.String possibleComment, boolean useOld)
public void writeMethodChangedTableEntry(java.lang.String pkgName, java.lang.String className, jdiff.MemberDiff memberDiff)
public void writeFieldTableEntry(java.lang.String pkgName, java.lang.String className, jdiff.FieldAPI fieldAPI, int linkType, java.lang.String possibleComment, boolean useOld)
public void writeFieldChangedTableEntry(java.lang.String pkgName, java.lang.String className, jdiff.MemberDiff memberDiff)
public void emitChanges(jdiff.MemberDiff memberDiff, int memberType)
memberType
- 0 = ctor, 1 = method, 2 = fieldpublic void emitException(java.lang.String ex)
public void emitType(java.lang.String type)
public static void emitTypeWithParens(java.lang.String type)
public static void emitTypeWithParens(java.lang.String type, boolean addBreaks)
public static void emitTypeWithNoParens(java.lang.String type)
public static java.lang.String simpleName(java.lang.String fqNames)
public void emitComment(java.lang.String commentID, java.lang.String possibleComment, int linkType)
commentID
- The identifier for this comment.possibleComment
- A possible comment from another source.linkType
- 0 = remove, 1 = add, 2 = changepublic void writeTableEnd()
public void writeText()
public void writeText(java.lang.String text)
public void indent(int indent)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |