问一个关于this的问题
import java.awt.*;import java.awt.event.*;
import
class MyApp implements ActionListener, Serializable
{
BigObjectThatShouldNotBeSerializedWithAButton bigOne;
Button aButton = new Button();
MyApp()
{
// Oops, now aButton has a listener with a reference
// to bigOne!
aButton.addActionListener(this);
}
public void actionPerformed(ActionEvent e)
{
System.out.println("Hello There");
}
}
jdk文档的这段实例代码,在添加事件监听器里,用了this关键字,这是则么传递的,是this的哪个用法,是调用构造函数还是作为参数传递?