diff options
136 files changed, 342 insertions, 268 deletions
diff --git a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/XooTokenizer.java b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/XooTokenizer.java index 7773d36df39..6c1fcde3a28 100644 --- a/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/XooTokenizer.java +++ b/plugins/sonar-xoo-plugin/src/main/java/org/sonar/xoo/lang/XooTokenizer.java @@ -27,12 +27,12 @@ import net.sourceforge.pmd.cpd.TokenEntry; import net.sourceforge.pmd.cpd.Tokenizer; import net.sourceforge.pmd.cpd.Tokens; import org.apache.commons.io.FileUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; -@BatchSide +@ScannerSide public class XooTokenizer implements Tokenizer { private static final Logger LOG = Loggers.get(XooTokenizer.class); diff --git a/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java b/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java index 7539c40512a..c23cf2bd596 100644 --- a/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java +++ b/sonar-core/src/main/java/org/sonar/core/component/DefaultResourceTypes.java @@ -19,14 +19,14 @@ */ package org.sonar.core.component; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.resources.Qualifiers; import org.sonar.api.resources.ResourceType; import org.sonar.api.resources.ResourceTypeTree; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public final class DefaultResourceTypes { diff --git a/sonar-core/src/main/java/org/sonar/core/config/Logback.java b/sonar-core/src/main/java/org/sonar/core/config/Logback.java index e8b70c0633d..08447fac1ad 100644 --- a/sonar-core/src/main/java/org/sonar/core/config/Logback.java +++ b/sonar-core/src/main/java/org/sonar/core/config/Logback.java @@ -31,14 +31,14 @@ import java.util.Map; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * Configure Logback * * @since 2.12 */ -@BatchSide +@ScannerSide public class Logback { private Logback() { diff --git a/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java b/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java index 72486d51c07..5c6bfb9818f 100644 --- a/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java +++ b/sonar-core/src/main/java/org/sonar/core/i18n/DefaultI18n.java @@ -41,7 +41,7 @@ import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.apache.commons.io.IOUtils; import org.picocontainer.Startable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.i18n.I18n; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -52,7 +52,7 @@ import org.sonar.api.utils.log.Loggers; import org.sonar.core.platform.PluginInfo; import org.sonar.core.platform.PluginRepository; -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class DefaultI18n implements I18n, Startable { diff --git a/sonar-core/src/main/java/org/sonar/core/i18n/RuleI18nManager.java b/sonar-core/src/main/java/org/sonar/core/i18n/RuleI18nManager.java index a3270e12e3f..6ca91cd7e96 100644 --- a/sonar-core/src/main/java/org/sonar/core/i18n/RuleI18nManager.java +++ b/sonar-core/src/main/java/org/sonar/core/i18n/RuleI18nManager.java @@ -22,7 +22,7 @@ package org.sonar.core.i18n; import java.util.Locale; import javax.annotation.CheckForNull; import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.i18n.RuleI18n; import org.sonar.api.rules.Rule; import org.sonar.api.ce.ComputeEngineSide; @@ -32,7 +32,7 @@ import org.sonar.api.server.ServerSide; * @deprecated in 4.1. Rules are not localized anymore. See http://jira.sonarsource.com/browse/SONAR-4885 */ @Deprecated -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class RuleI18nManager implements RuleI18n { diff --git a/sonar-core/src/main/java/org/sonar/core/issue/tracking/Tracker.java b/sonar-core/src/main/java/org/sonar/core/issue/tracking/Tracker.java index 9b57dd27efb..7fe871be272 100644 --- a/sonar-core/src/main/java/org/sonar/core/issue/tracking/Tracker.java +++ b/sonar-core/src/main/java/org/sonar/core/issue/tracking/Tracker.java @@ -25,12 +25,12 @@ import java.util.Collection; import java.util.Objects; import javax.annotation.Nonnull; import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.rule.RuleKey; @InstantiationStrategy(InstantiationStrategy.PER_BATCH) -@BatchSide +@ScannerSide public class Tracker<RAW extends Trackable, BASE extends Trackable> { public Tracking<RAW, BASE> track(Input<RAW> rawInput, Input<BASE> baseInput) { diff --git a/sonar-core/src/main/java/org/sonar/core/metric/ScannerMetrics.java b/sonar-core/src/main/java/org/sonar/core/metric/ScannerMetrics.java index 05bcb7a5ac1..9d797f7a8ce 100644 --- a/sonar-core/src/main/java/org/sonar/core/metric/ScannerMetrics.java +++ b/sonar-core/src/main/java/org/sonar/core/metric/ScannerMetrics.java @@ -25,7 +25,7 @@ import com.google.common.collect.Iterables; import java.util.List; import java.util.Set; import javax.annotation.Nullable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.measures.Metric; import org.sonar.api.measures.Metrics; import org.sonar.api.ce.ComputeEngineSide; @@ -87,7 +87,7 @@ import static org.sonar.api.measures.CoreMetrics.UNCOVERED_LINES; * Scanners should not send other metrics, and the Compute Engine should not allow other metrics. */ @ComputeEngineSide -@BatchSide +@ScannerSide public class ScannerMetrics { private static final Set<Metric> ALLOWED_CORE_METRICS = ImmutableSet.<Metric>of( diff --git a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java index f94f2245278..9e4be739883 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/ComponentContainer.java @@ -36,7 +36,7 @@ import org.picocontainer.PicoContainer; import org.picocontainer.behaviors.OptInCaching; import org.picocontainer.lifecycle.ReflectionLifecycleStrategy; import org.picocontainer.monitors.NullComponentMonitor; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.config.PropertyDefinitions; import org.sonar.api.server.ServerSide; @@ -46,7 +46,7 @@ import org.sonar.api.utils.log.Profiler; import static com.google.common.collect.ImmutableList.copyOf; import static java.util.Objects.requireNonNull; -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class ComponentContainer implements ContainerPopulator.Container { diff --git a/sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java b/sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java index 03a3c21f501..df9913f19a4 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/PluginClassloaderFactory.java @@ -26,7 +26,7 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.apache.commons.io.FileUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; import org.sonar.api.utils.TempFolder; @@ -46,7 +46,7 @@ import static org.sonar.classloader.ClassloaderBuilder.LoadingOrder.SELF_FIRST; * <li>loading of the libraries embedded in plugin JAR files (directory META-INF/libs)</li> * </ul> */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class PluginClassloaderFactory { diff --git a/sonar-core/src/main/java/org/sonar/core/platform/PluginRepository.java b/sonar-core/src/main/java/org/sonar/core/platform/PluginRepository.java index f90c2881f43..a5aff6b1583 100644 --- a/sonar-core/src/main/java/org/sonar/core/platform/PluginRepository.java +++ b/sonar-core/src/main/java/org/sonar/core/platform/PluginRepository.java @@ -21,14 +21,14 @@ package org.sonar.core.platform; import java.util.Collection; import org.sonar.api.Plugin; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; /** * Provides information about the plugins installed in the dependency injection container */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public interface PluginRepository { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java index ea8dfc5863a..426e8bb34a1 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java @@ -19,7 +19,7 @@ */ package org.sonar.api; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * Marker interface for all the components available in container of batch (code analyzer). Note that @@ -38,9 +38,9 @@ import org.sonar.api.batch.BatchSide; * </pre> * * @since 2.2 - * @deprecated since 5.2 use {@link BatchSide} annotation + * @deprecated since 5.2 use {@link ScannerSide} annotation */ @Deprecated -@BatchSide +@ScannerSide public interface BatchComponent { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java index 3ea80ff9b11..2531885de94 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java @@ -19,14 +19,14 @@ */ package org.sonar.api; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * Marker interface for all the batch extension points, which are aimed to be implemented * by plugins. * * @since 1.10 - * @deprecated since 5.2 replaced by {@link BatchSide} and {@link ExtensionPoint} annotations + * @deprecated since 5.2 replaced by {@link ScannerSide} and {@link ExtensionPoint} annotations */ @Deprecated public interface BatchExtension extends Extension, BatchComponent { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java index fc010d2271f..21832e1754e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java @@ -102,10 +102,10 @@ public interface Plugin { /** * Add an extension as : * <ul> - * <li>a Class that is annotated with {@link org.sonar.api.batch.BatchSide}, {@link org.sonar.api.server.ServerSide} + * <li>a Class that is annotated with {@link org.sonar.api.batch.ScannerSide}, {@link org.sonar.api.server.ServerSide} * or {@link org.sonar.api.ce.ComputeEngineSide}. The extension will be instantiated once. Its dependencies are * injected through constructor parameters.</li> - * <li>an instance that is annotated with {@link org.sonar.api.batch.BatchSide}, {@link org.sonar.api.server.ServerSide} + * <li>an instance that is annotated with {@link org.sonar.api.batch.ScannerSide}, {@link org.sonar.api.server.ServerSide} * or {@link org.sonar.api.ce.ComputeEngineSide}.</li> * </ul> * Only a single component can be registered for a class. It's not allowed for example to register: diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/SonarQubeVersion.java b/sonar-plugin-api/src/main/java/org/sonar/api/SonarQubeVersion.java index 7c55e533ba2..cbd08aa0090 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/SonarQubeVersion.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/SonarQubeVersion.java @@ -20,7 +20,7 @@ package org.sonar.api; import javax.annotation.concurrent.Immutable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.sensor.Sensor; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -118,7 +118,7 @@ import static java.util.Objects.requireNonNull; * * @since 5.5 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide @Immutable diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Startable.java b/sonar-plugin-api/src/main/java/org/sonar/api/Startable.java index a657d2164f5..b6407045011 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Startable.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Startable.java @@ -20,7 +20,7 @@ package org.sonar.api; /** - * An interface which is implemented by classes annotated with {@link org.sonar.api.batch.BatchSide BatchSide}, + * An interface which is implemented by classes annotated with {@link org.sonar.api.batch.ScannerSide ScannerSide}, * {@link org.sonar.api.server.ServerSide ServerSide} and/or {@link org.sonar.api.ce.ComputeEngineSide ComputeEngineSide} * (referred to below as "component") that can be started and stopped. * <p> diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java index 01fd097164a..99abffa2595 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/AnalysisMode.java @@ -23,7 +23,7 @@ package org.sonar.api.batch; * Use this component to find the current running mode. * @since 5.1 */ -@BatchSide +@ScannerSide public interface AnalysisMode { boolean isPreview(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchSide.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchSide.java index cb5f1070bd5..4489a51083d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchSide.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/BatchSide.java @@ -42,9 +42,10 @@ import java.lang.annotation.Target; * } * * </pre> - * + * @deprecated since 6.0. Use {@link ScannerSide} instead. * @since 5.2 */ +@Deprecated @Documented @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CoverageExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CoverageExtension.java index 1fe8b43a2ed..3731c3f2e4c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CoverageExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CoverageExtension.java @@ -26,7 +26,7 @@ import org.sonar.api.ExtensionPoint; * @deprecated since 5.2 not used anymore */ @Deprecated -@BatchSide +@ScannerSide @ExtensionPoint public interface CoverageExtension { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java index a39c405dcec..131b9728529 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/CpdMapping.java @@ -31,7 +31,7 @@ import org.sonar.api.resources.Resource; * @since 1.10 * @deprecated since 5.5 use {@link SensorContext#newCpdTokens()} */ -@BatchSide +@ScannerSide @ExtensionPoint @Deprecated public interface CpdMapping { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Initializer.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Initializer.java index 2a5ec53ff73..fb6a35d8ecd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Initializer.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Initializer.java @@ -29,7 +29,7 @@ import org.sonar.api.resources.Project; * <p> * @since 2.6 */ -@BatchSide +@ScannerSide @ExtensionPoint public abstract class Initializer implements CheckProject { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java index a7120f5e8e8..1134d1c6274 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/PostJob.java @@ -32,7 +32,7 @@ import org.sonar.api.resources.Project; * @deprecated since 5.6 use org.sonar.api.batch.postjob.PostJob */ @Deprecated -@BatchSide +@ScannerSide @ExtensionPoint public interface PostJob { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java index 462d31e0f0f..283fe4d3119 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ResourceFilter.java @@ -32,7 +32,7 @@ import org.sonar.api.resources.Resource; * @deprecated since 4.2. Analysis is file-system oriented. See {@link org.sonar.api.batch.fs.InputFileFilter} */ @Deprecated -@BatchSide +@ScannerSide @ExtensionPoint public interface ResourceFilter { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/ScannerSide.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ScannerSide.java new file mode 100644 index 00000000000..688a254469f --- /dev/null +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/ScannerSide.java @@ -0,0 +1,52 @@ +/* + * SonarQube + * Copyright (C) 2009-2016 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ +package org.sonar.api.batch; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * Marker annotation for all the components available in the container of the scanner (code analyzer). Note that + * injection of dependencies by constructor is used : + * <pre> + * {@literal @}ScannerSide + * public class Foo { + * + * } + * {@literal @}ScannerSide + * public class Bar { + * private final Foo foo; + * public Bar(Foo f) { + * this.foo = f; + * } + * } + * + * </pre> + * + * @since 6.0 + */ +@Documented +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface ScannerSide { +} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java index 5f632e974a9..2907938da5a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/Sensor.java @@ -43,7 +43,7 @@ import org.sonar.api.resources.Project; * @deprecated since 5.6 use org.sonar.api.batch.sensor.Sensor */ @Deprecated -@BatchSide +@ScannerSide @ExtensionPoint public interface Sensor extends CheckProject { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java index 432ea91733b..750e782a4e9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectBuilder.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.bootstrap; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionPoint; import org.sonar.api.batch.InstantiationStrategy; @@ -35,7 +35,7 @@ import org.sonar.api.batch.InstantiationStrategy; * * @since 2.9 */ -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) @ExtensionPoint public abstract class ProjectBuilder { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java index 66f36ced759..a069cd40980 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/bootstrap/ProjectReactor.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.bootstrap; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import java.util.ArrayList; import java.util.List; @@ -28,7 +28,7 @@ import java.util.List; * Mutable project definitions that can be modified by {@link ProjectBuilder} extensions. * @since 2.9 */ -@BatchSide +@ScannerSide public class ProjectReactor implements ProjectKey { private ProjectDefinition root; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/EventHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/EventHandler.java index 7d818a1daa6..0f4ec1fe21d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/EventHandler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/EventHandler.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.events; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionPoint; /** @@ -28,7 +28,7 @@ import org.sonar.api.ExtensionPoint; * * @since 2.8 */ -@BatchSide +@ScannerSide @ExtensionPoint public interface EventHandler { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/FileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/FileSystem.java index 18733a2c01f..af020cdbc03 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/FileSystem.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/FileSystem.java @@ -23,7 +23,7 @@ import java.io.File; import java.nio.charset.Charset; import java.util.SortedSet; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * The {@link FileSystem} manages all the source files to be analyzed. @@ -51,7 +51,7 @@ import org.sonar.api.batch.BatchSide; * * @since 4.2 */ -@BatchSide +@ScannerSide public interface FileSystem { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/InputFileFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/InputFileFilter.java index a2f240006de..2c489628b40 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/InputFileFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/InputFileFilter.java @@ -19,14 +19,14 @@ */ package org.sonar.api.batch.fs; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionPoint; /** * Extension point to exclude some files from inspection * @since 4.2 */ -@BatchSide +@ScannerSide @ExtensionPoint public interface InputFileFilter { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java index 4d2179886ae..4e45d825a38 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/fs/internal/FileMetadata.java @@ -43,7 +43,7 @@ import org.apache.commons.codec.digest.DigestUtils; import org.apache.commons.io.ByteOrderMark; import org.apache.commons.io.input.BOMInputStream; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; @@ -51,7 +51,7 @@ import org.sonar.api.utils.log.Loggers; * Computes hash of files. Ends of Lines are ignored, so files with * same content but different EOL encoding have the same hash. */ -@BatchSide +@ScannerSide public class FileMetadata { private static final Logger LOG = Loggers.get(FileMetadata.class); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/measure/MetricFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/measure/MetricFinder.java index ed8338d1473..43c32156d4f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/measure/MetricFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/measure/MetricFinder.java @@ -23,12 +23,12 @@ import java.io.Serializable; import java.util.Collection; import java.util.List; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * @since 4.5 */ -@BatchSide +@ScannerSide public interface MetricFinder { @CheckForNull diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java index 58510ad3ea1..86d9ad50817 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/postjob/PostJob.java @@ -20,7 +20,7 @@ package org.sonar.api.batch.postjob; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * PostJobs are executed at the very end of scanner analysis. A PostJob can't do any modification @@ -30,7 +30,7 @@ import org.sonar.api.batch.BatchSide; * * @since 5.2 */ -@BatchSide +@ScannerSide @ExtensionPoint public interface PostJob { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/ActiveRules.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/ActiveRules.java index b88131c94b2..09b2804a38f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/ActiveRules.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/ActiveRules.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.rule; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.rule.RuleKey; import javax.annotation.CheckForNull; @@ -35,7 +35,7 @@ import java.util.Collection; * * @since 4.2 */ -@BatchSide +@ScannerSide public interface ActiveRules { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/CheckFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/CheckFactory.java index 2afc732065f..30ce050fa55 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/CheckFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/CheckFactory.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.rule; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * Creates {@link org.sonar.api.batch.rule.Checks}. This class is available @@ -27,7 +27,7 @@ import org.sonar.api.batch.BatchSide; * * @since 4.2 */ -@BatchSide +@ScannerSide public class CheckFactory { private final ActiveRules activeRules; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Rules.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Rules.java index d27ede1cc5d..3a228f1bdc2 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Rules.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Rules.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.rule; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.rule.RuleKey; import javax.annotation.CheckForNull; @@ -32,7 +32,7 @@ import java.util.Collection; * * @since 4.2 */ -@BatchSide +@ScannerSide public interface Rules { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java index 1527e7ca20f..87dbab5f8a7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/BlameCommand.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.scm; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; @@ -31,7 +31,7 @@ import java.util.List; * @since 5.0 */ @InstantiationStrategy(InstantiationStrategy.PER_BATCH) -@BatchSide +@ScannerSide public abstract class BlameCommand { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java index 56f25efc1a5..5cbf5b96af7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/scm/ScmProvider.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.scm; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.CoreProperties; import org.sonar.api.ExtensionPoint; import org.sonar.api.batch.InstantiationStrategy; @@ -30,7 +30,7 @@ import java.io.File; * See {@link CoreProperties#LINKS_SOURCES_DEV} to get old Maven URL format. * @since 5.0 */ -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) @ExtensionPoint public abstract class ScmProvider { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/Sensor.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/Sensor.java index 0633d0c35cd..2eae58b055a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/Sensor.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/Sensor.java @@ -20,7 +20,7 @@ package org.sonar.api.batch.sensor; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.sensor.internal.SensorContextTester; /** @@ -33,7 +33,7 @@ import org.sonar.api.batch.sensor.internal.SensorContextTester; * For testing purpose you can use {@link SensorContextTester} * @since 5.1 */ -@BatchSide +@ScannerSide @ExtensionPoint public interface Sensor { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorStorage.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorStorage.java index 3ea574b5bf6..a0be68cbc24 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorStorage.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorStorage.java @@ -19,7 +19,7 @@ */ package org.sonar.api.batch.sensor.internal; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage; import org.sonar.api.batch.sensor.cpd.internal.DefaultCpdTokens; import org.sonar.api.batch.sensor.highlighting.internal.DefaultHighlighting; @@ -31,7 +31,7 @@ import org.sonar.api.batch.sensor.symbol.internal.DefaultSymbolTable; * Interface for storing data computed by sensors. * @since 5.1 */ -@BatchSide +@ScannerSide public interface SensorStorage { void store(Measure measure); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ce/ComputeEngineSide.java b/sonar-plugin-api/src/main/java/org/sonar/api/ce/ComputeEngineSide.java index fdcb0c1a682..2cdb5411b4c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ce/ComputeEngineSide.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ce/ComputeEngineSide.java @@ -24,10 +24,10 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** - * Same as {@link BatchSide} but for components for the Compute Engine Server. + * Same as {@link ScannerSide} but for components for the Compute Engine Server. * * @since 5.5 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java index 60eac6d247e..9628a3c7cef 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/EmailSettings.java @@ -21,7 +21,7 @@ package org.sonar.api.config; import com.google.common.base.MoreObjects; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -30,7 +30,7 @@ import org.sonar.api.server.ServerSide; * * @since 3.2 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class EmailSettings { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java index 5214281c54e..eb73a5590ce 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinition.java @@ -32,7 +32,7 @@ import org.apache.commons.lang.math.NumberUtils; import org.sonar.api.ExtensionPoint; import org.sonar.api.Property; import org.sonar.api.PropertyType; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.resources.Qualifiers; import org.sonar.api.server.ServerSide; @@ -67,7 +67,7 @@ import org.sonar.api.server.ServerSide; * * @since 3.6 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide @ExtensionPoint diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java index c2e427b1e17..4aa351ab910 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java @@ -30,7 +30,7 @@ import org.apache.commons.lang.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.Properties; import org.sonar.api.Property; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; import org.sonar.api.utils.AnnotationUtils; @@ -40,7 +40,7 @@ import org.sonar.api.utils.AnnotationUtils; * * @since 2.12 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public final class PropertyDefinitions { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java index 55de869a85f..8946bc77393 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java @@ -33,7 +33,7 @@ import javax.annotation.CheckForNull; import javax.annotation.Nullable; import org.apache.commons.lang.ArrayUtils; import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; import org.sonar.api.utils.DateUtils; @@ -86,7 +86,7 @@ import org.sonar.api.utils.DateUtils; * * @since 2.12 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class Settings { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java b/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java index df37c340bb9..dad422a019b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java @@ -22,7 +22,7 @@ package org.sonar.api.i18n; import java.util.Date; import java.util.Locale; import javax.annotation.Nullable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -31,7 +31,7 @@ import org.sonar.api.server.ServerSide; * * @since 2.10 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public interface I18n { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java b/sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java index 3f70eeeef67..eacddc29e66 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/i18n/RuleI18n.java @@ -21,7 +21,7 @@ package org.sonar.api.i18n; import java.util.Locale; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.rules.Rule; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -33,7 +33,7 @@ import org.sonar.api.server.ServerSide; * @deprecated in 4.1. Rules are not localized anymore. See http://jira.sonarsource.com/browse/SONAR-4885 */ @Deprecated -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public interface RuleI18n { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java index b02e8590d30..2d20849d44e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/Issue.java @@ -26,7 +26,7 @@ import java.util.Date; import java.util.List; import java.util.Map; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.rule.RuleKey; import org.sonar.api.utils.Duration; @@ -188,7 +188,7 @@ public interface Issue extends Serializable { * Non-null list of comments, ordered by chronological order. * <br> * IMPORTANT: existing comments are not loaded when this method is called when analyzing project - * (from {@link BatchSide}). + * (from {@link ScannerSide}). */ List<IssueComment> comments(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java index b9a794c1b63..fb9bb62aff9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/IssueHandler.java @@ -19,7 +19,7 @@ */ package org.sonar.api.issue; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionPoint; import org.sonar.api.user.User; @@ -28,7 +28,7 @@ import javax.annotation.Nullable; /** * @since 3.6 */ -@BatchSide +@ScannerSide @ExtensionPoint public interface IssueHandler { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/NoSonarFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/NoSonarFilter.java index 5fe0c2b4574..fe556767854 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/NoSonarFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/NoSonarFilter.java @@ -24,7 +24,7 @@ import org.sonar.api.scan.issue.filter.FilterableIssue; import org.sonar.api.scan.issue.filter.IssueFilter; import com.google.common.collect.Maps; import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.scan.issue.filter.IssueFilterChain; @@ -35,7 +35,7 @@ import java.util.Set; /** * Issue filter used to ignore issues created on lines commented with the tag "NOSONAR". * <br> - * Plugins, via {@link BatchSide}s, must feed this filter by registering the + * Plugins, via {@link ScannerSide}s, must feed this filter by registering the * lines that contain "NOSONAR". Note that filters are disabled for the issues reported by * end-users from UI or web services. * diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/ProjectIssues.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/ProjectIssues.java index 9f91d7a86d2..662d3ba2688 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/ProjectIssues.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/ProjectIssues.java @@ -19,7 +19,7 @@ */ package org.sonar.api.issue; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import static org.sonar.api.batch.InstantiationStrategy.PER_BATCH; @@ -30,7 +30,7 @@ import static org.sonar.api.batch.InstantiationStrategy.PER_BATCH; * @since 4.0 */ @InstantiationStrategy(PER_BATCH) -@BatchSide +@ScannerSide public interface ProjectIssues { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/issue/batch/IssueFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/issue/batch/IssueFilter.java index cb43741b340..d1f025266a0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/issue/batch/IssueFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/issue/batch/IssueFilter.java @@ -20,7 +20,7 @@ package org.sonar.api.issue.batch; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.issue.Issue; /** @@ -28,7 +28,7 @@ import org.sonar.api.issue.Issue; * @since 4.0 * @deprecated since 5.3. Use {@link org.sonar.api.scan.issue.filter.IssueFilter} instead. */ -@BatchSide +@ScannerSide @ExtensionPoint @Deprecated public interface IssueFilter { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java index 1d52cc1e163..59f22ffca98 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/FileLinesContextFactory.java @@ -19,7 +19,7 @@ */ package org.sonar.api.measures; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.resources.Resource; @@ -28,7 +28,7 @@ import org.sonar.api.resources.Resource; * * @since 2.14 */ -@BatchSide +@ScannerSide public interface FileLinesContextFactory { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java index 941fa587022..425777eada6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metric.java @@ -29,7 +29,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -42,7 +42,7 @@ import static org.apache.commons.lang.StringUtils.isNotBlank; * Used to define a metric in a plugin. Should be used with {@link Metrics} extension point. * Should no more be used on scanner side. Use {@link org.sonar.api.batch.measure.Metric} instead. */ -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) @ServerSide @ComputeEngineSide diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java index 5f0d127524e..f82593b55bd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/MetricFinder.java @@ -22,7 +22,7 @@ package org.sonar.api.measures; import java.util.Collection; import java.util.List; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -31,7 +31,7 @@ import org.sonar.api.server.ServerSide; * @deprecated since 5.1 use {@link org.sonar.api.batch.measure.MetricFinder} on scanner side. */ @Deprecated -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public interface MetricFinder { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java index acb25075509..22565ff8612 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/measures/Metrics.java @@ -21,7 +21,7 @@ package org.sonar.api.measures; import java.util.List; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -30,7 +30,7 @@ import org.sonar.api.server.ServerSide; * This is the extension point used by plugins to declare new metrics. * @since 1.10 */ -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) @ServerSide @ComputeEngineSide diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java index 5ac727afd9e..bfa8d8b6749 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/Server.java @@ -22,14 +22,14 @@ package org.sonar.api.platform; import java.io.File; import java.util.Date; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; /** * @since 2.2 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public abstract class Server { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java index c6283fefe34..3e1dfa846d8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/ProfileExporter.java @@ -24,13 +24,13 @@ import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.server.ServerSide; /** * @since 2.3 */ -@BatchSide +@ScannerSide @ServerSide @ExtensionPoint public abstract class ProfileExporter { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java index b58ed7cfacf..4143453f79e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java @@ -20,7 +20,7 @@ package org.sonar.api.resources; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -32,7 +32,7 @@ import org.sonar.api.server.ServerSide; * * @since 1.10 */ -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) @ServerSide @ComputeEngineSide diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java index ffb93f6f744..fdc4dd150e5 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java @@ -26,7 +26,7 @@ import java.util.Collection; import java.util.List; import java.util.Map; import org.apache.commons.lang.ArrayUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; import org.sonar.api.utils.log.Logger; @@ -37,7 +37,7 @@ import org.sonar.api.utils.log.Loggers; * * @since 1.10 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class Languages { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceTypeTree.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceTypeTree.java index 8f7c2e37a65..feed55c9ddd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceTypeTree.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/ResourceTypeTree.java @@ -30,14 +30,14 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.List; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; /** * @since 2.14 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class ResourceTypeTree { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java index 38fbb4f02b0..17c442a4d5e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/rules/RuleFinder.java @@ -21,7 +21,7 @@ package org.sonar.api.rules; import java.util.Collection; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.rule.RuleKey; import org.sonar.api.ce.ComputeEngineSide; @@ -32,7 +32,7 @@ import org.sonar.api.server.ServerSide; * @deprecated since 5.1. Use {@link ActiveRules} on batch side. */ @Deprecated -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public interface RuleFinder { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileExclusions.java b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileExclusions.java index c8dab9ce522..cabf34e6f61 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileExclusions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileExclusions.java @@ -21,7 +21,7 @@ package org.sonar.api.scan.filesystem; import com.google.common.collect.ObjectArrays; import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.CoreProperties; import org.sonar.api.config.Settings; @@ -35,7 +35,7 @@ import java.util.List; * * @since 3.5 */ -@BatchSide +@ScannerSide public class FileExclusions { private final Settings settings; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileSystemFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileSystemFilter.java index d7cea0d2e8a..0a4a43483b6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileSystemFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/FileSystemFilter.java @@ -19,7 +19,7 @@ */ package org.sonar.api.scan.filesystem; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionPoint; import org.sonar.api.batch.fs.InputFileFilter; @@ -36,7 +36,7 @@ import java.io.File; * @deprecated since 4.2 use {@link InputFileFilter} */ @Deprecated -@BatchSide +@ScannerSide @ExtensionPoint public interface FileSystemFilter { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/ModuleFileSystem.java b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/ModuleFileSystem.java index 65186db14e2..a35ad1e8a5b 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/ModuleFileSystem.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/ModuleFileSystem.java @@ -23,7 +23,7 @@ import java.io.File; import java.nio.charset.Charset; import java.util.List; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; @@ -32,7 +32,7 @@ import org.sonar.api.batch.fs.InputFile; * @deprecated in 4.2. Replaced by {@link org.sonar.api.batch.fs.FileSystem} */ @Deprecated -@BatchSide +@ScannerSide public interface ModuleFileSystem { /** diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java index 266abad42cb..385a3a2efe9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/scan/filesystem/PathResolver.java @@ -27,13 +27,13 @@ import java.util.Collection; import java.util.List; import javax.annotation.CheckForNull; import org.apache.commons.io.FilenameUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.PathUtils; /** * @since 3.5 */ -@BatchSide +@ScannerSide public class PathResolver { public File relativeFile(File dir, String path) { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scan/issue/filter/IssueFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/scan/issue/filter/IssueFilter.java index eb5d384403f..e403776784e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/scan/issue/filter/IssueFilter.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/scan/issue/filter/IssueFilter.java @@ -20,9 +20,9 @@ package org.sonar.api.scan.issue.filter; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide @ExtensionPoint /** * @since 5.3 diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java index 9add6cb6653..d688f06d158 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/ResourcePermissions.java @@ -19,7 +19,7 @@ */ package org.sonar.api.security; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.server.ServerSide; import org.sonar.api.resources.Resource; @@ -30,7 +30,7 @@ import org.sonar.api.resources.Resource; * * @since 3.2 */ -@BatchSide +@ScannerSide @ServerSide public interface ResourcePermissions { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/ServerSide.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/ServerSide.java index 3ff2a0e4610..0f1d1e2cac0 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/server/ServerSide.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/ServerSide.java @@ -24,10 +24,10 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** - * Same as {@link BatchSide} but for server-side components. + * Same as {@link ScannerSide} but for server-side components. * * @since 5.2 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java index 7a3a13e3453..c4975c41dd7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/task/Task.java @@ -19,14 +19,14 @@ */ package org.sonar.api.task; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; /** * Implement this interface to provide the behavior of a task. * @since 3.6 */ -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_TASK) public interface Task { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java index 1f5a68f1564..f825f92285f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskComponent.java @@ -19,17 +19,17 @@ */ package org.sonar.api.task; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; /** * All the classes implementing this interface can be injected in public constructors of {@link TaskExtension}. * * @since 3.6 - * @deprecated since 5.1. Use {@link BatchSide} and {@link InstantiationStrategy#PER_TASK} + * @deprecated since 5.1. Use {@link ScannerSide} and {@link InstantiationStrategy#PER_TASK} */ @Deprecated -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_TASK) public interface TaskComponent { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java index 6075e1300ab..ff895a86df6 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskDefinition.java @@ -23,7 +23,7 @@ import com.google.common.base.Preconditions; import com.google.common.base.Strings; import java.util.regex.Pattern; import org.sonar.api.ExtensionPoint; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; /** @@ -32,7 +32,7 @@ import org.sonar.api.batch.InstantiationStrategy; * @since 3.6 */ @ExtensionPoint -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_TASK) public class TaskDefinition implements Comparable<TaskDefinition> { static final String KEY_PATTERN = "[a-zA-Z0-9\\-\\_]+"; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java index 6a5aa783662..765e12c4cbb 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/task/TaskExtension.java @@ -19,7 +19,7 @@ */ package org.sonar.api.task; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; /** @@ -29,7 +29,7 @@ import org.sonar.api.batch.InstantiationStrategy; * @deprecated since 5.1. Not used. */ @Deprecated -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_TASK) public interface TaskExtension { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java index febbf03ee98..5c069e664b9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/Durations.java @@ -22,7 +22,7 @@ package org.sonar.api.utils; import java.util.Locale; import javax.annotation.CheckForNull; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.config.Settings; import org.sonar.api.i18n.I18n; @@ -33,7 +33,7 @@ import org.sonar.api.server.ServerSide; * * @since 4.3 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class Durations { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java index 8d128afd9b1..a8e6ebc3a6d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/HttpDownloader.java @@ -19,7 +19,7 @@ */ package org.sonar.api.utils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.server.ServerSide; import java.io.File; @@ -30,7 +30,7 @@ import java.net.URI; * This component is available in IoC container, so it should be injected through * a constructor parameter. It is available in both batch and server. */ -@BatchSide +@ScannerSide @ServerSide public abstract class HttpDownloader extends UriReader.SchemeProcessor { public static final int TIMEOUT_MILLISECONDS = 20 * 1000; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java index 585e14d034d..51c8735def3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/System2.java @@ -26,7 +26,7 @@ import java.util.Properties; import java.util.TimeZone; import javax.annotation.CheckForNull; import org.apache.commons.lang.SystemUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -63,7 +63,7 @@ import org.sonar.api.server.ServerSide; * * @since 4.2 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class System2 { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java index da16a352447..5e255810808 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java @@ -21,7 +21,7 @@ package org.sonar.api.utils; import java.io.File; import javax.annotation.Nullable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -35,7 +35,7 @@ import org.sonar.api.server.ServerSide; * @since 4.0 * */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public interface TempFolder { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/UriReader.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/UriReader.java index 562f313509c..3001e039194 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/UriReader.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/UriReader.java @@ -32,7 +32,7 @@ import java.nio.charset.Charset; import java.util.List; import java.util.Locale; import java.util.Map; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -41,7 +41,7 @@ import org.sonar.api.server.ServerSide; * * @since 3.2 */ -@BatchSide +@ScannerSide @ServerSide @ComputeEngineSide public class UriReader { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java index 997cae744f2..1ba17667560 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/ProjectConfigurator.java @@ -24,7 +24,7 @@ import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.config.Settings; import org.sonar.api.resources.Project; @@ -35,7 +35,7 @@ import org.sonar.api.utils.System2; * Used by views !! * */ -@BatchSide +@ScannerSide public class ProjectConfigurator { private static final Logger LOG = LoggerFactory.getLogger(ProjectConfigurator.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java index a91a6b38cbc..b1ee308a926 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginJarExploder.java @@ -20,7 +20,7 @@ package org.sonar.batch.bootstrap; import org.apache.commons.io.FileUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.ZipUtils; import org.sonar.core.platform.ExplodedPlugin; import org.sonar.core.platform.PluginJarExploder; @@ -33,7 +33,7 @@ import java.io.IOException; import static org.sonar.core.util.FileUtils.deleteQuietly; -@BatchSide +@ScannerSide public class BatchPluginJarExploder extends PluginJarExploder { private final FileCache fileCache; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java index ea4380c44da..6aa3fe77320 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchPluginPredicate.java @@ -31,7 +31,7 @@ import javax.annotation.Nonnull; import org.apache.commons.lang.StringUtils; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.config.Settings; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; @@ -40,7 +40,7 @@ import static com.google.common.collect.Sets.newHashSet; /** * Filters the plugins to be enabled during analysis */ -@BatchSide +@ScannerSide public class BatchPluginPredicate implements Predicate<String> { private static final Logger LOG = Loggers.get(BatchPluginPredicate.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java index 5cd52b3419c..ea6ad1e9139 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/BatchWsClientProvider.java @@ -21,7 +21,7 @@ package org.sonar.batch.bootstrap; import org.picocontainer.injectors.ProviderAdapter; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.batch.bootstrapper.EnvironmentInformation; import org.sonarqube.ws.client.HttpConnector; import org.sonarqube.ws.client.WsClientFactories; @@ -30,7 +30,7 @@ import static java.lang.Integer.parseInt; import static java.lang.String.valueOf; import static org.apache.commons.lang.StringUtils.defaultIfBlank; -@BatchSide +@ScannerSide public class BatchWsClientProvider extends ProviderAdapter { static final int CONNECT_TIMEOUT_MS = 5_000; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java index d38581f572d..d5bd2516af0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionMatcher.java @@ -19,12 +19,12 @@ */ package org.sonar.batch.bootstrap; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * @since 3.6 */ -@BatchSide +@ScannerSide public interface ExtensionMatcher { boolean accept(Object extension); } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java index adf16a40315..9d6882420f6 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java @@ -21,6 +21,7 @@ package org.sonar.batch.bootstrap; import org.sonar.api.batch.BatchSide; import org.sonar.api.batch.InstantiationStrategy; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.AnnotationUtils; public class ExtensionUtils { @@ -36,9 +37,10 @@ public class ExtensionUtils { } return InstantiationStrategy.PER_PROJECT.equals(strategy); } - - public static boolean isBatchSide(Object extension) { - return AnnotationUtils.getAnnotation(extension, BatchSide.class) != null; + + public static boolean isScannerSide(Object extension) { + return AnnotationUtils.getAnnotation(extension, BatchSide.class) != null || + AnnotationUtils.getAnnotation(extension, ScannerSide.class) != null; } public static boolean isType(Object extension, Class<?> extensionClass) { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java index 1735ab4a79b..735eeb4089f 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/MetricProvider.java @@ -20,7 +20,7 @@ package org.sonar.batch.bootstrap; import com.google.common.collect.Lists; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionProvider; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.measures.CoreMetrics; @@ -29,7 +29,7 @@ import org.sonar.api.measures.Metrics; import java.util.List; -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_BATCH) public class MetricProvider extends ExtensionProvider { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java index 4525027dbaa..fc07d4c2a77 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrap/PluginInstaller.java @@ -21,10 +21,10 @@ package org.sonar.batch.bootstrap; import java.util.Map; import org.sonar.api.Plugin; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.core.platform.PluginInfo; -@BatchSide +@ScannerSide public interface PluginInstaller { /** diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/EnvironmentInformation.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/EnvironmentInformation.java index a04da9df40a..75f9620ecc3 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/EnvironmentInformation.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/EnvironmentInformation.java @@ -19,14 +19,14 @@ */ package org.sonar.batch.bootstrapper; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; /** * Describes execution environment. * * @since 2.6 */ -@BatchSide +@ScannerSide public class EnvironmentInformation { private String key; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdBlockIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdBlockIndexer.java index fe58cb6558b..b210e2f488c 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdBlockIndexer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdBlockIndexer.java @@ -20,9 +20,9 @@ package org.sonar.batch.cpd.deprecated; import org.slf4j.Logger; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide public abstract class CpdBlockIndexer { abstract boolean isLanguageSupported(String language); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdMappings.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdMappings.java index ad2275e399c..abeb4e64ef7 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdMappings.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/cpd/deprecated/CpdMappings.java @@ -19,12 +19,12 @@ */ package org.sonar.batch.cpd.deprecated; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.CpdMapping; import javax.annotation.CheckForNull; -@BatchSide +@ScannerSide public class CpdMappings { private final CpdMapping[] mappings; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/deprecated/perspectives/PerspectiveBuilder.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/deprecated/perspectives/PerspectiveBuilder.java index 0f38dc2ed41..f3db5fb259f 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/deprecated/perspectives/PerspectiveBuilder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/deprecated/perspectives/PerspectiveBuilder.java @@ -20,11 +20,11 @@ package org.sonar.batch.deprecated.perspectives; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.component.Perspective; import org.sonar.batch.index.BatchComponent; -@BatchSide +@ScannerSide public abstract class PerspectiveBuilder<T extends Perspective> { private final Class<T> perspectiveClass; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/index/BatchComponentCache.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/index/BatchComponentCache.java index 68c29f69c95..e858112e8b2 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/index/BatchComponentCache.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/index/BatchComponentCache.java @@ -26,11 +26,11 @@ import java.util.Collection; import java.util.Map; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.InputComponent; import org.sonar.api.resources.Resource; -@BatchSide +@ScannerSide public class BatchComponentCache { // components by key private final Map<String, BatchComponent> components = Maps.newLinkedHashMap(); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/index/Caches.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/index/Caches.java index ddddb271dfd..a16d409bd56 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/index/Caches.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/index/Caches.java @@ -33,9 +33,9 @@ import com.persistit.encoding.ValueCoder; import com.persistit.exception.PersistitException; import com.persistit.Volume; import org.picocontainer.Startable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide public class Caches implements Startable { private final Map<String, Exchange> cacheMap = Maps.newHashMap(); private Persistit persistit; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/index/CachesManager.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/index/CachesManager.java index 010375a84eb..33d85c5ed24 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/index/CachesManager.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/index/CachesManager.java @@ -26,7 +26,7 @@ import java.io.File; import java.util.Properties; import org.picocontainer.Startable; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.utils.TempFolder; import static org.sonar.core.util.FileUtils.deleteQuietly; @@ -36,7 +36,7 @@ import static org.sonar.core.util.FileUtils.deleteQuietly; * * @since 3.6 */ -@BatchSide +@ScannerSide public class CachesManager implements Startable { private File tempDir; private Persistit persistit; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueCache.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueCache.java index ac1bc6826a5..f7a0b7f5b36 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueCache.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueCache.java @@ -21,7 +21,7 @@ package org.sonar.batch.issue; import org.sonar.batch.issue.tracking.TrackedIssue; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.batch.index.Cache; import org.sonar.batch.index.Caches; @@ -30,7 +30,7 @@ import java.util.Collection; /** * Shared issues among all project modules */ -@BatchSide +@ScannerSide public class IssueCache { // component key -> issue key -> issue diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueFilters.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueFilters.java index ef542d551ab..5b233dfbdee 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueFilters.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/IssueFilters.java @@ -23,12 +23,12 @@ import org.sonar.api.scan.issue.filter.FilterableIssue; import org.sonar.api.scan.issue.filter.IssueFilterChain; import org.sonar.scanner.protocol.output.ScannerReport; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.issue.Issue; import org.sonar.api.scan.issue.filter.IssueFilter; import org.sonar.api.resources.Project; -@BatchSide +@ScannerSide public class IssueFilters { private final IssueFilter[] filters; private final org.sonar.api.issue.batch.IssueFilter[] deprecatedFilters; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/pattern/AbstractPatternInitializer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/pattern/AbstractPatternInitializer.java index af6a0efe228..8144a878c86 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/pattern/AbstractPatternInitializer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/pattern/AbstractPatternInitializer.java @@ -22,14 +22,14 @@ package org.sonar.batch.issue.ignore.pattern; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.Lists; import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.config.Settings; import java.util.List; import static com.google.common.base.MoreObjects.firstNonNull; -@BatchSide +@ScannerSide public abstract class AbstractPatternInitializer { private Settings settings; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScanner.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScanner.java index de465ad4dc5..462fea53575 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScanner.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/ignore/scanner/IssueExclusionsRegexpScanner.java @@ -25,7 +25,7 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.batch.issue.ignore.pattern.IssueExclusionPatternInitializer; import org.sonar.batch.issue.ignore.pattern.IssuePattern; import org.sonar.batch.issue.ignore.pattern.LineRange; @@ -36,7 +36,7 @@ import java.nio.charset.Charset; import java.util.List; import java.util.Set; -@BatchSide +@ScannerSide public class IssueExclusionsRegexpScanner { private static final Logger LOG = LoggerFactory.getLogger(IssueExclusionsRegexpScanner.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/IssueTransition.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/IssueTransition.java index bff1974a99d..0b398f59cee 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/IssueTransition.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/IssueTransition.java @@ -21,7 +21,7 @@ package org.sonar.batch.issue.tracking; import org.sonar.batch.util.ProgressReport; import org.sonar.batch.issue.IssueTransformer; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.resources.Project; import org.sonar.batch.index.BatchComponent; import org.sonar.batch.index.BatchComponentCache; @@ -38,7 +38,7 @@ import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; -@BatchSide +@ScannerSide public class IssueTransition { private final IssueCache issueCache; private final BatchComponentCache componentCache; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/LocalIssueTracking.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/LocalIssueTracking.java index 13f5a774405..56ac7eabe92 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/LocalIssueTracking.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/LocalIssueTracking.java @@ -29,7 +29,7 @@ import java.util.List; import java.util.Map; import javax.annotation.CheckForNull; import javax.annotation.Nullable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.InputFile.Status; import org.sonar.api.batch.fs.internal.DefaultInputFile; import org.sonar.api.batch.rule.ActiveRule; @@ -44,7 +44,7 @@ import org.sonar.core.issue.tracking.Tracker; import org.sonar.core.issue.tracking.Tracking; import org.sonar.scanner.protocol.output.ScannerReport; -@BatchSide +@ScannerSide public class LocalIssueTracking { private final Tracker<TrackedIssue, ServerIssueFromWs> tracker; private final ServerLineHashesLoader lastLineHashes; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerIssueRepository.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerIssueRepository.java index 040ce776b9f..7106de46e02 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerIssueRepository.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerIssueRepository.java @@ -21,7 +21,7 @@ package org.sonar.batch.issue.tracking; import com.google.common.base.Function; import javax.annotation.Nullable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.utils.log.Logger; import org.sonar.api.utils.log.Loggers; @@ -36,7 +36,7 @@ import org.sonar.core.component.ComponentKeys; import org.sonar.scanner.protocol.input.ScannerInput.ServerIssue; @InstantiationStrategy(InstantiationStrategy.PER_BATCH) -@BatchSide +@ScannerSide public class ServerIssueRepository { private static final Logger LOG = Loggers.get(ServerIssueRepository.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerLineHashesLoader.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerLineHashesLoader.java index 23edcc430d4..a09064b80b7 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerLineHashesLoader.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/issue/tracking/ServerLineHashesLoader.java @@ -19,9 +19,9 @@ */ package org.sonar.batch.issue.tracking; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide public interface ServerLineHashesLoader { String[] getLineHashes(String fileKey); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/ScanTaskObserver.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/ScanTaskObserver.java index 05b9f338eef..bd07b1cee7a 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/ScanTaskObserver.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/mediumtest/ScanTaskObserver.java @@ -19,11 +19,11 @@ */ package org.sonar.batch.mediumtest; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ExtensionPoint; import org.sonar.batch.scan.ProjectScanContainer; -@BatchSide +@ScannerSide @ExtensionPoint public interface ScanTaskObserver { diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java index 277b45b8d3c..dbca5779152 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/PostJobsExecutor.java @@ -25,7 +25,7 @@ import com.google.common.collect.Lists; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.PostJob; import org.sonar.api.batch.SensorContext; import org.sonar.api.resources.Project; @@ -34,7 +34,7 @@ import org.sonar.batch.events.EventBus; import java.util.Collection; -@BatchSide +@ScannerSide public class PostJobsExecutor { private static final Logger LOG = LoggerFactory.getLogger(PostJobsExecutor.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/ProjectInitializer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/ProjectInitializer.java index 8dac11520e5..b9a4b45ff8a 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/ProjectInitializer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/ProjectInitializer.java @@ -19,7 +19,7 @@ */ package org.sonar.batch.phases; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.apache.commons.lang.StringUtils; import org.sonar.api.CoreProperties; import org.sonar.api.config.Settings; @@ -31,7 +31,7 @@ import org.sonar.api.utils.MessageException; /** * Should be dropped when org.sonar.api.resources.Project is fully refactored. */ -@BatchSide +@ScannerSide public class ProjectInitializer { private Languages languages; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/SensorsExecutor.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/SensorsExecutor.java index 3af1cf2b6ee..d5682e02743 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/SensorsExecutor.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/phases/SensorsExecutor.java @@ -20,7 +20,7 @@ package org.sonar.batch.phases; import com.google.common.collect.Lists; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.Sensor; import org.sonar.api.batch.SensorContext; import org.sonar.api.resources.Project; @@ -29,7 +29,7 @@ import org.sonar.batch.events.EventBus; import java.util.Collection; -@BatchSide +@ScannerSide public class SensorsExecutor { private EventBus eventBus; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/platform/DefaultServer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/platform/DefaultServer.java index 60ad445afa7..0243846664e 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/platform/DefaultServer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/platform/DefaultServer.java @@ -27,14 +27,14 @@ import javax.annotation.CheckForNull; import org.apache.commons.lang.StringUtils; import org.slf4j.LoggerFactory; import org.sonar.api.CoreProperties; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.config.Settings; import org.sonar.api.platform.Server; import org.sonar.batch.bootstrap.BatchWsClient; import static org.apache.commons.lang.StringUtils.trimToEmpty; -@BatchSide +@ScannerSide public class DefaultServer extends Server { private Settings settings; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/postjob/PostJobOptimizer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/postjob/PostJobOptimizer.java index e1b0cca1c1e..8aedf095fc9 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/postjob/PostJobOptimizer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/postjob/PostJobOptimizer.java @@ -21,11 +21,11 @@ package org.sonar.batch.postjob; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.postjob.internal.DefaultPostJobDescriptor; import org.sonar.api.config.Settings; -@BatchSide +@ScannerSide public class PostJobOptimizer { private static final Logger LOG = LoggerFactory.getLogger(PostJobOptimizer.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java index 38706664ff8..5d739cf56cf 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/report/AnalysisContextReportPublisher.java @@ -31,7 +31,7 @@ import java.util.Properties; import java.util.TreeSet; import org.sonar.api.CoreProperties; import org.sonar.api.batch.AnalysisMode; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.utils.System2; import org.sonar.api.utils.log.Logger; @@ -42,7 +42,7 @@ import org.sonar.core.platform.PluginInfo; import org.sonar.scanner.protocol.input.GlobalRepositories; import org.sonar.scanner.protocol.output.ScannerReportWriter; -@BatchSide +@ScannerSide public class AnalysisContextReportPublisher { private static final String KEY_VALUE_FORMAT = " - %s=%s"; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/report/ReportPublisher.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/report/ReportPublisher.java index b47217b8859..7775deccabb 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/report/ReportPublisher.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/report/ReportPublisher.java @@ -34,7 +34,7 @@ import java.util.Map; import javax.annotation.Nullable; import org.apache.commons.io.FileUtils; import org.picocontainer.Startable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.config.Settings; import org.sonar.api.platform.Server; @@ -54,7 +54,7 @@ import org.sonarqube.ws.client.WsResponse; import static org.sonar.core.util.FileUtils.deleteQuietly; -@BatchSide +@ScannerSide public class ReportPublisher implements Startable { private static final Logger LOG = Loggers.get(ReportPublisher.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/repository/language/LanguagesRepository.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/repository/language/LanguagesRepository.java index da1bab7993f..732b6705087 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/repository/language/LanguagesRepository.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/repository/language/LanguagesRepository.java @@ -19,7 +19,7 @@ */ package org.sonar.batch.repository.language; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import javax.annotation.CheckForNull; @@ -29,7 +29,7 @@ import java.util.Collection; * Languages repository * @since 4.4 */ -@BatchSide +@ScannerSide public interface LanguagesRepository { /** diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java index 5a671de840f..29763f4edc0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/ModuleQProfiles.java @@ -23,7 +23,7 @@ import org.sonar.api.utils.DateUtils; import org.sonarqube.ws.QualityProfiles.SearchWsResponse.QualityProfile; import com.google.common.collect.ImmutableMap; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import javax.annotation.CheckForNull; @@ -33,7 +33,7 @@ import java.util.Map; /** * Lists the Quality profiles enabled on the current module. */ -@BatchSide +@ScannerSide public class ModuleQProfiles { public static final String SONAR_PROFILE_PROP = "sonar.profile"; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/QProfileVerifier.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/QProfileVerifier.java index 6206a289f17..f37fcd0adac 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/QProfileVerifier.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/rule/QProfileVerifier.java @@ -23,14 +23,14 @@ import com.google.common.annotations.VisibleForTesting; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.config.Settings; import org.sonar.api.utils.MessageException; import static org.apache.commons.lang.StringUtils.isNotEmpty; -@BatchSide +@ScannerSide public class QProfileVerifier { private static final Logger LOG = LoggerFactory.getLogger(QProfileVerifier.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ImmutableProjectReactor.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ImmutableProjectReactor.java index 4bfa99c6da2..8d070a34254 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ImmutableProjectReactor.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ImmutableProjectReactor.java @@ -23,13 +23,13 @@ import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; /** * Immutable copy of project reactor after all modifications have been applied (see {@link ImmutableProjectReactorProvider}). */ -@BatchSide +@ScannerSide public class ImmutableProjectReactor { private ProjectDefinition root; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java index 194de4c363f..2da9c9e4967 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ModuleScanContainer.java @@ -179,7 +179,7 @@ public class ModuleScanContainer extends ComponentContainer { installer.install(this, new ExtensionMatcher() { @Override public boolean accept(Object extension) { - return ExtensionUtils.isBatchSide(extension) && ExtensionUtils.isInstantiationStrategy(extension, InstantiationStrategy.PER_PROJECT); + return ExtensionUtils.isScannerSide(extension) && ExtensionUtils.isInstantiationStrategy(extension, InstantiationStrategy.PER_PROJECT); } }); } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java index 91c383d55c6..f91461fa86b 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/ProjectScanContainer.java @@ -244,7 +244,7 @@ public class ProjectScanContainer extends ComponentContainer { static class BatchExtensionFilter implements ExtensionMatcher { @Override public boolean accept(Object extension) { - return ExtensionUtils.isBatchSide(extension) + return ExtensionUtils.isScannerSide(extension) && ExtensionUtils.isInstantiationStrategy(extension, InstantiationStrategy.PER_BATCH); } } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java index 761f6d15823..6c0d4893b19 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ComponentIndexer.java @@ -19,7 +19,7 @@ */ package org.sonar.batch.scan.filesystem; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.SonarIndex; import org.sonar.api.batch.fs.InputDir; import org.sonar.api.batch.fs.InputFile; @@ -35,7 +35,7 @@ import org.sonar.batch.index.BatchComponentCache; * * @since 4.2 */ -@BatchSide +@ScannerSide public class ComponentIndexer { private final Languages languages; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ExclusionFilters.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ExclusionFilters.java index 256688ef364..4a82d9fb933 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ExclusionFilters.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ExclusionFilters.java @@ -22,12 +22,12 @@ package org.sonar.batch.scan.filesystem; import org.apache.commons.lang.ArrayUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.PathPattern; import org.sonar.api.scan.filesystem.FileExclusions; -@BatchSide +@ScannerSide public class ExclusionFilters { private static final Logger LOG = LoggerFactory.getLogger(ExclusionFilters.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java index b9d6c47bcf8..21cb362a7ad 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileIndexer.java @@ -22,7 +22,7 @@ package org.sonar.batch.scan.filesystem; import com.google.common.util.concurrent.ThreadFactoryBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.InputFile.Type; @@ -58,7 +58,7 @@ import java.util.concurrent.TimeUnit; /** * Index input files into {@link InputPathCache}. */ -@BatchSide +@ScannerSide public class FileIndexer { private static final Logger LOG = LoggerFactory.getLogger(FileIndexer.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileSystemLogger.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileSystemLogger.java index 0d717301283..44a2600773e 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileSystemLogger.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/FileSystemLogger.java @@ -28,10 +28,10 @@ import java.util.Locale; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.scan.filesystem.PathResolver; -@BatchSide +@ScannerSide public class FileSystemLogger { private final DefaultModuleFileSystem fs; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactory.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactory.java index 46dc2b2fbcd..42eed0e4653 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactory.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputFileBuilderFactory.java @@ -19,13 +19,13 @@ */ package org.sonar.batch.scan.filesystem; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.fs.internal.FileMetadata; import org.sonar.api.config.Settings; import org.sonar.api.scan.filesystem.PathResolver; -@BatchSide +@ScannerSide public class InputFileBuilderFactory { private final String moduleKey; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputPathCache.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputPathCache.java index 3375f92c7ff..4797b24e922 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputPathCache.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/InputPathCache.java @@ -21,7 +21,7 @@ package org.sonar.batch.scan.filesystem; import com.google.common.collect.Table; import com.google.common.collect.TreeBasedTable; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.InputDir; import org.sonar.api.batch.fs.InputFile; @@ -31,7 +31,7 @@ import javax.annotation.CheckForNull; * Cache of all files and dirs. This cache is shared amongst all project modules. Inclusion and * exclusion patterns are already applied. */ -@BatchSide +@ScannerSide public class InputPathCache { private final Table<String, String, InputFile> inputFileCache = TreeBasedTable.create(); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactory.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactory.java index b25a0038c64..0503497663d 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactory.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/LanguageDetectionFactory.java @@ -19,11 +19,11 @@ */ package org.sonar.batch.scan.filesystem; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.config.Settings; import org.sonar.batch.repository.language.LanguagesRepository; -@BatchSide +@ScannerSide public class LanguageDetectionFactory { private final Settings settings; private final LanguagesRepository languages; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializer.java index faab666579a..86d3b08cbbc 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleFileSystemInitializer.java @@ -21,7 +21,7 @@ package org.sonar.batch.scan.filesystem; import com.google.common.collect.Lists; import org.apache.commons.io.FileUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.scan.filesystem.PathResolver; import org.sonar.api.utils.TempFolder; @@ -34,7 +34,7 @@ import java.util.List; /** * @since 3.5 */ -@BatchSide +@ScannerSide public class ModuleFileSystemInitializer { private File baseDir; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleInputFileCache.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleInputFileCache.java index 5326b3fda4b..0788e4fff27 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleInputFileCache.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/ModuleInputFileCache.java @@ -19,13 +19,13 @@ */ package org.sonar.batch.scan.filesystem; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.bootstrap.ProjectDefinition; import org.sonar.api.batch.fs.InputDir; import org.sonar.api.batch.fs.InputFile; import org.sonar.api.batch.fs.internal.DefaultFileSystem; -@BatchSide +@ScannerSide public class ModuleInputFileCache extends DefaultFileSystem.Cache { private final String moduleKey; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/StatusDetectionFactory.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/StatusDetectionFactory.java index b1a75c228c0..419611095ef 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/StatusDetectionFactory.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/filesystem/StatusDetectionFactory.java @@ -21,9 +21,9 @@ package org.sonar.batch.scan.filesystem; import org.sonar.batch.repository.ProjectRepositories; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide public class StatusDetectionFactory { private final ProjectRepositories projectReferentials; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/measure/MeasureCache.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/measure/MeasureCache.java index 4b400323e55..28ac18e9f15 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/measure/MeasureCache.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/measure/MeasureCache.java @@ -21,7 +21,7 @@ package org.sonar.batch.scan.measure; import com.google.common.base.Preconditions; import javax.annotation.CheckForNull; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.measure.MetricFinder; import org.sonar.api.measures.Measure; import org.sonar.api.resources.Resource; @@ -32,7 +32,7 @@ import org.sonar.batch.index.Caches; /** * Cache of all measures. This cache is shared amongst all project modules. */ -@BatchSide +@ScannerSide public class MeasureCache { private final Cache<Measure> cache; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReportBuilder.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReportBuilder.java index 079dabc2ceb..a87b043bfb8 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReportBuilder.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReportBuilder.java @@ -25,7 +25,7 @@ import javax.annotation.CheckForNull; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.rule.Rule; import org.sonar.api.batch.rule.Rules; import org.sonar.api.resources.Project; @@ -36,7 +36,7 @@ import org.sonar.batch.index.BatchComponentCache; import org.sonar.batch.issue.IssueCache; import org.sonar.batch.scan.filesystem.InputPathCache; -@BatchSide +@ScannerSide public class IssuesReportBuilder { private static final Logger LOG = LoggerFactory.getLogger(IssuesReportBuilder.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReports.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReports.java index ac4a5abb375..a35b32262b4 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReports.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/IssuesReports.java @@ -19,9 +19,9 @@ */ package org.sonar.batch.scan.report; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide public class IssuesReports { private final Reporter[] reporters; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/Reporter.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/Reporter.java index 9cb91dc2fad..8a5b3972067 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/Reporter.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/Reporter.java @@ -19,9 +19,9 @@ */ package org.sonar.batch.scan.report; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; -@BatchSide +@ScannerSide public interface Reporter { void execute(); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java index 90981fea342..e4c39188731 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/RuleNameProvider.java @@ -23,12 +23,12 @@ import org.sonar.api.batch.rule.Rule; import org.sonar.api.batch.rule.Rules; import org.apache.commons.lang.StringEscapeUtils; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.rule.RuleKey; import javax.annotation.CheckForNull; -@BatchSide +@ScannerSide public class RuleNameProvider { private Rules rules; diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/SourceProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/SourceProvider.java index 8017dbd753e..c3b72b6907d 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/SourceProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scan/report/SourceProvider.java @@ -27,12 +27,12 @@ import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.fs.InputFile; import org.sonar.batch.index.BatchComponent; -@BatchSide +@ScannerSide public class SourceProvider { private static final Logger LOG = LoggerFactory.getLogger(SourceProvider.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/scm/ScmConfiguration.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/scm/ScmConfiguration.java index f6a88bf4465..c5997efa864 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/scm/ScmConfiguration.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/scm/ScmConfiguration.java @@ -29,7 +29,7 @@ import org.sonar.api.Properties; import org.sonar.api.Property; import org.sonar.api.PropertyType; import org.sonar.api.batch.AnalysisMode; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.batch.scm.ScmProvider; import org.sonar.api.config.Settings; @@ -50,7 +50,7 @@ import org.sonar.batch.scan.ImmutableProjectReactor; type = PropertyType.BOOLEAN) }) @InstantiationStrategy(InstantiationStrategy.PER_BATCH) -@BatchSide +@ScannerSide public final class ScmConfiguration implements Startable { private static final Logger LOG = Loggers.get(ScmConfiguration.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/SensorOptimizer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/SensorOptimizer.java index 7e8dd63e93a..19ad9cbeab0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/SensorOptimizer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/sensor/SensorOptimizer.java @@ -21,14 +21,14 @@ package org.sonar.batch.sensor; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.fs.FilePredicate; import org.sonar.api.batch.fs.FileSystem; import org.sonar.api.batch.rule.ActiveRules; import org.sonar.api.batch.sensor.internal.DefaultSensorDescriptor; import org.sonar.api.config.Settings; -@BatchSide +@ScannerSide public class SensorOptimizer { private static final Logger LOG = LoggerFactory.getLogger(SensorOptimizer.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/source/CodeColorizers.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/source/CodeColorizers.java index 39a4a0b1c98..0f1ebe7c250 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/source/CodeColorizers.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/source/CodeColorizers.java @@ -34,7 +34,7 @@ import org.apache.commons.io.input.BOMInputStream; import org.apache.commons.lang.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.sensor.highlighting.NewHighlighting; import org.sonar.api.web.CodeColorizerFormat; import org.sonar.colorizer.JavaTokenizers; @@ -43,7 +43,7 @@ import org.sonar.colorizer.Tokenizer; /** * Central point for sonar-colorizer extensions */ -@BatchSide +@ScannerSide public class CodeColorizers { private static final Logger LOG = LoggerFactory.getLogger(CodeColorizers.class); diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/task/TaskContainer.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/task/TaskContainer.java index eee91f63055..d730536a8f0 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/task/TaskContainer.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/task/TaskContainer.java @@ -65,7 +65,7 @@ public class TaskContainer extends ComponentContainer { static class TaskExtensionFilter implements ExtensionMatcher { @Override public boolean accept(Object extension) { - return ExtensionUtils.isBatchSide(extension) + return ExtensionUtils.isScannerSide(extension) && ExtensionUtils.isInstantiationStrategy(extension, InstantiationStrategy.PER_TASK); } } diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/task/Tasks.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/task/Tasks.java index ee68b62b1db..7689e23ec8c 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/batch/task/Tasks.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/task/Tasks.java @@ -24,12 +24,12 @@ import com.google.common.collect.Maps; import java.util.Collection; import java.util.Map; import java.util.SortedMap; -import org.sonar.api.batch.BatchSide; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.batch.InstantiationStrategy; import org.sonar.api.task.Task; import org.sonar.api.task.TaskDefinition; -@BatchSide +@ScannerSide @InstantiationStrategy(InstantiationStrategy.PER_TASK) public class Tasks { diff --git a/sonar-scanner-engine/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java b/sonar-scanner-engine/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java index f4b685a57a4..328abd324f3 100644 --- a/sonar-scanner-engine/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java +++ b/sonar-scanner-engine/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java @@ -23,6 +23,7 @@ import org.junit.Test; import org.sonar.api.BatchComponent; import org.sonar.api.batch.BatchSide; import org.sonar.api.batch.InstantiationStrategy; +import org.sonar.api.batch.ScannerSide; import org.sonar.api.ce.ComputeEngineSide; import org.sonar.api.server.ServerSide; @@ -38,6 +39,9 @@ public class ExtensionUtilsTest { assertThat(ExtensionUtils.isInstantiationStrategy(new ProjectService(), InstantiationStrategy.PER_BATCH)).isFalse(); assertThat(ExtensionUtils.isInstantiationStrategy(DefaultService.class, InstantiationStrategy.PER_BATCH)).isFalse(); assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultService(), InstantiationStrategy.PER_BATCH)).isFalse(); + assertThat(ExtensionUtils.isInstantiationStrategy(DefaultScannerService.class, InstantiationStrategy.PER_BATCH)).isFalse(); + assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultScannerService(), InstantiationStrategy.PER_BATCH)).isFalse(); + } @Test @@ -48,18 +52,22 @@ public class ExtensionUtilsTest { assertThat(ExtensionUtils.isInstantiationStrategy(new ProjectService(), InstantiationStrategy.PER_PROJECT)).isTrue(); assertThat(ExtensionUtils.isInstantiationStrategy(DefaultService.class, InstantiationStrategy.PER_PROJECT)).isTrue(); assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultService(), InstantiationStrategy.PER_PROJECT)).isTrue(); + assertThat(ExtensionUtils.isInstantiationStrategy(DefaultScannerService.class, InstantiationStrategy.PER_PROJECT)).isTrue(); + assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultScannerService(), InstantiationStrategy.PER_PROJECT)).isTrue(); + } @Test - public void testIsBatchSide() { - assertThat(ExtensionUtils.isBatchSide(BatchService.class)).isTrue(); - assertThat(ExtensionUtils.isBatchSide(new BatchService())).isTrue(); - assertThat(ExtensionUtils.isBatchSide(DeprecatedBatchService.class)).isTrue(); - - assertThat(ExtensionUtils.isBatchSide(ServerService.class)).isFalse(); - assertThat(ExtensionUtils.isBatchSide(new ServerService())).isFalse(); - assertThat(ExtensionUtils.isBatchSide(new WebServerService())).isFalse(); - assertThat(ExtensionUtils.isBatchSide(new ComputeEngineService())).isFalse(); + public void testIsScannerSide() { + assertThat(ExtensionUtils.isScannerSide(BatchService.class)).isTrue(); + assertThat(ExtensionUtils.isScannerSide(ScannerService.class)).isTrue(); + assertThat(ExtensionUtils.isScannerSide(new BatchService())).isTrue(); + assertThat(ExtensionUtils.isScannerSide(DeprecatedBatchService.class)).isTrue(); + + assertThat(ExtensionUtils.isScannerSide(ServerService.class)).isFalse(); + assertThat(ExtensionUtils.isScannerSide(new ServerService())).isFalse(); + assertThat(ExtensionUtils.isScannerSide(new WebServerService())).isFalse(); + assertThat(ExtensionUtils.isScannerSide(new ComputeEngineService())).isFalse(); } @BatchSide @@ -68,6 +76,12 @@ public class ExtensionUtilsTest { } + @ScannerSide + @InstantiationStrategy(InstantiationStrategy.PER_BATCH) + public static class ScannerService { + + } + public static class DeprecatedBatchService implements BatchComponent { } @@ -82,6 +96,11 @@ public class ExtensionUtilsTest { public static class DefaultService { } + + @ScannerSide + public static class DefaultScannerService { + + } @ServerSide public static class ServerService { |