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 classDifference.Builderstatic classDifference.InReportBuilder
-
Field Summary
Fields Modifier and Type Field Description Map<String,String>attachmentsThe attachments of the difference, keyed by their meaning.Map<CompatibilityType,DifferenceSeverity>classificationStringcodeAPI analyzer dependent unique identification of the reported problemCriticalitycriticalityThe criticality of the difference.StringdescriptionDetailed description of the problemStringjustificationThe justification for this difference.StringnameHuman 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.Builderbuilder()static Difference.Buildercopy(Difference other)booleanequals(Object o)inthashCode()booleanisIdentifyingAttachment(String attachmentName)StringtoString()
-
-
-
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)
-
-