Java Code Examples for org.springframework.boot.loader.archive.Archive#Entry

The following examples show how to use org.springframework.boot.loader.archive.Archive#Entry . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FormulaLauncher.java    From spring-cloud-formula with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isNestedArchive(Archive.Entry entry) {
    if (entry.isDirectory()) {
        return entry.getName().equals(BOOT_INF_CLASSES);
    }
    return entry.getName().startsWith(BOOT_INF_LIB);
}
 
Example 2
Source File: LancherTest.java    From tac with MIT License 5 votes vote down vote up
protected boolean isNestedArchive(Archive.Entry entry) {
    System.out.println(entry.getName());
    if (entry.isDirectory()) {
        return entry.getName().equals(BOOT_INF_CLASSES);
    }
    return entry.getName().startsWith(BOOT_INF_LIB);
}
 
Example 3
Source File: BootClassLoaderFactory.java    From spring-cloud-dashboard with Apache License 2.0 5 votes vote down vote up
public URLClassLoader createClassLoader() {
	boolean useBoot14Layout = false;
	for (Archive.Entry entry : archive) {
		if (entry.getName().startsWith(BOOT_14_LIBS_LOCATION)) {
			useBoot14Layout = true;
			break;
		}
	}

	ClassLoaderExposingLauncher launcher = useBoot14Layout
			? new Boot14ClassLoaderExposingLauncher()
			: new Boot13ClassLoaderExposingLauncher();

	return launcher.createClassLoader();
}
 
Example 4
Source File: BootClassLoaderFactory.java    From spring-cloud-dataflow with Apache License 2.0 5 votes vote down vote up
public URLClassLoader createClassLoader() {
	boolean useBoot14Layout = false;
	for (Archive.Entry entry : archive) {
		if (entry.getName().startsWith(BOOT_14_LIBS_LOCATION)) {
			useBoot14Layout = true;
			break;
		}
	}

	ClassLoaderExposingLauncher launcher = useBoot14Layout ? new Boot14ClassLoaderExposingLauncher()
			: new Boot13ClassLoaderExposingLauncher();

	return launcher.createClassLoader();
}
 
Example 5
Source File: WebApplication.java    From TrackRay with GNU General Public License v3.0 4 votes vote down vote up
protected static boolean isNestedArchive(Archive.Entry entry) {
	return entry.isDirectory() ? entry.getName().equals("BOOT-INF/classes/") : entry.getName().startsWith("BOOT-INF/lib/");
}
 
Example 6
Source File: BootClassLoaderFactory.java    From spring-cloud-dashboard with Apache License 2.0 4 votes vote down vote up
@Override
protected boolean isNestedArchive(Archive.Entry entry) {
	return !entry.isDirectory() && entry.getName().startsWith(BOOT_13_LIBS_LOCATION);
}
 
Example 7
Source File: BootClassLoaderFactory.java    From spring-cloud-dashboard with Apache License 2.0 4 votes vote down vote up
@Override
protected boolean isNestedArchive(Archive.Entry entry) {
	return (!entry.isDirectory() && entry.getName().startsWith(BOOT_14_LIBS_LOCATION))
			|| (entry.isDirectory() && entry.getName().equals(BOOT_14_CLASSESS_LOCATION));
}
 
Example 8
Source File: BootClassLoaderFactory.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
@Override
protected boolean isNestedArchive(Archive.Entry entry) {
	return !entry.isDirectory() && entry.getName().startsWith(BOOT_13_LIBS_LOCATION);
}
 
Example 9
Source File: BootClassLoaderFactory.java    From spring-cloud-dataflow with Apache License 2.0 4 votes vote down vote up
@Override
protected boolean isNestedArchive(Archive.Entry entry) {
	return (!entry.isDirectory() && entry.getName().startsWith(BOOT_14_LIBS_LOCATION))
			|| (entry.isDirectory() && entry.getName().equals(BOOT_14_CLASSESS_LOCATION));
}