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.
    Lukas Krejci
    • Method Detail

      • validateConfiguration

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

        analysisContext - the analysis context containing the "global" configuration of all extensions
        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).

        analysisContext - describes the analysis to be performed
        a result object that has to be closed for the analysis to conclude