Class OptionCollectionParser

java.lang.Object
org.apache.rat.OptionCollectionParser

public final class OptionCollectionParser extends Object
Uses the AbstractOptionCollection to parse the command line options. Contains utility methods to ReportConfiguration from the options and an array of arguments.
  • Constructor Details

    • OptionCollectionParser

      public OptionCollectionParser(UIOptionCollection<?> optionCollection)
  • Method Details

    • parseCommands

      public ArgumentContext parseCommands(File workingDirectory, String[] args) throws IOException, org.apache.commons.cli.ParseException
      Parses the standard options to create a ReportConfiguration.
      Parameters:
      workingDirectory - The directory to resolve relative file names against.
      args - the arguments to parse
      Returns:
      the ArgumentContext for the process.
      Throws:
      IOException - on error.
      org.apache.commons.cli.ParseException - on option parsing error.