当前位置: 首页>>代码示例>>Java>>正文


Java EntryFilter类代码示例

本文整理汇总了Java中org.springframework.boot.loader.archive.Archive.EntryFilter的典型用法代码示例。如果您正苦于以下问题:Java EntryFilter类的具体用法?Java EntryFilter怎么用?Java EntryFilter使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


EntryFilter类属于org.springframework.boot.loader.archive.Archive包,在下文中一共展示了EntryFilter类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addNestedEntries

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
private void addNestedEntries(List<Archive> lib) {
	// The parent archive might have "BOOT-INF/lib/" and "BOOT-INF/classes/"
	// directories, meaning we are running from an executable JAR. We add nested
	// entries from there with low priority (i.e. at end).
	try {
		lib.addAll(this.parent.getNestedArchives(new EntryFilter() {

			@Override
			public boolean matches(Entry entry) {
				if (entry.isDirectory()) {
					return entry.getName().startsWith(JarLauncher.BOOT_INF_CLASSES);
				}
				return entry.getName().startsWith(JarLauncher.BOOT_INF_LIB);
			}

		}));
	}
	catch (IOException ex) {
		// Ignore
	}
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:22,代码来源:PropertiesLauncher.java

示例2: getNestedArchive

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
private Archive getNestedArchive(String root) throws Exception {
	if (root.startsWith("/")
			|| this.parent.getUrl().equals(this.home.toURI().toURL())) {
		// If home dir is same as parent archive, no need to add it twice.
		return null;
	}
	EntryFilter filter = new PrefixMatchingArchiveFilter(root);
	if (this.parent.getNestedArchives(filter).isEmpty()) {
		return null;
	}
	// If there are more archives nested in this subdirectory (root) then create a new
	// virtual archive for them, and have it added to the classpath
	return new FilteredArchive(this.parent, filter);
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:15,代码来源:PropertiesLauncher.java

示例3: getNestedArchives

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
@Override
public List<Archive> getNestedArchives(final EntryFilter filter)
		throws IOException {
	return this.parent.getNestedArchives(new EntryFilter() {
		@Override
		public boolean matches(Entry entry) {
			return FilteredArchive.this.filter.matches(entry)
					&& filter.matches(entry);
		}
	});
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:12,代码来源:PropertiesLauncher.java

示例4: getClassPathArchives

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
@Override
protected List<Archive> getClassPathArchives() throws Exception {
	List<Archive> archives = new ArrayList<Archive>(
			this.archive.getNestedArchives(new EntryFilter() {

				@Override
				public boolean matches(Entry entry) {
					return isNestedArchive(entry);
				}

			}));
	postProcessClassPathArchives(archives);
	return archives;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:15,代码来源:ExecutableArchiveLauncher.java

示例5: getNestedArchive

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
private Archive getNestedArchive(final String root) throws Exception {
	if (root.startsWith("/")
			|| this.parent.getUrl().equals(this.home.toURI().toURL())) {
		// If home dir is same as parent archive, no need to add it twice.
		return null;
	}
	EntryFilter filter = new PrefixMatchingArchiveFilter(root);
	if (this.parent.getNestedArchives(filter).isEmpty()) {
		return null;
	}
	// If there are more archives nested in this subdirectory (root) then create a new
	// virtual archive for them, and have it added to the classpath
	return new FilteredArchive(this.parent, filter);
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:15,代码来源:PropertiesLauncher.java

示例6: getClassPathArchives

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
@Override
protected List<Archive> getClassPathArchives() throws Exception {
	List<Archive> archives = new ArrayList<Archive>(
			this.archive.getNestedArchives(new EntryFilter() {
				@Override
				public boolean matches(Entry entry) {
					return isNestedArchive(entry);
				}
			}));
	postProcessClassPathArchives(archives);
	return archives;
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:13,代码来源:ExecutableArchiveLauncher.java

示例7: FilteredArchive

import org.springframework.boot.loader.archive.Archive.EntryFilter; //导入依赖的package包/类
FilteredArchive(Archive parent, EntryFilter filter) {
	this.parent = parent;
	this.filter = filter;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:PropertiesLauncher.java


注:本文中的org.springframework.boot.loader.archive.Archive.EntryFilter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。