Re: [aspectj-users] Weaving into Java System Libs

2009-07-27 Thread Alex Villazon
Hi, In fact ajc does not restrict weaving into the class library, but the resulting code may break the VM bootstrapping or crash the VM... For LTW, you could implement your own weaving agent using the WeavingAdaptor, and use bcelWorld .performExtraConfiguration ("weaveJavaPackages=t

Re: [aspectj-users] Weaving into Java System Libs

2009-07-22 Thread Alex Villazon
Hi, You can try MAJOR tool which allows you to do exactly that. http://www.inf.unisi.ch/projects/ferrari/MAJOR.html Alex On Jul 22, 2009, at 5:19 PM, Nikolas Nehmer wrote: Hi there, I'm new to AOP and AspectJ in particular. Today I started exploring some simple HelloWorld style exampl

Re: [aspectj-users] inlining

2009-04-30 Thread Alex Villazon
On Apr 30, 2009, at 4:46 PM, Holger Hoffstätte wrote: Alex Villazon wrote: We're looking for a way to inline advice bodies in woven code... I'm curious: why? The only reason I could think of is performance, though this is a slippery slope. I also think you could easily blow

[aspectj-users] inlining

2009-04-30 Thread Alex Villazon
Hi, We're looking for a way to inline advice bodies in woven code... According to this mail http://dev.eclipse.org/mhonarc/lists/aspectj-users/msg03530.html the reason for not doing that is modularity.. I agree that you need to reweave all the code, but isn't there a hidden option to enab

Re: [aspectj-users] Static conditional poincuts

2009-04-21 Thread Alex Villazon
ow describing it as a pointcut) but probably this is not even possible with SCoPE.. The problem is that our application needs to be very fast, and computing dyn joinpoints is already introducing too much perturbation.. Probably there is a nicer way to do that... Alex --a On Tue,

[aspectj-users] Static conditional poincuts

2009-04-21 Thread Alex Villazon
Hi, Is there a mechanism similar to SCoPE http://www.graco.c.u-tokyo.ac.jp/ppp/index.php?Projects%2Fscope implemented (or planned) for AspectJ? This feature seems to be very useful to avoid heavy runtime tests... Any comments? Alex ___ aspec

Re: [aspectj-users] advising java.util classes?

2009-02-23 Thread Alex Villazon
Hi, Yes, you can do that. If you encounter problems (depending which classes of java.util are woven), you can use MAJOR tool, I announced some minutes ago ;-) http://www.inf.unisi.ch/projects/ferrari/MAJOR.html Cheers, Alex On Feb 23, 2009, at 5:41 PM, epicwin...@hotmail.com wrote:

[aspectj-users] MAJOR: New tool for aspect weaving in the Java Standard Library

2009-02-23 Thread Alex Villazon
Dear all, I'm pleased to announce MAJOR (release 0.5), a new tool for aspect weaving into the Java Standard Library (aka JDK classes) http://www.inf.unisi.ch/projects/ferrari/MAJOR.html MAJOR allows you to weave standard AspectJ aspects into the JDK. It uses standard AspectJ weaver and c

Re: [aspectj-users] Re: Extending standard java classes

2008-12-02 Thread Alex Villazon
On Dec 2, 2008, at 3:49 PM, Tassilo Horn wrote: Alex Villazon <[EMAIL PROTECTED]> writes: Hi Alex, What I want to do is to add an interface to some classes. From the documentation I can see how that's done, but unfortunately I want to add this interface to about 10 classes fro

Re: [aspectj-users] Extending standard java classes

2008-12-02 Thread Alex Villazon
On Dec 2, 2008, at 3:17 PM, Tassilo Horn wrote: Hi all, I'm pretty new to AOP, so please excuse me if this is a FAQ, but at least I grepped the FAQs and didn't find an answer. :-) What I want to do is to add an interface to some classes. From the documentation I can see how that's done, but

[aspectj-users] wormhole pattern for benchmarking

2008-11-28 Thread Alex Villazon
Hi, I want to use the wormhole pattern to make some benchmarks of cflow using dacapo.. I don't know if there is a generic wormhole that could be applied to any benchmark, in order to stress the execution of cflow. I was thinking something similar to this one, i.e. to capture the worm

Re: [aspectj-users] Weaving classes in rt.jar

2008-10-23 Thread Alex Villazon
On Oct 23, 2008, at 6:59 PM, Mario Mendez-Lojo wrote: As far as I know, prepending the bootclasspath is the only solution to this problem. You don't necessarily have to use the JDK sources, you can do binary weaving. I should have said that weaving the bytecode is not allowed either, since

Re: [aspectj-users] Weaving classes in rt.jar

2008-10-23 Thread Alex Villazon
Hi, Please check our paper about aspect weaving in the JDK http://portal.acm.org/citation.cfm?doid=1411732.1411754 We are planning a binary demo release within 1 month, and an open source release in early 2009. The underlaying instrumentation framework (FERRARI) is described

