Class Syntax

java.lang.Object
me.efekos.simpler.commands.syntax.Syntax

public class Syntax extends Object
Represents a syntax for a command. Every Argument is being used at tab completion and handling argument validness. A Syntax can be used to generate usage for the command. Required for BaseCommand and SubCommands.
  • Constructor Details

    • Syntax

      public Syntax()
      Represents a syntax for a command. Every Argument gets used at tab completion and handling argument validness. A Syntax can be used to generate usage for the command. Required for BaseCommand and SubCommands.
  • Method Details

    • getArguments

      public List<Argument> getArguments()
      Returns a list of the Arguments on this syntax.
      Returns:
      List of the Arguments.
    • withArgument

      public Syntax withArgument(Argument arg)
      Adds an argument to the list.
      Parameters:
      arg - Argument to add
      Returns:
      The Syntax itself, making it able to repeat this method for multiple arguments.