MergedAnnotationSelector implementations that provide various options
for MergedAnnotation instances.
MergedAnnotations#get(Class, Predicate, MergedAnnotationSelector), MergedAnnotations#get(String, Predicate, MergedAnnotationSelector)
| Modifier and Type | Class and Description |
|---|---|
| private static class | MergedAnnotationSelectors.FirstDirectlyDeclared
|
| private static class | MergedAnnotationSelectors.Nearest
|
| Modifier and Type | Field and Description |
|---|---|
| private static final MergedAnnotationSelector | |
| private static final MergedAnnotationSelector |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static <A extends Annotation> MergedAnnotationSelector | Returns: a selector that picks the first directly declared annotation whenever possibleSelect the first directly declared annotation when possible. |
| public static <A extends Annotation> MergedAnnotationSelector | Returns: a selector that picks the annotation with the lowest distanceSelect the nearest annotation, i.e. the one with the lowest distance. |
| FIRST_DIRECTLY_DECLARED | back to summary |
|---|---|
| private static final MergedAnnotationSelector<?> FIRST_DIRECTLY_DECLARED | |
| NEAREST | back to summary |
|---|---|
| private static final MergedAnnotationSelector<?> NEAREST | |
| MergedAnnotationSelectors | back to summary |
|---|---|
| private MergedAnnotationSelectors() | |
| firstDirectlyDeclared | back to summary |
|---|---|
| public static <A extends Annotation> MergedAnnotationSelector Select the first directly declared annotation when possible. If no direct annotations are declared then the nearest annotation is selected.
| |
| nearest | back to summary |
|---|---|
| public static <A extends Annotation> MergedAnnotationSelector Select the nearest annotation, i.e. the one with the lowest distance.
| |
MergedAnnotationSelector to select the first directly declared
annotation.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | isBestCandidate(MergedAnnotation<Annotation>
the annotation to check annotation)Overrides default org. |
| public MergedAnnotation | select(MergedAnnotation<Annotation>
an existing annotation returned from an earlier result existing, MergedAnnotation<Annotation> a candidate annotation that may be better suited candidate)Implements org. |
| FirstDirectlyDeclared | back to summary |
|---|---|
| private FirstDirectlyDeclared() | |
| isBestCandidate | back to summary |
|---|---|
| public boolean isBestCandidate(MergedAnnotation<Annotation> annotation) Overrides default org. Doc from org. Determine if the existing annotation is known to be the best candidate and any subsequent selections may be skipped.
| |
| select | back to summary |
|---|---|
| public MergedAnnotation Implements org. Doc from org. Select the annotation that should be used.
| |
MergedAnnotationSelector to select the nearest annotation.
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | isBestCandidate(MergedAnnotation<Annotation>
the annotation to check annotation)Overrides default org. |
| public MergedAnnotation | select(MergedAnnotation<Annotation>
an existing annotation returned from an earlier result existing, MergedAnnotation<Annotation> a candidate annotation that may be better suited candidate)Implements org. |
| Nearest | back to summary |
|---|---|
| private Nearest() | |
| isBestCandidate | back to summary |
|---|---|
| public boolean isBestCandidate(MergedAnnotation<Annotation> annotation) Overrides default org. Doc from org. Determine if the existing annotation is known to be the best candidate and any subsequent selections may be skipped.
| |
| select | back to summary |
|---|---|
| public MergedAnnotation Implements org. Doc from org. Select the annotation that should be used.
| |