diff options
Diffstat (limited to 'api/src/main/java/org/semver/Delta.java')
-rwxr-xr-x | api/src/main/java/org/semver/Delta.java | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/api/src/main/java/org/semver/Delta.java b/api/src/main/java/org/semver/Delta.java index d38777d..e148a72 100755 --- a/api/src/main/java/org/semver/Delta.java +++ b/api/src/main/java/org/semver/Delta.java @@ -107,6 +107,23 @@ public final class Delta { } @Immutable + public static class CompatChange extends Difference { + + private final AbstractInfo modifiedInfo; + + public CompatChange(@Nonnull final String className, @Nonnull final AbstractInfo info, @Nonnull final AbstractInfo modifiedInfo) { + super(className, info); + + this.modifiedInfo = modifiedInfo; + } + + public AbstractInfo getModifiedInfo() { + return this.modifiedInfo; + } + + } + + @Immutable public static class Deprecate extends Difference { private final AbstractInfo modifiedInfo; @@ -155,7 +172,8 @@ public final class Delta { contains(this.differences, Remove.class)) { return CompatibilityType.NON_BACKWARD_COMPATIBLE; } else if (contains(this.differences, Add.class) || - contains(this.differences, Deprecate.class)) { + contains(this.differences, CompatChange.class) || + contains(this.differences, Deprecate.class)) { return CompatibilityType.BACKWARD_COMPATIBLE_USER; } else { return CompatibilityType.BACKWARD_COMPATIBLE_IMPLEMENTER; |