Package: groovy.transform

## [Java] Enum AnnotationCollectorMode

- groovy.transform.AnnotationCollectorMode

-     public enum AnnotationCollectorMode
      extends Enum

  Conflict resolution modes for AnnotationCollector.

  Since:
    2.0.0

- - ### Enum Constants Summary

    Enum constants classes
    Enum constant | Description
    --- | ---
    `DUPLICATE` | Annotations from the annotation collection will always be inserted.
    `PREFER_COLLECTOR` | Annotations from the collector will be added and any existing annotations with the same name will be removed.
    `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` | Annotations from the collector will be ignored if any existing annotations with the same name are found.
    `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.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Enum` | `compareTo, compareTo, describeConstable, equals, getClass, getDeclaringClass, hashCode, name, notify, notifyAll, ordinal, toString, valueOf, wait, wait, wait`

- - ### Enum Constant Detail

    - #### AnnotationCollectorMode 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.

    - #### AnnotationCollectorMode PREFER_COLLECTOR

      Annotations from the collector will be added and any existing annotations with the same name will be removed.

    - #### AnnotationCollectorMode 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.

    - #### AnnotationCollectorMode PREFER_EXPLICIT

      Annotations from the collector will be ignored if any existing annotations with the same name are found.

    - #### AnnotationCollectorMode 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.