Package org.revapi
Class Revapi
- java.lang.Object
-
- org.revapi.Revapi
-
public final class Revapi extends Object
The main entry point to the library. The instance of this class is initialized with the different extensions and then can run analyses on APIs with different configurations using theanalyze(AnalysisContext)
method.- Since:
- 1.0
- Author:
- Lukas Krejci
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Revapi.Builder
Deprecated.favor thePipelineConfiguration.Builder
-
Constructor Summary
Constructors Constructor Description Revapi(PipelineConfiguration pipelineConfiguration)
Use thebuilder()
instead.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalysisResult
analyze(AnalysisContext analysisContext)
Performs the analysis configured by the given analysis context.static Revapi.Builder
builder()
PipelineConfiguration
getPipelineConfiguration()
AnalysisResult.Extensions
prepareAnalysis(AnalysisContext analysisContext)
This instantiates the individual extensions and assigns the configurations to each one of them.ValidationResult
validateConfiguration(AnalysisContext analysisContext)
Validates the configuration of the analysis context.
-
-
-
Constructor Detail
-
Revapi
public Revapi(PipelineConfiguration pipelineConfiguration)
Use thebuilder()
instead.- Parameters:
pipelineConfiguration
- the configuration of the analysis pipeline- Throws:
IllegalArgumentException
- if any of the parameters is null
-
-
Method Detail
-
builder
@Nonnull public static Revapi.Builder builder()
-
validateConfiguration
public ValidationResult validateConfiguration(@Nonnull AnalysisContext analysisContext)
Validates the configuration of the analysis context.- Parameters:
analysisContext
- the analysis context- Returns:
- the validation result
-
getPipelineConfiguration
public PipelineConfiguration getPipelineConfiguration()
-
prepareAnalysis
public AnalysisResult.Extensions prepareAnalysis(AnalysisContext analysisContext)
This instantiates the individual extensions and assigns the configurations to each one of them. The caller of this method gains insight on what extensions with what configurations would be executed by the analysis.Note that the extensions are instantiated but NOT initialized after this call.
- Parameters:
analysisContext
- the analysis context containing the "global" configuration of all extensions- Returns:
- the instantiated extensions and their individual configurations
-
analyze
public AnalysisResult analyze(@Nonnull AnalysisContext analysisContext)
Performs the analysis configured by the given analysis context.Make sure to call the
AnalysisResult.close()
method (or perform the analysis in try-with-resources block).- Parameters:
analysisContext
- describes the analysis to be performed- Returns:
- a result object that has to be closed for the analysis to conclude
-
-