Class Revapi
java.lang.Object
org.revapi.Revapi
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 the
analyze(AnalysisContext) method.- Since:
- 1.0
- Author:
- Lukas Krejci
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionRevapi(PipelineConfiguration pipelineConfiguration) Use thebuilder()instead. -
Method Summary
Modifier and TypeMethodDescriptionanalyze(AnalysisContext analysisContext) Performs the analysis configured by the given analysis context.static Revapi.Builderbuilder()prepareAnalysis(AnalysisContext analysisContext) This instantiates the individual extensions and assigns the configurations to each one of them.validateConfiguration(AnalysisContext analysisContext) Validates the configuration of the analysis context.
-
Constructor Details
-
Revapi
Use thebuilder()instead.- Parameters:
pipelineConfiguration- the configuration of the analysis pipeline- Throws:
IllegalArgumentException- if any of the parameters is null
-
-
Method Details
-
builder
-
validateConfiguration
Validates the configuration of the analysis context.- Parameters:
analysisContext- the analysis context- Returns:
- the validation result
-
getPipelineConfiguration
-
prepareAnalysis
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
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
-
PipelineConfiguration.Builder