我在的IntelliJ这样的代码:
return collection.stream().anyMatch(annotation ->
method.isAnnotationPresent(annotation));
而编译器告诉我,“method.isAnnotationPresent(注释)”可以与方法的引用替换,我无法弄清楚如何做到这一点,因为它有一个参数。
没有人知道如何做呢?
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句