private static class MergedAnnotationSelectors.FirstDirectlyDeclared extends java.lang.Object implements MergedAnnotationSelector<java.lang.annotation.Annotation>
MergedAnnotationSelector
to select the first directly declared
annotation.Modifier | Constructor and Description |
---|---|
private |
FirstDirectlyDeclared() |
Modifier and Type | Method and Description |
---|---|
boolean |
isBestCandidate(MergedAnnotation<java.lang.annotation.Annotation> annotation)
Determine if the existing annotation is known to be the best
candidate and any subsequent selections may be skipped.
|
MergedAnnotation<java.lang.annotation.Annotation> |
select(MergedAnnotation<java.lang.annotation.Annotation> existing,
MergedAnnotation<java.lang.annotation.Annotation> candidate)
Select the annotation that should be used.
|
public boolean isBestCandidate(MergedAnnotation<java.lang.annotation.Annotation> annotation)
MergedAnnotationSelector
isBestCandidate
in interface MergedAnnotationSelector<java.lang.annotation.Annotation>
annotation
- the annotation to checktrue
if the annotation is known to be the best candidatepublic MergedAnnotation<java.lang.annotation.Annotation> select(MergedAnnotation<java.lang.annotation.Annotation> existing, MergedAnnotation<java.lang.annotation.Annotation> candidate)
MergedAnnotationSelector
select
in interface MergedAnnotationSelector<java.lang.annotation.Annotation>
existing
- an existing annotation returned from an earlier resultcandidate
- a candidate annotation that may be better suitedexisting
or
candidate