groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <keeganw...@gmail.com>
Subject Re: Always add no-args constructor at compile time
Date Mon, 13 Jul 2015 22:24:04 GMT
Sorry, I should have given you the example in the configuration script
syntax

withConfig(configuration) {
    ast(groovy.transform.TupleConstructor, includes:[''])
}


But it doesn't matter, because the transformation removes existing
constructors from the class.  Sorry, I got ahead of myself.

-Keegan

On Mon, Jul 13, 2015 at 5:45 PM, Keegan Witt <keeganwitt@gmail.com> wrote:

> One way that comes to mind offhand would be
>     @groovy.transform.TupleConstructor(includeFields=false,
> includeProperties=false, includeSuperFields=false,
> includeSuperProperties=false)
>
> or
>     @groovy.transform.TupleConstructor(includes=[''])
>
> Anybody know why
>     @groovy.transform.TupleConstructor(includes=[])
> doesn't work?
>
> -Keegan
>
> On Mon, Jul 13, 2015 at 5:34 PM, Nikolay Totomanov <ntotomanov@abv.bg>
> wrote:
>
>> Hello,
>>
>> I need to always add the default constructor to my classes.
>> Is it possible to achieve that using CompilerConfiguration
>>
>> Regards,
>> Nikki
>>
>
>

Mime
View raw message