Class ArrayConsumer

    • Constructor Detail

      • ArrayConsumer

        public ArrayConsumer()
    • Method Detail

      • initOutput

        protected OptionHandler initOutput()
        Creates the empty option handler from the internal data structure and returns it. This option handler will then be "visited".
        Specified by:
        initOutput in class AbstractOptionConsumer<String[],​String[]>
        Returns:
        the generated option handler, null in case of an error
      • extractClassname

        protected String extractClassname​(String cmdline)
        Extracts the classname from the given commandline.
        Parameters:
        cmdline - the commandline to process
        Returns:
        the classname
      • collectValues

        protected String[] collectValues​(AbstractOption option,
                                         String[] input)
        Collects all the arguments for given argument options.

        NB: collection is destructive, i.e., the flags and values are removed from the array.
        Parameters:
        option - the option to gather the arguments for
        input - the command-line array to process
        Returns:
        the collected values
      • setOptions

        public static void setOptions​(OptionHandler handler,
                                      String[] options)
        Sets the options of the option handler. Does check for remaining options.
        Parameters:
        handler - the object to set the options for
        options - the options to set
      • setOptions

        public static void setOptions​(OptionHandler handler,
                                      String[] options,
                                      boolean remaining)
        Sets the options of the option handler.
        Parameters:
        handler - the object to set the options for
        options - the options to set
        remaining - whether to check for remaining options