extract light method object: create class initializer if there is no place to put initializer (IDEA-131912)

This commit is contained in:
Anna Kozlova
2014-10-27 15:40:03 +01:00
parent e473a2ed4d
commit f2257025fa
7 changed files with 115 additions and 4 deletions
@@ -0,0 +1,10 @@
class Sample {
void a() {
System.out.println("");
<caret>}
private int foo() {
return 1;
}
}
@@ -0,0 +1,12 @@
class Sample {
void a() {
class Local {
<caret>}
}
private int foo() {
return 1;
}
}
@@ -0,0 +1,7 @@
class Sample {
static {<caret>}
int foo() {
return 1;
}
}
@@ -0,0 +1,7 @@
class Sample {
int <caret>i = 0;
int foo() {
return 1;
}
}
@@ -0,0 +1,9 @@
class Sample {
public Sample() {
<caret>super();
}
int foo() {
return 1;
}
}