Annotation Type SonarLintSide


  • @Documented
    @Retention(RUNTIME)
    @Target(TYPE)
    public @interface SonarLintSide
    Marker annotation for all the components available in container of sonarlint. Note that injection of dependencies by constructor is used :
       @SonarLintSide
       public class Foo {
    
       }
       @SonarLintSide
       public class Bar {
         private final Foo foo;
         public Bar(Foo f) {
           this.foo = f;
         }
       }
    
     
    Since:
    6.0
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static java.lang.String INSTANCE
      The component will be instantiated once and reused by all analyses, as long as SonarLint is active in the IDE.
      static java.lang.String MODULE
      The component will be instantiated when a module is opened and kept alive until the module is closed.
      static java.lang.String MULTIPLE_ANALYSES
      Deprecated.
      since 9.0 use INSTANCE as a direct replacement
      static java.lang.String SINGLE_ANALYSIS
      The component will be instantiated for each analysis (could be single or multiple files analysis).
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String lifespan
      Control the lifecycle of the component in the IoC container.
    • Field Detail

      • SINGLE_ANALYSIS

        static final java.lang.String SINGLE_ANALYSIS
        The component will be instantiated for each analysis (could be single or multiple files analysis).
      • MULTIPLE_ANALYSES

        @Deprecated
        static final java.lang.String MULTIPLE_ANALYSES
        Deprecated.
        since 9.0 use INSTANCE as a direct replacement
        The component will be instantiated once and reused by all analyses, as long as the SonarLint engine is not restarted.
      • MODULE

        static final java.lang.String MODULE
        The component will be instantiated when a module is opened and kept alive until the module is closed. A module is a project in Eclipse, a folder in VSCode and a module in IntelliJ.
      • INSTANCE

        static final java.lang.String INSTANCE
        The component will be instantiated once and reused by all analyses, as long as SonarLint is active in the IDE.
        Since:
        9.0
    • Element Detail

      • lifespan

        java.lang.String lifespan
        Control the lifecycle of the component in the IoC container.
        Since:
        7.0
        Default:
        "SINGLE_ANALYSIS"