Class NestedConsumer

    • Field Detail

      • m_Encoding

        protected BaseCharset m_Encoding
        the encoding to use.
    • Constructor Detail

      • NestedConsumer

        public NestedConsumer()
    • Method Detail

      • setEncoding

        public void setEncoding​(BaseCharset value)
        Sets the encoding to use.
        Specified by:
        setEncoding in interface EncodingSupporter
        Parameters:
        value - the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • getEncoding

        public BaseCharset getEncoding()
        Returns the encoding to use.
        Specified by:
        getEncoding in interface EncodingSupporter
        Returns:
        the encoding, e.g. "UTF-8" or "UTF-16", empty string for default
      • encodingTipText

        public String encodingTipText()
        Returns the tip text for this property.
        Specified by:
        encodingTipText in interface EncodingSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • getLineRange

        protected void getLineRange​(List values,
                                    gnu.trove.list.array.TIntArrayList range)
        Collects all the line numbers.
        Parameters:
        values - the list to traverse
        range - for collecting the line numbers
      • getLineRange

        protected String getLineRange​(List values)
        Generates a line number range from the list of values (mixed Line/ArrayList).
        Parameters:
        values - the values to inspect
        Returns:
        the line range, null if no line numbers available
      • 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<List,​List>
        Returns:
        the generated option handler, null in case of an error
      • convertToInput

        protected List convertToInput​(String s)
        Converts the input string into the internal format.
        Specified by:
        convertToInput in class AbstractOptionConsumer<List,​List>
        Parameters:
        s - the string to process
        Returns:
        the internal format, null in case of an error
      • doProcessOption

        protected void doProcessOption​(AbstractArgumentOption option,
                                       List values)
                                throws Exception
        Processes the specified argument option.
        Parameters:
        option - the argument option to process
        values - the value(s) for the argument option
        Throws:
        Exception - if something goes wrong
      • collectValues

        protected ArrayList collectValues​(AbstractOption option,
                                          List input)
        Collects all the arguments for given argument options.

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