Examples of ExpressionInfo


Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

    public static IntroductionDefinition createIntroductionDefinition(
        final Class mixinClass,
        final String expression,
        final String deploymentModel,
        final AspectDefinition aspectDef) {
        ExpressionInfo expressionInfo = new ExpressionInfo(expression, aspectDef.getFullQualifiedName());

        // auto-name the pointcut which is anonymous for introduction
        ExpressionNamespace.getNamespace(aspectDef.getFullQualifiedName()).addExpressionInfo(
            "AW_" + expression.hashCode(),
            expressionInfo);
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

    public static InterfaceIntroductionDefinition createInterfaceIntroductionDefinition(
        final String introductionName,
        final String expression,
        final String interfaceClassName,
        final AspectDefinition aspectDef) {
        ExpressionInfo expressionInfo = new ExpressionInfo(expression, aspectDef.getFullQualifiedName());

        // auto-name the pointcut which is anonymous for introduction
        ExpressionNamespace.getNamespace(aspectDef.getFullQualifiedName()).addExpressionInfo(
            "AW_" + expression.hashCode(),
            expressionInfo);
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

            "call(void test.expression.Target.parameters3(String, StringBuffer, String, *))",
            NAMESPACE).getExpression().match(new ExpressionContext(PointcutType.CALL, parameters3, null)));
    }

    public void testMethodParameters4() throws Exception {
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters4())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, parameters4, null)));
        assertTrue(new ExpressionInfo("call(void test.expression.Target.parameters4(..))", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, parameters4, null)));
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters4(Object))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters4, null)));
        assertTrue(new ExpressionInfo("call(void test.expression.Target.parameters4(Object[]))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters4, null)));
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters4(Object[][]))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters4, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters4(Object[][]))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters4, null)));
    }

    public void testMethodParameters5() throws Exception {
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters5())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
        assertTrue(new ExpressionInfo("call(void test.expression.Target.parameters5(..))", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters5(int))", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters5(int[]))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
        assertTrue(new ExpressionInfo("call(void test.expression.Target.parameters5(int[][]))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
        assertFalse(new ExpressionInfo("call(void test.expression.Target.parameters5(int[][][]))", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

                .getExpression().match(new ExpressionContext(PointcutType.CALL, parameters5, null)));
    }

    // ============ method return type test =============
    public void testMethodReturnType1() throws Exception {
        assertTrue(new ExpressionInfo("call(void test.expression.Target.returnType1())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType1, null)));
        assertFalse(new ExpressionInfo("call(String test.expression.Target.returnType1())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType1, null)));
        assertTrue(new ExpressionInfo("call(* test.expression.Target.returnType1())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, returnType1, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        assertTrue(new ExpressionInfo("call(* test.expression.Target.returnType1())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, returnType1, null)));
    }

    public void testMethodReturnType2() throws Exception {
        assertFalse(new ExpressionInfo("call(void test.expression.Target.returnType2())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType2, null)));
        assertFalse(new ExpressionInfo("call(String test.expression.Target.returnType2())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType2, null)));
        assertTrue(new ExpressionInfo("call(* test.expression.Target.returnType2())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, returnType2, null)));
        assertTrue(new ExpressionInfo("call(int test.expression.Target.returnType2())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType2, null)));
        assertFalse(new ExpressionInfo("call(int[] test.expression.Target.returnType2())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType2, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        assertFalse(new ExpressionInfo("call(int[] test.expression.Target.returnType2())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType2, null)));
    }

    public void testMethodReturnType3() throws Exception {
        assertFalse(new ExpressionInfo("call(void test.expression.Target.returnType3())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType3, null)));
        assertTrue(new ExpressionInfo("call(String test.expression.Target.returnType3())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType3, null)));
        assertTrue(new ExpressionInfo("call(* test.expression.Target.returnType3())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, returnType3, null)));
        assertTrue(new ExpressionInfo("call(java.lang.String* test.expression.Target.returnType3())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, returnType3, null)));
        assertFalse(new ExpressionInfo("call(java.lang.StringBuffer test.expression.Target.returnType3())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, returnType3, null)));
    }
View Full Code Here

Examples of org.codehaus.aspectwerkz.expression.ExpressionInfo

        assertFalse(new ExpressionInfo("call(java.lang.StringBuffer test.expression.Target.returnType3())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, returnType3, null)));
    }

    public void testMethodReturnType4() throws Exception {
        assertFalse(new ExpressionInfo("call(void test.expression.Target.returnType4())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType4, null)));
        assertTrue(new ExpressionInfo("call(Process test.expression.Target.returnType4())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType4, null)));
        assertTrue(new ExpressionInfo("call(* test.expression.Target.returnType4())", NAMESPACE).getExpression().match(
            new ExpressionContext(PointcutType.CALL, returnType4, null)));
        assertTrue(new ExpressionInfo("call(java.lang.Process test.expression.Target.returnType4())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, returnType4, null)));
        assertTrue(new ExpressionInfo("call(java.lang.* test.expression.Target.returnType4())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, returnType4, null)));
        assertTrue(new ExpressionInfo("call(java..* test.expression.Target.returnType4())", NAMESPACE).getExpression()
                .match(new ExpressionContext(PointcutType.CALL, returnType4, null)));
        assertTrue(new ExpressionInfo("call(java.*.Process test.expression.Target.returnType4())", NAMESPACE)
                .getExpression().match(new ExpressionContext(PointcutType.CALL, returnType4, null)));
    }
View Full Code Here

Examples of org.eclipse.core.expressions.ExpressionInfo

    }
    return evaluateAnd(new EvaluationContext(context, variable));
  }

  public void collectExpressionInfo(ExpressionInfo info) {
    ExpressionInfo other= new ExpressionInfo();
    super.collectExpressionInfo(other);
    if (other.hasDefaultVariableAccess()) {
      info.addVariableNameAccess(fVariable);
    }
    info.mergeExceptDefaultVariable(other);
 
View Full Code Here

Examples of org.eclipse.core.expressions.ExpressionInfo

    }
    return evaluateAnd(new EvaluationContext(context, variable));
  }
 
  public void collectExpressionInfo(ExpressionInfo info) {
    ExpressionInfo other= new ExpressionInfo();
    super.collectExpressionInfo(other);
    if (other.hasDefaultVariableAccess()) {
      info.addVariableNameAccess(fVariable);
    }
    info.mergeExceptDefaultVariable(other);
  }
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.