2727import org .springframework .context .annotation .Bean ;
2828import org .springframework .shell .core .MethodTargetRegistrar ;
2929import org .springframework .shell .boot .SpringShellProperties .Help ;
30- import org .springframework .shell .core .command .Command ;
3130import org .springframework .shell .core .command .CommandRegistry ;
3231import org .springframework .shell .core .command .CommandRegistryCustomizer ;
33- import org .springframework .shell .core .command .BuilderSupplier ;
34- import org .springframework .shell .core .command .OptionNameModifier ;
32+ import org .springframework .shell .core .command .CommandRegistration ;
33+ import org .springframework .shell .core .command .CommandRegistration .BuilderSupplier ;
34+ import org .springframework .shell .core .command .CommandRegistration .OptionNameModifier ;
3535import org .springframework .shell .core .command .support .OptionNameModifierSupport ;
3636import org .springframework .shell .core .command .CommandResolver ;
3737import org .springframework .shell .core .context .ShellContext ;
@@ -57,7 +57,8 @@ public CommandRegistry commandRegistry(ObjectProvider<MethodTargetRegistrar> met
5757 }
5858
5959 @ Bean
60- public CommandRegistryCustomizer defaultCommandRegistryCustomizer (ObjectProvider <Command > commandRegistrations ) {
60+ public CommandRegistryCustomizer defaultCommandRegistryCustomizer (
61+ ObjectProvider <CommandRegistration > commandRegistrations ) {
6162 return registry -> {
6263 commandRegistrations .orderedStream ().forEach (registration -> {
6364 registry .register (registration );
@@ -70,10 +71,11 @@ public CommandRegistrationCustomizer helpOptionsCommandRegistrationCustomizer(Sp
7071 return registration -> {
7172 Help help = properties .getHelp ();
7273 if (help .isEnabled ()) {
73- registration .withHelpOptions (helpOptionsSpec -> helpOptionsSpec .enabled (true )
74+ registration .withHelpOptions ()
75+ .enabled (true )
7476 .longNames (help .getLongNames ())
7577 .shortNames (help .getShortNames ())
76- .command (help .getCommand ())) ;
78+ .command (help .getCommand ());
7779 }
7880 };
7981 }
@@ -119,7 +121,7 @@ public CommandRegistrationCustomizer defaultOptionNameModifierCommandRegistratio
119121 public BuilderSupplier commandRegistrationBuilderSupplier (
120122 ObjectProvider <CommandRegistrationCustomizer > customizerProvider ) {
121123 return () -> {
122- Command .Builder builder = Command .builder ();
124+ CommandRegistration .Builder builder = CommandRegistration .builder ();
123125 customizerProvider .orderedStream ().forEach ((customizer ) -> customizer .customize (builder ));
124126 return builder ;
125127 };
0 commit comments