You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Vladimír Oraný (JIRA)" <ji...@apache.org> on 2016/06/02 13:06:59 UTC

[jira] [Closed] (GROOVY-7662) @BindsTo annotation for checking map parameters

     [ https://issues.apache.org/jira/browse/GROOVY-7662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimír Oraný closed GROOVY-7662.
----------------------------------
    Resolution: Duplicate

the solution proposed in GROOVY-7632 looks like a better solution

> @BindsTo annotation for checking map parameters
> -----------------------------------------------
>
>                 Key: GROOVY-7662
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7662
>             Project: Groovy
>          Issue Type: Wish
>          Components: Static Type Checker
>            Reporter: Vladimír Oraný
>
> Maybe there is something similar already there but I can remember seeing something like this:
> Currently only way how to create type-safe DSL is to use method calls with normal arguments and a closure with @DelegatesTo.
> I would be great to have annotation similar to @DelegatesTo accepting a single class parameter which will be applied to the Map argument of the method and static type checker will check that there are appropriate setters in the class for the given arguments of the methods.
> As second step, it will be great if we'll be able to incorporate this into most popular IDEs (or at least IntelliJ) for content assist while you're entering these arguments.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)