Package org.revapi.maven
Class BuildTimeReporter
- java.lang.Object
-
- org.revapi.maven.BuildTimeReporter
-
- All Implemented Interfaces:
AutoCloseable
,org.revapi.configuration.Configurable
,org.revapi.Reporter
public final class BuildTimeReporter extends Object implements org.revapi.Reporter
Build-time reporter is aReporter
extension for Revapi that is used by theCheckMojo
to output the found problems and also to provide the suggestions to the user how to ignore the problems if deemed ok.Even though this is a normal Revapi extension, it doesn't use the normal configuration mechanisms provided by Revapi (i.e. it doesn't define a configuration schema and doesn't accept any configuration from the configuration in the analysis context during the
initialize(AnalysisContext)
method). Instead, it is configured through theAnalysisContext.getData(String)
. This is to make it easier to pass complex objects to the reporter and also to amplify the fact that this is no "normal" extension but is tightly bound to theCheckMojo
and the Maven build.- Since:
- 0.1
- Author:
- Lukas Krejci
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
BuildTimeReporter.SuggestionBuilderContext
The context that can be used by theBuildTimeReporter.SuggestionsBuilder
to get information about the differences and the configured output options.static interface
BuildTimeReporter.SuggestionsBuilder
A suggestion builder is an object that theBuildTimeReporter
uses to render suggestions for ignoring the found problems.
-
Field Summary
Fields Modifier and Type Field Description static String
BREAKING_CRITICALITY_KEY
static String
OUTPUT_NON_IDENTIFYING_ATTACHMENTS
static String
SUGGESTIONS_BUILDER_KEY
-
Constructor Summary
Constructors Constructor Description BuildTimeReporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
getAllProblemsMessage()
String
getExtensionId()
String
getIgnoreSuggestion()
Reader
getJSONSchema()
boolean
hasBreakingProblems()
void
initialize(org.revapi.AnalysisContext context)
void
report(org.revapi.Report report)
-
-
-
Field Detail
-
BREAKING_CRITICALITY_KEY
public static final String BREAKING_CRITICALITY_KEY
- See Also:
- Constant Field Values
-
OUTPUT_NON_IDENTIFYING_ATTACHMENTS
public static final String OUTPUT_NON_IDENTIFYING_ATTACHMENTS
- See Also:
- Constant Field Values
-
SUGGESTIONS_BUILDER_KEY
public static final String SUGGESTIONS_BUILDER_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasBreakingProblems
public boolean hasBreakingProblems()
-
getAllProblemsMessage
public String getAllProblemsMessage()
-
getIgnoreSuggestion
public String getIgnoreSuggestion()
-
getExtensionId
@Nullable public String getExtensionId()
- Specified by:
getExtensionId
in interfaceorg.revapi.configuration.Configurable
-
getJSONSchema
@Nullable public Reader getJSONSchema()
- Specified by:
getJSONSchema
in interfaceorg.revapi.configuration.Configurable
-
initialize
public void initialize(@Nonnull org.revapi.AnalysisContext context)
- Specified by:
initialize
in interfaceorg.revapi.configuration.Configurable
-
report
public void report(@Nonnull org.revapi.Report report)
- Specified by:
report
in interfaceorg.revapi.Reporter
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
-