You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2015/05/16 08:15:59 UTC

[jira] [Resolved] (GROOVY-7422) @AnnotationCollector could provide more control over how annotations are added in the presence of existing explicit annotations

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

Paul King resolved GROOVY-7422.
-------------------------------
    Resolution: Fixed

> @AnnotationCollector could provide more control over how annotations are added in the presence of existing explicit annotations
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7422
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7422
>             Project: Groovy
>          Issue Type: Improvement
>          Components: xforms
>    Affects Versions: 2.4.3
>            Reporter: Paul King
>            Assignee: Paul King
>             Fix For: 2.5.0-beta-1
>
>
> When expanding a meta annotation alias into its annotation collection, it is sometimes useful to be able to control how annotations are added in particular in the presence of existing explicit annotations. This issue proposes adding an annotation parameter to {{@AnnotationCollection}} which lets the addition of collected annotations be controlled in more flexible ways. The following modes are proposed for @AC:
> {code}
> DUPLICATE: Annotations from the annotation collection will always be inserted. After all transforms have been run, it will be an error if multiple annotations (excluding those with SOURCE retention) exist.
> PREFER_COLLECTOR: Annotations from the collector will be added and any existing annotations with the same name will be removed.
> PREFER_EXPLICIT: Annotations from the collector will be ignored if any existing annotations with the same name are found.
> PREFER_COLLECTOR_MERGED: Annotations from the collector will be added and any existing annotations with the same name will be removed but any new parameters found within existing annotations will be merged into the added annotation.
> PREFER_EXPLICIT_MERGED: Annotations from the collector will be ignored if any existing annotations with the same name are found but any new parameters on the collector annotation will be added to existing annotations.
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)