Dear Ramnivas Laddad, Thanks for the help. I'm working with java programs instrumentation and verification using AspectJ. In fact, we apply the Design by Contract technique. I'm studying AspectJ and use these concepts (DBC) at same time. Our compiler, generates for each assertion (e.g., precondition, normal or exceptional postcondition, and invariants) the advice responsible for instrumenting the assertion. Moreover, Our contracts instrumentation must be on aspect per class, I mean one aspect association per-object association. Because that, We need to reference them in a single pointcut (not anonymous) to use the perthis().
About the AspectJ advice, specially after advice, As we use normal or exceptional postcondition (When a method terminates by throwing an exception) testing, we actually use both after returning and after throwing advice. Because the simple after advice always execute no matters ... Thus, We thought to use it instead using the two kinds of after advice. The main problem is that we cannot handling the exception, because we need to know the type of the exception thrown (If it is a assertion violation exception or a simple exception thrown by a method). If you don´t mind, I can change more information about my research and Would be my pleasure If you can help me (discussing more issues about how can I improve my work). Thanks for the help!!! best regards! On Nov 13, 2007 2:00 PM, < [EMAIL PROTECTED]> wrote: > Send aspectj-users mailing list submissions to > [email protected] > > To subscribe or unsubscribe via the World Wide Web, visit > https://dev.eclipse.org/mailman/listinfo/aspectj-users > or, via email, send a message with subject or body 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of aspectj-users digest..." > > > Today's Topics: > > 1. Re: "About AspectJ creation and After advice" (Ramnivas Laddad) > 2. Re: Why i get java.lang.NoSuchFieldError ? (Andy Clement) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Tue, 13 Nov 2007 10:19:36 -0500 > From: "Ramnivas Laddad" < [EMAIL PROTECTED]> > Subject: Re: [aspectj-users] "About AspectJ creation and After advice" > To: [email protected] > Message-ID: > < [EMAIL PROTECTED]> > Content-Type: text/plain; charset="iso-8859-1" > > For question 1: Why not use named pointcuts? Then, if you want, you can > create one more named pointcut combining the 20 pointcuts and used it in > perthis(). > > For question 2: There isn't a way to handle exception in plain after > advice. > Why do you want to do this? > > -Ramnivas > > On Nov 12, 2007 9:45 PM, Henrique Mostaert <[EMAIL PROTECTED]> wrote: > > > Dear AspectJ users, > > > > I have simple two questions about AspectJ. > > > > > > - About AspectJ creation (association), we have the "per-object > > association", which associates a separate aspect instance with the > execution > > object > > (this) for the join point matching the pointcut specified inside > > perthis(). However, suppose we have an Aspect with twenty (20) > *anonymous > > **pointcut*. > > > > Question 1: Is there any way to perform the perthis() for this > > Aspect without explicit all the 20 *anonymous **pointcut* inside the > > perthis()? > > > > - About After advice, we have two more kinds of after advice besides > > the simpler one. One of them is the After throwing -- that is > responsible to > > add behavior when the intercepted method throws an exception. We also > can > > verify the kind of the exception thrown: *after() throwing(Throwable > > throwable), by using thowable inside the advice's body.* > > > > Question 2: I know the uses of after advice (after, after > > returning and after throwing). However, I really want If there exists > any > > way to handler an exception (or verify the kind > > of exception thrown) using a simple after > > advice (no using after throwing). > > > > > > Best regards! > > > > -- > > Henrique Mostaert > > _______________________________________________ > > aspectj-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > https://dev.eclipse.org/mailman/listinfo/aspectj-users/attachments/20071113/102d8415/attachment.html > > ------------------------------ > > Message: 2 > Date: Tue, 13 Nov 2007 16:25:18 +0000 > From: "Andy Clement" < [EMAIL PROTECTED]> > Subject: Re: [aspectj-users] Why i get java.lang.NoSuchFieldError ? > To: [email protected] > Message-ID: > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1 > > You must ensure the aspect type representing the XML concrete aspect > itself is woven. See these two bugs in bugzilla: > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=166647 > > https://bugs.eclipse.org/bugs/show_bug.cgi?id=186322 > > What is the name you are giving your generated aspect? Is it being > put into the package 'org.objectweb.jonas.webapp.jonasadmin..*' which > would enable it to be included by the <weaver> include statement? > > Andy. > > On 13/11/2007, Jean-Louis PASTUREL > < [EMAIL PROTECTED]> wrote: > > > > > > > > > > I complete my post : > > > > This pointcut : > > > > expression="within(org.objectweb.jonas.webapp.jonasadmin..* ) > > AND call(public * > > org.objectweb.jonas.webapp.jonasadmin..*(..)) AND > > !cflowbelow(call(public * > > org.objectweb.jonas.webapp.jonasadmin..*(..)) ) "? > > > > > > > > > > > > doesn't work with the element <weaver> filled like this : > > > > <weaver> > > > > <include > > within="org.objectweb.jonas.webapp.jonasadmin..*"/> > > > > </weaver> > > > > > > > > > > When I comment the include tag, it runs ! but there are error send to > > console : > > > > > > > > [EMAIL PROTECTED] ] error can't determine superclass of missing type > > org.objec > > > > tweb.jonas_ws.deployment.lib.MappingFileManager > > > > when weaving type > > org.objectweb.jonas_ws.deployment.api.ServiceRefDesc > > > > when weaving classes > > > > when weaving > > > > [Xlint:cantFindType] > > > > [EMAIL PROTECTED] error can't determine superclass of missing type > > org.objec > > > > tweb.jonas_ws.deployment.lib.MappingFileManager > > > > when weaving type > > org.objectweb.jonas_ws.deployment.api.ServiceRefDesc > > > > when weaving classes > > > > when weaving > > > > > > > > Is there a precedence between the within clause of > aspctj/concrete-aspect > > tag and the within clause of weaver/include tag ? > > > > Cordialement / Best regards > > > > Jean-Louis PASTUREL > > > > > > > > ________________________________ > > > > > > De : [EMAIL PROTECTED] > > [mailto: [EMAIL PROTECTED] De la part de > > Jean-Louis PASTUREL > > Envoyé : mardi 13 novembre 2007 09:04 > > À : [email protected] > > Objet : [aspectj-users] Why i get java.lang.NoSuchFieldError ? > > > > > > > > > > HI > > > > I get this Exception > > java.lang.NoSuchFieldError:ajc$cfowCounter$0 > > > > With a pointcut defined in aop.xml like this : > > > > expression="within(org.objectweb.jonas.webapp.jonasadmin..*) > > AND call(public * > > org.objectweb.jonas.webapp.jonasadmin..*(..)) AND > > !cflowbelow(call(public * > > org.objectweb.jonas.webapp.jonasadmin..* (..)) ) "? > > > > > > > > When i remove the !cflowbelow(..) condition there is no error. > > > > With AspectJ lastbuild : > > aspectj-DEVELOPMENT-20071112180727.jar. Running on Windows > > XP, JRockit 1.5.0_11 > > > > > > > > > > > > Cordialement / Best regards > > > > Jean-Louis PASTUREL > > > > > > > > ********************************* > > This message and any attachments (the "message") are confidential and > > intended solely for the addressees. > > Any unauthorised use or dissemination is prohibited. > > Messages are susceptible to alteration. > > France Telecom Group shall not be liable for the message if altered, > > changed or falsified. > > If you are not the intended addressee of this message, please cancel it > > immediately and inform the sender. > > ******************************** > > > > ********************************* > > This message and any attachments (the "message") are confidential and > > intended solely for the addressees. > > Any unauthorised use or dissemination is prohibited. > > Messages are susceptible to alteration. > > France Telecom Group shall not be liable for the message if altered, > > changed or falsified. > > If you are not the intended addressee of this message, please cancel it > > immediately and inform the sender. > > ******************************** > > > > _______________________________________________ > > 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 > > > End of aspectj-users Digest, Vol 33, Issue 15 > ********************************************* > -- Henrique Mostaert, Departamento de Sistemas Computacionais, UPE http://www.dsc.upe.br/~hemr <http://www.dsc.upe.br/%7Ehemr>
_______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
