Package org.apache.tools.ant.taskdefs.optional.junitlauncher

# Class LauncherSupport

java.lang.Object
org.apache.tools.ant.taskdefs.optional.junitlauncher.LauncherSupport

public class LauncherSupport extends Object
Responsible for doing the real work involved in launching the JUnit platform and passing it the relevant tests that need to be executed by the JUnit platform.

This class relies on a `LaunchDefinition` for setting up the launch of the JUnit platform.

The `LauncherSupport` isn't concerned with whether or not it's being executed in the same JVM as the build in which the `junitlauncher` was triggered or if it's running as part of a forked JVM. Instead it just relies on the `LaunchDefinition` to do whatever decisions need to be done before and after launching the tests.

This class is not thread-safe and isn't expected to be used for launching from multiple different threads simultaneously.

This class is an internal implementation detail of the Ant project and although it's a public class, it isn't meant to be used outside of this project. This class can be changed, across releases, without any backward compatible guarantees and hence shouldn't be used or relied upon outside of this project.

## Constructor Summary

Constructors
Constructor
Description
`LauncherSupport(LaunchDefinition definition, TestExecutionContext testExecutionContext)`
Create a `LauncherSupport` for the passed `LaunchDefinition`

## Method Summary

Modifier and Type
Method
Description
`void`
`launch()`
Launches the tests defined in the `LaunchDefinition`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### LauncherSupport

public LauncherSupport(LaunchDefinition definition, TestExecutionContext testExecutionContext)
Create a `LauncherSupport` for the passed `LaunchDefinition`

Parameters:
  `definition` - The launch definition which will be used for launching the tests
  `testExecutionContext` - The `TestExecutionContext` to use for the tests

## Method Details

### launch

public void launch() throws BuildException
Launches the tests defined in the `LaunchDefinition`

Throws:
  `BuildException` - If any tests failed and the launch definition was configured to throw an exception, or if any other exception occurred before or after launching the tests