Interface IChangeFactory
-
- All Known Implementing Classes:
AbstractChangeFactory
public interface IChangeFactory
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Diff
create(Diff input)
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>
getExtensionKind()
Returns the kind of extension that this factory has to create.Match
getParentMatch(Diff input)
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 anextension
.
-
-
-
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 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
Diff create(Diff input)
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
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.
-
-