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

showUsage() — spring-boot Function Reference

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

Function java GradlePlugin AotProcessing calls 5 called by 2

Entity Profile

Dependency Diagram

graph TD
  498377fc_fdeb_8d62_f0a1_f867ac7a7540["showUsage()"]
  146781aa_36d9_10e6_eb21_8c24c5539805["runAndHandleErrors()"]
  146781aa_36d9_10e6_eb21_8c24c5539805 -->|calls| 498377fc_fdeb_8d62_f0a1_f867ac7a7540
  5be2ce5f_cd3e_d3cc_bcc3_09f53ee247d5["handleError()"]
  5be2ce5f_cd3e_d3cc_bcc3_09f53ee247d5 -->|calls| 498377fc_fdeb_8d62_f0a1_f867ac7a7540
  37a94ba6_a69a_07ea_abf5_edb5bdebc038["infoPrint()"]
  498377fc_fdeb_8d62_f0a1_f867ac7a7540 -->|calls| 37a94ba6_a69a_07ea_abf5_edb5bdebc038
  41e94940_1938_2d2c_de13_1a3a9788c802["isOptionCommand()"]
  498377fc_fdeb_8d62_f0a1_f867ac7a7540 -->|calls| 41e94940_1938_2d2c_de13_1a3a9788c802
  aeeca5ce_db3b_1fe2_4395_d7e730c8ee92["getName()"]
  498377fc_fdeb_8d62_f0a1_f867ac7a7540 -->|calls| aeeca5ce_db3b_1fe2_4395_d7e730c8ee92
  fc88690e_99c9_f856_76c6_c71d50291cb8["info()"]
  498377fc_fdeb_8d62_f0a1_f867ac7a7540 -->|calls| fc88690e_99c9_f856_76c6_c71d50291cb8
  94ebd14d_39b6_0a27_9a4e_ed1c5d415c71["isHiddenCommand()"]
  498377fc_fdeb_8d62_f0a1_f867ac7a7540 -->|calls| 94ebd14d_39b6_0a27_9a4e_ed1c5d415c71
  style 498377fc_fdeb_8d62_f0a1_f867ac7a7540 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 268–294

	protected void showUsage() {
		Log.infoPrint("usage: " + this.name);
		for (Command command : this.commands) {
			if (isOptionCommand(command)) {
				Log.infoPrint("[--" + command.getName() + "] ");
			}
		}
		Log.info("");
		Log.info("       <command> [<args>]");
		Log.info("");
		Log.info("Available commands are:");
		for (Command command : this.commands) {
			if (!isOptionCommand(command) && !isHiddenCommand(command)) {
				String usageHelp = command.getUsageHelp();
				String description = command.getDescription();
				Log.info(String.format("%n  %1$s %2$-15s%n    %3$s", command.getName(),
						(usageHelp != null) ? usageHelp : "", (description != null) ? description : ""));
			}
		}
		Log.info("");
		Log.info("Common options:");
		Log.info(String.format("%n  %1$s %2$-15s%n    %3$s", "--debug", "Verbose mode",
				"Print additional status information for the command you are running"));
		Log.info("");
		Log.info("");
		Log.info("See '" + this.name + "help <command>' for more information on a specific command.");
	}

Domain

Subdomains

Frequently Asked Questions

What does showUsage() do?
showUsage() is a function in the spring-boot codebase.
What does showUsage() call?
showUsage() calls 5 function(s): getName, info, infoPrint, isHiddenCommand, isOptionCommand.
What calls showUsage()?
showUsage() is called by 2 function(s): handleError, runAndHandleErrors.

Analyze Your Own Codebase

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

Try Supermodel Free