Files
Alexandr Suhinin 0e860160e5 [extract method] fork tests
GitOrigin-RevId: 3aae5c738d48c38144f6a78c36738121831ae5a5
2020-03-31 12:32:01 +00:00

28 lines
554 B
Java

public class ExtractMethods { }
abstract class MyButton
extends JButton
{
protected MyButton( String text ) {
super( text );
}
}
class Foo {
private JButton createOKButton() {
return new MyButton( "OK" ) {
public void actionPerformed( int e ) {
newMethod();
}
private void newMethod() {
setVisible( false );
}
};
}
}
class JButton {
public JButton(String text) {
}
public void setVisible(boolean b) {}
}