[aspectj-users] around advice for constructor call

2013-06-04 Thread Sojan Mathew
Hi AspectJ Community Members, I'm using AOP for unit testing purpose. (to replace external dependency). In my app, I'm creating object of ClassA (which is present in external lib). I want to byepass constructor call of ClassA . I tried "call" pointcut and around advice as below, but it is not wor

Re: [aspectj-users] around advice for constructor call

2013-06-04 Thread Alexander Kriegisch
The error message says it: You are intercepting a call which does not return void (but ClassA). Consequently, your around advice should also return ClassA. Alexander Kriegisch Am 04.06.2013 um 11:33 schrieb Sojan Mathew : > Hi AspectJ Community Members, > > I'm using AOP for unit testing purpo

Re: [aspectj-users] around advice for constructor call

2013-06-04 Thread Sojan Mathew
Hi Alexander, Thank you for the reply. Basically what I need is, bypass constructor call. In around advice, from where I can get object to be returned? (I'm NOT calling proceed inside around, to bypass constructor body execution) How can bypass constructor body execution? Regards Sojan

Re: [aspectj-users] around advice for constructor call

2013-06-04 Thread Alexander Kriegisch
Well, Sojan, if you don't know where to get the object from how should I? ;-) I suggest you derive your ClassA by something like ClassAMock and inject it, i.e. use an instance of it as a return value. Mock testing is state of the art and you can easily return a subclass instance if the return va

[aspectj-users] 2nd CFP: 7th LA-WASP (Latin American Workshop on Aspect-Oriented Software Development): Advanced Modularization Techniques

2013-06-04 Thread Henrique RebĂȘlo
* SECOND CALL FOR PAPERS 7th LATIN AMERICAN WORKSHOP ON ASPECT-ORIENTED SOFTWARE DEVELOPMENT: ADVANCED MODULARIZATION TECHNIQUES (LA-WASP.13) September, 29th, 2013, BrasĂ­lia, DF - Brazil http://www2.dc.ufscar.br/~lawasp/2013 Co-

[aspectj-users] Replace void with return this

2013-06-04 Thread Matthew Adams
Can AspectJ replace void return types with 'return this' capability? Basically, for any class T, change void doStuff() {} to T doStuff() { return this; } This has been requested over in pure java land and got deferred. -Matthew Sent from my iPhone ___