public final class BuildTimeReporter extends Object implements org.revapi.Reporter
Reporter
extension for Revapi that is used by the CheckMojo
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 the
AnalysisContext.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 the CheckMojo
and the Maven
build.
Modifier and Type | Class and Description |
---|---|
class |
BuildTimeReporter.SuggestionBuilderContext
The context that can be used by the
BuildTimeReporter.SuggestionsBuilder to get information about the differences
and the configured output options. |
static interface |
BuildTimeReporter.SuggestionsBuilder
A suggestion builder is an object that the
BuildTimeReporter uses to render suggestions for ignoring
the found problems. |
Modifier and Type | Field and Description |
---|---|
static String |
BREAKING_CRITICALITY_KEY |
static String |
OUTPUT_NON_IDENTIFYING_ATTACHMENTS |
static String |
SUGGESTIONS_BUILDER_KEY |
Constructor and Description |
---|
BuildTimeReporter() |
Modifier and Type | Method and 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) |
public static final String BREAKING_CRITICALITY_KEY
public static final String OUTPUT_NON_IDENTIFYING_ATTACHMENTS
public static final String SUGGESTIONS_BUILDER_KEY
public boolean hasBreakingProblems()
public String getAllProblemsMessage()
public String getIgnoreSuggestion()
@Nullable public String getExtensionId()
getExtensionId
in interface org.revapi.configuration.Configurable
@Nullable public Reader getJSONSchema()
getJSONSchema
in interface org.revapi.configuration.Configurable
public void initialize(@Nonnull org.revapi.AnalysisContext context)
initialize
in interface org.revapi.configuration.Configurable
public void report(@Nonnull org.revapi.Report report)
report
in interface org.revapi.Reporter
public void close() throws IOException
close
in interface AutoCloseable
IOException
Copyright © 2014-2021 Lukas Krejci. All Rights Reserved.