Interface IChangeFactory

    • Method Detail

      • 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.