org.jboss.weld.environment.se.Weld.handleJar()方法的使用及代码示例

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

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

Weld.handleJar介绍

暂无

代码示例

代码示例来源:origin: weld/core

protected Set<String> scanPackages() {
  if (packages.isEmpty()) {
    return Collections.emptySet();
  }
  Set<String> foundClasses = new HashSet<String>();
  for (PackInfo packInfo : packages) {
    String packName = packInfo.getPackName();
    URL resourceUrl = packInfo.getResourceUrl(resourceLoader);
    if (resourceUrl != null) {
      WeldSELogger.LOG.scanningPackage(packName, resourceUrl);
      try {
        URI resourceUri = resourceUrl.toURI();
        if (PROCOTOL_FILE.equals(resourceUrl.getProtocol())) {
          File file = new File(resourceUri);
          handleDir(file.isDirectory() ? file : file.getParentFile(), packInfo.isScanRecursively(), packName, foundClasses);
        } else if (PROCOTOL_JAR.equals(resourceUrl.getProtocol())) {
          handleJar(resourceUri, packInfo.isScanRecursively(), packName, foundClasses);
        } else {
          WeldSELogger.LOG.resourceUrlProtocolNotSupported(resourceUrl);
        }
      } catch (URISyntaxException e) {
        CommonLogger.LOG.couldNotReadResource(resourceUrl, e);
      }
    } else {
      WeldSELogger.LOG.packageNotFound(packName);
    }
  }
  return foundClasses;
}

代码示例来源:origin: org.jboss.weld.se/weld-se-shaded

protected Set<String> scanPackages() {
  if (packages.isEmpty()) {
    return Collections.emptySet();
  }
  Set<String> foundClasses = new HashSet<String>();
  for (PackInfo packInfo : packages) {
    String packName = packInfo.getPackName();
    URL resourceUrl = packInfo.getResourceUrl(resourceLoader);
    if (resourceUrl != null) {
      WeldSELogger.LOG.scanningPackage(packName, resourceUrl);
      try {
        URI resourceUri = resourceUrl.toURI();
        if (PROCOTOL_FILE.equals(resourceUrl.getProtocol())) {
          File file = new File(resourceUri);
          handleDir(file.isDirectory() ? file : file.getParentFile(), packInfo.isScanRecursively(), packName, foundClasses);
        } else if (PROCOTOL_JAR.equals(resourceUrl.getProtocol())) {
          handleJar(resourceUri, packInfo.isScanRecursively(), packName, foundClasses);
        } else {
          WeldSELogger.LOG.resourceUrlProtocolNotSupported(resourceUrl);
        }
      } catch (URISyntaxException e) {
        CommonLogger.LOG.couldNotReadResource(resourceUrl, e);
      }
    } else {
      WeldSELogger.LOG.packageNotFound(packName);
    }
  }
  return foundClasses;
}

代码示例来源:origin: weld/core

protected Set<String> scanPackages() {
  if (packages.isEmpty()) {
    return Collections.emptySet();
  }
  Set<String> foundClasses = new HashSet<String>();
  for (PackInfo packInfo : packages) {
    String packName = packInfo.getPackName();
    URL resourceUrl = packInfo.getResourceUrl(resourceLoader);
    if (resourceUrl != null) {
      WeldSELogger.LOG.scanningPackage(packName, resourceUrl);
      try {
        URI resourceUri = resourceUrl.toURI();
        if (PROCOTOL_FILE.equals(resourceUrl.getProtocol())) {
          File file = new File(resourceUri);
          handleDir(file.isDirectory() ? file : file.getParentFile(), packInfo.isScanRecursively(), packName, foundClasses);
        } else if (PROCOTOL_JAR.equals(resourceUrl.getProtocol())) {
          handleJar(resourceUri, packInfo.isScanRecursively(), packName, foundClasses);
        } else {
          WeldSELogger.LOG.resourceUrlProtocolNotSupported(resourceUrl);
        }
      } catch (URISyntaxException e) {
        CommonLogger.LOG.couldNotReadResource(resourceUrl, e);
      }
    } else {
      WeldSELogger.LOG.packageNotFound(packName);
    }
  }
  return foundClasses;
}

代码示例来源:origin: org.jboss.weld.se/weld-se

handleJar(resourceUri, packInfo.isScanRecursively(), packName, foundClasses);
} else {
  WeldSELogger.LOG.resourceUrlProtocolNotSupported(resourceUrl);

相关文章