By the way, I am going to use this opportunity to "advertise" my master
thesis (http://aosd.di.fct.unl.pt/sergioag/), where I'm developing a
prototype AspectJ library for Design by Contract. Although it is not a
tool intended for production (like Dr Wampler's Contract4J, for
example), it is very small, so you should find the aspect code
relatively simple. (And of course, if you have any comments, I would
like to known them.)
Sérgio Agostinho
Dean Wampler wrote:
On a side note, since you're effectively doing "design by contract",
have a look at Contract4J (http://www.contract4j.org) which uses Java
5 annotations to define the contract conditions and AspectJ to test
those conditions.
You might decide it's too heavyweight for your needs, but you could
look at the aspects as examples.
dean
On Oct 31, 2007, at 7:30 AM, Jubin Zawar wrote:
Hi,
I am verifying preconditions using AspectJ.
For this I create an aspect called PrePostConditions, it includes an
around() advice for a service class. Whenever a method of this class
is invoked, the Aspect comes into play.
Now – for a ceratin reason – I have to have access to the class’ name
within the Aspect.
However, when using the “this” keyword, it refers to the aspect and
not the class that the class advises to.
How can I et access to the class’ name or a reference to class for
which the advice executes ?
Kind regards,
Jay
_______________________________________________
aspectj-users mailing list
[email protected] <mailto:[email protected]>
https://dev.eclipse.org/mailman/listinfo/aspectj-users
Dean Wampler, Ph.D.
dean at objectmentor.com
http://www.objectmentor.com
See also:
http://www.aspectprogramming.com AOP advocacy site
http://aquarium.rubyforge.org AOP for Ruby
http://www.contract4j.org Design by Contract for Java5
I want my tombstone to say:
Unknown Application Error in Dean Wampler.exe.
Application Terminated.
[Okay] [Cancel]
------------------------------------------------------------------------
_______________________________________________
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