本文整理了Java中org.reflections.vfs.Vfs.getDefaultUrlTypes()
方法的一些代码示例,展示了Vfs.getDefaultUrlTypes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vfs.getDefaultUrlTypes()
方法的具体详情如下:
包路径:org.reflections.vfs.Vfs
类名称: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());
内容来源于网络,如有侵权,请联系作者删除!