org.reflections.vfs.Vfs.getDefaultUrlTypes()方法的使用及代码示例

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

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

Vfs.getDefaultUrlTypes介绍

[英]the default url types that will be used when issuing org.reflections.vfs.Vfs#fromURL(java.net.URL)
[中]发布组织时将使用的默认url类型。反思。vfs。Vfs#fromURL(java.net.URL)

代码示例

代码示例来源:origin: org.seedstack.seed/seed-core

private KernelManager() {
  // Load Nuun and Reflections classes to force initialization of Vfs url types
  try {
    Class.forName(Vfs.class.getCanonicalName());
    Class.forName(AbstractClasspathScanner.class.getCanonicalName());
  } catch (ClassNotFoundException e) {
    throw new RuntimeException("Cannot initialize the classpath scanning infrastructure", e);
  }
  // Save existing url types
  savedUrlTypes = Vfs.getDefaultUrlTypes();
  // Find all classpath scan handlers and add their Vfs url types
  List<Vfs.UrlType> urlTypes = new ArrayList<>();
  for (ClasspathScanHandler classpathScanHandler : ServiceLoader.load(ClasspathScanHandler.class)) {
    LOGGER.trace("Detected classpath handler {}", classpathScanHandler.getClass().getCanonicalName());
    urlTypes.addAll(classpathScanHandler.urlTypes());
  }
  LOGGER.debug("URL types for scanning: {}", urlTypes);
  detectedUrlTypes = urlTypes;
}

代码示例来源:origin: eu.limetri.ygg/jboss-support

if (!Vfs.getDefaultUrlTypes().contains(getInstance())) {
  Vfs.addDefaultURLTypes(getInstance());

相关文章