Christopher Smith created GROOVY-11191:
------------------------------------------

             Summary: Control/alias properties for collected annotations
                 Key: GROOVY-11191
                 URL: https://issues.apache.org/jira/browse/GROOVY-11191
             Project: Groovy
          Issue Type: Improvement
          Components: Compiler
    Affects Versions: 4.0.13
            Reporter: Christopher Smith


{{@AnnotationCollector}} automatically and inflexibly maps properties on the 
collection annotation onto the collected annotations. This is particularly 
inconvenient when multiple annotations declare a property {{value()}}:

{code:groovy}
@JsonTypeName // String value()
@CompileStatic // TypeCheckingMode value()
@AnnotationCollector
@interface StaticBody {}
{code}

Currently, the only way to support such behavior is to subclass 
{{AnnotationCollectorTransform}} and hand-write it (and I'm not even sure how, 
since the logic is not simple). It would be immensely helpful to be able to 
declaratively alias or even suppress mapping certain properties onto certain 
collected annotations (e.g., it would solve my use case to be able to skip 
applying {{value()}} to {{CompileStatic}} above).



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to