本文整理了Java中org.reflections.vfs.Vfs.findFiles()
方法的一些代码示例,展示了Vfs.findFiles()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Vfs.findFiles()
方法的具体详情如下:
包路径:org.reflections.vfs.Vfs
类名称:Vfs
方法名:findFiles
[英]return an iterable of all org.reflections.vfs.Vfs.File in given urls, matching filePredicate
[中]返回所有组织的iterable。反思。vfs。Vfs。指定URL中的文件,匹配filePredicate
代码示例来源:origin: ronmamo/reflections
/** return an iterable of all {@link org.reflections.vfs.Vfs.File} in given urls, starting with given packagePrefix and matching nameFilter */
public static Iterable<File> findFiles(final Collection<URL> inUrls, final String packagePrefix, final Predicate<String> nameFilter) {
Predicate<File> fileNamePredicate = new Predicate<File>() {
public boolean apply(File file) {
String path = file.getRelativePath();
if (path.startsWith(packagePrefix)) {
String filename = path.substring(path.indexOf(packagePrefix) + packagePrefix.length());
return !Utils.isEmpty(filename) && nameFilter.apply(filename.substring(1));
} else {
return false;
}
}
};
return findFiles(inUrls, fileNamePredicate);
}
代码示例来源:origin: org.reflections/reflections
/** return an iterable of all {@link org.reflections.vfs.Vfs.File} in given urls, starting with given packagePrefix and matching nameFilter */
public static Iterable<File> findFiles(final Collection<URL> inUrls, final String packagePrefix, final Predicate<String> nameFilter) {
Predicate<File> fileNamePredicate = new Predicate<File>() {
public boolean apply(File file) {
String path = file.getRelativePath();
if (path.startsWith(packagePrefix)) {
String filename = path.substring(path.indexOf(packagePrefix) + packagePrefix.length());
return !Utils.isEmpty(filename) && nameFilter.apply(filename.substring(1));
} else {
return false;
}
}
};
return findFiles(inUrls, fileNamePredicate);
}
代码示例来源:origin: ronmamo/reflections
long start = System.currentTimeMillis();
final Reflections reflections = new Reflections();
Iterable<Vfs.File> files = Vfs.findFiles(urls, packagePrefix, resourceNameFilter);
for (final Vfs.File file : files) {
InputStream inputStream = null;
代码示例来源:origin: org.reflections/reflections
long start = System.currentTimeMillis();
final Reflections reflections = new Reflections();
Iterable<Vfs.File> files = Vfs.findFiles(urls, packagePrefix, resourceNameFilter);
for (final Vfs.File file : files) {
InputStream inputStream = null;
代码示例来源:origin: ai.h2o/reflections
/** return an iterable of all {@link org.reflections.vfs.Vfs.File} in given urls, starting with given packagePrefix and matching nameFilter */
public static Iterable<File> findFiles(final Collection<URL> inUrls, final String packagePrefix, final Predicate<String> nameFilter) {
Predicate<File> fileNamePredicate = new Predicate<File>() {
public boolean apply(File file) {
String path = file.getRelativePath();
if (path.startsWith(packagePrefix)) {
String filename = path.substring(path.indexOf(packagePrefix) + packagePrefix.length());
return !Utils.isEmpty(filename) && nameFilter.apply(filename.substring(1));
} else {
return false;
}
}
};
return findFiles(inUrls, fileNamePredicate);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections
/** a matcher and factory for a url */
public interface UrlType {
boolean matches(URL url) throws Exception;
Dir createDir(URL url) throws Exception;
}
代码示例来源:origin: org.rapidpm/rapidpm-dependencies-core-reflections
public static Iterable<File> findFiles(final Collection<URL> inUrls , final String packagePrefix , final Predicate<String> nameFilter) {
Predicate<File> fileNamePredicate = file -> {
String path = file.getRelativePath();
if (path.startsWith(packagePrefix)) {
String filename = path.substring(path.indexOf(packagePrefix) + packagePrefix.length());
return ! Utils.isEmpty(filename) && nameFilter.apply(filename.substring(1));
} else {
return false;
}
};
return findFiles(inUrls , fileNamePredicate);
}
代码示例来源:origin: ai.h2o/reflections
long start = System.currentTimeMillis();
final Reflections reflections = new Reflections();
Iterable<Vfs.File> files = Vfs.findFiles(urls, packagePrefix, resourceNameFilter);
for (final Vfs.File file : files) {
InputStream inputStream = null;
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.reflections
long start = System.currentTimeMillis();
final Reflections reflections = new Reflections();
Iterable<Vfs.File> files = Vfs.findFiles(urls, packagePrefix, resourceNameFilter);
for (final Vfs.File file : files) {
InputStream inputStream = null;
代码示例来源:origin: org.rapidpm/rapidpm-dependencies-core-reflections
long start = System.currentTimeMillis();
final Reflections reflections = new Reflections();
Iterable<Vfs.File> files = Vfs.findFiles(urls , packagePrefix , resourceNameFilter);
for (final Vfs.File file : files) {
LOGGER.info("scanning VFS file : " + file.getRelativePath() + "/" + file.getName());
内容来源于网络,如有侵权,请联系作者删除!