jdiff

Class HTMLIndexes

public class HTMLIndexes extends Object

Emit HTML indexes which appear in the bottom left frame in the report. All indexes are links to JDiff-generated pages. See the file LICENSE.txt for copyright details.
Field Summary
static booleanlogMissingSinces
Whether to log all missing @since tags to a file or not.
static PrintWritermissingSincesFile
The file used to output details of missing @since tags.
Constructor Summary
HTMLIndexes(HTMLReportGenerator h)
Constructor.
Method Summary
voidemitAllBottomLeftFiles(String packagesIndexName, String classesIndexName, String constructorsIndexName, String methodsIndexName, String fieldsIndexName, String allDiffsIndexName, APIDiff apiDiff)
Emit all the bottom left frame index files.
voidemitAllDiffsIndex(APIDiff apiDiff, int indexType)
Emit the index of all changes, which appears in the bottom left frame.
voidemitBottomLeftFile(String indexBaseName, APIDiff apiDiff, int indexType, String programElementType)
Emit a single bottom left frame with the given kind of differences for the given program element type in an alphabetical index.
voidemitClassesIndex(APIDiff apiDiff, int indexType)
Emit the index of classes, which appears in the bottom left frame.
charemitClassIndexEntry(Index cls, char oldsw, int multipleMarker)
Emit an index entry for a class.
voidemitConstructorsIndex(APIDiff apiDiff, int indexType)
Emit the index of all constructors, which appears in the bottom left frame.
charemitCtorIndexEntry(Index ctor, char oldsw, int multipleMarker)
Emit an index entry for a constructor.
charemitFieldIndexEntry(Index fld, char oldsw, int multipleMarker)
Emit an index entry for a field.
voidemitFieldsIndex(APIDiff apiDiff, int indexType)
Emit the index of all fields, which appears in the bottom left frame.
voidemitIndexEntries(Iterator iter)
Emit all the entries and links for the given iterator to their respective files.
charemitIndexEntry(Index currIndex, char oldsw, int multipleMarker)
Emit a single entry and the link to its file.
charemitIndexEntryForAny(Index currIndex, char oldsw, int multipleMarker)
Call the appropriate *IndexEntry method for each entry.
charemitMethodIndexEntry(Index meth, char oldsw, int multipleMarker)
Emit an index entry for a method.
voidemitMethodsIndex(APIDiff apiDiff, int indexType)
Emit the index of all methods, which appears in the bottom left frame.
voidemitMissingSinces(Iterator iter)
Emit elements in the given iterator which were added and missing @since tags.
charemitPackageIndexEntry(Index pkg, char oldsw)
Emit an index entry for a package.
voidemitPackagesIndex(APIDiff apiDiff, int indexType)
Emit the index of packages, which appears in the bottom left frame.

Field Detail

logMissingSinces

public static boolean logMissingSinces
Whether to log all missing @since tags to a file or not. If false, just warn the user.

missingSincesFile

public static PrintWriter missingSincesFile
The file used to output details of missing @since tags.

Constructor Detail

HTMLIndexes

public HTMLIndexes(HTMLReportGenerator h)
Constructor.

Method Detail

emitAllBottomLeftFiles

public void emitAllBottomLeftFiles(String packagesIndexName, String classesIndexName, String constructorsIndexName, String methodsIndexName, String fieldsIndexName, String allDiffsIndexName, APIDiff apiDiff)
Emit all the bottom left frame index files.

emitAllDiffsIndex

public void emitAllDiffsIndex(APIDiff apiDiff, int indexType)
Emit the index of all changes, which appears in the bottom left frame. Has to be run after all the other indexes have been written, since it uses data from when they are generated.

emitBottomLeftFile

public void emitBottomLeftFile(String indexBaseName, APIDiff apiDiff, int indexType, String programElementType)
Emit a single bottom left frame with the given kind of differences for the given program element type in an alphabetical index.

Parameters: indexBaseName The base name of the index file. apiDiff The root element containing all the API differences. indexType 0 = removals only, 1 = additions only, 2 = changes only, 3 = all differences, programElementType "Package", "Class", "Constructor", "Method", "Field" or "All".

emitClassesIndex

public void emitClassesIndex(APIDiff apiDiff, int indexType)
Emit the index of classes, which appears in the bottom left frame.

emitClassIndexEntry

public char emitClassIndexEntry(Index cls, char oldsw, int multipleMarker)
Emit an index entry for a class.

emitConstructorsIndex

public void emitConstructorsIndex(APIDiff apiDiff, int indexType)
Emit the index of all constructors, which appears in the bottom left frame.

emitCtorIndexEntry

public char emitCtorIndexEntry(Index ctor, char oldsw, int multipleMarker)
Emit an index entry for a constructor.

emitFieldIndexEntry

public char emitFieldIndexEntry(Index fld, char oldsw, int multipleMarker)
Emit an index entry for a field.

emitFieldsIndex

public void emitFieldsIndex(APIDiff apiDiff, int indexType)
Emit the index of all fields, which appears in the bottom left frame.

emitIndexEntries

public void emitIndexEntries(Iterator iter)
Emit all the entries and links for the given iterator to their respective files.

emitIndexEntry

public char emitIndexEntry(Index currIndex, char oldsw, int multipleMarker)
Emit a single entry and the link to its file.

Parameters: programElementType "Class", "Constructor", "Method", or "Field".

emitIndexEntryForAny

public char emitIndexEntryForAny(Index currIndex, char oldsw, int multipleMarker)
Call the appropriate *IndexEntry method for each entry.

emitMethodIndexEntry

public char emitMethodIndexEntry(Index meth, char oldsw, int multipleMarker)
Emit an index entry for a method.

emitMethodsIndex

public void emitMethodsIndex(APIDiff apiDiff, int indexType)
Emit the index of all methods, which appears in the bottom left frame.

emitMissingSinces

public void emitMissingSinces(Iterator iter)
Emit elements in the given iterator which were added and missing @since tags.

emitPackageIndexEntry

public char emitPackageIndexEntry(Index pkg, char oldsw)
Emit an index entry for a package. Package names are unique, so no need to check for duplicates.

emitPackagesIndex

public void emitPackagesIndex(APIDiff apiDiff, int indexType)
Emit the index of packages, which appears in the bottom left frame.