All Known Implementing Classes:
AbstractChangeFactory

public interface IChangeFactory
An IChangeFactory is a factory capable to create an extension from a Diff if and only if this factory can handle the given Diff.

A factory must be able to say in which parent an extension must be attached if it handles the Diff from which it has been created.

  • Method Summary

    Modifier and Type
    Method
    Description
    create(Diff input)
    Creates and returns a extension from the given Diff.
    void
    fillRequiredDifferences(Comparison comparison, Diff extension)
    Sets the required link of the difference extension created by the related factory.
    It has to be called when all the extensions are created.
    Class<? extends Diff>
    Returns the kind of extension that this factory has to create.
    Returns the match in which the difference will be added.
    boolean
    handles(Diff input)
    Returns true if this factory handles the given kind of Diff, i.e., if it can create an extension.
  • Method Details

    • getExtensionKind

      Class<? extends Diff> getExtensionKind()
      Returns the kind of extension that this factory has to create.
      Returns:
      The kind of extension.
    • handles

      boolean handles(Diff input)
      Returns true if this factory handles the given kind of Diff, i.e., if it can create an extension.

      Performance note: this method should return as quickly as possible as it will called on every Diff of the Comparison.

      Parameters:
      input - the element to test
      Returns:
      true if this factory handles the given input, false otherwise.
    • create

      Diff create(Diff input)
      Creates and returns a extension from the given Diff. The returned element MUST NOT be added to its parent, it will be done by the post processor.
      Parameters:
      input - The input difference element.
      Returns:
      The difference extension.
    • getParentMatch

      Match getParentMatch(Diff input)
      Returns the match in which the difference will be added.
      Parameters:
      input - The input difference element.
      Returns:
      The difference extension.
    • fillRequiredDifferences

      void fillRequiredDifferences(Comparison comparison, Diff extension)
      Sets the required link of the difference extension created by the related factory.
      It has to be called when all the extensions are created.
      Parameters:
      comparison - The comparison.
      extension - The difference extension.