Class CommandlineParser

java.lang.Object
games.stendhal.common.CommandlineParser

public class CommandlineParser extends Object
Generic command line parser considering quoted strings.
Author:
Martin Fuchs
  • Field Details

  • Constructor Details

    • CommandlineParser

      public CommandlineParser(String text)
      Creates a new CommandlineParser
      Parameters:
      text - text to parse
  • Method Details

    • skipWhitespace

      public void skipWhitespace()
      Skip leading spaces.
    • getNextParameter

      public String getNextParameter(ErrorDrain errors)
      Read next command line parameter considering quoting.
      Parameters:
      errors -
      Returns:
      parameter
    • readAllParameters

      public List<String> readAllParameters(ErrorDrain errors)
      Read all remaining parameters into a String list.
      Parameters:
      errors -
      Returns:
      parameter list