Home / Class/ OptionHelpAdapter Class — spring-boot Architecture

OptionHelpAdapter Class — spring-boot Architecture

Architecture documentation for the OptionHelpAdapter class in OptionHandler.java from the spring-boot codebase.

Entity Profile

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/options/OptionHandler.java lines 173–202

	private static class OptionHelpAdapter implements OptionHelp {

		private final Set<String> options;

		private final String description;

		OptionHelpAdapter(OptionDescriptor descriptor) {
			this.options = new LinkedHashSet<>();
			for (String option : descriptor.options()) {
				String prefix = (option.length() != 1) ? "--" : "-";
				this.options.add(prefix + option);
			}
			if (this.options.contains("--cp")) {
				this.options.remove("--cp");
				this.options.add("-cp");
			}
			this.description = descriptor.description();
		}

		@Override
		public Set<String> getOptions() {
			return this.options;
		}

		@Override
		public String getUsageHelp() {
			return this.description;
		}

	}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free