groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dogbert <>
Subject Re: Question about AST Transforms and @DelegatesTo
Date Sun, 25 Sep 2016 13:36:17 GMT
Hi Krzysztof,

That might work, I just have to figure how how to apply that to parameters
in the interface to an AST transform. for example in my case:

@Target([ElementType.TYPE, ElementType.METHOD])
public @interface Enforce {
    Class value()
    Class failure() default {false}
    Class success() default {true}

value, failure and success, are closures in the annotation, and those
closures are eventually delegated to a EnforcerService. So after looking at
the documentation this looks promising:

it's just a matter of if it will accept "value()" as the method and Enforce
as the Class. I'll give it a try and see where I get.


On Sat, Sep 24, 2016 at 6:38 PM, Krzysztof Kowalczyk <> wrote:

> Hi Tucker,
> If you only want some IDE support, would GDSL be enough for you? Example:
> properties-in-a-closure-passed-to-method-of-particular-name/
> GDSL can be put in a jar and should be automatically picked up by Idea,
> like
> in
> Definitions.gdsl
> Regards,
> Krzysztof
> --
> View this message in context: http://groovy.329449.n5.
> tp5735161p5735605.html
> Sent from the Groovy Users mailing list archive at

View raw message