public final class RunUtil
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
static boolean |
checkDefaultAnnotationOption(org.apache.commons.cli.CommandLine settings) |
|
static boolean |
checkDefaultParallelOption(org.apache.commons.cli.CommandLine settings) |
|
static void |
execute(java.util.concurrent.Callable<java.lang.Void> runner) |
Executes the given given runner and logs any occurring error to the console.
|
static java.lang.AssertionError |
failWithMessage(java.lang.String message,
java.lang.Throwable cause) |
Prints given
message on standard error and calls System.exit(int) with 1. |
static org.apache.commons.cli.Option |
getDefaultAnnotationOption() |
|
static org.apache.commons.cli.Option |
getDefaultParallelOption() |
public static org.apache.commons.cli.Option getDefaultAnnotationOption()
public static boolean checkDefaultAnnotationOption(org.apache.commons.cli.CommandLine settings)
public static org.apache.commons.cli.Option getDefaultParallelOption()
public static boolean checkDefaultParallelOption(org.apache.commons.cli.CommandLine settings)
public static java.lang.AssertionError failWithMessage(java.lang.String message, @Nullable java.lang.Throwable cause)
message
on standard error and calls System.exit(int)
with 1.
An exception is returned to allow for one-line statements like
throw failWithMessage("error!")
. This approximates the actual control flow as precise
as possible, since System.exit(int)
does not return, but the compiler doesn't know
about this.public static void execute(java.util.concurrent.Callable<java.lang.Void> runner)