Skip to content

Commit 9be3279

Browse files
committed
Polishing
1 parent ee20413 commit 9be3279

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

spring-core/src/main/java/org/springframework/core/annotation/MergedAnnotations.java

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,9 @@
115115
*
116116
* // get all ExampleAnnotation declarations (including any meta-annotations) and
117117
* // print the merged "value" attributes
118-
* mergedAnnotations.stream(ExampleAnnotation.class).map(
119-
* a -> a.getString("value")).forEach(System.out::println);
118+
* mergedAnnotations.stream(ExampleAnnotation.class)
119+
* .map(mergedAnnotation -> mergedAnnotation.getString("value"))
120+
* .forEach(System.out::println);
120121
* </pre>
121122
*
122123
* @author Phillip Webb
@@ -152,7 +153,7 @@ public interface MergedAnnotations extends Iterable<MergedAnnotation<Annotation>
152153
* Determine if the specified annotation is directly present.
153154
* <p>Equivalent to calling {@code get(annotationType).isDirectlyPresent()}.
154155
* @param annotationType the annotation type to check
155-
* @return {@code true} if the annotation is present
156+
* @return {@code true} if the annotation is directly present
156157
*/
157158
<A extends Annotation> boolean isDirectlyPresent(Class<A> annotationType);
158159

@@ -161,12 +162,12 @@ public interface MergedAnnotations extends Iterable<MergedAnnotation<Annotation>
161162
* <p>Equivalent to calling {@code get(annotationType).isDirectlyPresent()}.
162163
* @param annotationType the fully qualified class name of the annotation type
163164
* to check
164-
* @return {@code true} if the annotation is present
165+
* @return {@code true} if the annotation is directly present
165166
*/
166167
boolean isDirectlyPresent(String annotationType);
167168

168169
/**
169-
* Return the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
170+
* Get the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
170171
* annotation or meta-annotation of the specified type, or
171172
* {@link MergedAnnotation#missing()} if none is present.
172173
* @param annotationType the annotation type to get
@@ -175,7 +176,7 @@ public interface MergedAnnotations extends Iterable<MergedAnnotation<Annotation>
175176
<A extends Annotation> MergedAnnotation<A> get(Class<A> annotationType);
176177

177178
/**
178-
* Return the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
179+
* Get the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
179180
* annotation or meta-annotation of the specified type, or
180181
* {@link MergedAnnotation#missing()} if none is present.
181182
* @param annotationType the annotation type to get
@@ -188,7 +189,7 @@ <A extends Annotation> MergedAnnotation<A> get(Class<A> annotationType,
188189
@Nullable Predicate<? super MergedAnnotation<A>> predicate);
189190

190191
/**
191-
* Return a matching annotation or meta-annotation of the specified type, or
192+
* Get a matching annotation or meta-annotation of the specified type, or
192193
* {@link MergedAnnotation#missing()} if none is present.
193194
* @param annotationType the annotation type to get
194195
* @param predicate a predicate that must match, or {@code null} if only
@@ -205,7 +206,7 @@ <A extends Annotation> MergedAnnotation<A> get(Class<A> annotationType,
205206
@Nullable MergedAnnotationSelector<A> selector);
206207

207208
/**
208-
* Return the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
209+
* Get the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
209210
* annotation or meta-annotation of the specified type, or
210211
* {@link MergedAnnotation#missing()} if none is present.
211212
* @param annotationType the fully qualified class name of the annotation type
@@ -215,7 +216,7 @@ <A extends Annotation> MergedAnnotation<A> get(Class<A> annotationType,
215216
<A extends Annotation> MergedAnnotation<A> get(String annotationType);
216217

217218
/**
218-
* Return the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
219+
* Get the {@linkplain MergedAnnotationSelectors#nearest() nearest} matching
219220
* annotation or meta-annotation of the specified type, or
220221
* {@link MergedAnnotation#missing()} if none is present.
221222
* @param annotationType the fully qualified class name of the annotation type
@@ -229,7 +230,7 @@ <A extends Annotation> MergedAnnotation<A> get(String annotationType,
229230
@Nullable Predicate<? super MergedAnnotation<A>> predicate);
230231

231232
/**
232-
* Return a matching annotation or meta-annotation of the specified type, or
233+
* Get a matching annotation or meta-annotation of the specified type, or
233234
* {@link MergedAnnotation#missing()} if none is present.
234235
* @param annotationType the fully qualified class name of the annotation type
235236
* to get
@@ -443,7 +444,7 @@ enum SearchStrategy {
443444
/**
444445
* Perform a full search of the entire type hierarchy on the source
445446
* <em>and</em> any enclosing classes. This strategy is similar to
446-
* {@link #TYPE_HIERARCHY} except that {@link Class#getEnclosingClass()
447+
* {@link #TYPE_HIERARCHY} except that {@linkplain Class#getEnclosingClass()
447448
* enclosing classes} are also searched. Superclass annotations do not
448449
* need to be meta-annotated with {@link Inherited @Inherited}. When
449450
* searching a {@link Method} source, this strategy is identical to

0 commit comments

Comments
 (0)