Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Replace void with return this

If a setter has been weaved to return this instead of void, can non-aspect client code use that to chain main executions ?


Hemal


  • From: matthew@xxxxxxxxxxxxxxx<....>
To: aspectj-users@xxxxxxxxxxx<aspectj-users@xxxxxxxxxxx>
Sent: Thursday, June 6, 2013
Subject: Re: [aspectj-users] Replace void with return this

Only to provide the builder pattern to chain method executions, especially WRT setters.


On Wed, Jun 5, 2013 at 1:41 PM, Andy Clement <....> wrote:
Well with modifying the bytecode anything is possible. But whether it fits into the remit of AspectJ I'm not sure.  What is your use case?

Andy


On 4 June 2013 09:10, Matthew Adams <matthew@xxxxxxxxxxxxxxx> wrote:
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
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users




--
mailto:matthew@xxxxxxxxxxxxxxx 
skype:matthewadams12
googletalk:matthew@xxxxxxxxxxxxxxx
http://matthewadams.me
http://www.linkedin.com/in/matthewadams

Back to the top