Re: [T5] class transformation to override an annotated method

2007-06-29 Thread #Cyrille37#
Dan Adams a écrit : @Once public List getFoos() { // do some expensive operation like reading foos from the db } Could you please give us the your @Once annotation source code ? My 2 reasons are : - I'm learning Java so I'll like to see how to write such annotation - It is a really gr

Re: [T5] class transformation to override an annotated method

2007-06-29 Thread Dan Adams
yeah, the docs say that it adds you code to the end of it. I added a ticket: https://issues.apache.org/jira/browse/TAPESTRY-1615 On Fri, 2007-06-29 at 09:30 -0700, Howard Lewis Ship wrote: > You can extend an existing method, but off the top of my head, I can't > remember if that automatically in

Re: [T5] class transformation to override an annotated method

2007-06-29 Thread Howard Lewis Ship
You can extend an existing method, but off the top of my head, I can't remember if that automatically invokes the existing method before executing the new code. I think it does, which would defeat what you are trying to do. On 6/29/07, Howard Lewis Ship <[EMAIL PROTECTED]> wrote: You are correct

Re: [T5] class transformation to override an annotated method

2007-06-29 Thread Howard Lewis Ship
You are correct, ClassTransformation needs the ability to rename a method. On 6/29/07, Dan Adams <[EMAIL PROTECTED]> wrote: Okay, so I'm creating a @Once annotation that when applied to a method like so: @Once public List getFoos() { // do some expensive operation like reading foos from the d

[T5] class transformation to override an annotated method

2007-06-29 Thread Dan Adams
Okay, so I'm creating a @Once annotation that when applied to a method like so: @Once public List getFoos() { // do some expensive operation like reading foos from the db } you can call getFoos() as much as you want and it will only actually execute once, allowing you to reference foos many tim