Package org.codehaus.aspectwerkz.expression

Examples of org.codehaus.aspectwerkz.expression.ExpressionContext


    // ============ pointcut type tests =============
    public void testPointcutTypes() throws Exception {
        MethodInfo method = JavaMethodInfo.getMethodInfo(Target.class.getDeclaredMethod("modifiers1", new Class[] {}));
        FieldInfo field = JavaFieldInfo.getFieldInfo(Target.class.getDeclaredField("modifier1"));
        assertTrue(new ExpressionInfo("execution(void test.expression.Target.modifiers1())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.EXECUTION, method, null)));
        assertFalse(new ExpressionInfo("execution(void test.expression.Target.modifiers1())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, method, null)));
        assertTrue(new ExpressionInfo("set(int test.expression.Target.modifier1)", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.SET, field, null)));
        assertFalse(new ExpressionInfo("get(int test.expression.Target.modifier1)", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.SET, field, null)));
        try {
            assertFalse(new ExpressionInfo("set(int test.expression.Target.modifier1())", NAMESPACE).getExpression()
                    .match(new ExpressionContext(PointcutType.SET, method, null)));
        } catch (Throwable e) {
            return;
        }
        fail("expected exception");
    }
View Full Code Here


    // ============ advised class tests =============
    public void testAdvisedClassExpression() throws Exception {
        ClassInfo otherType = JavaClassInfo.getClassInfo(String.class);
        assertFalse(new ExpressionInfo("execution(void test.expression.Target.modifiers1())", NAMESPACE)
                .getAdvisedClassFilterExpression().match(new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertTrue(new ExpressionInfo("execution(void test.expression.Target.modifiers1())", NAMESPACE)
                .getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo("call(void test.expression.Target.modifiers1())", NAMESPACE)
                .getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo("set(int test.expression.Target.modifier1)", NAMESPACE)
                .getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo("get(int test.expression.Target.modifier1)", NAMESPACE)
                .getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo("handler(java.lang.Exception) && within(test.expression.Target)", NAMESPACE)
                .getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo("handler(java.lang.Exception) && within(test.expression.Target)", NAMESPACE)
                .getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "handler(java.lang.Exception) && withincode(void test.expression.Target.modifiers1())",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "handler(java.lang.Exception) && NOT withincode(void test.expression.Target.modifiers1())",
            NAMESPACE).getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertFalse(new ExpressionInfo(
            "call(void test.expression.Dummy.modifiers1()) && within(test.expression.Target)",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "call(void test.expression.Dummy.modifiers1()) && withincode(void test.expression.Target.modifiers1())",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));//fails on CALL
        assertFalse(new ExpressionInfo(
            "call(void test.expression.Target.modifiers1()) && withincode(void test.expression.TargetNOMATCH.modifiers1())",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, s_declaringType)));//fails on WITHIN
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) OR execution(* java.lang.String.*(..))",
            NAMESPACE).getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, otherType, null)));

        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) OR execution(* java.lang.String.*(..))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) AND NOT execution(* java.lang.String.*(..))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));

        // check that we ignore cflow
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) AND cflow(execution(* *..*(..)))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) AND NOT cflow(execution(* *..*(..)))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "execution(void test.expression.TargetNOMATCH.modifiers1()) AND cflow(execution(* *..*(..)))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "execution(void test.expression.TargetNOMATCH.modifiers1()) AND NOT cflow(execution(* *..*(..)))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));

        // the following should return FALSE with a good early filtering
        // returning TRUE is not a problem for the early filtering but false will save time
        assertFalse(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) OR NOT execution(* java.lang.String.*(..))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertFalse(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) AND execution(* java.lang.String.*(..))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) AND execution(* java.lang.String.*(..))",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));

        //FIXME: since Pointcut with signature in grammar, not/NOT must be separated by a <space>
        //        assertTrue(new ExpressionInfo(
        //            "NOT(execution(void test.expression.Target.modifiers1()) OR NOT execution(* java.lang.String.*(..)))",
        //            NAMESPACE).getAdvisedClassFilterExpression().match(
        //            new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertTrue(new ExpressionInfo(
            "NOT (execution(void test.expression.Target.modifiers1()) OR NOT execution(* java.lang.String.*(..)))",
            NAMESPACE).getAdvisedClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, otherType, null)));

    }
