当前位置: 首页>>代码示例>>Java>>正文


Java Actions.toAction方法代码示例

本文整理汇总了Java中org.gradle.internal.Actions.toAction方法的典型用法代码示例。如果您正苦于以下问题:Java Actions.toAction方法的具体用法?Java Actions.toAction怎么用?Java Actions.toAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.gradle.internal.Actions的用法示例。


在下文中一共展示了Actions.toAction方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createAction

import org.gradle.internal.Actions; //导入方法依赖的package包/类
private Action<? super ExecutionListener> createAction(Iterable<CommandLineAction> factories, CommandLineParser parser, ParsedCommandLine commandLine) {
    for (CommandLineAction factory : factories) {
        Runnable action = factory.createAction(parser, commandLine);
        if (action != null) {
            return Actions.toAction(action);
        }
    }
    throw new UnsupportedOperationException("No action factory for specified command-line arguments.");
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:10,代码来源:CommandLineActionFactory.java

示例2: createAction

import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<? super ExecutionListener> createAction(CommandLineParser parser, ParsedCommandLine commandLine) {
    if (commandLine.hasOption(HELP)) {
        return Actions.toAction(new ShowUsageAction(parser));
    }
    if (commandLine.hasOption(VERSION)) {
        return Actions.toAction(new ShowVersionAction());
    }
    return null;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:10,代码来源:CommandLineActionFactory.java

示例3: createAction

import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<? super ExecutionListener> createAction(CommandLineParser parser, ParsedCommandLine commandLine) {
    BuildLayoutParameters layout = new BuildLayoutParameters();
    layoutConverter.convert(commandLine, layout);

    Map<String, String> properties = new HashMap<String, String>();
    layoutToPropertiesConverter.convert(layout, properties);
    propertiesConverter.convert(commandLine, properties);

    StartParameter startParameter = new StartParameter();
    propertiesToStartParameterConverter.convert(properties, startParameter);
    commandLineConverter.convert(commandLine, startParameter);

    DaemonParameters daemonParameters = new DaemonParameters(layout);
    propertiesToDaemonParametersConverter.convert(properties, daemonParameters);
    daemonConverter.convert(commandLine, daemonParameters);

    if (commandLine.hasOption(STOP)) {
        return stopAllDaemons(daemonParameters, loggingServices);
    }
    if (commandLine.hasOption(FOREGROUND)) {
        ForegroundDaemonConfiguration conf = new ForegroundDaemonConfiguration(
                daemonParameters.getUid(), daemonParameters.getBaseDir(), daemonParameters.getIdleTimeout());
        return Actions.toAction(new ForegroundDaemonMain(conf));
    }
    if (daemonParameters.isEnabled()) {
        return runBuildWithDaemon(startParameter, daemonParameters, loggingServices);
    }
    if (canUseCurrentProcess(daemonParameters)) {
        return runBuildInProcess(startParameter, daemonParameters, loggingServices);
    }
    return runBuildInSingleUseDaemon(startParameter, daemonParameters, loggingServices);
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:33,代码来源:BuildActionsFactory.java

示例4: createAction

import org.gradle.internal.Actions; //导入方法依赖的package包/类
public Action<? super ExecutionListener> createAction(CommandLineParser parser, ParsedCommandLine commandLine) {
    if (commandLine.hasOption(GUI)) {
        return Actions.toAction(new ShowGuiAction());
    }
    return null;
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:7,代码来源:GuiActionsFactory.java

示例5: stopAllDaemons

import org.gradle.internal.Actions; //导入方法依赖的package包/类
private Action<? super ExecutionListener> stopAllDaemons(DaemonParameters daemonParameters, ServiceRegistry loggingServices) {
    DaemonClientServices clientServices = new StopDaemonClientServices(loggingServices, daemonParameters, System.in);
    DaemonClient stopClient = clientServices.get(DaemonClient.class);
    return Actions.toAction(new StopDaemonAction(stopClient));
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:6,代码来源:BuildActionsFactory.java

示例6: daemonBuildAction

import org.gradle.internal.Actions; //导入方法依赖的package包/类
private Action<? super ExecutionListener> daemonBuildAction(StartParameter startParameter, DaemonParameters daemonParameters, BuildActionExecuter<BuildActionParameters> executer) {
    return Actions.toAction(
            new RunBuildAction(executer, startParameter, SystemProperties.getCurrentDir(), clientMetaData(), getBuildStartTime(), daemonParameters.getEffectiveSystemProperties(), System.getenv()));
}
 
开发者ID:Pushjet,项目名称:Pushjet-Android,代码行数:5,代码来源:BuildActionsFactory.java


注:本文中的org.gradle.internal.Actions.toAction方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。