Class InterceptorBindingQualifier<T>
- Type Parameters:
T- The bean type
- All Implemented Interfaces:
Qualifier<T>
io.micronaut.aop.InterceptorBinding annotations of an interception point.
A binding names the binding annotation and, when it binds members, the members are compared on the occurrences
of the binding annotation found on each side, see resolveBoundOccurrences(AnnotationValue, AnnotationMetadata).
An interceptor bound by name only applies wherever its binding annotation does.
- Since:
- 3.0.0
- Author:
- graemerocher
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic booleananyMatch(Collection<AnnotationValue<?>> occurrences, Collection<AnnotationValue<?>> otherOccurrences) Whether any occurrence of one side is the same annotation as any occurrence of the other, every member compared with the defaults filled in.static booleanbindingValuesMatch(@Nullable AnnotationValue<?> interceptorValues, @Nullable AnnotationValue<?> interceptPointValues) Whether two binding occurrences are the same annotation.booleandoesQualify(Class<T> beanType, BeanType<T> candidate) Check if the candidate qualifies.booleaninthashCode()static @Nullable List<AnnotationValue<?>> resolveBoundOccurrences(AnnotationValue<?> binding, @Nullable AnnotationMetadata annotationMetadata) The occurrences of the binding annotation a binding compares members with, in the given metadata.static @Nullable List<AnnotationValue<?>> resolveBoundOccurrences(AnnotationValue<?> binding, @Nullable AnnotationMetadata annotationMetadata, boolean declaredOverrides) The occurrences of the binding annotation a binding compares members with, in the given metadata.toString()Methods inherited from class FilteringQualifier
doesQualify, doesQualifyQualified, filter, filterQualified, getIndexedArgument, reduceMethods inherited from interface Qualifier
contains, doesQualify, qualify
-
Field Details
-
META_BINDING_VALUES
The member of a binding written by earlier versions of the framework, carrying a copy of the occurrence of the binding annotation the binding was declared through. Members are now compared on the occurrences themselves, which a binding annotation retains, and the copy is only read where it is still present.- See Also:
-
META_MEMBER_INTERCEPTOR_TYPE
- See Also:
-
-
Method Details
-
doesQualify
-
resolveBoundOccurrences
@Internal public static @Nullable List<AnnotationValue<?>> resolveBoundOccurrences(AnnotationValue<?> binding, @Nullable AnnotationMetadata annotationMetadata) The occurrences of the binding annotation a binding compares members with, in the given metadata.nullwhen the binding does not bind members, or when the metadata holds no occurrence of the binding annotation: such a binding matches by name. Otherwise the occurrences of the binding annotation, declared on the element or composed by another annotation and retained on it, with the members markedio.micronaut.context.annotation.NonBindingleft out. A binding written by an earlier version of the framework carries a copy of its occurrence, which is used as is.- Parameters:
binding- The interceptor bindingannotationMetadata- The metadata of the element the binding was declared on- Returns:
- The occurrences to compare, or
nullto compare by name - Since:
- 5.2.0
-
resolveBoundOccurrences
@Internal public static @Nullable List<AnnotationValue<?>> resolveBoundOccurrences(AnnotationValue<?> binding, @Nullable AnnotationMetadata annotationMetadata, boolean declaredOverrides) The occurrences of the binding annotation a binding compares members with, in the given metadata.- Parameters:
binding- The interceptor bindingannotationMetadata- The metadata of the element the binding was declared ondeclaredOverrides- Whether, for a hierarchy such as a method under its class, an occurrence declared on the most specific element replaces the ones above it, the way the bindings themselves are resolved for an interception point- Returns:
- The occurrences to compare, or
nullto compare by name - Since:
- 5.2.0
- See Also:
-
anyMatch
@Internal public static boolean anyMatch(Collection<AnnotationValue<?>> occurrences, Collection<AnnotationValue<?>> otherOccurrences) Whether any occurrence of one side is the same annotation as any occurrence of the other, every member compared with the defaults filled in.- Parameters:
occurrences- The occurrences of one sideotherOccurrences- The occurrences of the other side- Returns:
- Whether one pair matches
- Since:
- 5.2.0
-
bindingValuesMatch
@Internal public static boolean bindingValuesMatch(@Nullable AnnotationValue<?> interceptorValues, @Nullable AnnotationValue<?> interceptPointValues) Whether two binding occurrences are the same annotation.- Parameters:
interceptorValues- The occurrence bound on the interceptorinterceptPointValues- The occurrence at the interception point- Returns:
- Whether the two are the same annotation, or there is nothing bound on the interceptor
-
equals
-
hashCode
-
toString
-