Class AbstractScannerEngineFacade

java.lang.Object
org.sonarsource.scanner.lib.internal.facade.AbstractScannerEngineFacade
All Implemented Interfaces:
AutoCloseable, ScannerEngineFacade
Direct Known Subclasses:
InProcessScannerEngineFacade, NewScannerEngineFacade, SimulationScannerEngineFacade

public abstract class AbstractScannerEngineFacade extends Object implements ScannerEngineFacade
  • Constructor Details

    • AbstractScannerEngineFacade

      protected AbstractScannerEngineFacade(Map<String,String> bootstrapProperties, boolean isSonarQubeCloud, @Nullable String serverVersion, boolean wasEngineCacheHit, @Nullable JreCacheHit wasJreCacheHit)
  • Method Details

    • getServerVersion

      public String getServerVersion()
      Description copied from interface: ScannerEngineFacade
      Get the version of the SonarQube Server that the scanner is connected to. Don't call this method if the scanner is connected to SonarQube Cloud.
      Specified by:
      getServerVersion in interface ScannerEngineFacade
      Returns:
      the version of the SonarQube Server
    • isSonarQubeCloud

      public boolean isSonarQubeCloud()
      Specified by:
      isSonarQubeCloud in interface ScannerEngineFacade
      Returns:
      true if the scanner is connected to SonarQube Cloud, false otherwise
    • analyze

      public boolean analyze(Map<String,String> analysisProps)
      Description copied from interface: ScannerEngineFacade
      Run the analysis. In case of failure, a log message should have been emitted.
      Specified by:
      analyze in interface ScannerEngineFacade
      Returns:
      true if the analysis succeeded, false otherwise.
    • doAnalyze

      protected abstract boolean doAnalyze(Map<String,String> allProps)
    • getBootstrapProperties

      public Map<String,String> getBootstrapProperties()
      Description copied from interface: ScannerEngineFacade
      Get the properties that will be passed to the bootstrapped scanner engine.
      Specified by:
      getBootstrapProperties in interface ScannerEngineFacade