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


Java CollectionUtils.any方法代码示例

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


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

示例1: maybeGetPCHArgs

import org.gradle.util.CollectionUtils; //导入方法依赖的package包/类
protected List<String> maybeGetPCHArgs(final T spec, File sourceFile) {
    if (spec.getPreCompiledHeader() == null) {
        return Lists.newArrayList();
    }

    final IncludeDirectives includes = spec.getSourceFileIncludeDirectives().get(sourceFile);
    final String header = spec.getPreCompiledHeader();

    List<Include> headers = includes.getIncludesAndImports();
    boolean usePCH = !headers.isEmpty() && header.equals(headers.get(0).getValue());

    if (usePCH) {
        return getPCHArgs(spec);
    } else {
        boolean containsHeader = CollectionUtils.any(headers, new Spec<Include>() {
            @Override
            public boolean isSatisfiedBy(Include include) {
                return include.getValue().equals(header);
            }
        });
        if (containsHeader) {
            logger.log(LogLevel.WARN, getCantUsePCHMessage(spec.getPreCompiledHeader(), sourceFile));
        }
        return Lists.newArrayList();
    }
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:27,代码来源:NativeCompiler.java

示例2: sourceFilesUseMacroIncludes

import org.gradle.util.CollectionUtils; //导入方法依赖的package包/类
private boolean sourceFilesUseMacroIncludes(Collection<File> files, final CompilationState compilationState) {
    // If we couldn't determine all dependencies of some files due to macros, we have to scan all include directories.
    return CollectionUtils.any(files, new Spec<File>() {
        @Override
        public boolean isSatisfiedBy(File file) {
            // If a macro was used for any #includes
            return CollectionUtils.any(compilationState.getState(file).getResolvedIncludes(), new Spec<ResolvedInclude>() {
                @Override
                public boolean isSatisfiedBy(ResolvedInclude element) {
                    // Using macro
                    return element.isMaybeMacro();
                }
            });
        }
    });
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:17,代码来源:IncrementalNativeCompiler.java

示例3: isPreemptiveEnabled

import org.gradle.util.CollectionUtils; //导入方法依赖的package包/类
private boolean isPreemptiveEnabled(Collection<Authentication> authentications) {
    return CollectionUtils.any(authentications, new Spec<Authentication>() {
        @Override
        public boolean isSatisfiedBy(Authentication element) {
            return element instanceof BasicAuthentication;
        }
    });
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:HttpClientConfigurer.java

示例4: hasTwirlSourceSetsWithJavaImports

import org.gradle.util.CollectionUtils; //导入方法依赖的package包/类
private static boolean hasTwirlSourceSetsWithJavaImports(PlayApplicationSpec playApplicationSpec) {
    return CollectionUtils.any(playApplicationSpec.getSources().withType(TwirlSourceSet.class).values(), new Spec<TwirlSourceSet>() {
        @Override
        public boolean isSatisfiedBy(TwirlSourceSet twirlSourceSet) {
            return twirlSourceSet.getDefaultImports() == TwirlImports.JAVA;
        }
    });
}
 
开发者ID:lxxlxx888,项目名称:Reer,代码行数:9,代码来源:PlayTwirlPlugin.java


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