Interface ArgumentParser

All Known Implementing Classes:
QuotedStringTokenizer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ArgumentParser
Represents a parser that receives strings and converts them into collection-like ArgumentStack that is consumed by resolvers.

Argument parsers allow to customize the tokenizing logic of strings, such as allowing quotes, skipping extra whitespace, etc.

Set with CommandHandler.setArgumentParser(ArgumentParser)

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ArgumentParser
    An argument parser that only parses strings by spaces, and does not respect quotes.
    static final ArgumentParser
    An argument parser that parses strings by quotes and skips extra whitespace.
  • Method Summary

    Modifier and Type
    Method
    Description
    parse(@NotNull String arguments)
    Parses the string and returns an ArgumentStack for it.
  • Field Details

    • QUOTES

      static final ArgumentParser QUOTES
      An argument parser that parses strings by quotes and skips extra whitespace.
    • NO_QUOTES

      static final ArgumentParser NO_QUOTES
      An argument parser that only parses strings by spaces, and does not respect quotes.
  • Method Details