Package groovy.transform
Enum AnnotationCollectorMode
- All Implemented Interfaces:
Serializable
,Comparable<AnnotationCollectorMode>
,java.lang.constant.Constable
public enum AnnotationCollectorMode extends Enum<AnnotationCollectorMode>
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends 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(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.
-
Enum Constant Details
-
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.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-