Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-7662

@BindsTo annotation for checking map parameters

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • None
    • None
    • Static Type Checker
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              musketyr VladimĂ­r OranĂ˝
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: