Perfect. What version supports hasfield? On 3/14/07, Ramnivas Laddad <[EMAIL PROTECTED]> wrote:
This can be done using the experimental -XhasMember option to 'ajc' and then using hasfield() type pattern. Here is untested pointcut for your case:execution(* new(..)) && within(hasfield(@B * *)) -Ramnivas On 3/14/07, Pavel Kusch <[EMAIL PROTECTED]> wrote: > > Hello, > > Please how can I specify a pointcut that would match any constructor > of any class that has at least one instance varible of certain > annotation? > > For example if the annotation is @B then: > > class A { > @B int field; > > A() {} > A(int a) {} > } > //matches both constructors > > > class A { > int field; > > A() {} > A(int a) {} > } > //no match > > class A { > @B int field1; > @B int field2; > > A() {} > A(int a) {} > } > //matches both constructors > > Thank you, > Pavel Kusch > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
