Class GnuParser

  • All Implemented Interfaces:
    CommandLineParser

    @Deprecated
    public class GnuParser
    extends Parser
    Deprecated.
    since 1.3, use the DefaultParser instead
    The class GnuParser provides an implementation of the flatten method.
    Version:
    $Id: GnuParser.java 1445352 2013-02-12 20:48:19Z tn $
    • Constructor Detail

      • GnuParser

        public GnuParser()
        Deprecated.
    • Method Detail

      • flatten

        protected java.lang.String[] flatten​(Options options,
                                             java.lang.String[] arguments,
                                             boolean stopAtNonOption)
        Deprecated.
        This flatten method does so using the following rules:
        1. If an Option exists for the first character of the arguments entry AND an Option does not exist for the whole argument then add the first character as an option to the processed tokens list e.g. "-D" and add the rest of the entry to the also.
        2. Otherwise just add the token to the processed tokens list.
        Specified by:
        flatten in class Parser
        Parameters:
        options - The Options to parse the arguments by.
        arguments - The arguments that have to be flattened.
        stopAtNonOption - specifies whether to stop flattening when a non option has been encountered
        Returns:
        a String array of the flattened arguments