Class SimpleCommandLineParser


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

      • SimpleCommandLineParser

        public SimpleCommandLineParser()
    • Method Detail

      • parseAndReturnRemaining

        public java.lang.String[] parseAndReturnRemaining​(java.lang.String[] someParameters)
                                                   throws java.lang.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:
        java.lang.IllegalArgumentException
      • getHelp

        public java.lang.String getHelp​(java.lang.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