Package org.nanocontainer.aop

Examples of org.nanocontainer.aop.MethodPointcut.picks()


    public void testMembersOf() {
        MethodPointcut cut = cuts.membersOf(Foo.class);
        assertTrue(cut.picks(apple));
        assertTrue(cut.picks(equals));
        assertFalse(cut.picks(subFooMethod));
    }

    public void testCustomClassPointcuts() {
        ClassPointcut picksFoo = new ClassPointcut() {
            public boolean picks(Class clazz) {
View Full Code Here


            public boolean picks(Method method) {
                return method.equals(apricot);
            }
        };
        MethodPointcut cut = cuts.union(picksApple, picksApricot);
        assertTrue(cut.picks(apple));
        assertTrue(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }

    protected void setUp() throws Exception {
View Full Code Here

                return method.equals(apricot);
            }
        };
        MethodPointcut cut = cuts.union(picksApple, picksApricot);
        assertTrue(cut.picks(apple));
        assertTrue(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }

    protected void setUp() throws Exception {
        super.setUp();
View Full Code Here

            }
        };
        MethodPointcut cut = cuts.union(picksApple, picksApricot);
        assertTrue(cut.picks(apple));
        assertTrue(cut.picks(apricot));
        assertFalse(cut.picks(banana));
    }

    protected void setUp() throws Exception {
        super.setUp();
        apple = Foo.class.getMethod("apple", new 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.