Package groovy.transform

## Enum AnnotationCollectorMode

- java.lang.Object
- - java.lang.Enum<AnnotationCollectorMode>
  - - groovy.transform.AnnotationCollectorMode

- All Implemented Interfaces:
    `java.io.Serializable`, `java.lang.Comparable<AnnotationCollectorMode>`

      public enum AnnotationCollectorMode
      extends java.lang.Enum<AnnotationCollectorMode>

- - ### Enum Constant Summary

    Enum Constants
    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.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static AnnotationCollectorMode` | `valueOf​(java.lang.String name)` | Returns the enum constant of this type with the specified name.
    `static AnnotationCollectorMode[]` | `values()` | Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### DUPLICATE

          public static final 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.

    - #### PREFER_COLLECTOR

          public static final AnnotationCollectorMode PREFER_COLLECTOR

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

    - #### PREFER_EXPLICIT

          public static final AnnotationCollectorMode PREFER_EXPLICIT

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

    - #### PREFER_COLLECTOR_MERGED

          public static final 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.

    - #### PREFER_EXPLICIT_MERGED

          public static final 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.

  - ### Method Detail

    - #### values

          public static AnnotationCollectorMode[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (AnnotationCollectorMode c : AnnotationCollectorMode.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static AnnotationCollectorMode valueOf​(java.lang.String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
        `java.lang.NullPointerException` - if the argument is null