Enum Class MergedAnnotations.SearchStrategy
java.lang.Object
java.lang.Enum<MergedAnnotations.SearchStrategy>
org.springframework.core.annotation.MergedAnnotations.SearchStrategy
- All Implemented Interfaces:
Serializable
,Comparable<MergedAnnotations.SearchStrategy>
,Constable
- Enclosing interface:
- MergedAnnotations
Search strategies supported by
MergedAnnotations.from(AnnotatedElement, SearchStrategy)
.
Each strategy creates a different set of aggregates that will be
combined to create the final MergedAnnotations
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionFind only directly declared annotations, without considering@Inherited
annotations and without searching superclasses or implemented interfaces.Find all directly declared annotations as well as any@Inherited
superclass annotations.Find all directly declared and superclass annotations.Perform a full search of the entire type hierarchy, including superclasses and implemented interfaces.Perform a full search of the entire type hierarchy on the source and any enclosing classes. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static MergedAnnotations.SearchStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DIRECT
Find only directly declared annotations, without considering@Inherited
annotations and without searching superclasses or implemented interfaces. -
INHERITED_ANNOTATIONS
Find all directly declared annotations as well as any@Inherited
superclass annotations. This strategy is only really useful when used withClass
types since the@Inherited
annotation is ignored for all other annotated elements. This strategy does not search implemented interfaces. -
SUPERCLASS
Find all directly declared and superclass annotations. This strategy is similar toINHERITED_ANNOTATIONS
except the annotations do not need to be meta-annotated with@Inherited
. This strategy does not search implemented interfaces. -
TYPE_HIERARCHY
Perform a full search of the entire type hierarchy, including superclasses and implemented interfaces. Superclass annotations do not need to be meta-annotated with@Inherited
. -
TYPE_HIERARCHY_AND_ENCLOSING_CLASSES
Perform a full search of the entire type hierarchy on the source and any enclosing classes. This strategy is similar toTYPE_HIERARCHY
except that enclosing classes are also searched. Superclass annotations do not need to be meta-annotated with@Inherited
. When searching aMethod
source, this strategy is identical toTYPE_HIERARCHY
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-