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

ASTTransformationCustomizer should support raw Expressions for parameters

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.9
    • Fix Version/s: 2.2.1
    • Component/s: None
    • Labels:
      None

      Description

      The ASTTransformationCustomizer only supports basic types for annotation values. It would be good if it could support any Expression too. This would solve this, which is not working:

      new ASTTransformationCustomizer(value:500, unit: TimeUnit.MILLISECONDS, TimedInterrupt)
      

      which could be written this way:

      new ASTTransformationCustomizer(value:500, unit: new PropertyExpression(new ClassExpression(ClassHelper.make(TimeUnit)),'MILLISECONDS'), TimedInterrupt)
      

        Attachments

          Activity

            People

            • Assignee:
              melix Cédric Champeau
              Reporter:
              melix Cédric Champeau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: