org.kie.workbench.common.services.shared.whitelist.WhiteList.isEmpty()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(105)

本文整理了Java中org.kie.workbench.common.services.shared.whitelist.WhiteList.isEmpty()方法的一些代码示例,展示了WhiteList.isEmpty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WhiteList.isEmpty()方法的具体详情如下:
包路径:org.kie.workbench.common.services.shared.whitelist.WhiteList
类名称:WhiteList
方法名:isEmpty

WhiteList.isEmpty介绍

暂无

代码示例

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend

@Test
  public void testNoFile() throws Exception {
    tempFiles.deleteFiles();
    assertTrue( loader.load( pathToWhiteList ).isEmpty() );
  }
}

代码示例来源:origin: org.kie.workbench.services/kie-wb-common-services-backend

/**
 * Filter the provided Package names by the Module's white list
 * @param module Module for which to filter Package names
 * @param packageNames All Package names in the Module
 * @return A filtered collection of Package names
 */
@Override
public WhiteList filterPackageNames(final Module module,
                  final Collection<String> packageNames) {
  if (packageNames == null) {
    return new WhiteList();
  } else if (module instanceof KieModule) {
    final WhiteList whiteList = load(((KieModule) module).getPackageNamesWhiteListPath());
    if (whiteList.isEmpty()) {
      return new WhiteList(packageNames);
    } else {
      for (Package aPackage : moduleService.resolvePackages(module)) {
        whiteList.add(aPackage.getPackageName());
      }
      return new PackageNameWhiteListFilter(packageNames,
                         whiteList).getFilteredPackageNames();
    }
  } else {
    return new WhiteList(packageNames);
  }
}

相关文章