private List getNestedArchives()

in spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/PropertiesLauncher.java [600:640]


		private List<Archive> getNestedArchives(String path) throws Exception {
			Archive parent = PropertiesLauncher.this.parent;
			String root = path;
			if (!root.equals("/") && root.startsWith("/")
					|| parent.getUrl().toURI().equals(PropertiesLauncher.this.home.toURI())) {
				// If home dir is same as parent archive, no need to add it twice.
				return null;
			}
			int index = root.indexOf('!');
			if (index != -1) {
				File file = new File(PropertiesLauncher.this.home, root.substring(0, index));
				if (root.startsWith("jar:file:")) {
					file = new File(root.substring("jar:file:".length(), index));
				}
				parent = getJarFileArchive(file);
				root = root.substring(index + 1);
				while (root.startsWith("/")) {
					root = root.substring(1);
				}
			}
			if (root.endsWith(".jar")) {
				File file = new File(PropertiesLauncher.this.home, root);
				if (file.exists()) {
					parent = getJarFileArchive(file);
					root = "";
				}
			}
			if (root.equals("/") || root.equals("./") || root.equals(".")) {
				// The prefix for nested jars is actually empty if it's at the root
				root = "";
			}
			EntryFilter filter = new PrefixMatchingArchiveFilter(root);
			List<Archive> archives = asList(parent.getNestedArchives(null, filter));
			if (("".equals(root) || ".".equals(root)) && !path.endsWith(".jar")
					&& parent != PropertiesLauncher.this.parent) {
				// You can't find the root with an entry filter so it has to be added
				// explicitly. But don't add the root of the parent archive.
				archives.add(parent);
			}
			return archives;
		}