[aspectj-users] infinite recursion warning with cflow

2008-09-29 Thread Alex Villazon
Hi, Is it possible to write an aspect that prints a message after a giving number of recursive invocations.. and warns that there is a potential infinite recursion? Or is there any mean to check for example if there is a given sequence of calls in the control flow? Can I write a

Re: [aspectj-users] Excluding join points in body

2008-09-28 Thread Alex Villazon
On Sep 28, 2008, at 4:25 PM, Eric Bodden wrote: Alex, try the following: before() : (set(* *) && !cflow(staticinitialization(*))) { Thanks eric, but I forgot to mention that I'm not allowed to use cflow :-( because I'm trying to reproduce what cflow does... I saw old messages, where i

[aspectj-users] Excluding join points in body

2008-09-28 Thread Alex Villazon
Hi, I want to capture with before() all get, set, call, but to exclude those that happen on the body of the s... I tried with for set aspect Foo { before() : (set(* *) && !staticinitialization(*)) && !within(Foo) { .. } } but it does not work.. I can prevent sets and gets by saying

Re: [aspectj-users] Constructor advice & problem with inlining?

2008-09-08 Thread Alex Villazon
only inside the 'execution' of constructors? Probably with that, I could capture separately the invocations to this/super, so that I do not need to use pre-init? How could I express such a pointcut? Thanks, Alex cheers, Andy. 2008/9/4 Alex Villazon <[EMAIL PROTECTED]<m

[aspectj-users] Constructor advice & problem with inlining?

2008-09-04 Thread Alex Villazon
Hi, I would like to execute some code at the very beginning and the end of every constructor... I'm using preinitialization and after returning as follows. public aspect Foo { pointcut allExecsNews() : execution(*.new(..)) && ! within(Foo) ; pointcut preInit() : preinitiali

Re: [aspectj-users] generics problem: generated method not adviced (bug?)

2008-09-03 Thread Alex Villazon
w how it goes... Many thanks. We will also try to find a solution in our tool to keep compatibility with standard aspectj. Cheers, Alex cheers, Andy. 2008/9/3 Alex Villazon <[EMAIL PROTECTED]> On Sep 3, 2008, at 10:40 PM, Andy Clement wrote: Hi Alex, It is not an optimization,

Re: [aspectj-users] generics problem: generated method not adviced (bug?)

2008-09-03 Thread Alex Villazon
d to debug :-( and we do not have a workaround to easily detect such situations... An option to enable bridge methods to be advised would greatly help. ;-) Many thanks, Alex Andy. 2008/9/3 Alex Villazon <[EMAIL PROTECTED]> Thanks Andy for the rapid answer. If I understood we

Re: [aspectj-users] generics problem: generated method not adviced (bug?)

2008-09-03 Thread Alex Villazon
have 'lost slots' because of the non advised bridge methods, which are very hard to debug :-( I'm not sure if enabling advise of bridge methods could benefit other users but it would be helpful to have such a feature. Cheers, Alex cheers, Andy. 2008/9/3 Alex Villazon

[aspectj-users] generics problem: generated method not adviced (bug?)

2008-09-03 Thread Alex Villazon
Dear all, I have a problem with the following aspect which can advice methods, depending on how it's compiled... public class A implements java.util.Comparator { public int compare(String a, String b) { return 0; } } javac generated a compare(Object, Object) method corresponding t

Re: [aspectj-users] IDT in JDK classes (How to enable java..* weaving?)

2008-08-08 Thread Alex Villazon
java.lang.Comparable java.lang.CharSequence? Thanks Andy & Eric, I was checking the a small (and wrong) subset of JDK classes without considering the interfaces. Everything should be fine then. Many thanks again, Alex Andy. 2008/8/8 Alex Villazon <[EMAIL PROTECTED]> On Aug 8, 2008,

Re: [aspectj-users] IDT in JDK classes (How to enable java..* weaving?)

2008-08-08 Thread Alex Villazon
annotation types, change org/ aspectj/weaver/patterns/DeclareParents.java method maybeGetNewParent(). As Ron says, it can get ugly. Andy. 2008/8/8 Alex Villazon <[EMAIL PROTECTED]> Hi, I'm trying to add an marker interface to JDK classes... If I use: declare parents: * &

[aspectj-users] IDT in JDK classes (How to enable java..* weaving?)

2008-08-08 Thread Alex Villazon
Hi, I'm trying to add an marker interface to JDK classes... If I use: declare parents: * && !java.lang.Object implements myInterface; then, java.* classes are not woven, which is OK for loadtime weaving but should be enabled for static weaving...(as we would like also to weave JDK clas

[aspectj-users] Adding a field to a direct subclass only...

2008-08-08 Thread Alex Villazon
Hi, I'm trying to use ITD to add a field only to a direct subclass of a give class (and not to direct and indirect as aspectj allows by default), but I cannot find the correct expression to do so. The problem is that I have to keep a single value for every instance (ideally I would like t