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>`, `java.lang.constant.Constable`

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

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `java.lang.Enum.EnumDesc<E extends java.lang.Enum<E>>`

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

  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, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

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

- ## Enum Constant Details

  - ### 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 Details

  - ### values

    public static AnnotationCollectorMode[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    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