I have this code in intellij:
return collection.stream().anyMatch(annotation -> method.isAnnotationPresent(annotation));
And the compiler tells me that "method.isAnnotationPresent (annotation)" can be replaced with a reference to a method, and I cannot figure out how to do this because it has an argument.
Does anyone know how to do this?
java reflection intellij-idea java-8 method-reference
Motomine
source share