88import org .jetbrains .annotations .Nullable ;
99
1010import java .lang .annotation .Annotation ;
11- import java .util .ArrayList ;
12- import java .util .EnumSet ;
13- import java .util .LinkedHashMap ;
14- import java .util .List ;
15- import java .util .Map ;
16- import java .util .Set ;
11+ import java .util .*;
1712
18- import static org .bbottema .javareflection .LookupCaches .CACHED_COMPATIBLE_TARGET_TYPES ;
19- import static org .bbottema .javareflection .LookupCaches .CACHED_REGISTERED_COMPATIBLE_TARGET_TYPES ;
20- import static org .bbottema .javareflection .LookupCaches .addCompatiblesignaturesToCache ;
21- import static org .bbottema .javareflection .LookupCaches .getCachedCompatibleSignatures ;
13+ import static org .bbottema .javareflection .LookupCaches .*;
2214
2315/**
2416 * Utility functions that deal with type information, conversions and autoboxing.
@@ -289,7 +281,7 @@ public static boolean isPackage(final String name) {
289281
290282 /**
291283 * @return Whether a given list of Annotation contains a certain annotation type.
292- * @see #findAnnotation(List , Class)
284+ * @see #findAnnotation(Collection , Class)
293285 */
294286 @ SuppressWarnings ("WeakerAccess" )
295287 public static boolean containsAnnotation (List <Annotation > myListOfAnnotations , Class <? extends Annotation > annotationClass ) {
@@ -300,7 +292,6 @@ public static boolean containsAnnotation(List<Annotation> myListOfAnnotations, C
300292 * @return Whether a given list of Annotation contains a certain annotation type.
301293 * @see #findAnnotation(Annotation[], Class)
302294 */
303- @ SuppressWarnings ("WeakerAccess" )
304295 public static boolean containsAnnotation (Annotation [] myListOfAnnotations , Class <? extends Annotation > annotationClass ) {
305296 return findAnnotation (myListOfAnnotations , annotationClass ) != null ;
306297 }
@@ -311,7 +302,7 @@ public static boolean containsAnnotation(Annotation[] myListOfAnnotations, Class
311302 */
312303 @ SuppressWarnings ({"WeakerAccess" })
313304 @ Nullable
314- public static <T extends Annotation > T findAnnotation (List <Annotation > myListOfAnnotations , Class <T > annotationClass ) {
305+ public static <T extends Annotation > T findAnnotation (Collection <Annotation > myListOfAnnotations , Class <T > annotationClass ) {
315306 return findAnnotation (myListOfAnnotations .toArray (new Annotation [0 ]), annotationClass );
316307 }
317308
0 commit comments