Java 类org.springframework.boot.cli.command.CommandFactory 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:SpringCli.java   
private static void addServiceLoaderCommands(CommandRunner runner) {
    ServiceLoader<CommandFactory> factories = ServiceLoader.load(CommandFactory.class,
            runner.getClass().getClassLoader());
    for (CommandFactory factory : factories) {
        runner.addCommands(factory.getCommands());
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:Shell.java   
private Iterable<Command> getCommands() {
    List<Command> commands = new ArrayList<Command>();
    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;
}
项目:spring-boot-concourse    文件:SpringCli.java   
private static void addServiceLoaderCommands(CommandRunner runner) {
    ServiceLoader<CommandFactory> factories = ServiceLoader.load(CommandFactory.class,
            runner.getClass().getClassLoader());
    for (CommandFactory factory : factories) {
        runner.addCommands(factory.getCommands());
    }
}
项目:spring-boot-concourse    文件:Shell.java   
private Iterable<Command> getCommands() {
    List<Command> commands = new ArrayList<Command>();
    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;
}
项目:contestparser    文件:SpringCli.java   
private static void addServiceLoaderCommands(CommandRunner runner) {
    ServiceLoader<CommandFactory> factories = ServiceLoader.load(CommandFactory.class,
            runner.getClass().getClassLoader());
    for (CommandFactory factory : factories) {
        runner.addCommands(factory.getCommands());
    }
}
项目:contestparser    文件:Shell.java   
private Iterable<Command> getCommands() {
    List<Command> commands = new ArrayList<Command>();
    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;
}