Example usage for org.aspectj.weaver.tools UnsupportedPointcutPrimitiveException getUnsupportedPrimitive

List of usage examples for org.aspectj.weaver.tools UnsupportedPointcutPrimitiveException getUnsupportedPrimitive

Introduction

In this page you can find the example usage for org.aspectj.weaver.tools UnsupportedPointcutPrimitiveException getUnsupportedPrimitive.

Prototype

public PointcutPrimitive getUnsupportedPrimitive() 

Source Link

Usage

From source file:org.springframework.aop.aspectj.AspectJExpressionPointcutTests.java

License:Apache License

@Test
public void testWithUnsupportedPointcutPrimitive() throws Exception {
    String expression = "call(int org.springframework.tests.sample.beans.TestBean.getAge())";

    try {/*  w w  w.j a va  2s .  co  m*/
        getPointcut(expression).getClassFilter(); // call to getClassFilter forces resolution...
        fail("Should not support call pointcuts");
    } catch (UnsupportedPointcutPrimitiveException ex) {
        assertEquals("Should not support call pointcut", PointcutPrimitive.CALL, ex.getUnsupportedPrimitive());
    }

}