Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] How to add methods to java.lang.String

Hi,

The bugzilla for bugs/enhancement requests is here:

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ

> JRuby(highly dynamic scripting language) allows to do such meta programming
> with ease.

To me this kind of task is more suitable for a dynamic language (which
allow calling things that aren't really there which are then
intercepted/satisfied at runtime) than for a more statically based
language like AspectJ.

Yes, it could be made to work that if the compiler could see you were
intercepting a method call with an around advice and that around
advice was not calling proceed, then we could in principal treat the
advice as satisfying the invocation.  It isn't trivial to implement
though.  Feel free to raise an enhancement request but without a bunch
of votes I can't see it being implemented imminently.

cheers,
Andy

On 9 June 2012 09:21, MattOng <ongbp@xxxxxxxxx> wrote:
> Hi Henrique,
>
> Anyway to suggest the changes in the weaving process to the AspectJ
> Deverloper and where do I go for such a
> feature change request? Any bugzilla(not that it is a bug), but to enhance
> the user experience of AspectJ?
>
> This is what I would also suggest, just like in the case of call point cut.
> ----------------------------
>       System.out.println("LTRIM:"+mystring.ltrim());  <<< The same weaving
> can be done for non-existing method at the USER class level instead of the
> rt.jar level.
>
> ------------------------------
>
> I believe the semantics of the JVM bytecode is clearly possible because it
> has been prooven by the call point cut and also the previous final class
> example. Just that perhaps a new way to instruct the aspectj compiler to
> weave caller instead of the system library.
>
> JRuby(highly dynamic scripting language) allows to do such meta programming
> with ease.
>
> --
> View this message in context: http://aspectj.2085585.n4.nabble.com/How-to-add-methods-to-java-lang-String-tp4650376p4650387.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top