diff --git a/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/ShellRunnerAutoConfiguration.java b/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/ShellRunnerAutoConfiguration.java index 12f55284..f580b18a 100644 --- a/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/ShellRunnerAutoConfiguration.java +++ b/spring-shell-autoconfigure/src/main/java/org/springframework/shell/boot/ShellRunnerAutoConfiguration.java @@ -22,10 +22,10 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.shell.Shell; -import org.springframework.shell.jline.InteractiveShellApplicationRunner; -import org.springframework.shell.jline.NonInteractiveShellApplicationRunner; +import org.springframework.shell.jline.InteractiveShellRunner; +import org.springframework.shell.jline.NonInteractiveShellRunner; import org.springframework.shell.jline.PromptProvider; -import org.springframework.shell.jline.ScriptShellApplicationRunner; +import org.springframework.shell.jline.ScriptShellRunner; @Configuration(proxyBeanMethods = false) public class ShellRunnerAutoConfiguration { @@ -44,19 +44,19 @@ public class ShellRunnerAutoConfiguration { @Bean @ConditionalOnProperty(prefix = "spring.shell.interactive", value = "enabled", havingValue = "true", matchIfMissing = true) - public InteractiveShellApplicationRunner interactiveApplicationRunner() { - return new InteractiveShellApplicationRunner(lineReader, promptProvider, shell); + public InteractiveShellRunner interactiveApplicationRunner() { + return new InteractiveShellRunner(lineReader, promptProvider, shell); } @Bean @ConditionalOnProperty(prefix = "spring.shell.noninteractive", value = "enabled", havingValue = "true", matchIfMissing = true) - public NonInteractiveShellApplicationRunner nonInteractiveApplicationRunner() { - return new NonInteractiveShellApplicationRunner(shell); + public NonInteractiveShellRunner nonInteractiveApplicationRunner() { + return new NonInteractiveShellRunner(shell); } @Bean @ConditionalOnProperty(prefix = "spring.shell.script", value = "enabled", havingValue = "true", matchIfMissing = true) - public ScriptShellApplicationRunner scriptApplicationRunner() { - return new ScriptShellApplicationRunner(parser, shell); + public ScriptShellRunner scriptApplicationRunner() { + return new ScriptShellRunner(parser, shell); } } diff --git a/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java b/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellRunner.java similarity index 92% rename from spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java rename to spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellRunner.java index 7dbdbceb..0163fdec 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellApplicationRunner.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/jline/InteractiveShellRunner.java @@ -37,8 +37,8 @@ import org.springframework.shell.ShellRunner; * * @author Eric Bottard */ -@Order(InteractiveShellApplicationRunner.PRECEDENCE) -public class InteractiveShellApplicationRunner implements ShellRunner { +@Order(InteractiveShellRunner.PRECEDENCE) +public class InteractiveShellRunner implements ShellRunner { /** * The precedence at which this runner is set. Highger precedence runners may effectively disable this one by setting @@ -52,7 +52,7 @@ public class InteractiveShellApplicationRunner implements ShellRunner { private final Shell shell; - public InteractiveShellApplicationRunner(LineReader lineReader, PromptProvider promptProvider, Shell shell) { + public InteractiveShellRunner(LineReader lineReader, PromptProvider promptProvider, Shell shell) { this.lineReader = lineReader; this.promptProvider = promptProvider; this.shell = shell; diff --git a/spring-shell-core/src/main/java/org/springframework/shell/jline/NonInteractiveShellApplicationRunner.java b/spring-shell-core/src/main/java/org/springframework/shell/jline/NonInteractiveShellRunner.java similarity index 92% rename from spring-shell-core/src/main/java/org/springframework/shell/jline/NonInteractiveShellApplicationRunner.java rename to spring-shell-core/src/main/java/org/springframework/shell/jline/NonInteractiveShellRunner.java index ebb74b87..1f08021e 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/jline/NonInteractiveShellApplicationRunner.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/jline/NonInteractiveShellRunner.java @@ -33,12 +33,12 @@ import org.springframework.util.StringUtils; * * @author Janne Valkealahti */ -@Order(InteractiveShellApplicationRunner.PRECEDENCE - 50) -public class NonInteractiveShellApplicationRunner implements ShellRunner { +@Order(InteractiveShellRunner.PRECEDENCE - 50) +public class NonInteractiveShellRunner implements ShellRunner { private final Shell shell; - public NonInteractiveShellApplicationRunner(Shell shell) { + public NonInteractiveShellRunner(Shell shell) { this.shell = shell; } diff --git a/spring-shell-core/src/main/java/org/springframework/shell/jline/ScriptShellApplicationRunner.java b/spring-shell-core/src/main/java/org/springframework/shell/jline/ScriptShellRunner.java similarity index 88% rename from spring-shell-core/src/main/java/org/springframework/shell/jline/ScriptShellApplicationRunner.java rename to spring-shell-core/src/main/java/org/springframework/shell/jline/ScriptShellRunner.java index c43168f0..7bf57345 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/jline/ScriptShellApplicationRunner.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/jline/ScriptShellRunner.java @@ -34,14 +34,14 @@ import org.springframework.util.ObjectUtils; * Spring Boot ApplicationRunner that looks for process arguments that start with * {@literal @}, which are then interpreted as references to script files to run and exit. * - * Has higher precedence than {@link InteractiveShellApplicationRunner} so that it + * Has higher precedence than {@link InteractiveShellRunner} so that it * prevents it to run if scripts are found. * * @author Eric Bottard */ //tag::documentation[] -@Order(InteractiveShellApplicationRunner.PRECEDENCE - 100) // Runs before InteractiveShellApplicationRunner -public class ScriptShellApplicationRunner implements ShellRunner { +@Order(InteractiveShellRunner.PRECEDENCE - 100) +public class ScriptShellRunner implements ShellRunner { //end::documentation[] public static final String SPRING_SHELL_SCRIPT = "spring.shell.script"; @@ -57,7 +57,7 @@ public class ScriptShellApplicationRunner implements ShellRunner { private final Shell shell; - public ScriptShellApplicationRunner(Parser parser, Shell shell) { + public ScriptShellRunner(Parser parser, Shell shell) { this.parser = parser; this.shell = shell; } diff --git a/spring-shell-core/src/main/java/org/springframework/shell/result/ResultHandlerConfig.java b/spring-shell-core/src/main/java/org/springframework/shell/result/ResultHandlerConfig.java index 666ac81a..a18f1f63 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/result/ResultHandlerConfig.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/result/ResultHandlerConfig.java @@ -24,7 +24,7 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.shell.CommandRegistry; import org.springframework.shell.TerminalSizeAware; -import org.springframework.shell.jline.InteractiveShellApplicationRunner; +import org.springframework.shell.jline.InteractiveShellRunner; /** * Used for explicit configuration of {@link org.springframework.shell.ResultHandler}s. @@ -58,7 +58,7 @@ public class ResultHandlerConfig { @Bean public ThrowableResultHandler throwableResultHandler(Terminal terminal, CommandRegistry commandRegistry, - ObjectProvider interactiveApplicationRunner) { + ObjectProvider interactiveApplicationRunner) { return new ThrowableResultHandler(terminal, commandRegistry, interactiveApplicationRunner); } diff --git a/spring-shell-core/src/main/java/org/springframework/shell/result/ThrowableResultHandler.java b/spring-shell-core/src/main/java/org/springframework/shell/result/ThrowableResultHandler.java index b8af816e..cbe21e71 100644 --- a/spring-shell-core/src/main/java/org/springframework/shell/result/ThrowableResultHandler.java +++ b/spring-shell-core/src/main/java/org/springframework/shell/result/ThrowableResultHandler.java @@ -24,7 +24,7 @@ import org.jline.utils.AttributedStyle; import org.springframework.beans.factory.ObjectProvider; import org.springframework.shell.CommandRegistry; import org.springframework.shell.ResultHandler; -import org.springframework.shell.jline.InteractiveShellApplicationRunner; +import org.springframework.shell.jline.InteractiveShellRunner; import org.springframework.util.StringUtils; /** @@ -45,10 +45,10 @@ public class ThrowableResultHandler extends TerminalAwareResultHandler interactiveRunner; + private ObjectProvider interactiveRunner; public ThrowableResultHandler(Terminal terminal, CommandRegistry commandRegistry, - ObjectProvider interactiveRunner) { + ObjectProvider interactiveRunner) { super(terminal); this.commandRegistry = commandRegistry; this.interactiveRunner = interactiveRunner;