Most visited

Recently visited

Added in API level 1

EventListenerProxy

public abstract class EventListenerProxy
extends Object implements EventListener

java.lang.Object
   ↳ java.util.EventListenerProxy<T extends java.util.EventListener>
Known Direct Subclasses


EventListener类的抽象包装类, EventListener一组附加参数与侦听器相关联。 子类必须为附加参数或参数提供存储和访问器方法。

例如,支持命名属性的bean将具有两个参数方法签名,用于为属性添加 PropertyChangeListener

 public void addPropertyChangeListener(String propertyName,
                                       PropertyChangeListener listener)
 
If the bean also implemented the zero argument get listener method:
 public PropertyChangeListener[] getPropertyChangeListeners()
 
then the array may contain inner PropertyChangeListeners which are also PropertyChangeListenerProxy objects.

如果调用方法有兴趣检索命名属性,那么它将不得不测试元素以查看它是否是代理类。

Summary

Public constructors

EventListenerProxy(T listener)

为指定的侦听器创建代理。

Public methods

T getListener()

返回与代理关联的侦听器。

Inherited methods

From class java.lang.Object

Public constructors

EventListenerProxy

Added in API level 23
EventListenerProxy (T listener)

为指定的侦听器创建代理。

Parameters
listener T: the listener object

Public methods

getListener

Added in API level 1
T getListener ()

返回与代理关联的侦听器。

Returns
T the listener associated with the proxy

Hooray!