本文整理了Java中org.kie.workbench.common.services.shared.whitelist.WhiteList.contains()
方法的一些代码示例,展示了WhiteList.contains()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WhiteList.contains()
方法的具体详情如下:
包路径:org.kie.workbench.common.services.shared.whitelist.WhiteList
类名称:WhiteList
方法名:contains
暂无
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-api
public boolean containsAny( final Collection<String> packages ) {
for ( String aPackage : packages ) {
if ( contains( aPackage ) ) {
return true;
}
}
return false;
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
public List<BuildMessage> verify(WhiteList whiteList) {
for (final String packageName : kieModuleMetaData.getPackages()) {
if (whiteList.contains(packageName)) {
for (final String className : kieModuleMetaData.getClasses(packageName)) {
verifyClass(packageName,
className);
}
}
}
return buildMessages;
}
代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend
@Test
public void ifWhiteListIsEmptyWhiteListEverything() throws
Exception {
final PackageNameWhiteListService packageNameWhiteListService = makeService("");
WhiteList filterPackageNames = packageNameWhiteListService.filterPackageNames(mock(KieModule.class),
new ArrayList<String>
() {{
add("a");
add("b");
add("c");
}});
assertEquals(3,
filterPackageNames.size());
assertTrue(filterPackageNames.contains("a"));
assertTrue(filterPackageNames.contains("b"));
assertTrue(filterPackageNames.contains("c"));
}
内容来源于网络,如有侵权,请联系作者删除!