Class SimpleCommandLineParser


  • public class SimpleCommandLineParser
    extends Object
    A very simple command line parser.
    Author:
    Rene Schneider - initial API and implementation
    • Constructor Detail

      • SimpleCommandLineParser

        public SimpleCommandLineParser()
    • Method Detail

      • parseAndReturnRemaining

        public String[] parseAndReturnRemaining​(String[] someParameters)
                                         throws IllegalArgumentException
        Parses the given parameters and returns all parameters that could not be matched.
        Parameters:
        someParameters - the parameters to parse
        Returns:
        the remaining unmatched parameters
        Throws:
        IllegalArgumentException
      • getHelp

        public String getHelp​(String aRemainingParamsHelp)
        Creates a help message to print out on the command line, based on the command line options registered.
        Parameters:
        aRemainingParamsHelp - the text to attach at the end of the "command line"
        Returns:
        the help message string