[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [aspectj-users] Withincode pointcut??
- From: "Eric Bodden" <eric.bodden@xxxxxxxxxxxxxx>
- Date: Mon, 29 May 2006 22:06:53 -0400
- Delivered-to: email@example.com
- Thread-index: AcaDVS6dPV91z3pvRY2AEjuKNctmOgAN6khQ
- Thread-topic: [aspectj-users] Withincode pointcut??
Ok, I have to admit that the difference in semantics you point out looks
strange. I can only estimate that it has to do with the execution
pointcut semantics or invokevirtual (used for non-private methods) vs.
invokespecial (used for constructor execution) bytecodes.
The other point is that - I know this is not a satisfying answer - your
pointcut specifications do not make much sense. What does it mean if you
state that a method execution (or constructor execution) should occur
within the code of a method? Either this is always the case or never?
Maybe execution(* g()) && cflow(withincode(* f())) or something like
this is what you actually want to express.
Still, it's an interesting observation. Maybe the ajc guys can shed some
light on us.
Sable Research Group, McGill University
> -----Original Message-----
> From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-
> bounces@xxxxxxxxxxx] On Behalf Of Nadia Belblidia-Guerroumi
> Sent: Monday, May 29, 2006 7:20 PM
> To: aspectj-users@xxxxxxxxxxx
> Subject: [aspectj-users] Withincode pointcut??
> Hi everyone!
> Could somebody explain me why the pointcut withincode can match only
> against the following join points:
> and not on execution-method also!?? Why Constructor-execution and not
> method execution??
> For example:
> withincode(public static void Main.f()) && execution(public static
> Doesn't match but for the execution of public static void Main.f().
> withincode(Main.new()) && execution(Main.new()) matches against
> execution of Main constructor.
> Thank you very much!