Class MainCommand
- java.lang.Object
-
- org.junit.platform.console.options.MainCommand
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Object>
,picocli.CommandLine.IExitCodeGenerator
class MainCommand extends java.lang.Object implements java.util.concurrent.Callable<java.lang.Object>, picocli.CommandLine.IExitCodeGenerator
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.String>
allParameters
(package private) CommandResult<?>
commandResult
(package private) picocli.CommandLine.Model.CommandSpec
commandSpec
private ConsoleTestExecutor.Factory
consoleTestExecutorFactory
private boolean
helpRequested
private boolean
helpRequested2
-
Constructor Summary
Constructors Constructor Description MainCommand(ConsoleTestExecutor.Factory consoleTestExecutorFactory)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
call()
int
getExitCode()
private static picocli.CommandLine
getLikelyExecutedCommand(picocli.CommandLine commandLine)
Get the most likely executed subcommand, if any, or the main command otherwise.private static void
printDeprecationWarning(java.lang.String subcommand, java.util.Optional<java.lang.String> triggeringOption, picocli.CommandLine commandLine)
(package private) CommandResult<?>
run(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String[] args)
private static CommandResult<?>
runCommand(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String[] args, java.lang.Object command)
private static CommandResult<java.lang.Object>
runCommand(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String[] args, picocli.CommandLine commandLine)
private java.lang.Object
runCommand(java.lang.String subcommand, java.util.Optional<java.lang.String> triggeringOption)
-
-
-
Field Detail
-
consoleTestExecutorFactory
private final ConsoleTestExecutor.Factory consoleTestExecutorFactory
-
helpRequested
private boolean helpRequested
-
helpRequested2
private boolean helpRequested2
-
allParameters
private java.util.List<java.lang.String> allParameters
-
commandSpec
picocli.CommandLine.Model.CommandSpec commandSpec
-
commandResult
CommandResult<?> commandResult
-
-
Constructor Detail
-
MainCommand
MainCommand(ConsoleTestExecutor.Factory consoleTestExecutorFactory)
-
-
Method Detail
-
call
public java.lang.Object call()
- Specified by:
call
in interfacejava.util.concurrent.Callable<java.lang.Object>
-
getExitCode
public int getExitCode()
- Specified by:
getExitCode
in interfacepicocli.CommandLine.IExitCodeGenerator
-
runCommand
private java.lang.Object runCommand(java.lang.String subcommand, java.util.Optional<java.lang.String> triggeringOption)
-
printDeprecationWarning
private static void printDeprecationWarning(java.lang.String subcommand, java.util.Optional<java.lang.String> triggeringOption, picocli.CommandLine commandLine)
-
run
CommandResult<?> run(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String[] args)
-
runCommand
private static CommandResult<?> runCommand(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String[] args, java.lang.Object command)
-
runCommand
private static CommandResult<java.lang.Object> runCommand(java.io.PrintWriter out, java.io.PrintWriter err, java.lang.String[] args, picocli.CommandLine commandLine)
-
getLikelyExecutedCommand
private static picocli.CommandLine getLikelyExecutedCommand(picocli.CommandLine commandLine)
Get the most likely executed subcommand, if any, or the main command otherwise.- See Also:
- Executing Commands with Subcommands
-
-