From salvador at galvansanchez.com Tue Sep 20 13:07:53 2005 From: salvador at galvansanchez.com (=?iso-8859-1?Q?Salvador_Galv=E1n?=) Date: Thu Mar 23 12:03:27 2006 Subject: [Eos-discuss] initialization class Message-ID: <000001c5be05$d89737f0$0b00a8c0@portatilbori> Hello, I am trying to execute the next source. The pointcut execute when the SourceList is initialized. Inside the aspect (newLooking) creates another instance of SourceList, but I don?t want that this pointcut of initialization will execute if the instance is created in the newLooking method. I have used ?!within? to tried it, but always execute two times the newLooking method. How can I resolve this problem? Thanks Salvador using System.Net.Sockets; using System.Net; public class LookingNeigbors { private SourceList sourceList = null; // Pointcut for new instance of SourceList ( constructor --> public SourceList ()) static after initialization (SourceList.SourceList(..)) && !within(LookingNeigbors) && joinpoint(jp) : call newLooking(Eos.Runtime.IJoinpoint jp); public void newLooking(Eos.Runtime.IJoinpoint jp) { System.Console.WriteLine("*** Initialization LookingNeigbors.newLooking ***"); SourceList sourceList = (SourceList) jp.Target; this.sourceList = sourceList; } } -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/eos-discuss/attachments/20050920/d3b6bc40/attachment.htm From salvador at galvansanchez.com Tue Sep 20 13:08:19 2005 From: salvador at galvansanchez.com (=?iso-8859-1?Q?Salvador_Galv=E1n?=) Date: Thu Mar 23 12:03:27 2006 Subject: [Eos-discuss] ISourceLocation,... Message-ID: <000501c5be05$e7c9c080$0b00a8c0@portatilbori> Hello, How can I take the information of ISourceLocation, IStaticPart and Signature in my classpect? Thanks Salvador -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/eos-discuss/attachments/20050920/83564026/attachment.htm From salvador at galvansanchez.com Fri Sep 23 08:47:47 2005 From: salvador at galvansanchez.com (salvador@galvansanchez.com) Date: Thu Mar 23 12:03:27 2006 Subject: [Eos-discuss] Question about this list Message-ID: <39173.127.0.0.1.1127479667.squirrel@127.0.0.1> Hello, are there any problem with this list? I have post some messages and I have not got answer. Thanks Salvador From sullivan.kevinj at gmail.com Fri Sep 23 08:50:37 2005 From: sullivan.kevinj at gmail.com (Kevin Sullivan) Date: Thu Mar 23 12:03:27 2006 Subject: [Eos-discuss] Question about this list In-Reply-To: <39173.127.0.0.1.1127479667.squirrel@127.0.0.1> References: <39173.127.0.0.1.1127479667.squirrel@127.0.0.1> Message-ID: Hi Salvador, I'm sorry about the delay. Prof. Rajan, who just moved to Iowa State University, usually handles these requests. Perhaps there's a break in the e-mail pipeline somewhere. Prof. Rajan, are you getting these requests? Kevin Sullivan On 9/23/05, salvador@galvansanchez.com wrote: > Hello, > are there any problem with this list? > I have post some messages and I have not got answer. > > Thanks > Salvador > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@ares.cs.Virginia.EDU > http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/eos-discuss > -- Kevin Sullivan From hridesh at cs.iastate.edu Fri Sep 23 14:07:01 2005 From: hridesh at cs.iastate.edu (Hridesh Rajan) Date: Thu Mar 23 12:03:28 2006 Subject: [Eos-discuss] initialization class Message-ID: <200509231807.j8NI78lK017072@mail.cs.iastate.edu> Hi Salvador, Thanks for using Eos, and I apologize for the delayed response. I think you are trying to capture the constructor call join point as opposed to constructor execution join point ?initialization? . As of today, we do not provide ?constructor call? join point in Eos; however, you can solve your problem by using a Boolean variable inside the newLooking method. On entering the method set check the value of the variable, if it is set immediately return, otherwise set that variable logic and when done reset it back before you return. We will try to provide constructor call join point in future releases. Best, Rajan On 9/20/05, Salvador Galv?n wrote: > > > Hello, > > I am trying to execute the next source. > > The pointcut execute when the SourceList is initialized. Inside the aspect > (newLooking) creates another instance of SourceList, but I don?t want that > this pointcut of initialization will execute if the instance is created in > the newLooking method. > > > > I have used ?!within? to tried it, but always execute two times the > newLooking method. > > How can I resolve this problem? > > > > Thanks > > Salvador > > > > using System.Net.Sockets; > > using System.Net; > > > > public class LookingNeigbors { > > > > private SourceList sourceList = null; > > > > // Pointcut for new instance of SourceList ( constructor ? public > SourceList ()) > > static after initialization (SourceList.SourceList(..)) && > !within(LookingNeigbors) && joinpoint(jp) : call > newLooking(Eos.Runtime.IJoinpoint jp); > > > > > > public void newLooking(Eos.Runtime.IJoinpoint jp) > > { > > System.Console.WriteLine("*** Initialization > LookingNeigbors.newLooking ***"); > > SourceList sourceList = (SourceList) jp.Target; > > this.sourceList = sourceList; > > } > > > > } > > > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@ares.cs.Virginia.EDU > http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/eos-discuss > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/eos-discuss/attachments/20050923/0071d8a6/attachment.htm From hridesh at cs.iastate.edu Fri Sep 23 14:31:45 2005 From: hridesh at cs.iastate.edu (Hridesh Rajan) Date: Thu Mar 23 12:03:28 2006 Subject: [Eos-discuss] ISourceLocation,... Message-ID: <200509231831.j8NIVqlK001166@mail.cs.iastate.edu> Salvador, You can use the ?joinpoint? pointcut to extract the reflective information at the join point similar to the code in your last message. The IJoinPoint interface provides Signature, StaticPart, and Location properties to extract these reflective variables. These features are documented in the release note of version 0.3 that you can find in the doc directory of your Eos installation. Thanks, Rajan On 9/20/05, Salvador Galv?n wrote: > > > > > Hello, > > How can I take the information of ISourceLocation, IStaticPart and Signature > in my classpect? > > > > Thanks > > Salvador > _______________________________________________ > Eos-discuss mailing list > Eos-discuss@ares.cs.Virginia.EDU > http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/eos-discuss > > > Hridesh Rajan Assistant Professor Department of Computer Science Iowa State University Phone: +1-515-294-6168 211 Nuclear Engg Building Fax: +1-515-294-0258 Ames, IA E-Mail: hridesh@cs.iastate.edu 50010-1041, USA URL: http://www.cs.iastate.edu/~hridesh [Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message and kindly notify the sender by reply email. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information in this message that do not relate to the official business of my organization shall be understood as neither given nor endorsed.] -------------- next part -------------- An HTML attachment was scrubbed... URL: http://www.cs.Virginia.EDU/pipermail/eos-discuss/attachments/20050923/a7ceb670/attachment.htm From salvador at galvansanchez.com Wed Sep 28 06:25:41 2005 From: salvador at galvansanchez.com (salvador@galvansanchez.com) Date: Thu Mar 23 12:03:28 2006 Subject: [Eos-discuss] initialization ... Message-ID: <46958.127.0.0.1.1127903141.squirrel@cpanel04.gzo.com> Hello, I am tryng do this with Eos. I want to catch the created object (new()) and call some methods of this object inside the advice. How can I do that? This is the snippet in AspectJ I want to do and the snippet in Eos that I do. // AspectJ public aspect LookingNeigbors { private SourceList sourceList = null; pointcut newLooking(SourceList sourceList) : initialization (SourceList.new()) && target(sourceList); after(SourceList sourceList): newLooking(sourceList){ this.sourceList = sourceList; } } // Eos 0.3 public class LookingNeigbors { private SourceList sourceList = null; static after initialization (SourceList.SourceList(..)) && !within(LookingNeigbors) && joinpoint(jp) : call newLooking(Eos.Runtime.IJoinpoint jp); public void newLooking(Eos.Runtime.IJoinpoint jp) { this.sourceList = (SourceList) jp.Args[0]; } } From hridesh at cs.iastate.edu Wed Sep 28 10:14:07 2005 From: hridesh at cs.iastate.edu (Hridesh Rajan) Date: Thu Mar 23 12:03:28 2006 Subject: [Eos-discuss] initialization ... In-Reply-To: <46958.127.0.0.1.1127903141.squirrel@cpanel04.gzo.com> Message-ID: <200509281414.j8SEE3lK015015@mail.cs.iastate.edu> This code should do the job. You also might have to use the fully qualified name of SourceList. The difference is that initialization is treated as an execution join point in Eos, not a call join point as in AspectJ. The call join point has a target object, execution join point does not. In this case, however, you can access the currently executing object. // Eos 0.3 public class LookingNeigbors { private SourceList sourceList = null; static after initialization (SourceList.SourceList(..)) && this(sourceList) : call newLooking(SourceList sourceList); public void newLooking(SourceList sourceList) { this.sourceList = sourceList; } } -----Original Message----- From: eos-discuss-bounces@cs.virginia.edu [mailto:eos-discuss-bounces@cs.virginia.edu] On Behalf Of salvador@galvansanchez.com Sent: Wednesday, September 28, 2005 5:26 AM To: eos-discuss@ares.cs.Virginia.EDU Subject: [Eos-discuss] initialization ... Hello, I am tryng do this with Eos. I want to catch the created object (new()) and call some methods of this object inside the advice. How can I do that? This is the snippet in AspectJ I want to do and the snippet in Eos that I do. // AspectJ public aspect LookingNeigbors { private SourceList sourceList = null; pointcut newLooking(SourceList sourceList) : initialization (SourceList.new()) && target(sourceList); after(SourceList sourceList): newLooking(sourceList){ this.sourceList = sourceList; } } // Eos 0.3 public class LookingNeigbors { private SourceList sourceList = null; static after initialization (SourceList.SourceList(..)) && !within(LookingNeigbors) && joinpoint(jp) : call newLooking(Eos.Runtime.IJoinpoint jp); public void newLooking(Eos.Runtime.IJoinpoint jp) { this.sourceList = (SourceList) jp.Args[0]; } } _______________________________________________ Eos-discuss mailing list Eos-discuss@ares.cs.Virginia.EDU http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/eos-discuss