org.electrocodeogram.cpc.core.api.provider.reconciler
Interface IReconciliationResult


public interface IReconciliationResult

Structured return value for the IReconcilerProvider.
The semantics of the clone lists are similar to those of the CloneModificationEvent.
However, they are guaranteed to be non-null at all times.

Author:
vw
See Also:
IReconcilerProvider, CloneModificationEvent

Nested Class Summary
static class IReconciliationResult.Status
          The final status/result of the reconciliation effort.
 
Method Summary
 java.util.List<IClone> getLostClones()
          Returns a list of clones for which the clone positions could not be reconciled.
 java.util.List<IClone> getModifiedClones()
          A list of clones for which the content was modified due to the reconciliation.
 java.util.List<IClone> getMovedClones()
          A list of clones which were moved due to the reconciliation.
 java.util.List<IClone> getRemovedClones()
          Returns the clones which were removed due to the fact that the reconciled edits removed the clone ranges from the file.
 IReconciliationResult.Status getStatus()
          The status may only be modified by the IReconcilerProvider.
 boolean isFullyReconciled()
          Checks whether this result corresponds to a full reconciliation.
 java.lang.String toString()
          Each implementation should provide a meaningful toString() method.
 

Method Detail

getStatus

IReconciliationResult.Status getStatus()
The status may only be modified by the IReconcilerProvider.

Returns:
the final status/result of the reconciliation effort, may be NULL during reconciliation. Guaranteed to be non-null once the IReconcilerProvider returns.

isFullyReconciled

boolean isFullyReconciled()
Checks whether this result corresponds to a full reconciliation.
Convenience method.

Returns:
true if getStatus() is IReconciliationResult.Status.FULL_RECONCILIATION.

getModifiedClones

java.util.List<IClone> getModifiedClones()
A list of clones for which the content was modified due to the reconciliation.

Returns:
list of modified clones, never null.
See Also:
CloneModificationEvent.getModifiedClones()

getMovedClones

java.util.List<IClone> getMovedClones()
A list of clones which were moved due to the reconciliation.
This also includes clone instances which had any other values (beside the content) modified, i.e. extension data.

Returns:
list of moved clones, never null.
See Also:
CloneModificationEvent.getMovedClones()

getRemovedClones

java.util.List<IClone> getRemovedClones()
Returns the clones which were removed due to the fact that the reconciled edits removed the clone ranges from the file.

Clones which were removed because their new positions could not be determined are not part of this list.

A clone which is in this list, may not be in any of the other lists.

Returns:
list of removed clones, never null.
See Also:
getLostClones(), CloneModificationEvent.getRemovedClones()

getLostClones

java.util.List<IClone> getLostClones()
Returns a list of clones for which the clone positions could not be reconciled.

If IReconciliationResult.Status.FULL_RECONCILIATION is set, this method is guaranteed to return an empty list.
A clone which is in this list, may not be in any of the other lists.

Returns:
list of lost clones, never null.

toString

java.lang.String toString()
Each implementation should provide a meaningful toString() method.

Overrides:
toString in class java.lang.Object