Package org.springframework.shell.jline
Class ScriptShellRunner
java.lang.Object
org.springframework.shell.jline.ScriptShellRunner
- All Implemented Interfaces:
ShellRunner
A
ShellRunner that looks for process arguments that start with @, which are then interpreted as
references to script files to run and exit.
Has higher precedence than NonInteractiveShellRunner and InteractiveShellRunner which gives it
top priority to run the shell if scripts are found.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe precedence at which this runner is ordered by the DefaultApplicationRunner - which also controls the order it is consulted on the ability to handle the current shell. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
PRECEDENCE
public static final int PRECEDENCEThe precedence at which this runner is ordered by the DefaultApplicationRunner - which also controls the order it is consulted on the ability to handle the current shell.- See Also:
-
-
Constructor Details
-
ScriptShellRunner
-
-
Method Details
-
canRun
public boolean canRun(org.springframework.boot.ApplicationArguments args) Description copied from interface:ShellRunnerChecks if a particular shell runner can execute.- Specified by:
canRunin interfaceShellRunner- Parameters:
args- the application arguments- Returns:
- true if shell runner can execute
-
run
Description copied from interface:ShellRunnerExecute application.- Specified by:
runin interfaceShellRunner- Parameters:
args- the application argumets- Throws:
Exception- in errors
-