Files
openide/java/java-impl/resources/inspectionDescriptions/MethodRefCanBeReplacedWithLambda.html
2025-02-05 04:43:28 +00:00

17 lines
563 B
HTML

<html>
<body>
Reports method references, like <code>MyClass::myMethod</code> and <code>myObject::myMethod</code>,
and suggests replacing them with an equivalent lambda expression.
<p>Lambda expressions can be easier to modify than method references.</p>
<p>Example:</p>
<pre><code>
System.out::println
</code></pre>
<p>After the quick-fix is applied: </p>
<pre><code>
s -&gt; System.out.println(s)
</code></pre>
<!-- tooltip end -->
<p>By default, this inspection does not highlight the code in the editor, but only provides a quick-fix.</p>
</body>
</html>