Class ExtendedPosixParser

  • All Implemented Interfaces:
    org.apache.commons.cli.CommandLineParser

    @Deprecated
    public class ExtendedPosixParser
    extends org.apache.commons.cli.PosixParser
    Deprecated.
    A custom CommandLineParser that ignores unrecognized options without throwing an exception. See http://stackoverflow.com/a/8613949
    • Constructor Detail

      • ExtendedPosixParser

        @Deprecated
        public ExtendedPosixParser​(boolean ignoreUnrecognizedOption)
        Deprecated.
        Extend constructor to accept ignore option.
        Parameters:
        ignoreUnrecognizedOption - when true, silently ignore unrecognized options
    • Method Detail

      • processOption

        @Deprecated
        protected void processOption​(String arg,
                                     ListIterator<String> iter)
                              throws org.apache.commons.cli.ParseException
        Deprecated.
        Given an argument string and an iterator, try to process the option, respecting the ignoreUnrecognizedOption flag.
        Overrides:
        processOption in class org.apache.commons.cli.Parser
        Parameters:
        arg - the argument to process
        iter - the iterator for the super class to deal with
        Throws:
        org.apache.commons.cli.ParseException - on any problems