public ArgumentValues process(final String[] programArgs) throws UsageException {
  ArgumentHandler argHandler;
  final ArgumentValues result=new ArgumentValues();
  List<Argument> unmatched;
  List<Match> matches;
  matches=checkMatches(programArgs,result);
  unmatched=new ArrayList<Argument>();
  unmatched.addAll(args);
  for (  Match match : matches) {
    unmatched.remove(match.getArgument());
  }
  for (  Argument arg : unmatched) {
    if (arg.isRequired() && !arg.isDefinedInEnv()) {
      final UsageException usageException=new UsageException("Required argument not provided: " + arg);
      usageException.setUsage(getUsage());
      throw usageException;
    }
  }
  for (  Match match : matches) {
    final Argument arg=match.getArgument();
    argHandler=arg.getArgumentHandler();
    if (argHandler != null) {
      argHandler.handleArgument(arg,match.getForm(),match.getParams());
    }
    result.addResult(arg,match.getParams());
  }
  return result;
}

public ArgumentValues process ( final String [ ] programArgs ) throws UsageException { ArgumentHandler argHandler ; final ArgumentValues result = new ArgumentValues ( ) ; List < Argument > unmatched ; List < Match > matches ; matches = checkMatches ( programArgs , result ) ; unmatched = new ArrayList < Argument > ( ) ; unmatched . addAll ( args ) ; for ( Match match : matches ) { unmatched . remove ( match . getArgument ( ) ) ; } for ( Argument arg : unmatched ) { if ( arg . isRequired ( ) && ! arg . isDefinedInEnv ( ) ) { final UsageException usageException = new UsageException ( "Required argument not provided: " + arg ) ; usageException . setUsage ( getUsage ( ) ) ; throw usageException ; } } for ( Match match : matches ) { final Argument arg = match . getArgument ( ) ; argHandler = arg . getArgumentHandler ( ) ; if ( argHandler != null ) { argHandler . handleArgument ( arg , match . getForm ( ) , match . getParams ( ) ) ; } result . addResult ( arg , match . getParams ( ) ) ; } return result ; }
process the command line arguments provided .
