Class Command

java.lang.Object
org.graalvm.tools.lsp.server.types.JSONBase
org.graalvm.tools.lsp.server.types.Command

public class Command extends JSONBase
Represents a reference to a command. Provides a title which will be used to represent a command in the UI and, optionally, an array of arguments which will be passed to the command handler function when invoked.
  • Method Details

    • getTitle

      public String getTitle()
      Title of the command, like `save`.
    • setTitle

      public Command setTitle(String title)
    • getCommand

      public String getCommand()
      The identifier of the actual command handler.
    • setCommand

      public Command setCommand(String command)
    • getArguments

      public List<Object> getArguments()
      Arguments that the command handler should be invoked with.
    • setArguments

      public Command setArguments(List<Object> arguments)
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static Command create(String title, String command, Object... args)
      Creates a new Command literal.