Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Setting a static field

Either of your pointcuts will work fine, as would

   set(static * *)

(Don't forget static final variables don't make join points
because they are evaluated at compile-time.)

In my experience, this kind of thing happens when you're working 
with AJDT and you have an error somewhere else in the project.
The compiler does not continue after some errors, so the other
code won't be compiled.  Often when debugging pointcuts you use
declare error to test the staticly-determinable part, and it
still doesn't work - b/c the compiler doesn't get to that point.
So the solution for that is to fix the other errors first.

I haven't seen this, but it's possible that there is a bug with
incremental compilation mode in AJDT where you make a change 
that's not picked up.  If you see no other error, try cleaning the
project and rebuilding without incremental mode.  If you still
see no error and field-set is not picked up, try the 
command-line compiler.  If that fails, it really is a bug, if
your code is correct.

Sorry to be long-winded and hth -

Wes

> ------------Original Message------------
> From: Matt Morten <djcredo@xxxxxxxxx>
> To: aspectj-users@xxxxxxxxxxx
> Date: Fri, Nov-4-2005 11:58 AM
> Subject: [aspectj-users] Setting a static field
>
> Hello everyone,
> 
> I need to pick up all "set" pointcuts. However, my current
> configuration does not pick up set's to static fields:
> 
> pointcut fieldSet() : (set(* *.*) || set(* *));
> 
> Does anyone know what I'm doing wrong?
> Many thanks,
> Matt
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
> 



Back to the top