com.sun.tdk.specdiff.html

## Class Differ

- java.lang.Object
- - com.sun.tdk.specdiff.html.Differ

-     public class Differ
      extends java.lang.Object

  Compares two File objects and creates Diff reports in `this.outDir` A new instance should be created every time to compare two files!

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `DIFFER_CONFIG_PARAM`
    `static java.lang.String` | `DIFFER_JUMPING_ASSERT_PARAM`
    `static java.lang.String` | `DIFFER_NEW_FILE_PARAM`
    `static java.lang.String` | `DIFFER_OLD_FILE_PARAM`
    `static java.lang.String` | `DIFFER_USE_ASSERT_PARAM`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Differ(java.io.File outDir, java.util.Map<java.lang.String,java.lang.Object> parameters)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.File` | `addedReport(java.io.File file, java.lang.String fileName)`
    `java.io.File` | `addedReport(org.xml.sax.InputSource newSource, java.lang.String newFilePath, java.lang.String fileName)`
    `protected org.outerj.daisy.diff.html.HTMLDiffer` | `createHTMLDiffer()` Instantiates new HTMLDiffer Pass `this.parameters` as constructor arg
    `protected ReportBuilder` | `createReportBuilder()` New instance of ReportBuilder getter.
    `protected ReportFormatter` | `createReportFormatter()` New instance of ReportFormatter getter.
    `protected StatBuilder` | `createStatBuilder()` New instance of StatBuilder getter.
    `java.io.File` | `diff(java.io.File oldFile, java.io.File newFile, java.lang.String fileName)`
    `java.io.File` | `diff(org.xml.sax.InputSource oldSource, java.lang.String oldFilePath, org.xml.sax.InputSource newSource, java.lang.String newFilePath, java.lang.String fileName)`
    `java.io.File` | `getOutDir()` Gets default output folder
    `java.util.Map<java.lang.String,java.lang.Object>` | `getParameters()` Gets HTMLDiffer parameters
    `ReportBuilder` | `getReportBuilder()` Returns initialized ReportBuilder instance
    `ReportFormatter` | `getReportFormatter()` Returns initialized ReportFormatter instance
    `StatBuilder` | `getStatBuilder()` Returns initialized StatBuilder instance
    `java.lang.String` | `getTestUrl()`
    `protected void` | `init(DifferModule module)` Calls `DifferModule.init(java.lang.String, java.lang.String, java.lang.String, java.io.File)`
    `protected void` | `initReportBuilder(ReportBuilder reportBuilder)` Initializes ReportBuilder
    `protected void` | `initReportFormatter(ReportFormatter reportFormatter)` Initializes ReportFormatter
    `protected void` | `initStatBuilder(StatBuilder statBuilder)` Initializes StatBuilder
    `boolean` | `isClean()`
    `static boolean` | `isSDiffMode()`
    `boolean` | `isUseContexts()`
    `java.io.File` | `removedReport(java.io.File file, java.lang.String fileName)`
    `java.io.File` | `removedReport(org.xml.sax.InputSource oldSource, java.lang.String oldFilePath, java.lang.String fileName)`
    `void` | `setClean(boolean clean)` To clean HTML before parsing or not
    `static void` | `setSDiffMode(boolean flag)`
    `void` | `setTestUrl(java.lang.String testUrl)` Sets/Gets test url prefix
    `void` | `setUseContexts(boolean useContexts)` If true -> use contexts diff, otherwise - document diff

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DIFFER_USE_ASSERT_PARAM

          public static final java.lang.String DIFFER_USE_ASSERT_PARAM

      See Also:
        Constant Field Values

    - #### DIFFER_JUMPING_ASSERT_PARAM

          public static final java.lang.String DIFFER_JUMPING_ASSERT_PARAM

      See Also:
        Constant Field Values

    - #### DIFFER_CONFIG_PARAM

          public static final java.lang.String DIFFER_CONFIG_PARAM

      See Also:
        Constant Field Values

    - #### DIFFER_OLD_FILE_PARAM

          public static final java.lang.String DIFFER_OLD_FILE_PARAM

      See Also:
        Constant Field Values

    - #### DIFFER_NEW_FILE_PARAM

          public static final java.lang.String DIFFER_NEW_FILE_PARAM

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Differ

          public Differ(java.io.File outDir,
                        java.util.Map<java.lang.String,java.lang.Object> parameters)

  - ### Method Detail

    - #### getOutDir

          public final java.io.File getOutDir()

      Gets default output folder

    - #### getParameters

          public final java.util.Map<java.lang.String,java.lang.Object> getParameters()

      Gets HTMLDiffer parameters

    - #### getStatBuilder

          public final StatBuilder getStatBuilder()

      Returns initialized StatBuilder instance

    - #### getReportBuilder

          public final ReportBuilder getReportBuilder()

      Returns initialized ReportBuilder instance

    - #### getReportFormatter

          public final ReportFormatter getReportFormatter()

      Returns initialized ReportFormatter instance

    - #### setClean

          public final void setClean(boolean clean)

      To clean HTML before parsing or not

    - #### isClean

          public final boolean isClean()

    - #### setUseContexts

          public final void setUseContexts(boolean useContexts)

      If true -> use contexts diff, otherwise - document diff

    - #### isUseContexts

          public final boolean isUseContexts()

    - #### setTestUrl

          public final void setTestUrl(java.lang.String testUrl)

      Sets/Gets test url prefix

    - #### getTestUrl

          public final java.lang.String getTestUrl()

    - #### addedReport

          public final java.io.File addedReport(java.io.File file,
                                                java.lang.String fileName)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### addedReport

          public final java.io.File addedReport(org.xml.sax.InputSource newSource,
                                                java.lang.String newFilePath,
                                                java.lang.String fileName)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### removedReport

          public final java.io.File removedReport(java.io.File file,
                                                  java.lang.String fileName)
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### removedReport

          public final java.io.File removedReport(org.xml.sax.InputSource oldSource,
                                                  java.lang.String oldFilePath,
                                                  java.lang.String fileName)
                                           throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### diff

          public final java.io.File diff(java.io.File oldFile,
                                         java.io.File newFile,
                                         java.lang.String fileName)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### diff

          public final java.io.File diff(org.xml.sax.InputSource oldSource,
                                         java.lang.String oldFilePath,
                                         org.xml.sax.InputSource newSource,
                                         java.lang.String newFilePath,
                                         java.lang.String fileName)
                                  throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### createReportBuilder

          protected ReportBuilder createReportBuilder()

      New instance of ReportBuilder getter. You may override this method.
      Returns:
        ReportBuilder

    - #### initReportBuilder

          protected void initReportBuilder(ReportBuilder reportBuilder)

      Initializes ReportBuilder

    - #### createReportFormatter

          protected ReportFormatter createReportFormatter()

      New instance of ReportFormatter getter. You may override this method.
      Returns:
        ReportFormatter or NULL (if there is no need to generate HTML reports)

    - #### initReportFormatter

          protected void initReportFormatter(ReportFormatter reportFormatter)

      Initializes ReportFormatter

    - #### createStatBuilder

          protected StatBuilder createStatBuilder()

      New instance of StatBuilder getter. You may override this method.
      Returns:
        StatBuilder or NULL (if there is no need to generate statistics)

    - #### initStatBuilder

          protected void initStatBuilder(StatBuilder statBuilder)

      Initializes StatBuilder

    - #### createHTMLDiffer

          protected org.outerj.daisy.diff.html.HTMLDiffer createHTMLDiffer()

      Instantiates new HTMLDiffer Pass `this.parameters` as constructor arg

    - #### init

          protected final void init(DifferModule module)

      Calls `DifferModule.init(java.lang.String, java.lang.String, java.lang.String, java.io.File)`

    - #### setSDiffMode

          public static void setSDiffMode(boolean flag)

    - #### isSDiffMode

          public static boolean isSDiffMode()