Search in sources :

Example 1 with JDK6Console

use of com.beust.jcommander.internal.JDK6Console 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;
}
Also used : DefaultConsole(com.beust.jcommander.internal.DefaultConsole) Method(java.lang.reflect.Method) JDK6Console(com.beust.jcommander.internal.JDK6Console)

Aggregations

DefaultConsole (com.beust.jcommander.internal.DefaultConsole)1 JDK6Console (com.beust.jcommander.internal.JDK6Console)1 Method (java.lang.reflect.Method)1