@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); CommandLine cl; try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); return this; }
private void retainCompatibility(String[] cmdArgs) throws CliParseException { if (args.length > 2) { err.println("'delete path [version]' has been deprecated. " + "Please use 'delete [-v version] path' instead."); Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); } }
private void retainCompatibility(String[] cmdArgs) throws CliParseException { // stat path [watch] if (args.length > 2) { // rewrite to option cmdArgs[2] = "-w"; err.println("'stat path [watch]' has been deprecated. " + "Please use 'stat [-w] path' instead."); Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); } }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (cl.hasOption("?")) { printHelp(); } retainCompatibility(cmdArgs); return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 3) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 1) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 3) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if(args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); CommandLine cl; try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); CommandLine cl; try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); CommandLine cl; try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); CommandLine cl; try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); CommandLine cl; try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if(args.length < 2) { throw new CliParseException(getUsageStr()); } return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } retainCompatibility(cmdArgs); return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if(args.length < 2) { throw new CliParseException(getUsageStr()); } retainCompatibility(cmdArgs); return this; }
@Override public CliCommand parse(String[] cmdArgs) throws CliParseException { Parser parser = new PosixParser(); try { cl = parser.parse(options, cmdArgs); } catch (ParseException ex) { throw new CliParseException(ex); } args = cl.getArgs(); if (args.length < 2) { throw new CliParseException(getUsageStr()); } retainCompatibility(cmdArgs); return this; }