@@ -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); |
@@ -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 { |
@@ -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() { |
@@ -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 { |
@@ -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 { |
@@ -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) { |
@@ -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( |
@@ -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 { |
@@ -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 { |
@@ -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 { |
@@ -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 { | |||
} |
@@ -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 { |
@@ -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: |
@@ -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 |
@@ -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> |
@@ -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(); | |||
@@ -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) |
@@ -26,7 +26,7 @@ import org.sonar.api.ExtensionPoint; | |||
* @deprecated since 5.2 not used anymore | |||
*/ | |||
@Deprecated | |||
@BatchSide | |||
@ScannerSide | |||
@ExtensionPoint | |||
public interface CoverageExtension { | |||
@@ -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 { |
@@ -29,7 +29,7 @@ import org.sonar.api.resources.Project; | |||
* <p> | |||
* @since 2.6 | |||
*/ | |||
@BatchSide | |||
@ScannerSide | |||
@ExtensionPoint | |||
public abstract class Initializer implements CheckProject { | |||
@@ -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 { | |||
@@ -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 { | |||
@@ -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 { | |||
} |
@@ -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 { | |||
@@ -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 { |
@@ -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; |
@@ -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 { | |||
@@ -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 { | |||
/** |
@@ -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 { | |||
@@ -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); |
@@ -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 |
@@ -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 { | |||
@@ -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 { | |||
/** |
@@ -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; |
@@ -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 { | |||
/** |
@@ -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 { | |||
/** |
@@ -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 { |
@@ -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 { | |||
@@ -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); |
@@ -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 | |||
*/ |
@@ -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 { |
@@ -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 |
@@ -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 { |
@@ -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 { |
@@ -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 { |
@@ -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 { |
@@ -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(); | |||
@@ -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 { | |||
@@ -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. | |||
* |
@@ -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 { | |||
/** |
@@ -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 { |
@@ -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 { | |||
/** |
@@ -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 |
@@ -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 { |
@@ -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 |
@@ -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 { |
@@ -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 { |
@@ -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 |
@@ -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 { |
@@ -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 { |
@@ -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 { |
@@ -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; | |||
@@ -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 { | |||
@@ -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 { | |||
/** |
@@ -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) { |
@@ -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 |
@@ -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 { | |||
@@ -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 | |||
*/ |
@@ -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 { | |||
@@ -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 { | |||
} |
@@ -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\\-\\_]+"; |
@@ -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 { | |||
} |
@@ -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 { |
@@ -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; |
@@ -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 { |
@@ -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 { |
@@ -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 { |
@@ -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); |
@@ -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; |
@@ -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); |
@@ -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; |
@@ -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); | |||
} |
@@ -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) { |
@@ -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 { | |||
@@ -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 { | |||
/** |
@@ -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; |
@@ -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); |
@@ -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; |
@@ -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; |
@@ -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(); |
@@ -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; |
@@ -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; |
@@ -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 |
@@ -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; |
@@ -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; |
@@ -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); |
@@ -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; |
@@ -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; |
@@ -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); |