Top Fields Constructors Methods
org.junit.platform.console.command

pack-priv Class MainCommand

extends Object
implements Runnable, IExitCodeGenerator
Class Inheritance
All Implemented Interfaces
picocli.CommandLine.IExitCodeGenerator, java.lang.Runnable
Annotations
@Command
name:junit
abbreviateSynopsis:true
synopsisSubcommandLabel:COMMAND
sortOptions:false
usageHelpWidth:95
showAtFileInUsageHelp:true
usageHelpAutoWidth:true
description:Launches the JUnit Platform for test discovery and execution.
footerHeading:%n
footer:For more information, please refer to the JUnit User Guide at%n@|underline https://docs.junit.org/${junit.docs.version}/user-guide/|@
scope:INHERIT
exitCodeOnInvalidInput:3
exitCodeOnExecutionException:-1
versionProvider:ManifestVersionProvider
Static Imports
java.util.Objects.requireNonNull

Field Summary

Modifier and TypeField and Description
pack-priv AnsiColorOptionMixin
pack-priv @Nullable CommandResult<?>
pack-priv CommandLine.Model.CommandSpec
private final ConsoleTestExecutor.Factory
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
MainCommand(ConsoleTestExecutor.Factory consoleTestExecutorFactory)

Method Summary

Modifier and TypeMethod and Description
public int
getExitCode()

Implements picocli.CommandLine.IExitCodeGenerator.getExitCode.

Returns the exit code that should be returned from the execute method.

private static CommandLine
getLikelyExecutedCommand(final CommandLine commandLine)

Get the most likely executed subcommand, if any, or the main command otherwise.

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

pack-priv CommandResult<?>
run(String[] args, Optional<OutputStreamConfig> outputStreamConfig)

private static CommandResult<?>
runCommand(CommandLine commandLine, String[] args, Optional<OutputStreamConfig> outputStreamConfig)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

ansiColorOptionback to summary
pack-priv AnsiColorOptionMixin ansiColorOption
Annotations
@Mixin
commandResultback to summary
pack-priv @Nullable CommandResult<?> commandResult
commandSpecback to summary
pack-priv CommandLine.Model.CommandSpec commandSpec
Annotations
@Spec
consoleTestExecutorFactoryback to summary
private final ConsoleTestExecutor.Factory consoleTestExecutorFactory
helpRequestedback to summary
private boolean helpRequested
Annotations
@Option
names:-h, --help
help:true
description:Display help information.
versionRequestedback to summary
private boolean versionRequested
Annotations
@Option
names:--version
versionHelp:true
description:Display version information.

Constructor Detail

MainCommandback to summary
pack-priv MainCommand(ConsoleTestExecutor.Factory consoleTestExecutorFactory)

Method Detail

getExitCodeback to summary
public int getExitCode()

Implements picocli.CommandLine.IExitCodeGenerator.getExitCode.

Doc from picocli.CommandLine.IExitCodeGenerator.getExitCode.

Returns the exit code that should be returned from the execute method.

Annotations
@Override
getLikelyExecutedCommandback to summary
private static CommandLine getLikelyExecutedCommand(final CommandLine commandLine)

Get the most likely executed subcommand, if any, or the main command otherwise.

See Also
Executing Commands with Subcommands
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
runback to summary
pack-priv CommandResult<?> run(String[] args, Optional<OutputStreamConfig> outputStreamConfig)
runCommandback to summary
private static CommandResult<?> runCommand(CommandLine commandLine, String[] args, Optional<OutputStreamConfig> outputStreamConfig)