gwt-mpv-apt icon indicating copy to clipboard operation
gwt-mpv-apt copied to clipboard

Feature request: possibility of passing annotations on to generated action/result classes

Open AndrewGreen opened this issue 13 years ago • 1 comments

In http://turbomanage.wordpress.com/2010/07/12/caching-batching-dispatcher-for-gwt-dispatch/, Stephenh suggested the possibility of marking classes as cacheable. I'd generalize the suggestion: provide some mechanism to pass custom annotations on the spec class through to the generated action and/or result classes.

Thanks again for this, greetings.

AndrewGreen avatar Aug 19 '11 19:08 AndrewGreen

Configuring annotations via annotations is a slippery slope. I know of another annotation processor that has talked about doing that sort of thing and they haven't found a good solution yet (AFAIK).

I think it is simple for no-arg annotations, e.g. @GenDispatch(addAnnotations={Cacheable.NAME}) (ends up having @Cacheable in the generated action code), but when you start thinking about parameters, e.g. trying to get @Cacheable(timeToLive=5) to be in the generated action code, then it gets harder.

I think for now I'd recommend trying the baseAction approach and seeing how that works out.

stephenh avatar Aug 23 '11 04:08 stephenh