[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Overriding pointcuts

Title: Overriding pointcuts


I want to override pointcuts inserted in the aspect code during compile, at run time. What would I do to achieve this? If I created a pointcut in aop.xml that contradicts the pointcut inserted in the code, what would happen?

For ex.

In my aspect class
public aspect PrimitiveFlightRecorderAspect
        pointcut myMethod():  execution(@ PrimitiveDataLoggerAnnotation public * *.Method*(..)) );

        before (): myMethod() {

        after (): myMethod() {}

Now if in the aop.xml if I were to do this. (pardon me for any mistakes in the aop.xml, this is the first time I creating one)  what would happen?

                <aspect name="PrimitiveFlightRecorderAspect"/>
                  pointcut myMethod():  execution(! @ PrimitiveDataLoggerAnnotation public * *.Method*(..)) );