org.sonar.runner.api
Class EmbeddedRunner

java.lang.Object
  extended by org.sonar.runner.api.Runner<EmbeddedRunner>
      extended by org.sonar.runner.api.EmbeddedRunner

public class EmbeddedRunner
extends Runner<EmbeddedRunner>

Implementation of Runner that is executed in the same JVM. The application can inject some extensions into Sonar IoC container (see addExtensions(Object...). It can be used for example in the Maven Sonar plugin to register Maven components like MavenProject or MavenPluginExecutor.

Since:
2.2

Method Summary
 EmbeddedRunner addExtensions(Object... objects)
           
static EmbeddedRunner create()
          Create a new instance.
protected  void doExecute()
           
 EmbeddedRunner mask(String fqcnPrefix)
           
 EmbeddedRunner setUnmaskedPackages(String... packages)
          Deprecated. since 2.3 use unmask(String)
 EmbeddedRunner unmask(String fqcnPrefix)
          Sonar is executed in an almost fully isolated classloader (mask everything by default).
 
Methods inherited from class org.sonar.runner.api.Runner
addProperties, app, appVersion, execute, properties, property, setApp, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static EmbeddedRunner create()
Create a new instance.


unmask

public EmbeddedRunner unmask(String fqcnPrefix)
Sonar is executed in an almost fully isolated classloader (mask everything by default). This method allows to unmask some classes based on a prefix of their fully qualified name. It is related to the extensions provided by addExtensions(Object...). Complex mask/unmask rules can be defined by chaining several ordered calls to unmask(String) and mask(String). Registered mask/unmask rules are considered in their registration order and as soon as a matching prefix is found the class is masked/unmasked accordingly. If no matching prefix can be found then by default class is masked.


mask

public EmbeddedRunner mask(String fqcnPrefix)
See Also:
unmask(String)

setUnmaskedPackages

@Deprecated
public EmbeddedRunner setUnmaskedPackages(String... packages)
Deprecated. since 2.3 use unmask(String)


addExtensions

public EmbeddedRunner addExtensions(Object... objects)

doExecute

protected void doExecute()
Specified by:
doExecute in class Runner<EmbeddedRunner>


Copyright © 2011-2014 SonarSource. All Rights Reserved.