Package org.codehaus.aspectwerkz.expression

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo.addArgument()


    public void testMethodArgsBinding() throws Exception {
        ExpressionInfo info = null;

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, b)", NAMESPACE);
        info.addArgument("i", "int", this.getClass().getClassLoader());
        info.addArgument("f", "float", this.getClass().getClassLoader());
        info.addArgument("b", "byte", this.getClass().getClassLoader());
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, byte)", NAMESPACE);
        info.addArgument("i", "int", this.getClass().getClassLoader());
View Full Code Here


        ExpressionInfo info = null;

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, b)", NAMESPACE);
        info.addArgument("i", "int", this.getClass().getClassLoader());
        info.addArgument("f", "float", this.getClass().getClassLoader());
        info.addArgument("b", "byte", this.getClass().getClassLoader());
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, byte)", NAMESPACE);
        info.addArgument("i", "int", this.getClass().getClassLoader());
        info.addArgument("f", "float", this.getClass().getClassLoader());
View Full Code Here

        info.addArgument("f", "float", this.getClass().getClassLoader());
        info.addArgument("b", "byte", this.getClass().getClassLoader());
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, byte)", NAMESPACE);
        info.addArgument("i", "int", this.getClass().getClassLoader());
        info.addArgument("f", "float", this.getClass().getClassLoader());
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

//        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, b)", NAMESPACE);
//        info.addArgument("i", "int", this.getClass().getClassLoader());
View Full Code Here

        info.addArgument("b", "byte", this.getClass().getClassLoader());
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, byte)", NAMESPACE);
        info.addArgument("i", "int", this.getClass().getClassLoader());
        info.addArgument("f", "float", this.getClass().getClassLoader());
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

//        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, b)", NAMESPACE);
//        info.addArgument("i", "int", this.getClass().getClassLoader());
//        info.addArgument("f", "WRONG", this.getClass().getClassLoader());
View Full Code Here

                // skip the parameter if this ones is a after returning / throwing binding
                if (parameterInfo[1].equals(specialArgumentType)) {
                    resolvedSpecialArgumentType = parameterInfo[0];
                    expressionInfo.setSpecialArgumentName(parameterInfo[1]);
                } else {
                    expressionInfo.addArgument(
                            parameterInfo[1],
                            parameterInfo[0],
                            aspectDef.getClassInfo().getClassLoader()
                    );
                }
View Full Code Here

                // skip the parameter if this ones is a after returning / throwing binding
                if (parameterInfo[1].equals(specialArgumentType)) {
                    resolvedSpecialArgumentType = parameterInfo[0];
                    expressionInfo.setSpecialArgumentName(parameterInfo[1]);
                } else {
                    expressionInfo.addArgument(parameterInfo[1], parameterInfo[0]);
                }
            }
        }

        return new AdviceDefinition(
View Full Code Here

                for (int i = 0; i < parameters.length; i++) {
                    String[] parameterInfo = Strings.splitString(
                            Strings.replaceSubString(parameters[i].trim(), "  ", " "),
                            " "
                    );
                    info.addArgument(parameterInfo[1], parameterInfo[0]);
                }
            }
        }
        ExpressionNamespace.getNamespace(aspectDef.getQualifiedName()).addExpressionInfo(pointcutName, info);
    }
View Full Code Here

                // skip the parameter if this ones is a after returning / throwing binding
                if (paramName.equals(specialArgumentType)) {
                    resolvedSpecialArgumentType = paramType;
                    expressionInfo.setSpecialArgumentName(paramName);
                } else {
                    expressionInfo.addArgument(paramName, paramType);
                }
            }
        }

        // check that around advice return Object else the compiler will fail
View Full Code Here

    public void testMethodArgsBinding() throws Exception {
        ExpressionInfo info = null;

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, b)", NAMESPACE);
        info.addArgument("i", "int");
        info.addArgument("f", "float");
        info.addArgument("b", "byte");
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, byte)", NAMESPACE);
View Full Code Here

    public void testMethodArgsBinding() throws Exception {
        ExpressionInfo info = null;

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, b)", NAMESPACE);
        info.addArgument("i", "int");
        info.addArgument("f", "float");
        info.addArgument("b", "byte");
        assertTrue(info.getExpression().match(new ExpressionContext(PointcutType.CALL, parameters2, null)));

        info = new ExpressionInfo("call(void test.expression.Target.parameters2(..)) && args(i, f, byte)", NAMESPACE);
        info.addArgument("i", "int");
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.