Home / Function/ getCommands() — spring-boot Function Reference

getCommands() — spring-boot Function Reference

Architecture documentation for the getCommands() function in Shell.java from the spring-boot codebase.

Function java GradlePlugin RunTasks calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  f24cb0df_86b0_e91a_bb3c_044989f5b676["getCommands()"]
  a0875f38_348f_d67f_efc8_22a89829015a["createCommandRunner()"]
  a0875f38_348f_d67f_efc8_22a89829015a -->|calls| f24cb0df_86b0_e91a_bb3c_044989f5b676
  e45b2f65_2856_2e90_5444_2888f9198454["getCommands()"]
  f24cb0df_86b0_e91a_bb3c_044989f5b676 -->|calls| e45b2f65_2856_2e90_5444_2888f9198454
  1a09ad96_ef00_c025_ba59_def1b4edc416["convertToForkCommand()"]
  f24cb0df_86b0_e91a_bb3c_044989f5b676 -->|calls| 1a09ad96_ef00_c025_ba59_def1b4edc416
  style f24cb0df_86b0_e91a_bb3c_044989f5b676 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/Shell.java lines 90–102

	private Iterable<Command> getCommands() {
		List<Command> commands = new ArrayList<>();
		ServiceLoader<CommandFactory> factories = ServiceLoader.load(CommandFactory.class, getClass().getClassLoader());
		for (CommandFactory factory : factories) {
			for (Command command : factory.getCommands()) {
				commands.add(convertToForkCommand(command));
			}
		}
		commands.add(new PromptCommand(this.prompts));
		commands.add(new ClearCommand(this.consoleReader));
		commands.add(new ExitCommand());
		return commands;
	}

Domain

Subdomains

Calls

Frequently Asked Questions

What does getCommands() do?
getCommands() is a function in the spring-boot codebase.
What does getCommands() call?
getCommands() calls 2 function(s): convertToForkCommand, getCommands.
What calls getCommands()?
getCommands() is called by 1 function(s): createCommandRunner.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free