Inline contained/component class?

I'm looking at this situation:

-


public class Outer {
private Inner inner;

public void setInner(Inner inner) { this.inner = inner; }
public Inner getInner() { return inner; )
}

public class Inner {
private int foo;
private String bar;

public void setFoo(int foo) { this.foo = foo; }
public int getFoo() { return foo; )

public void setBar(String bar) { this.bar = bar; }
public String getBar() { return bar; )
}
-



I want to "inline" all the members of Inner into Outer.

In effect, I want to end up with this:
-


public class Outer {
private int foo;
private String bar;

public void setFoo(int foo) { this.foo = foo; }
public int getFoo() { return foo; )

public void setBar(String bar) { this.bar = bar; }
public String getBar() { return bar; )
}

// and remove "Inner" as a separate class
-



Can IDEA somehow help me in automating this refactoring?

Thanks in advance,
-tt

Please sign in to leave a comment.