Package org.apache.xbean.finder.archive

Examples of org.apache.xbean.finder.archive.FilteredArchive


    public static UrlSet filterArchives(final Filter filter, final ClassLoader classLoader, UrlSet urlSet) {

        for (final URL url : urlSet.getUrls()) {
            for (final Archive archive : ClasspathArchive.archives(classLoader, url)) {

                final FilteredArchive filtered = new FilteredArchive(archive, filter);

                if (!filtered.iterator().hasNext()) {
                    urlSet = urlSet.exclude(url);
                }

            }
        }
View Full Code Here


    public static UrlSet filterArchives(Filter filter, ClassLoader classLoader, UrlSet urlSet) {

        for (URL url : urlSet.getUrls()) {
            for (Archive archive : ClasspathArchive.archives(classLoader, url)) {

                FilteredArchive filtered = new FilteredArchive(archive, filter);

                if (!filtered.iterator().hasNext()) {
                    urlSet = urlSet.exclude(url);
                }

            }
        }
View Full Code Here

        for (URL url : urls) {

            final List<String> classes = new ArrayList<String>();

            final Archive archive = new FilteredArchive(ClasspathArchive.archive(loader, url), new Filter(){
                @Override
                public boolean accept(String name) {
                    classes.add(name);
                    return true;
                }
View Full Code Here

    public static UrlSet filterArchives(Filter filter, ClassLoader classLoader, UrlSet urlSet) {

        for (URL url : urlSet.getUrls()) {
            for (Archive archive : ClasspathArchive.archives(classLoader, url)) {

                FilteredArchive filtered = new FilteredArchive(archive, filter);

                if (!filtered.iterator().hasNext()) {
                    urlSet = urlSet.exclude(url);
                }

            }
        }
View Full Code Here

        return SystemInstance.get().getProperty(SCAN_XML_PROPERTY, SCAN_XML_NAME);
    }

    public static Archive packageArchive(final Set<String> packageNames, final ClassLoader loader, final URL url) {
        if (!packageNames.isEmpty()) {
            return new FilteredArchive(ClasspathArchive.archive(loader, url), filters(packageNames));
        }
        return null;
    }
View Full Code Here

            }
        }

        for (final URL url : urls) {
            final List<String> classes = new ArrayList<String>();
            final Archive archive = new FilteredArchive(new ConfigurableClasspathArchive(module.getClassLoader(), Arrays.asList(url)), new ScanXmlSaverFilter(scanXmlExists, handler, classes));
            map.put(url, classes);
            archives.add(archive);
        }

        archive = new CompositeArchive(archives);
View Full Code Here

    public static UrlSet filterArchives(final Filter filter, final ClassLoader classLoader, UrlSet urlSet) {

        for (final URL url : urlSet.getUrls()) {
            for (final Archive archive : ClasspathArchive.archives(classLoader, url)) {

                final FilteredArchive filtered = new FilteredArchive(archive, filter);

                if (!filtered.iterator().hasNext()) {
                    urlSet = urlSet.exclude(url);
                }

            }
        }
View Full Code Here

        final Map<URL, List<String>> classesByUrl = new HashMap<URL, List<String>>();

        final List<org.apache.xbean.finder.archive.Archive> archives = new ArrayList<org.apache.xbean.finder.archive.Archive>();
        for (final URL url : DeploymentLoader.filterWebappUrls(additionalPaths.toArray(new URL[additionalPaths.size()]), null)) {
            final List<String> currentClasses = new ArrayList<String>();
            final org.apache.xbean.finder.archive.Archive newArchive = new FilteredArchive(new JarArchive(cl, url), new WebappAggregatedArchive.ScanXmlSaverFilter(false, null, currentClasses));
            classesByUrl.put(url, currentClasses);
            archives.add(newArchive);
        }

        archives.add(new ClassesArchive(classes));
View Full Code Here

            }
        }

        for (final URL url : urls) {
            final List<String> classes = new ArrayList<String>();
            final Archive archive = new FilteredArchive(new ConfigurableClasspathArchive(module.getClassLoader(), Arrays.asList(url)), new ScanXmlSaverFilter(scanXmlExists, handler, classes));
            map.put(url, classes);
            archives.add(archive);
        }

        archive = new CompositeArchive(archives);
View Full Code Here

    public static UrlSet filterArchives(final Filter filter, final ClassLoader classLoader, UrlSet urlSet) {

        for (final URL url : urlSet.getUrls()) {
            for (final Archive archive : ClasspathArchive.archives(classLoader, url)) {

                final FilteredArchive filtered = new FilteredArchive(archive, filter);

                if (!filtered.iterator().hasNext()) {
                    urlSet = urlSet.exclude(url);
                }

            }
        }
View Full Code Here

TOP

Related Classes of org.apache.xbean.finder.archive.FilteredArchive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.