[java] create method reference from usage: prefer non-static methods (IDEA-278074)

GitOrigin-RevId: 84e0fd64f0697df44cbaf6a7b8174fcd42ece504
This commit is contained in:
Anna Kozlova
2021-09-20 14:23:34 +02:00
committed by intellij-monorepo-bot
parent bbc9f06505
commit d19e2011be
3 changed files with 50 additions and 29 deletions

View File

@@ -0,0 +1,14 @@
// "Create method 'fooBar'" "true"
interface I {
String str(Container c);
}
class FooBar {
{
I i = Container::fooBar;
}
}
class Container{
public String fooBar() {
return null;
}
}

View File

@@ -0,0 +1,10 @@
// "Create method 'fooBar'" "true"
interface I {
String str(Container c);
}
class FooBar {
{
I i = Container::foo<caret>Bar;
}
}
class Container{}