[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Problem with annotation based pointcut and inner classes
|
Does this not work for you? The call to method() in main() is where
the advice is applied.
privileged aspect JetmMeasurement {
pointcut jetmMeasure(): call(@Jetm * *(..));
Object around(): jetmMeasure() {
System.out.println("hi!");
return null;
}
@interface Jetm {}
static class MyClass {
@Jetm Object method() {
return null;
}
public static void main(String[] args) {
new MyClass().method();
}
}
}
What is a simple version of the code you are trying to advise, but can't?
On Wed, Aug 27, 2008 at 1:50 AM, Christian Kölle
<christian.koelle@xxxxxxxxx> wrote:
> Hello
>
> I have a problem with an annotation based pointcut that should match
> annotated methods. Here's the aspect code:
>
> privileged aspect JetmMeasurement {
> pointcut jetmMeasure(): call(@Jetm * *(..));
>
> Object around(): jetmMeasure() {
> [...]
> }
>
> Unfortunately the pointcut doesn't work with annotated methods in inner
> classes. I tried some other matching pattern like call(@Jetm * *..*(..))
> but this didn't help.
>
> I'd appreciate any hints.
>
> Christian
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>