jdiff
Class HTMLIndexes

java.lang.Object
  extended byjdiff.HTMLIndexes

public class HTMLIndexes
extends java.lang.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 boolean logMissingSinces
          Whether to log all missing @since tags to a file or not.
static java.io.PrintWriter missingSincesFile
          The file used to output details of missing @since tags.
 
Constructor Summary
HTMLIndexes(HTMLReportGenerator h)
          Constructor.
 
Method Summary
 void emitAllBottomLeftFiles(java.lang.String packagesIndexName, java.lang.String classesIndexName, java.lang.String constructorsIndexName, java.lang.String methodsIndexName, java.lang.String fieldsIndexName, java.lang.String allDiffsIndexName, APIDiff apiDiff)
          Emit all the bottom left frame index files.
 void emitAllDiffsIndex(APIDiff apiDiff, int indexType)
          Emit the index of all changes, which appears in the bottom left frame.
 void emitBottomLeftFile(java.lang.String indexBaseName, APIDiff apiDiff, int indexType, java.lang.String programElementType)
          Emit a single bottom left frame with the given kind of differences for the given program element type in an alphabetical index.
 void emitClassesIndex(APIDiff apiDiff, int indexType)
          Emit the index of classes, which appears in the bottom left frame.
 char emitClassIndexEntry(jdiff.Index cls, char oldsw, int multipleMarker)
          Emit an index entry for a class.
 void emitConstructorsIndex(APIDiff apiDiff, int indexType)
          Emit the index of all constructors, which appears in the bottom left frame.
 char emitCtorIndexEntry(jdiff.Index ctor, char oldsw, int multipleMarker)
          Emit an index entry for a constructor.
 char emitFieldIndexEntry(jdiff.Index fld, char oldsw, int multipleMarker)
          Emit an index entry for a field.
 void emitFieldsIndex(APIDiff apiDiff, int indexType)
          Emit the index of all fields, which appears in the bottom left frame.
 void emitIndexEntries(java.util.Iterator iter)
          Emit all the entries and links for the given iterator to their respective files.
 char emitIndexEntry(jdiff.Index currIndex, char oldsw, int multipleMarker)
          Emit a single entry and the link to its file.
 char emitIndexEntryForAny(jdiff.Index currIndex, char oldsw, int multipleMarker)
          Call the appropriate *IndexEntry method for each entry.
 char emitMethodIndexEntry(jdiff.Index meth, char oldsw, int multipleMarker)
          Emit an index entry for a method.
 void emitMethodsIndex(APIDiff apiDiff, int indexType)
          Emit the index of all methods, which appears in the bottom left frame.
 void emitMissingSinces(java.util.Iterator iter)
          Emit elements in the given iterator which were added and missing @since tags.
 char emitPackageIndexEntry(jdiff.Index pkg, char oldsw)
          Emit an index entry for a package.
 void emitPackagesIndex(APIDiff apiDiff, int indexType)
          Emit the index of packages, which appears in the bottom left frame.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 java.io.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(java.lang.String packagesIndexName,
                                   java.lang.String classesIndexName,
                                   java.lang.String constructorsIndexName,
                                   java.lang.String methodsIndexName,
                                   java.lang.String fieldsIndexName,
                                   java.lang.String allDiffsIndexName,
                                   APIDiff apiDiff)
Emit all the bottom left frame index files.


emitBottomLeftFile

public void emitBottomLeftFile(java.lang.String indexBaseName,
                               APIDiff apiDiff,
                               int indexType,
                               java.lang.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".

emitPackagesIndex

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


emitPackageIndexEntry

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


emitIndexEntries

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


emitMissingSinces

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


emitIndexEntry

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


emitClassesIndex

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


emitClassIndexEntry

public char emitClassIndexEntry(jdiff.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(jdiff.Index ctor,
                               char oldsw,
                               int multipleMarker)
Emit an index entry for a constructor.


emitMethodsIndex

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


emitMethodIndexEntry

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


emitFieldsIndex

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


emitFieldIndexEntry

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


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.


emitIndexEntryForAny

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