Examples of commandNames()


Examples of com.beust.jcommander.Parameters.commandNames()

    public static JCommander parseArgs(Object jcArgs, String[] cliArgs) {
        JCommander jc = new JCommander(jcArgs);
        try {
            if (Sets.newHashSet(cliArgs).contains("-help")) {
                Parameters parametersAnnotation = jcArgs.getClass().getAnnotation(Parameters.class);
                jc.addCommand(parametersAnnotation.commandNames()[0], jcArgs);
                jc.usage(parametersAnnotation.commandNames()[0]);
                System.exit(0);
            }
            jc.parse(cliArgs);
        } catch (Exception e) {
View Full Code Here

Examples of com.beust.jcommander.Parameters.commandNames()

        JCommander jc = new JCommander(jcArgs);
        try {
            if (Sets.newHashSet(cliArgs).contains("-help")) {
                Parameters parametersAnnotation = jcArgs.getClass().getAnnotation(Parameters.class);
                jc.addCommand(parametersAnnotation.commandNames()[0], jcArgs);
                jc.usage(parametersAnnotation.commandNames()[0]);
                System.exit(0);
            }
            jc.parse(cliArgs);
        } catch (Exception e) {
            JCommander.getConsole().println("Cannot parse arguments: " + e.getClass() + " -> " + e.getMessage());
View Full Code Here

Examples of com.beust.jcommander.Parameters.commandNames()

    public static JCommander parseArgs(Object jcArgs, String[] cliArgs) {
        JCommander jc = new JCommander(jcArgs);
        try {
            if (Sets.newHashSet(cliArgs).contains("-help")) {
                Parameters parametersAnnotation = jcArgs.getClass().getAnnotation(Parameters.class);
                jc.addCommand(parametersAnnotation.commandNames()[0], jcArgs);
                jc.usage(parametersAnnotation.commandNames()[0]);
                System.exit(0);
            }
            jc.parse(cliArgs);
        } catch (Exception e) {
View Full Code Here

Examples of com.beust.jcommander.Parameters.commandNames()

        JCommander jc = new JCommander(jcArgs);
        try {
            if (Sets.newHashSet(cliArgs).contains("-help")) {
                Parameters parametersAnnotation = jcArgs.getClass().getAnnotation(Parameters.class);
                jc.addCommand(parametersAnnotation.commandNames()[0], jcArgs);
                jc.usage(parametersAnnotation.commandNames()[0]);
                System.exit(0);
            }
            jc.parse(cliArgs);
        } catch (Exception e) {
            JCommander.getConsole().println("Cannot parse arguments: " + e.getClass() + " -> " + e.getMessage());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.