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

@AnnotationCollector could provide more control over how annotations are added in the presence of existing explicit annotations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.4.3
    • 2.5.0-alpha-1
    • xforms
    • None

    Description

      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:

      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.
      

      Attachments

        Activity

          People

            paulk Paul King
            paulk Paul King
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: