create method from method reference (IDEA-112556)

This commit is contained in:
Anna Kozlova
2014-04-02 12:43:26 +02:00
parent 702932a6fd
commit cbe0d6d860
12 changed files with 286 additions and 28 deletions

View File

@@ -0,0 +1,13 @@
// "Create Constructor" "true"
class FooBar {
FooBar(int i) {
}
{
Runnable r = FooBar::new;
}
public FooBar() {
}
}

View File

@@ -0,0 +1,10 @@
// "Create Method 'fooBar'" "true"
class FooBar {
{
Runnable r = FooBar::fooBar;
}
private static void fooBar() {
}
}

View File

@@ -0,0 +1,10 @@
// "Create Method 'fooBar'" "true"
class FooBar {
{
Runnable r = this::fooBar;
}
private void fooBar() {
}
}

View File

@@ -0,0 +1,9 @@
// "Create Constructor" "true"
class FooBar {
FooBar(int i) {
}
{
Runnable r = FooBar::ne<caret>w;
}
}

View File

@@ -0,0 +1,6 @@
// "Create Method 'fooBar'" "true"
class FooBar {
{
Runnable r = FooBar::foo<caret>Bar;
}
}

View File

@@ -0,0 +1,6 @@
// "Create Method 'fooBar'" "true"
class FooBar {
{
Runnable r = this::foo<caret>Bar;
}
}