Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Advising advice?

Another foolish question.  Is it possible to advise advice?   In
searching for an answer to this question, I ran across an older version
of the Developer notebook that mentioned the annotation styles use of a
method name made this possible, but it would appear that this passage
has been removed from the current documentation.  It also referenced an
annotation @AdviceName() whose current documentation states "...may in
future be used in adviceexecution() pcd."  I tried something like the
following, but this issues the 'adviceDidNotMatch' warning on the @After
declaration.  So am I to assume that this is not possible at the moment?

@Aspect
public class A {

    @Before( "call(void C.bar( int )) && args( i ) " )
    public void doBar( int i ) {
       System.out.println("What is 6 x 9?");
    }

    @After( "execution(void A.doBar( int ))" )
    public void adviseAdvise() {
        System.out.println("Everybody knows that..." );
    }
}

Thanks!

=Ron=






Back to the top