ForkDefinition (Apache Ant API)
Description: declaration: package: org.apache.tools.ant.taskdefs.optional.junitlauncher.confined, class: ForkDefinition

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

# Class ForkDefinition

java.lang.Object
org.apache.tools.ant.taskdefs.optional.junitlauncher.confined.ForkDefinition

public class ForkDefinition extends Object
Represents the `fork` element within test definitions of the `junitlauncher` task

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `ForkDefinition.ForkMode`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addConfiguredEnv(Environment.Variable var)`
  `void`
  `addConfiguredModulePath(Path modulePath)`
  `void`
  `addConfiguredSysProperty(Environment.Variable sysProp)`
  `void`
  `addConfiguredSysPropertySet(PropertySet propertySet)`
  `void`
  `addConfiguredUpgradeModulePath(Path upgradeModulePath)`
  `Commandline.Argument`
  `createJvmArg()`
  `void`
  `setDir(String dir)`
  `void`
  `setForkMode(ForkDefinition.ForkMode forkMode)`
  The `forkMode` to use when launching the tests in a forked JVM.
  `void`
  `setIncludeAntRuntimeLibraries(boolean include)`
  `void`
  `setIncludeJUnitPlatformLibraries(boolean include)`
  `void`
  `setJava(String java)`
  The command used to launch `java`.
  `void`
  `setTimeout(long timeout)`

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

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

- ## Method Details

  - ### setDir

    public void setDir(String dir)

  - ### setTimeout

    public void setTimeout(long timeout)

  - ### setIncludeJUnitPlatformLibraries

    public void setIncludeJUnitPlatformLibraries(boolean include)

  - ### setIncludeAntRuntimeLibraries

    public void setIncludeAntRuntimeLibraries(boolean include)

  - ### createJvmArg

    public Commandline.Argument createJvmArg()

  - ### addConfiguredSysProperty

    public void addConfiguredSysProperty(Environment.Variable sysProp)

  - ### addConfiguredSysPropertySet

    public void addConfiguredSysPropertySet(PropertySet propertySet)

  - ### addConfiguredEnv

    public void addConfiguredEnv(Environment.Variable var)

  - ### addConfiguredModulePath

    public void addConfiguredModulePath(Path modulePath)

  - ### addConfiguredUpgradeModulePath

    public void addConfiguredUpgradeModulePath(Path upgradeModulePath)

  - ### setJava

    public void setJava(String java)
    The command used to launch `java`. This can be a path to the `java` binary that will be used to launch the forked `java` process.
    Parameters:
      `java` - Path to the java command
    Since:
      Ant 1.10.14

  - ### setForkMode

    public void setForkMode(ForkDefinition.ForkMode forkMode)
    The `forkMode` to use when launching the tests in a forked JVM.
    Parameters:
      `forkMode` - Can be null, in which case an internal implementation default will be used.
    Since:
      Ant 1.10.14