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

findCommand() — spring-boot Function Reference

Architecture documentation for the findCommand() function in CommandRunner.java from the spring-boot codebase.

Function java GradlePlugin AotProcessing calls 2 called by 3

Entity Profile

Dependency Diagram

graph TD
  25efdbe0_704a_1f5d_2a3d_89793759e7ed["findCommand()"]
  9d0a96cd_7225_a1a4_7d58_1b34cca7b97f["run()"]
  9d0a96cd_7225_a1a4_7d58_1b34cca7b97f -->|calls| 25efdbe0_704a_1f5d_2a3d_89793759e7ed
  a7cc6a30_0aa7_e2ac_e4a0_ab96bb2280a3["showCommandOptionHints()"]
  a7cc6a30_0aa7_e2ac_e4a0_ab96bb2280a3 -->|calls| 25efdbe0_704a_1f5d_2a3d_89793759e7ed
  c8588309_5388_2800_4dbb_7e9c5cec6160["findCommand()"]
  c8588309_5388_2800_4dbb_7e9c5cec6160 -->|calls| 25efdbe0_704a_1f5d_2a3d_89793759e7ed
  aeeca5ce_db3b_1fe2_4395_d7e730c8ee92["getName()"]
  25efdbe0_704a_1f5d_2a3d_89793759e7ed -->|calls| aeeca5ce_db3b_1fe2_4395_d7e730c8ee92
  41e94940_1938_2d2c_de13_1a3a9788c802["isOptionCommand()"]
  25efdbe0_704a_1f5d_2a3d_89793759e7ed -->|calls| 41e94940_1938_2d2c_de13_1a3a9788c802
  style 25efdbe0_704a_1f5d_2a3d_89793759e7ed fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/CommandRunner.java lines 151–159

	public @Nullable Command findCommand(String name) {
		for (Command candidate : this.commands) {
			String candidateName = candidate.getName();
			if (candidateName.equals(name) || (isOptionCommand(candidate) && ("--" + candidateName).equals(name))) {
				return candidate;
			}
		}
		return null;
	}

Domain

Subdomains

Called By

Frequently Asked Questions

What does findCommand() do?
findCommand() is a function in the spring-boot codebase.
What does findCommand() call?
findCommand() calls 2 function(s): getName, isOptionCommand.
What calls findCommand()?
findCommand() is called by 3 function(s): findCommand, run, showCommandOptionHints.

Analyze Your Own Codebase

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

Try Supermodel Free