类 MergedAnnotationSelectors
- java.lang.Object
- org.springframework.core.annotation.MergedAnnotationSelectors
public abstract class MergedAnnotationSelectors extends Object
MergedAnnotationSelector
implementations that provide various options forMergedAnnotation
instances.- 从以下版本开始:
- 5.2
- 作者:
- Phillip Webb
- 另请参阅:
MergedAnnotations.get(Class, Predicate, MergedAnnotationSelector)
,MergedAnnotations.get(String, Predicate, MergedAnnotationSelector)
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static <A extends Annotation>
MergedAnnotationSelector<A>firstDirectlyDeclared()
Select the first directly declared annotation when possible.static <A extends Annotation>
MergedAnnotationSelector<A>nearest()
Select the nearest annotation, i.e. the one with the lowest distance.
方法详细资料
nearest
public static <A extends Annotation> MergedAnnotationSelector<A> nearest()
Select the nearest annotation, i.e. the one with the lowest distance.- 返回:
- a selector that picks the annotation with the lowest distance
firstDirectlyDeclared
public static <A extends Annotation> MergedAnnotationSelector<A> firstDirectlyDeclared()
Select the first directly declared annotation when possible. If no direct annotations are declared then the nearest annotation is selected.- 返回:
- a selector that picks the first directly declared annotation whenever possible