View Full Code Here

            NAMESPACE));
        s_namespace.addExpressionInfo("cflowTarget", new ExpressionInfo(
            "cflow(call(void test.expression.Target.modifiers3()) && withincode(void test.expression.Target.*(..)))",
            NAMESPACE));
        assertFalse(new ExpressionInfo("string && cflowString", NAMESPACE).getAdvisedCflowClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
                assertTrue(new ExpressionInfo("string && cflowString", NAMESPACE)
                        .getAdvisedCflowClassFilterExpression().match(
                            new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertFalse(new ExpressionInfo("target && cflowString", NAMESPACE).getAdvisedCflowClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
                assertTrue(new ExpressionInfo("target && cflowString", NAMESPACE)
                        .getAdvisedCflowClassFilterExpression().match(
                            new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertTrue(new ExpressionInfo("! target && cflowString", NAMESPACE)
                .getAdvisedCflowClassFilterExpression().match(
                    new ExpressionContext(PointcutType.ANY, otherType, null)));
        // will match since NOT is ignored so that cflow aspect can be plugged
        assertTrue(new ExpressionInfo("target && ! cflowString", NAMESPACE)
                .getAdvisedCflowClassFilterExpression().match(
                    new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertFalse(new ExpressionInfo("string && cflowTarget", NAMESPACE).getAdvisedCflowClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertTrue(new ExpressionInfo("string && cflowTarget", NAMESPACE)
                .getAdvisedCflowClassFilterExpression().match(
                    new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo("target && cflowTarget", NAMESPACE).getAdvisedCflowClassFilterExpression()
                .match(new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertTrue(new ExpressionInfo("target && cflowTarget", NAMESPACE)
                .getAdvisedCflowClassFilterExpression().match(
                    new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Dummy.modifiers1()) && cflow(execution(void test.expression.Target.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "execution(void test.expression.Dummy.modifiers1()) && cflow(execution(void test.expression.Target.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertFalse(new ExpressionInfo("cflow(execution(void test.expression.Target.modifiers1()))", NAMESPACE)
                .getAdvisedCflowClassFilterExpression().match(new ExpressionContext(PointcutType.ANY, otherType, null)));
        assertTrue(new ExpressionInfo("cflow(call(void test.expression.Target.modifiers1()))", NAMESPACE)
                .getAdvisedCflowClassFilterExpression().match(
                    new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "cflow(execution(void test.expression.Target.modifiers1())) && within(test.expression.Target)",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "within(test.expression.Target) && cflow(call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "cflow(within(test.expression.T) && call(void test.expression.T.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertTrue(new ExpressionInfo(
            "cflow(!within(test.expression.T) && call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));
        assertFalse(new ExpressionInfo(
            "cflow(call(void test.expression.Target.modifiers1()) && NOT withincode(void test.expression.Target.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, otherType, null)));

        assertTrue(new ExpressionInfo(
            "NOT execution(void test.expression.Target.modifiers1()) && cflow(call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getAdvisedCflowClassFilterExpression().match(
            new ExpressionContext(PointcutType.ANY, s_declaringType, null)));

    }
View Full Code Here

            NAMESPACE));
        s_namespace.addExpressionInfo("cflowPC", new ExpressionInfo(
            "cflow(call(void test.expression.Target.modifiers3()) AND within(test.expression.*))",
            NAMESPACE));
        assertTrue(new ExpressionInfo("cflow(execution(void test.expression.Target.modifiers1()))", NAMESPACE)
                .getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers2()) && cflow(execution(void test.expression.Target.modifiers1()))",
            NAMESPACE).hasCflowPointcut());
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers2()) && cflow(execution(void test.expression.Target.modifiers1()))",
View Full Code Here

            NAMESPACE));
        s_namespace.addExpressionInfo("cflowPC", new ExpressionInfo(
            "cflow(call(void test.expression.Target.modifiers3()) AND within(test.expression.*))",
            NAMESPACE));
        assertTrue(new ExpressionInfo("cflow(execution(void test.expression.Target.modifiers1()))", NAMESPACE)
                .getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers2()) && cflow(execution(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers2()) && cflow(execution(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo(
            "cflow(execution(void test.expression.Target.modifiers1())) && execution(void test.expression.Target.modifiers2())",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo("cflowPC && pc1", NAMESPACE).getCflowExpression().match(
            new ExpressionContext(PointcutType.CALL, method3, s_declaringType)));
        assertTrue(new ExpressionInfo("pc1 && cflowPC", NAMESPACE).getCflowExpression().match(
            new ExpressionContext(PointcutType.CALL, method3, s_declaringType)));
        assertTrue(new ExpressionInfo("cflow(pc2) && pc1", NAMESPACE).getCflowExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, method3, s_declaringType)));
        assertFalse(new ExpressionInfo("pc1 && cflow(pc2)", NAMESPACE).getCflowExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, method2, s_declaringType)));
        assertTrue(new ExpressionInfo(
            "pc2 && cflow(pc1 || pc2 || call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.CALL, method1, null)));
        assertTrue(new ExpressionInfo(
            "cflow(pc1 || pc2 || call(void test.expression.Target.modifiers1())) AND pc1",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method3, null)));
        assertTrue(new ExpressionInfo(
            "cflow(pc1 || call(void test.expression.Target.modifiers1())) && (execution(void test.expression.Target.modifiers3()) || pc1)",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method2, null)));
        assertFalse(new ExpressionInfo(
            "cflow(execution(void test.expression.Target.modifiers1())) && execution(void test.expression.Target.modifiers2())",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method2, null)));
        assertFalse(new ExpressionInfo("cflow(pc1) && execution(void test.expression.Target.modifiers3())", NAMESPACE)
                .getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method3, null)));
        assertFalse(new ExpressionInfo(
            "cflow(call(void test.expression.Target.modifiers1())) && execution(void test.expression.Target.modifiers1())",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertFalse(new ExpressionInfo(
            "cflow(call(void test.expression.Target.modifiers1())) || execution(void test.expression.Target.modifiers1())",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers2()) AND NOT cflow(call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, method2, null)));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers2()) AND NOT cflow(call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.CALL, method1, null)));
    }
View Full Code Here

            NAMESPACE));
        s_namespace.addExpressionInfo("pc2", new ExpressionInfo(
            "execution(void test.expression.Target.modifiers3())",
            NAMESPACE));
        assertTrue(new ExpressionInfo("cflowbelow(execution(void test.expression.Target.modifiers1()))", NAMESPACE)
                .getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method1, null)));
        assertTrue(new ExpressionInfo(
            "cflowbelow(pc1 || pc2 || call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.CALL, method1, null)));
        assertTrue(new ExpressionInfo(
            "cflowbelow(pc1 || pc2 || call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method2, null)));
        assertTrue(new ExpressionInfo(
            "cflowbelow(pc1 || pc2 || call(void test.expression.Target.modifiers1()))",
            NAMESPACE).getCflowExpression().match(new ExpressionContext(PointcutType.EXECUTION, method3, null)));
    }
View Full Code Here

    public void tesHasMethod() throws Exception {
        ClassInfo klass = JavaClassInfo.getClassInfo(Target.class);
        ClassInfo string = JavaClassInfo.getClassInfo(String.class);
        assertTrue(new ExpressionInfo(
            "hasmethod(void modifiers1())",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        assertFalse(new ExpressionInfo(
            "hasmethod(void modifiers1())",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.CALL, klass, string)));
        // will match at the AdvisedClassFilterExpression level
        assertTrue(new ExpressionInfo(
            "hasmethod(* getClass())",
            NAMESPACE).getAdvisedClassFilterExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        // but not at the Expression level
        assertFalse(new ExpressionInfo(
            "hasmethod(* getClass())",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        // unless method is in class hierarchy
        assertFalse(new ExpressionInfo(
            "hasmethod(* java.lang.Object+.getClass())",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        // even a fake method will match, since we extend java.lang.Object, for the AdvisedClassFilterExpression level
        assertTrue(new ExpressionInfo(
            "hasmethod(* java.lang.Object+.DOESNOTEXIST())",
            NAMESPACE).getAdvisedClassFilterExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        // but not at Expression level
        assertFalse(new ExpressionInfo(
            "hasmethod(* java.lang.Object+.DOESNOTEXIST())",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
    }
View Full Code Here

    public void tesHasField() throws Exception {
        ClassInfo klass = JavaClassInfo.getClassInfo(Target.class);
        ClassInfo string = JavaClassInfo.getClassInfo(String.class);
        assertTrue(new ExpressionInfo(
            "hasfield(int modifier1)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        assertFalse(new ExpressionInfo(
            "hasfield(* modifier1)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.CALL, klass, string)));
        // will match at the AdvisedClassFilterExpression level
        assertTrue(new ExpressionInfo(
            "hasfield(* value)",
            NAMESPACE).getAdvisedClassFilterExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        // but not at the Expression level
        assertFalse(new ExpressionInfo(
            "hasfield(* value)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, klass, klass)));
        //value field exists in String.class
        assertTrue(new ExpressionInfo(
            "hasfield(* value)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.CALL, klass, string)));
    }
View Full Code Here

    public void testWithinType1() throws Exception {
        ClassInfo klass = JavaClassInfo.getClassInfo(Target.class);
        MethodInfo method = JavaMethodInfo.getMethodInfo(Target.class.getDeclaredMethod("modifiers1", new Class[] {}));
        assertTrue(new ExpressionInfo(
            "execution(void test.expression.Target.modifiers1()) AND within(test.expression.Target)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.EXECUTION, method, s_declaringType)));
        assertTrue(new ExpressionInfo(
            "call(void test.expression.Target.modifiers1()) AND within(test.expression.Target)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.CALL, method, s_declaringType)));
        assertFalse(new ExpressionInfo(
            "call(void test.expression.Target.modifiers1()) AND NOT within(test.expression.Target)",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.CALL, method, s_declaringType)));
    }
View Full Code Here

    public void testWithinType2() throws Exception {
        ClassInfo klass = JavaClassInfo.getClassInfo(Target.class);
        MethodInfo method = JavaMethodInfo.getMethodInfo(Target.class.getDeclaredMethod("modifiers1", new Class[] {}));
        assertTrue(new ExpressionInfo("execution(void *..*.modifiers1()) AND within(test.expression.Target)", NAMESPACE)
                .getAdvisedClassFilterExpression().match(
                    new ExpressionContext(PointcutType.EXECUTION, method, s_declaringType)));
        assertTrue(new ExpressionInfo("execution(void *..*.modifiers1()) AND within(@Serializable *..*)", NAMESPACE)
                .getAdvisedClassFilterExpression().match(
                    new ExpressionContext(PointcutType.EXECUTION, method, s_declaringType)));
        assertFalse(new ExpressionInfo(
            "execution(void *..*.modifiers1()) AND NOT within(@Serializable *..*)",
            NAMESPACE).getAdvisedClassFilterExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, method, s_declaringType)));
    }
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.expression.ExpressionContext

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.