Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] "Perreturned" instantiation

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I am trying to have an aspect instantiated whenever a certain method
call returns some specific object and then want to associate the
aspect instance with that object, so something like:

aspect Foo perreturned (call(B A.bar(..))) {
	
	after() returning(B b): call(B A.bar(..)) {
		//do something with this particular instance b of type B
	}

}

I imagine that one could probably simulate that somehow with a piece
of around advice (to retrieve the returned object), but then, still,
since I cannot instanciate an aspect explicitly, how could I
associate a distinct aspect instance with that object.

(Similar to that one could also of course postulate a perthrown
clause.)

Thanks in advance,
Eric

- -- 
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQZJX8swiFCm7RlWCEQLA4gCgi4WegtJs2KInczN4h4g4zP0AMmEAnA+b
nzDzzv2wC71PXQUhKC5Qbu4J
=WCnz
-----END PGP SIGNATURE-----




Back to the top