java.lang.Object
java.util.EventObject
java.beans.beancontext.BeanContextEvent
java.beans.beancontext.BeanContextMembershipEvent
- 所有实现的接口:
-
Serializable
一个
BeanContextMembershipEvent
封装了添加到特定BeanContext
成员资格或从中移除的子级列表。每当在给定的BeanContext
实例上调用成功的add()、remove()、retainAll()、removeAll()或clear()时,都会触发此事件的实例。对于接收此类型事件的对象必须实现BeanContextMembershipListener
接口,并且必须通过BeanContext
的addBeanContextMembershipListener(BeanContextMembershipListener bcml)
方法注册其意图。
- 自:
- 1.2
- 参见:
-
Field Summary
Fields declared in class java.beans.beancontext.BeanContextEvent
propagatedFrom
Fields declared in class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionBeanContextMembershipEvent
(BeanContext bc, Object[] changes) 构造一个BeanContextMembershipEventBeanContextMembershipEvent
(BeanContext bc, Collection changes) 构造一个BeanContextMembershipEvent -
Method Summary
Methods declared in class java.beans.beancontext.BeanContextEvent
getBeanContext, getPropagatedFrom, isPropagated, setPropagatedFrom
Methods declared in class java.util.EventObject
getSource, toString
-
Field Details
-
children
此事件通知受影响的子级列表。
-
-
Constructor Details
-
BeanContextMembershipEvent
构造一个BeanContextMembershipEvent- 参数:
-
bc
- BeanContext源 -
changes
- 受影响的子级 - 抛出:
-
NullPointerException
- 如果changes
为null
-
BeanContextMembershipEvent
构造一个BeanContextMembershipEvent- 参数:
-
bc
- BeanContext源 -
changes
- 受影响的子级 - 抛出:
-
NullPointerException
- 如果与此事件关联的更改为null。
-
-
Method Details
-
size
public int size()获取受通知影响的子级数量。- 返回:
- 受通知影响的子级数量
-
contains
指定的子级是否受事件影响?- 参数:
-
child
- 要检查是否受影响的对象 - 返回:
-
true
表示受影响,false
表示未受影响
-
toArray
获取受此事件影响的子级数组。- 返回:
- 受影响的子级数组
-
iterator
获取受此事件影响的子级数组。- 返回:
- 受影响的子级数组
-