Package org.revapi
Class Difference
- java.lang.Object
-
- org.revapi.Difference
-
public final class Difference extends Object
Represents a single difference between an old and new API element.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Difference.Builder
static class
Difference.InReportBuilder
-
Field Summary
Fields Modifier and Type Field Description Map<String,String>
attachments
The attachments of the difference, keyed by their meaning.Map<CompatibilityType,DifferenceSeverity>
classification
String
code
API analyzer dependent unique identification of the reported problemCriticality
criticality
The criticality of the difference.String
description
Detailed description of the problemString
justification
The justification for this difference.String
name
Human readable name of the problem
-
Constructor Summary
Constructors Constructor Description Difference(String code, String name, String description, String justification, Criticality criticality, Map<CompatibilityType,DifferenceSeverity> classification, Map<String,String> attachments, List<String> identifyingAttachments)
Difference(String code, String name, String description, Map<CompatibilityType,DifferenceSeverity> classification, Map<String,String> attachments)
Deprecated.use the full constructor.Difference(String code, String name, String description, Map<CompatibilityType,DifferenceSeverity> classification, Map<String,String> attachments, List<String> identifyingAttachments)
Deprecated.use the full constructor.Difference(String code, String name, String description, CompatibilityType compatibility, DifferenceSeverity severity, Map<String,String> attachments)
Deprecated.use the full constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Difference.Builder
builder()
static Difference.Builder
copy(Difference other)
boolean
equals(Object o)
int
hashCode()
boolean
isIdentifyingAttachment(String attachmentName)
String
toString()
-
-
-
Field Detail
-
code
public final String code
API analyzer dependent unique identification of the reported problem
-
name
public final String name
Human readable name of the problem
-
description
public final String description
Detailed description of the problem
-
classification
public final Map<CompatibilityType,DifferenceSeverity> classification
-
attachments
public final Map<String,String> attachments
The attachments of the difference, keyed by their meaning. Each difference can define a different set of attachments that correspond to "findings" the difference represents. The map preserves the insertion order.
-
justification
public final String justification
The justification for this difference. This is meant to be read from the user-supplied configuration, set by some difference transform and read by the reporters.
-
criticality
@Nullable public final Criticality criticality
The criticality of the difference. Never null when accessed in aReporter
.
-
-
Constructor Detail
-
Difference
@Deprecated public Difference(@Nonnull String code, @Nonnull String name, @Nullable String description, @Nonnull CompatibilityType compatibility, @Nonnull DifferenceSeverity severity, @Nonnull Map<String,String> attachments)
Deprecated.use the full constructor. This will be removed in some future release.
-
Difference
@Deprecated public Difference(@Nonnull String code, @Nonnull String name, @Nullable String description, @Nonnull Map<CompatibilityType,DifferenceSeverity> classification, @Nonnull Map<String,String> attachments)
Deprecated.use the full constructor. This will be removed in some future release.
-
Difference
@Deprecated public Difference(@Nonnull String code, @Nonnull String name, @Nullable String description, @Nonnull Map<CompatibilityType,DifferenceSeverity> classification, @Nonnull Map<String,String> attachments, @Nonnull List<String> identifyingAttachments)
Deprecated.use the full constructor. This will be removed in some future release.
-
Difference
public Difference(@Nonnull String code, @Nonnull String name, @Nullable String description, @Nullable String justification, @Nullable Criticality criticality, @Nonnull Map<CompatibilityType,DifferenceSeverity> classification, @Nonnull Map<String,String> attachments, @Nonnull List<String> identifyingAttachments)
-
-
Method Detail
-
builder
@Nonnull public static Difference.Builder builder()
-
copy
public static Difference.Builder copy(Difference other)
-
isIdentifyingAttachment
public boolean isIdentifyingAttachment(String attachmentName)
-
-