Enum AnnotationCollectorMode

java.lang.Object
java.lang.Enum<AnnotationCollectorMode>
groovy.transform.AnnotationCollectorMode
All Implemented Interfaces:
Serializable, Comparable<AnnotationCollectorMode>, java.lang.constant.Constable

public enum AnnotationCollectorMode
extends Enum<AnnotationCollectorMode>
  • 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​(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:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null