Data structure representing all command execution information.
Value parameters
- attributes
-
custom command state. It is important to clean up attributes when no longer needed to avoid memory leaks and class loader leaks.
- configuration
-
provides access to the launcher environment, including the application configuration, Scala versions, jvm/filesystem wide locking, and the launcher itself
- definedCommands
-
the list of command definitions that evaluate command strings. These may be modified to change the available commands.
- exitHooks
-
code to run before sbt exits, usually to ensure resources are cleaned up.
- history
-
tracks the recently executed commands
- next
-
the next action for the command processor to take. This may be to continue with the next command, adjust global logging, or exit.
- onFailure
-
the command to execute when another command fails.
onFailure
is cleared before the failure handling command is executed. - remainingCommands
-
the sequence of commands to execute. This sequence may be modified to change the commands to be executed. Typically, the
::
and:::
methods are used to prepend new commands to run.
Attributes
Members list
Value members
Concrete methods
Registers newCommand
as an available command.
Registers newCommand
as an available command.
Attributes
Registers newCommands
as available commands.
Registers newCommands
as available commands.
Attributes
Schedules commands
to be run before any remaining commands.
Schedules commands
to be run before any remaining commands.
Attributes
Schedules command
to be run before any remaining commands.
Schedules command
to be run before any remaining commands.
Attributes
Schedules command
to be run before any remaining commands.
Schedules command
to be run before any remaining commands.
Attributes
Schedules commands
to be run before any remaining commands.
Schedules commands
to be run before any remaining commands.
Attributes
Registers a new exit hook, which will run when sbt exits or restarts.
Registers a new exit hook, which will run when sbt exits or restarts.
Attributes
The application base directory, which is not necessarily the current working directory.
The application base directory, which is not necessarily the current working directory.
Attributes
Get the class loader cache for the application.
Get the class loader cache for the application.
Attributes
Sets the next command processing action to be to rotate the global log and continue executing commands.
Sets the next command processing action to be to rotate the global log and continue executing commands.
Attributes
Sets the next command processing action to be to continue processing the next command.
Sets the next command processing action to be to continue processing the next command.
Attributes
Sets the next command processing action to be to exit with a zero exit code if ok
is true and a nonzero exit code if ok
if false.
Sets the next command processing action to be to exit with a zero exit code if ok
is true and a nonzero exit code if ok
if false.
Attributes
Marks the currently executing command as failing. This triggers failure handling by the command processor. See also State.onFailure
Marks the currently executing command as failing. This triggers failure handling by the command processor. See also State.onFailure
Attributes
Gets the value associated with key
from the custom attributes map.
Gets the value associated with key
from the custom attributes map.
Attributes
Marks the currently executing command as failing due to the given exception. This displays the error appropriately and triggers failure handling by the command processor. Note that this does not throw an exception and returns normally. It is only once control is returned to the command processor that failure handling at the command level occurs.
Marks the currently executing command as failing due to the given exception. This displays the error appropriately and triggers failure handling by the command processor. Note that this does not throw an exception and returns normally. It is only once control is returned to the command processor that failure handling at the command level occurs.
Attributes
Returns true if key
exists in the custom attributes map, false if it does not exist.
Returns true if key
exists in the custom attributes map, false if it does not exist.
Attributes
Create and register a class loader cache. This should be called once at the application entry-point.
Create and register a class loader cache. This should be called once at the application entry-point.
Attributes
An advisory flag that is true
if this application will execute commands based on user input.
An advisory flag that is true
if this application will execute commands based on user input.
Attributes
Sets the next command processing action to be to keep the previous log and continue executing commands.
Sets the next command processing action to be to keep the previous log and continue executing commands.
Attributes
Evaluates the provided expression with a JVM-wide and machine-wide lock on file
.
Evaluates the provided expression with a JVM-wide and machine-wide lock on file
.
Attributes
The Logger used for general command logging.
The Logger used for general command logging.
Attributes
Sets the value associated with key
in the custom attributes map.
Sets the value associated with key
in the custom attributes map.
Attributes
Implementation of reboot.
Implementation of reboot.
Attributes
Restarts sbt without dropping loaded Scala classes. It is a shallower restart than reboot
. This method takes a snapshot of the remaining commands and will resume executing those commands after reload. This means that any commands added to this State will be dropped.
Restarts sbt without dropping loaded Scala classes. It is a shallower restart than reboot
. This method takes a snapshot of the remaining commands and will resume executing those commands after reload. This means that any commands added to this State will be dropped.
Attributes
Removes the key
and any associated value from the custom attributes map.
Removes the key
and any associated value from the custom attributes map.
Attributes
Runs any defined exitHooks and then clears them.
Runs any defined exitHooks and then clears them.
Attributes
Changes the advisory interactive
flag.
Changes the advisory interactive
flag.
Attributes
Sets the next command processing action to do.
Sets the next command processing action to do.
Attributes
Sets the value associated with key
in the custom attributes map by transforming the current value.
Sets the value associated with key
in the custom attributes map by transforming the current value.
Attributes
Inherited methods
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Compares the receiver object (this
) with the argument object (that
) for equivalence.
Any implementation of this method should be an equivalence relation:
- It is reflexive: for any instance
x
of typeAny
,x.equals(x)
should returntrue
. - It is symmetric: for any instances
x
andy
of typeAny
,x.equals(y)
should returntrue
if and only ify.equals(x)
returnstrue
. - It is transitive: for any instances
x
,y
, andz
of typeAny
ifx.equals(y)
returnstrue
andy.equals(z)
returnstrue
, thenx.equals(z)
should returntrue
.
If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode
to ensure that objects which are "equal" (o1.equals(o2)
returns true
) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)
).
Value parameters
- that
-
the object to compare against this object for equality.
Attributes
Calculate a hash code value for the object.
Calculate a hash code value for the object.
The default hashing algorithm is platform dependent.
Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)
) yet not be equal (o1.equals(o2)
returns false
). A degenerate implementation could always return 0
. However, it is required that if two objects are equal (o1.equals(o2)
returns true
) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)
). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals
method.
Attributes
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product