Package org.revapi

Class AnalysisResult

  • All Implemented Interfaces:

    public final class AnalysisResult
    extends Object
    implements AutoCloseable
    Holds the result of the analysis. The outputs of the analysis are generated by the reporters the Revapi instance is configured with and as such are not directly accessible through this object.

    To properly close the resource acquired by the extensions during the analysis, one has to close() this analysis results object.

    Lukas Krejci
    • Method Detail

      • fakeSuccess

        public static AnalysisResult fakeSuccess()
        A factory method for users that need to report success without actually running any analysis. The returned result will be successful, but will not contain the actual configurations of extensions.
        a "fake" successful analysis result
      • fakeFailure

        public static AnalysisResult fakeFailure​(Exception failure)
        Similar to fakeSuccess(), this returns a failed analysis result without the need to run any analysis.
        failure - the failure to report
        a "fake" failed analysis result
      • isSuccess

        public boolean isSuccess()
      • getFailure

        public Exception getFailure()
        the error thrown during the analysis or null if the analysis completed without failures
      • getExtensions

        public AnalysisResult.Extensions getExtensions()
        the extension instances run during the analysis, each with its corresponding analysis context containing the configuration used for the extension