Class ScriptCommands

  • All Implemented Interfaces:
    CommandGroup

    public class ScriptCommands
    extends java.lang.Object
    implements CommandGroup
    Built-in commands for script execution.

    Provides:

    • source (alias .) ? executes a script file in the current session
    Since:
    4.0
    See Also:
    ScriptRunner
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Collection<Command> commands()
      Returns all commands in this group.
      java.lang.String name()
      Returns the name of this command group.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScriptCommands

        public ScriptCommands​(ScriptRunner scriptRunner,
                              CommandDispatcher dispatcher)
        Creates the script commands group.
        Parameters:
        scriptRunner - the script runner to use
        dispatcher - the command dispatcher for executing script lines
    • Method Detail

      • name

        public java.lang.String name()
        Description copied from interface: CommandGroup
        Returns the name of this command group.

        The default implementation returns the simple class name.

        Specified by:
        name in interface CommandGroup
        Returns:
        the group name
      • commands

        public java.util.Collection<Command> commands()
        Description copied from interface: CommandGroup
        Returns all commands in this group.
        Specified by:
        commands in interface CommandGroup
        Returns:
        the collection of commands, never null