Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] newbie question about after returning

Hi
I have a very simple point cut, but the method return does not seem to be intercepted.
Is the syntax wrong ?

Thanks !

@Pointcut("within(com.mycom.mypack.myclass)")
                public void withinMyPackage() {}
 
@AfterReturning(pointcut = "execution(public static * myMethod ( .. ))  " +        "  && withinMyPackage() " ,         returning = "myResult"         )
public void provideAdviseAfterReturning(   MyType myResult    , JoinPoint jp ) {
 
       // do something with returned results
 
}



Back to the top