public CommandLine parseArgs ( final String [ ] args ) throws CLIToolOptionsException { initOptions ( ) ; final CommandLineParser parser = new PosixParser ( ) ; try { commandLine = parser . parse ( getOptions ( ) , args ) ; } catch ( ParseException e ) { help ( ) ; throw new CLIToolOptionsException ( e ) ; } if ( null != toolOptions ) { for ( final CLIToolOptions toolOpts : toolOptions ) { toolOpts . parseArgs ( commandLine , args ) ; } } return commandLine ; }
Parse the options will apply this for each CLIToolOptions added to the tool . subclasses may override this but should call super