[ 
https://issues.apache.org/jira/browse/GROOVY-7671?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eric Milles updated GROOVY-7671:
--------------------------------
    Labels: annotations  (was: )

> AnnotationCollector should be composable/inheritable
> ----------------------------------------------------
>
>                 Key: GROOVY-7671
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7671
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 2.4.5
>            Reporter: Christopher Smith
>            Priority: Major
>              Labels: annotations
>
> I am using annotation collectors to simplify configuration for JPA entities. 
> I would like to have something like this:
> {code}
> @AnnotationCollector
> @Entity
> @CompileStatic
> @JsonIdentityInfo(property = "id", generator = 
> ObjectIdGenerators.PropertyGenerator.class)
> @interface JpaTable {}
> {code}
> {code}
> @AnnotationCollector
> @JpaTable
> @UuidId
> @interface JpaMainEntity {}
> {code}
> However, {{@AnnotationCollector}} can't "roll up" annotations like this; if I 
> make {{JpaTable}} a Java annotation, then the {{@AnnotationCollector}} *on* 
> it is ignored, and if I make it a Groovy annotation, it's elided, and at 
> compile time the processor for {{JpaMainEntity}} complains that {{JpaTable}} 
> is not an annotation.
> Instead, it would be helpful if the collector could operate recursively. This 
> might require reworking how the collector processor currently runs to 
> actually compile it as a {{.class}} instead of discarding it during 
> compilation.



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

Reply via email to