Package owl.run
Class RunUtil
- java.lang.Object
-
- owl.run.RunUtil
-
public final class RunUtil extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckDefaultAnnotationOption(org.apache.commons.cli.CommandLine settings)static voidcheckForVersion(String[] args)static voidexecute(Callable<Void> runner)Executes the given given runner and logs any occurring error to the console.static AssertionErrorfailWithMessage(String message)Prints givenmessageon standard error and callsSystem.exit(int)with 1.static AssertionErrorfailWithMessage(String message, Throwable cause)static org.apache.commons.cli.OptiongetDefaultAnnotationOption()
-
-
-
Method Detail
-
getDefaultAnnotationOption
public static org.apache.commons.cli.Option getDefaultAnnotationOption()
-
checkDefaultAnnotationOption
public static boolean checkDefaultAnnotationOption(org.apache.commons.cli.CommandLine settings)
-
failWithMessage
public static AssertionError failWithMessage(String message)
Prints givenmessageon standard error and callsSystem.exit(int)with 1. An exception is returned to allow for one-line statements likethrow failWithMessage("error!"). This approximates the actual control flow as precise as possible, sinceSystem.exit(int)does not return, but the compiler doesn't know about this.
-
failWithMessage
public static AssertionError failWithMessage(String message, Throwable cause)
- See Also:
failWithMessage(String)
-
checkForVersion
public static void checkForVersion(String[] args)
-
-