Home / Class/ ForkProcessCommand Class — spring-boot Architecture

ForkProcessCommand Class — spring-boot Architecture

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

Entity Profile

Relationship Graph

Source Code

cli/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/shell/ForkProcessCommand.java lines 36–84

class ForkProcessCommand extends RunProcessCommand {

	private static final String MAIN_CLASS = "org.springframework.boot.loader.launch.JarLauncher";

	private final Command command;

	ForkProcessCommand(Command command) {
		super(new JavaExecutable().toString());
		this.command = command;
	}

	@Override
	public String getName() {
		return this.command.getName();
	}

	@Override
	public String getDescription() {
		return this.command.getDescription();
	}

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

	@Override
	public @Nullable String getHelp() {
		return this.command.getHelp();
	}

	@Override
	public Collection<OptionHelp> getOptionsHelp() {
		return this.command.getOptionsHelp();
	}

	@Override
	public ExitStatus run(String... args) throws Exception {
		List<String> fullArgs = new ArrayList<>();
		fullArgs.add("-cp");
		fullArgs.add(System.getProperty("java.class.path"));
		fullArgs.add(MAIN_CLASS);
		fullArgs.add(this.command.getName());
		fullArgs.addAll(Arrays.asList(args));
		run(fullArgs);
		return ExitStatus.OK;
	}

}

Domain

Analyze Your Own Codebase

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

Try Supermodel Free