@ Deprecated public void addArguments ( String [ ] argList ) throws DuplicateOptionException , InvalidFormatException { for ( String arg : argList ) { Argument f = new Argument ( ) ; String [ ] breakdown = arg . split ( "," ) ; for ( String s : breakdown ) { s = s . trim ( ) ; if ( s . startsWith ( "--" ) ) { f . longOption = noDashes ( s ) ; } else if ( s . startsWith ( "-h" ) ) { f . helpText = s . substring ( 2 ) ; } else if ( s . startsWith ( "-" ) ) { f . option = noDashes ( s ) ; } else if ( s . equals ( "+" ) ) { f . takesValue = true ; f . valueRequired = true ; } else if ( s . equals ( "?" ) ) { f . isParam = true ; f . takesValue = true ; params . add ( f ) ; } else if ( s . equals ( "*" ) ) { f . takesValue = true ; } else { throw new InvalidFormatException ( s + " in " + arg + " is not formatted correctly." ) ; } } addArgument ( f ) ; } }
adds options for this command line parser