Package org.apache.xbean.finder.filter

Examples of org.apache.xbean.finder.filter.Filter.accept()


            while (iterator.hasNext()) {
                final StackTraceElement element = iterator.next();
                iterator.remove();

                // If we haven't yet reached an entry point, just keep going
                if (!start.accept(element.getClassName())) continue;

                // We found an entry point.
                // Fast-forward past this class
                while (iterator.hasNext() && element.getClassName().equals(iterator.next().getClassName())) iterator.remove();
View Full Code Here


            );

            // Everything between here and the end is part
            // of the call chain in which we are interested
            for (final StackTraceElement element : elements) {
                if (end.accept(element.getClassName())) break;

                callers.add(element.getClassName());
            }
        }
View Full Code Here

                    "sun.reflect."
            );

            final Iterator<String> classes = callers.iterator();
            while (classes.hasNext()) {
                if (unwanted.accept(classes.next())) classes.remove();
            }
        }


        return callers;
View Full Code Here

        while (iterator.hasNext()) {
            final URL url = iterator.next();
            final File file = URLs.toFile(url);

            final String name = filter(file).getName();
            if (filter.accept(name) && (includeFilter == null || !includeFilter.accept(name))) {
                iterator.remove();
            }
        }

        return new UrlSet(urls);
View Full Code Here

    }

    public void testPackages() throws Exception {
        Filter filter = Filters.packages("org.foo", "org.bar");

        assertTrue(filter.accept("org.foo.Red"));
        assertTrue(filter.accept("org.bar.Orange"));

        assertFalse(filter.accept("org.fooo.Orange"));
        assertFalse(filter.accept("org.barr.Orange"));
        assertFalse(filter.accept("org"));
View Full Code Here

    public void testPackages() throws Exception {
        Filter filter = Filters.packages("org.foo", "org.bar");

        assertTrue(filter.accept("org.foo.Red"));
        assertTrue(filter.accept("org.bar.Orange"));

        assertFalse(filter.accept("org.fooo.Orange"));
        assertFalse(filter.accept("org.barr.Orange"));
        assertFalse(filter.accept("org"));
        assertFalse(filter.accept(""));
View Full Code Here

        Filter filter = Filters.packages("org.foo", "org.bar");

        assertTrue(filter.accept("org.foo.Red"));
        assertTrue(filter.accept("org.bar.Orange"));

        assertFalse(filter.accept("org.fooo.Orange"));
        assertFalse(filter.accept("org.barr.Orange"));
        assertFalse(filter.accept("org"));
        assertFalse(filter.accept(""));
    }
View Full Code Here

        assertTrue(filter.accept("org.foo.Red"));
        assertTrue(filter.accept("org.bar.Orange"));

        assertFalse(filter.accept("org.fooo.Orange"));
        assertFalse(filter.accept("org.barr.Orange"));
        assertFalse(filter.accept("org"));
        assertFalse(filter.accept(""));
    }

    public void testClasses() throws Exception {
View Full Code Here

        assertTrue(filter.accept("org.foo.Red"));
        assertTrue(filter.accept("org.bar.Orange"));

        assertFalse(filter.accept("org.fooo.Orange"));
        assertFalse(filter.accept("org.barr.Orange"));
        assertFalse(filter.accept("org"));
        assertFalse(filter.accept(""));
    }

    public void testClasses() throws Exception {
        Filter filter = Filters.classes("org.foo.Red", "org.foo.Blue");
View Full Code Here

        assertTrue(filter.accept("org.bar.Orange"));

        assertFalse(filter.accept("org.fooo.Orange"));
        assertFalse(filter.accept("org.barr.Orange"));
        assertFalse(filter.accept("org"));
        assertFalse(filter.accept(""));
    }

    public void testClasses() throws Exception {
        Filter filter = Filters.classes("org.foo.Red", "org.foo.Blue");
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.