Interface AnalysisPlugin

All Superinterfaces:
OrderedPlugin

public interface AnalysisPlugin extends OrderedPlugin
A plugin that is called during the analysis phase to collect information about analysis decisions. This allows implementations to track why certain decisions were made, such as why a particular version range was chosen for an import.

This plugin is called during the Analyzer.analyze() phase, before the manifest is generated. It provides callbacks for various analysis events, allowing implementations to build a detailed log of analysis decisions.

  • Method Details

    • reportImportVersion

      void reportImportVersion(Analyzer analyzer, Descriptors.PackageRef packageRef, String version, String reason) throws Exception
      Called when the analyzer determines a version range for an import package. This provides insight into why a particular version range was chosen.
      Parameters:
      analyzer - the analyzer performing the analysis
      packageRef - the package being analyzed
      version - the version or version range determined
      reason - a human-readable explanation for why this version was chosen (e.g., "provider type", "consumer type", "explicit version policy")
      Throws:
      Exception - if an error occurs during processing
    • reportAnalysis

      default void reportAnalysis(Analyzer analyzer, String category, String details) throws Exception
      Called when the analyzer makes other analysis decisions that may be of interest.
      Parameters:
      analyzer - the analyzer performing the analysis
      category - the category of the analysis decision (e.g., "uses", "export", "capability")
      details - detailed information about the decision
      Throws:
      Exception - if an error occurs during processing