Examples of ExpressionInfo


Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        List interfaceIntroductionDefs = new ArrayList();
        for (Iterator it = m_interfaceIntroductionMap.values().iterator(); it.hasNext();) {
            InterfaceIntroductionDefinition introDef = (InterfaceIntroductionDefinition) it.next();
            ExpressionInfo[] expressionInfos = introDef.getExpressionInfos();
            for (int i = 0; i < expressionInfos.length; i++) {
                ExpressionInfo expressionInfo = expressionInfos[i];
                ExpressionVisitor expression = expressionInfo.getExpression();
                if (expression.match(ctx)) {
                    interfaceIntroductionDefs.add(introDef);
                }
            }
        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        }
        for (Iterator it = m_introductionMap.values().iterator(); it.hasNext();) {
            IntroductionDefinition introDef = (IntroductionDefinition) it.next();
            ExpressionInfo[] expressionInfos = introDef.getExpressionInfos();
            for (int i = 0; i < expressionInfos.length; i++) {
                ExpressionInfo expressionInfo = expressionInfos[i];
                ExpressionVisitor expression = expressionInfo.getExpression();
                if (expression.match(ctx)) {
                    return true;
                }
            }
        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        }
        for (Iterator it = m_aspectMap.values().iterator(); it.hasNext();) {
            AspectDefinition aspectDef = (AspectDefinition) it.next();
            for (Iterator it2 = aspectDef.getAllAdvices().iterator(); it2.hasNext();) {
                AdviceDefinition adviceDef = (AdviceDefinition) it2.next();
                ExpressionInfo expressionInfo = adviceDef.getExpressionInfo();
                if (expressionInfo.hasCflowPointcut() && expressionInfo.getCflowExpression().match(ctx)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        }
        for (Iterator it = m_introductionMap.values().iterator(); it.hasNext();) {
            IntroductionDefinition introDef = (IntroductionDefinition) it.next();
            ExpressionInfo[] expressionInfos = introDef.getExpressionInfos();
            for (int i = 0; i < expressionInfos.length; i++) {
                ExpressionInfo expressionInfo = expressionInfos[i];
                for (int j = 0; j < ctxs.length; j++) {
                    if (expressionInfo.getAdvisedClassFilterExpression().match(ctxs[j])) {
                        return true;
                    }
                }
            }
        }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        }
        for (Iterator it = m_introductionMap.values().iterator(); it.hasNext();) {
            IntroductionDefinition introDef = (IntroductionDefinition) it.next();
            ExpressionInfo[] expressionInfos = introDef.getExpressionInfos();
            for (int i = 0; i < expressionInfos.length; i++) {
                ExpressionInfo expressionInfo = expressionInfos[i];
                if (expressionInfo.getAdvisedClassFilterExpression().match(ctx)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        }
        for (Iterator it = m_interfaceIntroductionMap.values().iterator(); it.hasNext();) {
            InterfaceIntroductionDefinition introDef = (InterfaceIntroductionDefinition) it.next();
            ExpressionInfo[] expressionInfos = introDef.getExpressionInfos();
            for (int i = 0; i < expressionInfos.length; i++) {
                ExpressionInfo expressionInfo = expressionInfos[i];
                if (expressionInfo.getAdvisedClassFilterExpression().match(ctx)) {
                    return true;
                }
            }
        }
        return false;
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        super(name);
    }

    // ============ constructor signature test =============
    public void testConstructor() throws Exception {
        assertTrue(new ExpressionInfo("call(test.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
        assertFalse(new ExpressionInfo("call(test.expression.Target.new(String))", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
        //AW-112 below
        assertTrue(new ExpressionInfo("within(test.expression.Target) && execution(new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, constructor, null)));
        assertTrue(new ExpressionInfo("within(test..*) && execution(*.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, constructor, constructor.getDeclaringType())));
        assertTrue(new ExpressionInfo("within(test..*.*) && execution(*.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, constructor, constructor.getDeclaringType())));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

            new ExpressionContext(PointcutType.EXECUTION, constructor, constructor.getDeclaringType())));
    }

    // ============ constructor modifiers test =============
    public void testConstructorModifiers1() throws Exception {
        assertTrue(new ExpressionInfo("call(public test.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
        assertFalse(new ExpressionInfo("call(private test.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

            new ExpressionContext(PointcutType.CALL, constructor, null)));
    }

    //  ============ constructor annotations test =============
    public void testConstructorAnnotations1() throws Exception {
        assertTrue(new ExpressionInfo("call(@Requires test.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
        assertFalse(new ExpressionInfo("call(@RequiresNew test.expression.Target.new())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, constructor, null)));
        assertTrue(new ExpressionInfo("execution(@Requires test.expression.Target.new())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, constructor, null)));
        assertFalse(new ExpressionInfo("execution(@RequiresNew test.expression.Target.new())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.EXECUTION, constructor, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        assertFalse(new ExpressionInfo("execution(@RequiresNew test.expression.Target.new())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.EXECUTION, constructor, null)));
    }

    public void testConstructorAnnotations2() throws Exception {
        assertTrue(new ExpressionInfo("execution(@Requires *..*.new(..))", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, constructor, null)));
        assertFalse(new ExpressionInfo("execution(RequiresNew *..*.new(..))", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.EXECUTION, constructor, null)));
        assertTrue(new ExpressionInfo("call(@Requires *..*.new(..))", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
        assertFalse(new ExpressionInfo("call(RequiresNew *..*.new(..))", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, constructor, null)));
    }
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.