aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2018-11-09 10:35:06 +0100
committersonartech <sonartech@sonarsource.com>2019-01-16 09:42:59 +0100
commit0348fbfef3d9268003ffda07a81b85ec9a35b97c (patch)
tree17d2314ecca2e11b16d4bf3ae36d645ef89eb76b
parent8dc6b7101fc61cea51a725d02bd23a8a10eeda41 (diff)
downloadsonarqube-0348fbfef3d9268003ffda07a81b85ec9a35b97c.tar.gz
sonarqube-0348fbfef3d9268003ffda07a81b85ec9a35b97c.zip
SONAR-11465 Deprecate InstantiationStrategy
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/package-info.java21
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/scanner/ScannerSide.java52
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/scanner/package-info.java21
4 files changed, 96 insertions, 0 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java
index a3a964eb11e..9047416ffed 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java
@@ -28,7 +28,9 @@ import java.lang.annotation.Target;
* Define instantiation strategy of batch IoC components. If a component is not annotated, then default value
* is {@link org.sonar.api.batch.InstantiationStrategy#PER_PROJECT}.
* @since 4.4
+ * @deprecated since 7.6 removal of modules and tasks is planned. All extensions should progressively move to the project scope, using {@link org.sonar.api.scanner.ScannerSide}
*/
+@Deprecated
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface InstantiationStrategy {
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/package-info.java
new file mode 100644
index 00000000000..f9e75219d24
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info 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.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.batch.sensor;
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scanner/ScannerSide.java b/sonar-plugin-api/src/main/java/org/sonar/api/scanner/ScannerSide.java
new file mode 100644
index 00000000000..477a0b50c4d
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/scanner/ScannerSide.java
@@ -0,0 +1,52 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info 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.scanner;
+
+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 7.6
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface ScannerSide {
+}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/scanner/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/scanner/package-info.java
new file mode 100644
index 00000000000..95978f119da
--- /dev/null
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/scanner/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2018 SonarSource SA
+ * mailto:info 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.
+ */
+@javax.annotation.ParametersAreNonnullByDefault
+package org.sonar.api.scanner;