Package org.apache.xbean.finder

Examples of org.apache.xbean.finder.UrlSet.exclude()


        return cullSystemJars(cullOpenEJBJars(original));
    }

    public static UrlSet cullSystemJars(final UrlSet original) throws IOException {
        UrlSet urls = new UrlSet(original.getUrls());
        urls = urls.exclude(ClassLoader.getSystemClassLoader().getParent());
        urls = urls.excludeJavaExtDirs();
        urls = urls.excludeJavaEndorsedDirs();
        urls = urls.excludeJavaHome();
        urls = urls.excludePaths(System.getProperty("sun.boot.class.path", ""));
        urls = urls.exclude(".*/JavaVM.framework/.*");
 
View Full Code Here


        urls = urls.exclude(ClassLoader.getSystemClassLoader().getParent());
        urls = urls.excludeJavaExtDirs();
        urls = urls.excludeJavaEndorsedDirs();
        urls = urls.excludeJavaHome();
        urls = urls.excludePaths(System.getProperty("sun.boot.class.path", ""));
        urls = urls.exclude(".*/JavaVM.framework/.*");
        if (LOGGER.isDebugEnabled()) LOGGER.debug("Culled {0} system urls from set", original.size() - urls.size());
        return urls;
    }

    public static UrlSet cullOpenEJBJars(final UrlSet original) throws IOException {
View Full Code Here

        return urls;
    }

    public static UrlSet cullOpenEJBJars(final UrlSet original) throws IOException {
        UrlSet urls = new UrlSet(original.getUrls());
        urls = urls.exclude(".*openejb.*");
        if (LOGGER.isDebugEnabled()) LOGGER.debug("Culled {0} OpenEJB urls from set", original.size() - urls.size());
        return urls;
    }

    private URLs() { }
View Full Code Here

            UrlSet unchecked = new UrlSet();
            if (!filterDescriptors) {
                unchecked = NewLoaderLogic.applyBuiltinExcludes(prefiltered.exclude(urlSet));
                if (filterSystemApps) {
                    unchecked = unchecked.exclude(".*/openejb-[^/]+(.(jar|ear|war)(./)?|/target/classes/?)");
                }
                processUrls(unchecked.getUrls(), classLoader, EnumSet.allOf(RequireDescriptors.class), base, jarList);
            }

            if (logger.isDebugEnabled()) {
View Full Code Here

    }

    private static Collection<URL> getUrls(ClassLoader classLoader, ClassLoader excludeParent) throws IOException {
        UrlSet urlSet = new UrlSet(classLoader);
        if (excludeParent != null){
            urlSet = urlSet.exclude(excludeParent);
        }
        return urlSet.getUrls();
    }

    private List<String> file(URL location) {
View Full Code Here

            UrlSet urls;
            try {
                urls = new UrlSet(cl);
                if (cl.getParent() != null) {
                    urls = urls.exclude(cl.getParent());
                }
            } catch (IOException e) {
                streamManager.writeErr(INDENT + "` can't get urls of this classloader");
                continue;
            }
View Full Code Here

        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        UrlSet urlSet = new UrlSet(classLoader);

        if (classLoader.getParent() != null) {
            urlSet = urlSet.exclude(classLoader.getParent());
        }

        urlSet = urlSet.excludeJavaHome();

        archive = new ClasspathArchive(classLoader, urlSet.getUrls());
View Full Code Here

        ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

        UrlSet urlSet = new UrlSet(classLoader);

        if (classLoader.getParent() != null) {
            urlSet = urlSet.exclude(classLoader.getParent());
        }

        urlSet = urlSet.excludeJavaHome();

        List<Archive> list = ClasspathArchive.archives(classLoader, urlSet.getUrls());
View Full Code Here

                UrlSet urlSet = new UrlSet(classLoader);
                if (classLoader instanceof MultiParentClassLoader) {
                    MultiParentClassLoader multiParentClassLoader = (MultiParentClassLoader) classLoader;
                    for (ClassLoader parent : multiParentClassLoader.getParents()) {
                        if (parent != null) {
                            urlSet = urlSet.exclude(parent);
                        }
                    }
                } else {
                    ClassLoader parent = classLoader.getParent();
                    if (parent != null) {
View Full Code Here

                        }
                    }
                } else {
                    ClassLoader parent = classLoader.getParent();
                    if (parent != null) {
                        urlSet = urlSet.exclude(parent);
                    }
                }
                ClassFinder finder = new ClassFinder(classLoader, urlSet.getUrls());
                for (Field field : finder.findAnnotatedFields(EJB.class)) {
                    EJB ejb = field.getAnnotation(EJB.class);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.