30
30
* Provides {@link AnnotationTypeMapping} information for a single source
31
31
* annotation type. Performs a recursive breadth first crawl of all
32
32
* meta-annotations to ultimately provide a quick way to map the attributes of
33
- * root {@link Annotation}.
33
+ * a root {@link Annotation}.
34
34
*
35
35
* <p>Supports convention based merging of meta-annotations as well as implicit
36
36
* and explicit {@link AliasFor @AliasFor} aliases. Also provides information
@@ -81,14 +81,12 @@ private void addAllMappings(Class<? extends Annotation> annotationType) {
81
81
}
82
82
83
83
private void addMetaAnnotationsToQueue (Deque <AnnotationTypeMapping > queue , AnnotationTypeMapping source ) {
84
- Annotation [] metaAnnotations =
85
- AnnotationsScanner .getDeclaredAnnotations (source .getAnnotationType (), false );
84
+ Annotation [] metaAnnotations = AnnotationsScanner .getDeclaredAnnotations (source .getAnnotationType (), false );
86
85
for (Annotation metaAnnotation : metaAnnotations ) {
87
86
if (!isMappable (source , metaAnnotation )) {
88
87
continue ;
89
88
}
90
- Annotation [] repeatedAnnotations = this .repeatableContainers
91
- .findRepeatedAnnotations (metaAnnotation );
89
+ Annotation [] repeatedAnnotations = this .repeatableContainers .findRepeatedAnnotations (metaAnnotation );
92
90
if (repeatedAnnotations != null ) {
93
91
for (Annotation repeatedAnnotation : repeatedAnnotations ) {
94
92
if (!isMappable (source , metaAnnotation )) {
@@ -103,9 +101,7 @@ private void addMetaAnnotationsToQueue(Deque<AnnotationTypeMapping> queue, Annot
103
101
}
104
102
}
105
103
106
- private void addIfPossible (Deque <AnnotationTypeMapping > queue ,
107
- AnnotationTypeMapping source , Annotation ann ) {
108
-
104
+ private void addIfPossible (Deque <AnnotationTypeMapping > queue , AnnotationTypeMapping source , Annotation ann ) {
109
105
addIfPossible (queue , source , ann .annotationType (), ann );
110
106
}
111
107
@@ -183,21 +179,20 @@ static AnnotationTypeMappings forAnnotationType(Class<? extends Annotation> anno
183
179
static AnnotationTypeMappings forAnnotationType (
184
180
Class <? extends Annotation > annotationType , AnnotationFilter annotationFilter ) {
185
181
186
- return forAnnotationType (annotationType ,
187
- RepeatableContainers .standardRepeatables (), annotationFilter );
182
+ return forAnnotationType (annotationType , RepeatableContainers .standardRepeatables (), annotationFilter );
188
183
}
189
184
190
185
/**
191
186
* Create {@link AnnotationTypeMappings} for the specified annotation type.
192
187
* @param annotationType the source annotation type
188
+ * @param repeatableContainers the repeatable containers that may be used by
189
+ * the meta-annotations
193
190
* @param annotationFilter the annotation filter used to limit which
194
191
* annotations are considered
195
192
* @return type mappings for the annotation type
196
193
*/
197
- static AnnotationTypeMappings forAnnotationType (
198
- Class <? extends Annotation > annotationType ,
199
- RepeatableContainers repeatableContainers ,
200
- AnnotationFilter annotationFilter ) {
194
+ static AnnotationTypeMappings forAnnotationType (Class <? extends Annotation > annotationType ,
195
+ RepeatableContainers repeatableContainers , AnnotationFilter annotationFilter ) {
201
196
202
197
if (repeatableContainers == RepeatableContainers .standardRepeatables ()) {
203
198
return standardRepeatablesCache .computeIfAbsent (annotationFilter ,
@@ -207,8 +202,7 @@ static AnnotationTypeMappings forAnnotationType(
207
202
return noRepeatablesCache .computeIfAbsent (annotationFilter ,
208
203
key -> new Cache (repeatableContainers , key )).get (annotationType );
209
204
}
210
- return new AnnotationTypeMappings (repeatableContainers , annotationFilter ,
211
- annotationType );
205
+ return new AnnotationTypeMappings (repeatableContainers , annotationFilter , annotationType );
212
206
}
213
207
214
208
static void clearCache () {
0 commit comments