use of com.beust.jcommander.internal.DefaultConsole in project quality-measure-and-cohort-service by Alvearie.
the class TranslationCLI method main.
public static void main(String[] args) throws Exception {
TranslationOptions options = new TranslationOptions();
JCommander jc = JCommander.newBuilder().programName("cql-translation").console(new DefaultConsole(System.out)).addObject(options).build();
jc.parse(args);
if (options.isDisplayHelp) {
jc.usage();
System.exit(0);
}
TranslationCLI wrapper = new TranslationCLI();
wrapper.runWithArgs(options, System.out);
}
use of com.beust.jcommander.internal.DefaultConsole in project HarcHardware by bengtmartensson.
the class Wave method usage.
private static void usage(int exitcode) {
@SuppressWarnings("UseOfSystemOutOrSystemErr") PrintStream printStream = exitcode == IrpUtils.EXIT_SUCCESS ? System.out : System.err;
argumentParser.setConsole(new DefaultConsole(printStream));
argumentParser.usage();
System.exit(exitcode);
}
use of com.beust.jcommander.internal.DefaultConsole in project HarcHardware by bengtmartensson.
the class LircClient method usage.
private static void usage(int exitcode) {
@SuppressWarnings("UseOfSystemOutOrSystemErr") PrintStream printStream = exitcode == IrpUtils.EXIT_SUCCESS ? System.out : System.err;
argumentParser.setConsole(new DefaultConsole(printStream));
argumentParser.usage();
// placifying FindBugs...
doExit(exitcode);
}
use of com.beust.jcommander.internal.DefaultConsole in project geowave by locationtech.
the class GeoWaveBaseConverter method getConsole.
protected static Console getConsole() {
if (console == null) {
try {
Method consoleMethod = System.class.getDeclaredMethod("console");
Object systemConsole = consoleMethod.invoke(null);
if (systemConsole == null) {
console = new DefaultConsole();
} else {
console = new JDK6Console(systemConsole);
}
} catch (Throwable t) {
console = new DefaultConsole();
}
}
return console;
}
use of com.beust.jcommander.internal.DefaultConsole in project IrpTransmogrifier by bengtmartensson.
the class CommandHelp method usage.
public static void usage(PrintStream printStream, String command, JCommander argumentParser) {
argumentParser.setConsole(new DefaultConsole(printStream));
if (command == null)
argumentParser.usage();
else {
DefaultUsageFormatter formatter = new DefaultUsageFormatter(argumentParser);
formatter.usage(command);
}
}
Aggregations