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

Provide a way to lookup class nodes from static type checking extension scripts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.1.0-rc-2
    • Static Type Checker
    • None

    Description

      From extension scripts, provide access to a lookup method for classes that would have been defined in the source unit.

      Example, instead of doing this in the script:

      context.source.AST.classes.find { it.name == 'Robot' }
      

      Do the following with the new lookup method:

      lookupClassNodeFor('Robot')
      

      Attachments

        Activity

          People

            guillaume Guillaume Sauthier
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: