接口 MergedAnnotationSelector<A extends Annotation>
- 类型参数:
A
- the annotation type
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
@FunctionalInterface public interface MergedAnnotationSelector<A extends Annotation>
Strategy interface used to select between twoMergedAnnotation
instances.- 从以下版本开始:
- 5.2
- 作者:
- Phillip Webb
- 另请参阅:
MergedAnnotationSelectors
方法概要
所有方法 实例方法 抽象方法 默认方法 修饰符和类型 方法 说明 default boolean
isBestCandidate(MergedAnnotation<A> annotation)
Determine if the existing annotation is known to be the best candidate and any subsequent selections may be skipped.MergedAnnotation<A>
select(MergedAnnotation<A> existing, MergedAnnotation<A> candidate)
Select the annotation that should be used.
方法详细资料
isBestCandidate
default boolean isBestCandidate(MergedAnnotation<A> annotation)
Determine if the existing annotation is known to be the best candidate and any subsequent selections may be skipped.- 参数:
annotation
- the annotation to check- 返回:
true
if the annotation is known to be the best candidate
select
MergedAnnotation<A> select(MergedAnnotation<A> existing, MergedAnnotation<A> candidate)
Select the annotation that should be used.- 参数:
existing
- an existing annotation returned from an earlier resultcandidate
- a candidate annotation that may be better suited- 返回:
- the most appropriate annotation from the
existing
orcandidate