1
1
/*
2
- * Copyright 2002-2017 the original author or authors.
2
+ * Copyright 2002-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
59
59
* individual method for details on which search algorithm is used.
60
60
*
61
61
* <p><strong>Get semantics</strong> are limited to searching for annotations
62
- * that are either <em>present</em> on an {@code AnnotatedElement} (i.e.,
63
- * declared locally or {@linkplain java.lang.annotation.Inherited inherited})
64
- * or declared within the annotation hierarchy <em>above</em> the
65
- * {@code AnnotatedElement}.
62
+ * that are either <em>present</em> on an {@code AnnotatedElement} (i.e. declared
63
+ * locally or {@linkplain java.lang.annotation.Inherited inherited}) or declared
64
+ * within the annotation hierarchy <em>above</em> the {@code AnnotatedElement}.
66
65
*
67
66
* <p><strong>Find semantics</strong> are much more exhaustive, providing
68
67
* <em>get semantics</em> plus support for the following:
76
75
* </ul>
77
76
*
78
77
* <h3>Support for {@code @Inherited}</h3>
79
- * <p>Methods following <em>get semantics</em> will honor the contract of
80
- * Java's {@link java.lang.annotation.Inherited @Inherited} annotation except
81
- * that locally declared annotations (including custom composed annotations)
82
- * will be favored over inherited annotations. In contrast, methods following
83
- * <em>find semantics</em> will completely ignore the presence of
84
- * {@code @Inherited} since the <em>find</em> search algorithm manually
85
- * traverses type and method hierarchies and thereby implicitly supports
86
- * annotation inheritance without the need for {@code @Inherited}.
78
+ * <p>Methods following <em>get semantics</em> will honor the contract of Java's
79
+ * {@link java.lang.annotation.Inherited @Inherited} annotation except that locally
80
+ * declared annotations (including custom composed annotations) will be favored over
81
+ * inherited annotations. In contrast, methods following <em>find semantics</em>
82
+ * will completely ignore the presence of {@code @Inherited} since the <em>find</em>
83
+ * search algorithm manually traverses type and method hierarchies and thereby
84
+ * implicitly supports annotation inheritance without a need for {@code @Inherited}.
87
85
*
88
86
* @author Phillip Webb
89
87
* @author Juergen Hoeller
@@ -873,7 +871,7 @@ public static <A extends Annotation> Set<A> findMergedRepeatableAnnotations(Anno
873
871
* @param annotationName the fully qualified class name of the annotation
874
872
* type to find (as an alternative to {@code annotationType})
875
873
* @param processor the processor to delegate to
876
- * @return the result of the processor, potentially {@code null}
874
+ * @return the result of the processor ( potentially {@code null})
877
875
*/
878
876
private static <T > T searchWithGetSemantics (AnnotatedElement element , Class <? extends Annotation > annotationType ,
879
877
String annotationName , Processor <T > processor ) {
@@ -892,7 +890,7 @@ private static <T> T searchWithGetSemantics(AnnotatedElement element, Class<? ex
892
890
* @param containerType the type of the container that holds repeatable
893
891
* annotations, or {@code null} if the annotation is not repeatable
894
892
* @param processor the processor to delegate to
895
- * @return the result of the processor, potentially {@code null}
893
+ * @return the result of the processor ( potentially {@code null})
896
894
* @since 4.3
897
895
*/
898
896
private static <T > T searchWithGetSemantics (AnnotatedElement element , Class <? extends Annotation > annotationType ,
@@ -923,7 +921,7 @@ private static <T> T searchWithGetSemantics(AnnotatedElement element, Class<? ex
923
921
* @param processor the processor to delegate to
924
922
* @param visited the set of annotated elements that have already been visited
925
923
* @param metaDepth the meta-depth of the annotation
926
- * @return the result of the processor, potentially {@code null}
924
+ * @return the result of the processor ( potentially {@code null})
927
925
*/
928
926
private static <T > T searchWithGetSemantics (AnnotatedElement element , Class <? extends Annotation > annotationType ,
929
927
String annotationName , Class <? extends Annotation > containerType , Processor <T > processor ,
@@ -984,7 +982,7 @@ private static <T> T searchWithGetSemantics(AnnotatedElement element, Class<? ex
984
982
* @param processor the processor to delegate to
985
983
* @param visited the set of annotated elements that have already been visited
986
984
* @param metaDepth the meta-depth of the annotation
987
- * @return the result of the processor, potentially {@code null}
985
+ * @return the result of the processor ( potentially {@code null})
988
986
* @since 4.2
989
987
*/
990
988
private static <T > T searchWithGetSemanticsInAnnotations (AnnotatedElement element ,
@@ -1053,7 +1051,7 @@ else if (currentAnnotationType == containerType) {
1053
1051
* @param annotationName the fully qualified class name of the annotation
1054
1052
* type to find (as an alternative to {@code annotationType})
1055
1053
* @param processor the processor to delegate to
1056
- * @return the result of the processor, potentially {@code null}
1054
+ * @return the result of the processor ( potentially {@code null})
1057
1055
* @since 4.2
1058
1056
*/
1059
1057
private static <T > T searchWithFindSemantics (AnnotatedElement element , Class <? extends Annotation > annotationType ,
@@ -1073,7 +1071,7 @@ private static <T> T searchWithFindSemantics(AnnotatedElement element, Class<? e
1073
1071
* @param containerType the type of the container that holds repeatable
1074
1072
* annotations, or {@code null} if the annotation is not repeatable
1075
1073
* @param processor the processor to delegate to
1076
- * @return the result of the processor, potentially {@code null}
1074
+ * @return the result of the processor ( potentially {@code null})
1077
1075
* @since 4.3
1078
1076
*/
1079
1077
private static <T > T searchWithFindSemantics (AnnotatedElement element , Class <? extends Annotation > annotationType ,
@@ -1109,7 +1107,7 @@ private static <T> T searchWithFindSemantics(AnnotatedElement element, Class<? e
1109
1107
* @param processor the processor to delegate to
1110
1108
* @param visited the set of annotated elements that have already been visited
1111
1109
* @param metaDepth the meta-depth of the annotation
1112
- * @return the result of the processor, potentially {@code null}
1110
+ * @return the result of the processor ( potentially {@code null})
1113
1111
* @since 4.2
1114
1112
*/
1115
1113
private static <T > T searchWithFindSemantics (AnnotatedElement element , Class <? extends Annotation > annotationType ,
0 commit comments