Package org.codehaus.aspectwerkz.metadata

Examples of org.codehaus.aspectwerkz.metadata.MethodMetaData$NullMethodMetaData


            space.registerExpression("* test.ExpressionTest.get(..)", "", "pc2", PointcutType.EXECUTION);
            space.registerExpression("* test.ExpressionTest.suite(..)", "", "pc3", PointcutType.EXECUTION);
            Expression root = space.createExpression("pc1 && !(pc2 || pc3)");

            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );

            assertTrue(root.match(classMetaData1));
            assertTrue(root.match(classMetaData1, methodMetaData1));
View Full Code Here


            space.registerExpression("* test.ExpressionTest.get(..)", "", "pc2", PointcutType.CALL);
            space.registerExpression("* test.ExpressionTest.suite(..)", "", "pc3", PointcutType.CALL);
            Expression root = space.createExpression("!pc3 && (pc1 || pc2)");

            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );

            assertTrue(root.match(classMetaData1));
            assertTrue(root.match(classMetaData1, methodMetaData1));
View Full Code Here

            space.registerExpression("* test.ExpressionTest.get(..)", "", "pc2", PointcutType.CALL);
            space.registerExpression("* test.ExpressionTest.suite(..)", "", "pc3", PointcutType.CALL);
            Expression root = space.createExpression("pc1 && !(pc2 || pc3)");

            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );

            assertTrue(root.match(classMetaData1));
            assertTrue(root.match(classMetaData1, methodMetaData1));
View Full Code Here

    public void testMatchHierachicalExpression_EXECUTION() {
        try {
            Expression root = space.createExpression("* *..TestCase+.set(..)", PointcutType.EXECUTION);
            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            ClassMetaData classMetaData2 = ReflectionMetaDataMaker.createClassMetaData(ExpressionException.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            assertTrue(root.match(classMetaData1));
            assertTrue(root.match(classMetaData1, methodMetaData1));
            assertFalse(root.match(classMetaData2));
View Full Code Here

        try {
            Expression root = space.createExpression(
                    "java.lang.Object+->* *..ExpressionTest.suite(..)", PointcutType.CALL
            );
            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );
            assertTrue(root.match(classMetaData1));
            assertFalse(root.match(classMetaData1, methodMetaData1));
            assertFalse(root.match(classMetaData1, methodMetaData2));
View Full Code Here

    public void testMatchCalleeHierachicalExpression_CALL() {
        try {
            Expression root = space.createExpression("*->* *..TestCase+.suite(..)", PointcutType.CALL);
            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );
            assertTrue(root.match(classMetaData1));
            assertFalse(root.match(classMetaData1, methodMetaData1));
            assertFalse(root.match(classMetaData1, methodMetaData2));
View Full Code Here

    public void testMatchDoubleHierachicalExpression_CALL() {
        try {
            Expression root = space.createExpression("java.lang.Object+->* *..TestCase+.suite(..)", PointcutType.CALL);
            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );
            assertTrue(root.match(classMetaData1));
            assertFalse(root.match(classMetaData1, methodMetaData1));
            assertFalse(root.match(classMetaData1, methodMetaData2));
View Full Code Here

            Expression rootAnonymous = space.createExpression("execution(* test.ExpressionTest.set(..))");//type autodetection
            Expression rootAnonymous2 = space.createExpression("execution(* test.hierarchicalpattern.DummyInterface1+.testMethod1(..))");//type autodetection

            ClassMetaData classMetaDataTrue = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            ClassMetaData classMetaDataFalse = ReflectionMetaDataMaker.createClassMetaData(ExpressionException.class);
            MethodMetaData methodMetaDataTrue = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaDataFalse = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );

            assertTrue(root.match(classMetaDataTrue));
            assertTrue(rootAnonymous.match(classMetaDataTrue));
View Full Code Here

            Expression rootAnonymousAnonymous = space.createExpression(
                    "execution(* test.ExpressionTest.set(..)) || execution(* test.ExpressionTest.get(..))");

            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            ClassMetaData classMetaData2 = ReflectionMetaDataMaker.createClassMetaData(ExpressionException.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );

            assertTrue(root.match(classMetaData1, PointcutType.EXECUTION));
            assertTrue(rootAnonymous.match(classMetaData1, PointcutType.EXECUTION));
View Full Code Here

            Expression rootAnonymous = space.createExpression("pc1 || call(*->* test.ExpressionTest.get(..))");



            ClassMetaData classMetaData1 = ReflectionMetaDataMaker.createClassMetaData(ExpressionTest.class);
            MethodMetaData methodMetaData1 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("set", new Class[]{})
            );
            MethodMetaData methodMetaData2 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("get", new Class[]{})
            );
            MethodMetaData methodMetaData3 = ReflectionMetaDataMaker.createMethodMetaData(
                    ExpressionTest.class.getDeclaredMethod("suite", new Class[]{})
            );

            assertTrue(root.match(classMetaData1, PointcutType.CALL));
            assertTrue(rootAnonymous.match(classMetaData1, PointcutType.CALL));
View Full Code Here

TOP

Related Classes of org.codehaus.aspectwerkz.metadata.MethodMetaData$NullMethodMetaData

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.