/** * debugging routine to print out all options collected */ public void printOptions(){ for(ListIterator it=theOptions.listIterator(); it.hasNext();){ Option opt = (Option)it.next(); System.out.print("OPT =" + opt.getArgLetter()); String arg = opt.getArgument(); if(arg != null){ System.out.print(" " + arg); } System.out.println(); } }
char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument(); if(!theOptionMatcher.match(c)) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
/** * debugging routine to print out all options collected */ public void printOptions(){ for(ListIterator it=theOptions.listIterator(); it.hasNext();){ Option opt = (Option)it.next(); System.out.print("OPT =" + opt.getArgLetter()); String arg = opt.getArgument(); if(arg != null){ System.out.print(" " + arg); } System.out.println(); } }
char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument(); if(!theOptionMatcher.match(c)) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument(); if(!theOptionMatcher.match(c)) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument(); if(!theOptionMatcher.match(c)) { ErrorMsg msg = new ErrorMsg(ErrorMsg.ILLEGAL_CMDLINE_OPTION_ERR,
/** * gets the argument for the current parsed option. For example, * in case of '-d <file>', if current option parsed is 'd' then * getOptionArg() would return '<file>'. * @return String - argument for current parsed option. */ public String getOptionArg(){ String retval = null; String tmp = theCurrentOption.getArgument(); char c = theCurrentOption.getArgLetter(); if(theOptionMatcher.hasArg(c)){ retval = tmp; } return retval; }
/** * gets the argument for the current parsed option. For example, * in case of '-d <file>', if current option parsed is 'd' then * getOptionArg() would return '<file>'. * @return String - argument for current parsed option. */ public String getOptionArg(){ String retval = null; String tmp = theCurrentOption.getArgument(); char c = theCurrentOption.getArgLetter(); if(theOptionMatcher.hasArg(c)){ retval = tmp; } return retval; }
/** * gets the argument for the current parsed option. For example, * in case of '-d <file>', if current option parsed is 'd' then * getOptionArg() would return '<file>'. * @return String - argument for current parsed option. */ public String getOptionArg(){ String retval = null; String tmp = theCurrentOption.getArgument(); char c = theCurrentOption.getArgLetter(); if(theOptionMatcher.hasArg(c)){ retval = tmp; } return retval; }
/** * debugging routine to print out all options collected */ public void printOptions(){ for(ListIterator it=theOptions.listIterator(); it.hasNext();){ Option opt = (Option)it.next(); System.out.print("OPT =" + opt.getArgLetter()); String arg = opt.getArgument(); if(arg != null){ System.out.print(" " + arg); } System.out.println(); } }
/** * debugging routine to print out all options collected */ public void printOptions(){ for(ListIterator it=theOptions.listIterator(); it.hasNext();){ Option opt = (Option)it.next(); System.out.print("OPT =" + opt.getArgLetter()); String arg = opt.getArgument(); if(arg != null){ System.out.print(" " + arg); } System.out.println(); } }
/** * gets the argument for the current parsed option. For example, * in case of '-d <file>', if current option parsed is 'd' then * getOptionArg() would return '<file>'. * @return String - argument for current parsed option. */ public String getOptionArg(){ String retval = null; String tmp = theCurrentOption.getArgument(); char c = theCurrentOption.getArgLetter(); if(theOptionMatcher.hasArg(c)){ retval = tmp; } return retval; }