Package org.revapi

Class 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 the analyze(AnalysisContext) method.
    Since:
    1.0
    Author:
    Lukas Krejci
    • Method Detail

      • validateConfiguration

        public ValidationResult validateConfiguration​(@Nonnull
                                                      AnalysisContext analysisContext)
        Validates the configuration of the analysis context.
        Parameters:
        analysisContext - the analysis context
        Returns:
        the validation result
      • 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