/** * 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(); } }
indexoflast = theOptions.size()-1; Option op = (Option)theOptions.get(indexoflast); char opLetter = op.getArgLetter(); if(!op.hasArg() && theOptionMatcher.hasArg(opLetter)){ op.setArg(token);
if(theOptionsIterator.hasNext()){ theCurrentOption = (Option)theOptionsIterator.next(); char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument();
indexoflast = theOptions.size()-1; Option op = (Option)theOptions.get(indexoflast); char opLetter = op.getArgLetter(); if(!op.hasArg() && theOptionMatcher.hasArg(opLetter)){ op.setArg(token);
indexoflast = theOptions.size()-1; Option op = (Option)theOptions.get(indexoflast); char opLetter = op.getArgLetter(); if(!op.hasArg() && theOptionMatcher.hasArg(opLetter)){ op.setArg(token);
indexoflast = theOptions.size()-1; Option op = (Option)theOptions.get(indexoflast); char opLetter = op.getArgLetter(); if(!op.hasArg() && theOptionMatcher.hasArg(opLetter)){ op.setArg(token);
if(theOptionsIterator.hasNext()){ theCurrentOption = (Option)theOptionsIterator.next(); char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument();
if(theOptionsIterator.hasNext()){ theCurrentOption = (Option)theOptionsIterator.next(); char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument();
if(theOptionsIterator.hasNext()){ theCurrentOption = (Option)theOptionsIterator.next(); char c = theCurrentOption.getArgLetter(); boolean shouldHaveArg = theOptionMatcher.hasArg(c); String arg = theCurrentOption.getArgument();
/** * 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(); } }
/** * 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; }