Java 类org.springframework.boot.loader.archive.Archive.EntryFilter 实例源码

项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PropertiesLauncher.java   
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
    }
}
项目:spring-boot-concourse    文件:PropertiesLauncher.java   
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
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PropertiesLauncher.java   
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);
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PropertiesLauncher.java   
@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);
        }
    });
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ExecutableArchiveLauncher.java   
@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;
}
项目:spring-boot-concourse    文件:PropertiesLauncher.java   
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);
}
项目:spring-boot-concourse    文件:PropertiesLauncher.java   
@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);
        }
    });
}
项目:spring-boot-concourse    文件:ExecutableArchiveLauncher.java   
@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;
}
项目:contestparser    文件:PropertiesLauncher.java   
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);
}
项目:contestparser    文件:ExecutableArchiveLauncher.java   
@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;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:PropertiesLauncher.java   
FilteredArchive(Archive parent, EntryFilter filter) {
    this.parent = parent;
    this.filter = filter;
}
项目:spring-boot-concourse    文件:PropertiesLauncher.java   
FilteredArchive(Archive parent, EntryFilter filter) {
    this.parent = parent;
    this.filter = filter;
}