Interface IChangeFactory
- All Known Implementing Classes:
AbstractChangeFactory
public interface IChangeFactory
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Returns the kind of extension that this factory has to create.getParentMatch
(Diff input) Returns the match in which the difference will be added.boolean
Returns true if this factory handles the given kind of Diff, i.e., if it can create anextension
.
-
Method Details
-
getExtensionKind
Returns the kind of extension that this factory has to create.- Returns:
- The kind of extension.
-
handles
Returns true if this factory handles the given kind of Diff, i.e., if it can create anextension
.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
Creates and returns aextension
from the givenDiff
. 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
Returns the match in which the difference will be added.- Parameters:
input
- The input difference element.- Returns:
- The difference extension.
-
fillRequiredDifferences
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.
-