jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • groovy
  • GROOVY-3952

CLONE -Groovy Support for annotations on local variable declarations: Part II - Allow Local Transforms to process such annotations

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: New Feature New Feature
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 1.7.0
  • Fix Version/s: 1.7.x
  • Component/s: ast builder
  • Labels:
    None
  • Environment:
    All

Description

Groovy should support annotations on local variable declarations. It is syntactically legal to annotate a local variable, but the AST produced does not carry that annotation.

My use case with the AST builder. Either we'd like to annotate a local variable, like this:

@AstSource(CompilePhase.CONVERSION)
def source = { println "compiled on: ${new Date()}" }

Or annotate a property within a closure (which is a DeclarationExpression), like this:

def result = new AstBuilder().build {
           phase = CompilePhase.CONVERSION
           @AstSource
           source = { println "compiled on: ${new Date()}" }
 }

A getAnnotations() method should probably be added to DeclarationExpression to support this.

Issue Links

relates to

New Feature - A new feature of the product, which has yet to be developed. GROOVY-3481 Groovy Support for annotations on local variable declarations

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

  • All
  • Comments
  • Work Log
  • History
  • Activity
There are no comments yet on this issue.

People

  • Assignee:
    Unassigned
    Reporter:
    Paul King
Vote (0)
Watch (0)

Dates

  • Created:
    21/Dec/09 5:40 AM
    Updated:
    21/Dec/09 5:43 AM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.