Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] exclude some originating objects?

"Lexically within B" means it is in the body of the
source for class B, if the Java bytecode format permits
that to be determined.  It does not include anonymous
inner classes (bytecode does not permit it) or subtypes
outside the body.  It does include static contexts
where "this(B)" would not be true (like constructors,
initializers, and static methods).  

To pick out subtypes as well, use "within(B+)".  Note 
by contrast that "this(B)" would be true in an 
instance context of any subtype of B.

Also, in a call PCD, when using the declaring type of 
the called target type, e.g., "A" in

   call(* A.*(..))

"A" refers to the reference type of the call (at compile
time), not the actual (runtime) type of the object 
handling the call.

For a discussion of the PCD's within(), this(), etc.,
see the programmers guide.

Wes

On Mon, 25 Jul 2005 11:13:28 +0200
 Eric Bodden <eric@xxxxxxxxx> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Ted Anagnost wrote:
> > Thanks Adrian,
> > 
> > Can you please explain what you mean by 'call site is
> not lexically
> > within B'? 
> 
> He means that the call is not made from any instance of
> class B or any inner
> class of class B (because inner classes are inside the
> lexical scope of B
> and this within(B)).
> 
> Eric
> 
> - -- 
> Eric Bodden
> Chair I2 for Programming Languages and Program Analysis
> RWTH Aachen University
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP Desktop 9.0.1 (Build 2185)
> 
>
iQA/AwUBQuStRMwiFCm7RlWCEQJ3aACgkkbWQf4/O5CS+xUqc+kADf2kbEkAoI+F
> R8uSWjOY8hy/S9HCUnXrtx2J
> =lip1
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top