- java.lang.Object
 -  
      
- java.beans.beancontext.BeanContextChildSupport
 -  
        
- java.beans.beancontext.BeanContextSupport
 
 
 
-  
       
- 实现的所有接口
 -  
         
BeanContext,BeanContextChild,BeanContextServiceRevokedListener,BeanContextServicesListener,DesignMode,PropertyChangeListener,VetoableChangeListener,Visibility,Serializable,Iterable,Collection,EventListener 
- 已知直接子类:
 -  
         
BeanContextServicesSupport 
public class BeanContextSupport extends BeanContextChildSupport implements BeanContext, Serializable, PropertyChangeListener, VetoableChangeListener
此助手类提供java.beans.beancontext.BeanContext接口的实用程序实现。由于此类直接实现BeanContext接口,因此该类可以通过子类化此实现来使用,也可以通过从另一个实例对该类的实例进行临时委派来使用。
- 从以下版本开始:
 - 1.2
 - 另请参见:
 - Serialized Form
 
 
-  
        
       
-  
             
嵌套类汇总
嵌套类 变量和类型 类 描述 protected classBeanContextSupport.BCSChildprotected static classBeanContextSupport.BCSIteratorprotected final子类,它封装了一个迭代器,但实现了一个noop remove()方法。 
-  
             
字段汇总
字段 变量和类型 字段 描述 protected ArrayList<BeanContextMembershipListener>bcmListeners所有对protected ArrayList bcmListeners字段的访问都应在该对象上同步。protected HashMap<Object,BeanContextSupport.BCSChild>children所有对protected HashMap children字段的访问都应在该对象上同步。protected booleandesignTimeboolean指示此对象当前是否处于设计时模式。protected Localelocale此BeanContext的当前语言环境。protected booleanokToUseGuiboolean指示此实例现在是否可以呈现GUI。-  
               
声明的属性在类 java.beans.beancontext.BeanContextChildSupport
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport 
-  
               
Fields declared in interface java.beans.beancontext.BeanContext
globalHierarchyLock 
-  
               
Fields declared in interface java.beans.DesignMode
PROPERTYNAME 
 -  
               
 
-  
             
构造方法摘要
构造方法 构造器 描述 BeanContextSupport()创建一个不是另一个对象委托的实例BeanContextSupport(BeanContext peer)使用默认语言环境创建实例BeanContextSupport(BeanContext peer, Locale lcle)使用指定的区域设置创建实例BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)使用指定的区域设置和设计模式创建实例。BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)构造BeanContextSupport实例 
-  
             
方法摘要
所有方法 静态方法 实例方法 具体的方法 变量和类型 方法 描述 booleanadd(Object targetChild)在这个BeanContext添加/嵌套一个孩子。booleanaddAll(Collection c)添加到子集(不支持)实现的集合必须在层次结构锁和“children”受保护字段上同步voidaddBeanContextMembershipListener(BeanContextMembershipListener bcml)添加BeanContextMembershipListenerbooleanavoidingGui()用于确定BeanContext子级是否正在避免使用其GUI。protected Iterator<BeanContextSupport.BCSChild>bcsChildren()返回此BeanContext的所有子项的迭代器。protected voidbcsPreDeserializationHook(ObjectInputStream ois)在defaultReadObject()之后但在反序列化任何子级之前由readObject调用。protected voidbcsPreSerializationHook(ObjectOutputStream oos)在defaultWriteObject()之后但在序列化当前可序列化的子级之前由writeObject调用。protected voidchildDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)由readObject与新反序列化的子项和BCSChild调用。protected voidchildJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)子类可以覆盖此方法,以便在添加子项之后和事件通知发生之前简单地扩展add()语义。protected voidchildJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)子类可以重写此方法,以便在删除子项之后和事件通知发生之前简单地扩展remove()语义。protected static booleanclassEquals(类<?> first, 类<?> second)测试两个类对象或它们的名称是否相等。voidclear()清除子(不支持)实现必须在层次结构锁和“children”受保护字段上同步booleancontains(Object o)确定指定的对象当前是否为此BeanContext的子BeanContext。booleancontainsAll(Collection c)测试以查看指定的Collection中的所有对象是否为此BeanContext子BeanContext。booleancontainsKey(Object o)确定指定的对象当前是否为此BeanContext的子BeanContext。protected Object[]copyChildren()获取此BeanContext的子项的副本。protected BeanContextSupport.BCSChildcreateBCSChild(Object targetChild, Object peer)子类可以重写此方法以插入自己的Child子类,而不必覆盖add()或其他将子项添加到集合的Collection方法。protected voiddeserialize(ObjectInputStream ois, Collection coll)readObject用于反序列化集合。voiddontUseGui()通知此实例它可能不再呈现GUI。protected voidfireChildrenAdded(BeanContextMembershipEvent bcme)在BeanContextMembershipListener接口上触发BeanContextshipEventprotected voidfireChildrenRemoved(BeanContextMembershipEvent bcme)在BeanContextMembershipListener接口上触发BeanContextshipEventBeanContextgetBeanContextPeer()获取此对象为其提供实现的BeanContext的实例。protected static BeanContextChildgetChildBeanContextChild(Object child)获取指定子级的BeanContextChild(如果有)protected static BeanContextMembershipListenergetChildBeanContextMembershipListener(Object child)获取指定子级的BeanContextMembershipListener(如果有)protected static PropertyChangeListenergetChildPropertyChangeListener(Object child)获取指定子级的PropertyChangeListener(如果有)protected static SerializablegetChildSerializable(Object child)获取与指定Child关联的Serializable(如果有)protected static VetoableChangeListenergetChildVetoableChangeListener(Object child)获取指定子级的VetoableChangeListener(如果有)protected static VisibilitygetChildVisibility(Object child)获取与指定子项关联的Component(如果有)。LocalegetLocale()获取此BeanContext的语言环境。URLgetResource(String name, BeanContextChild bcc)与java.lang.ClassLoader.getResource(),此方法允许BeanContext实现在子Component和基础ClassLoader之间插入行为。InputStreamgetResourceAsStream(String name, BeanContextChild bcc)与java.lang.ClassLoader.getResourceAsStream(),此方法允许BeanContext实现插入子Component与底层ClassLoader之间的行为。protected voidinitialize()从构造函数和readObject调用的protected方法,用于初始化BeanContextSupport实例的临时状态。ObjectinstantiateChild(String beanName)instantiateChild方法是BeanContext中的一个便利钩子,用于简化将嵌套的Bean实例化为BeanContext。booleanisDesignTime()报告此对象当前是否处于设计时模式。booleanisEmpty()报告此BeanContext是否为空。booleanisSerializing()这是BeanContext正在序列化吗?Iterator<Object>iterator()获取当前嵌套在此BeanContext中的所有JavaBean或BeanContext实例。booleanneedsGui()通常从环境调用此方法,以确定实现者是否“需要”GUI。voidokToUseGui()通知此实例它现在可以呈现GUIvoidpropertyChange(PropertyChangeEvent pce)子类可以封装以监视子属性更改。voidreadChildren(ObjectInputStream ois)当此类的实例用作BeanContext协议(及其子协议)的实现的委托时,在反序列化期间存在“鸡和蛋”问题booleanremove(Object targetChild)从此BeanContext中删除子项。protected booleanremove(Object targetChild, boolean callChildSetBC)内部删除在由意外setBeanContext或remove()调用引起的删除时使用。booleanremoveAll(Collection c)删除所有指定的子(不支持)实现必须在层次结构锁和“children”受保护字段上同步voidremoveBeanContextMembershipListener(BeanContextMembershipListener bcml)删除BeanContextMembershipListenerbooleanretainAll(Collection c)仅保留指定的子项(不支持)实现必须在层次结构锁和“children”受保护字段上同步protected voidserialize(ObjectOutputStream oos, Collection<?> coll)由writeObject用于序列化Collection。voidsetDesignTime(boolean dTime)设置此BeanContext的新设计时间值。voidsetLocale(Locale newLocale)设置此BeanContext的语言环境。intsize()获取当前嵌套在此BeanContext中的子节点数。Object[]toArray()获取当前嵌套在此BeanContext中的所有JavaBean或BeanContext实例。Object[]toArray(Object[] arry)获取一个数组,其中包含此BeanContext中与BeanContext中包含的类型匹配的所有子项。protected booleanvalidatePendingAdd(Object targetChild)此类的子类可以覆盖或封装此方法,以便为BeanContext添加验证行为,以便在将子对象添加到BeanContext之前立即检查它们。protected booleanvalidatePendingRemove(Object targetChild)此类的子类可以覆盖或包含此方法,以便为BeanContext添加验证行为,以便在将子对象从BeanContext中删除之前立即检查它们。voidvetoableChange(PropertyChangeEvent pce)子类可以封装以监视否决子属性更改。voidwriteChildren(ObjectOutputStream oos)用于序列化这BeanContext所有孩子。-  
               
声明方法的类 java.beans.beancontext.BeanContextChildSupport
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext 
-  
               
声明方法的类 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
-  
               
声明方法的接口 java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext 
-  
               
声明方法的接口 java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
字段详细信息
-  
children
protected transient HashMap<Object,BeanContextSupport.BCSChild> children
所有对protected HashMap children字段的访问都应在该对象上同步。 
-  
bcmListeners
protected transient ArrayList<BeanContextMembershipListener> bcmListeners
所有对protected ArrayList bcmListeners字段的访问都应在该对象上同步。 
-  
locale
protected Locale locale
此BeanContext的当前语言环境。 
-  
okToUseGui
protected boolean okToUseGui
boolean指示此实例现在是否可以呈现GUI。 
-  
designTime
protected boolean designTime
boolean指示该对象当前是否处于设计时模式。 
 -  
 
-  
             
构造方法详细信息
-  
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
构造BeanContextSupport实例- 参数
 -  
              
peer-对等BeanContext我们提供了一个实现,或null如果此对象是它自己的同 -  
              
lcle- 此BeanContext的当前Locale。 如果lcle是null,则将默认区域设置分配给BeanContext实例。 -  
              
dTime-初始状态,true如果在设计模式中,false如果运行时。 -  
              
visible- 初始可见性。 - 另请参见:
 -  
              
Locale.getDefault(),Locale.setDefault(java.util.Locale) 
 
-  
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
使用指定的区域设置和设计模式创建实例。- 参数
 -  
              
peer- 对等BeanContext我们正在提供实现,或null如果此对象是其自己的对等端 -  
              
lcle- 该lcle的当前位置和当前BeanContext。 如果lcle是null,null将默认语言环境分配给BeanContext实例。 -  
              
dtime-初始状态,true如果在设计模式中,false如果运行时。 - 另请参见:
 -  
              
Locale.getDefault(),Locale.setDefault(java.util.Locale) 
 
-  
BeanContextSupport
public BeanContextSupport(BeanContext peer, Locale lcle)
使用指定的区域设置创建实例- 参数
 -  
              
peer- 我们正在为其提供实现的对等BeanContext,如果此对象是其自己的对等方,null -  
              
lcle- 此BeanContext的当前BeanContext。 如果lcle是null,null将默认语言环境分配给BeanContext实例。 - 另请参见:
 -  
              
Locale.getDefault(),Locale.setDefault(java.util.Locale) 
 
-  
BeanContextSupport
public BeanContextSupport(BeanContext peer)
使用默认语言环境创建实例- 参数
 -  
              
peer- 对等BeanContext我们正在提供实现,或null如果此对象是其自己的对等方 
 
-  
BeanContextSupport
public BeanContextSupport()
创建一个不是另一个对象委托的实例 
 -  
 
-  
             
方法详细信息
-  
getBeanContextPeer
public BeanContext getBeanContextPeer()
获取此对象为其提供实现的BeanContext的实例。- 结果
 - BeanContext实例
 
 
-  
instantiateChild
public Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
instantiateChild方法是BeanContext中的一个便利钩子,用于简化将嵌套的Bean实例化为
BeanContext。beanName参数的语义由java.beans.Beans.instantiate定义。
- Specified by:
 -  
              
instantiateChild在接口BeanContext - 参数
 -  
              
beanName- 要在此BeanContext中实例化的Bean的名称 - 结果
 - 新的对象
 - 异常
 -  
              
IOException- 如果反序列化bean时出现I / O错误 -  
              
ClassNotFoundException- 如果找不到beanName参数标识的类 
 
-  
size
public int size()
获取当前嵌套在此BeanContext中的子节点数。- Specified by:
 -  
              
size在界面Collection - 结果
 - 儿童人数
 
 
-  
isEmpty
public boolean isEmpty()
报告此BeanContext是否为空。 当BeanContext包含零嵌套子项时,它被视为空。- Specified by:
 -  
              
isEmptyin界面Collection - 结果
 - 如果没有孩子
 
 
-  
contains
public boolean contains(Object o)
确定指定的对象当前是否为此BeanContext的子BeanContext。- Specified by:
 -  
              
contains在界面Collection - 参数
 -  
              
o- 有问题的对象 - 结果
 - 如果这个对象是孩子
 
 
-  
containsKey
public boolean containsKey(Object o)
确定指定的对象当前是否为此BeanContext的子BeanContext。- 参数
 -  
              
o- 有问题的对象 - 结果
 - 如果这个对象是孩子
 
 
-  
iterator
public Iterator<Object> iterator()
获取当前嵌套在此BeanContext中的所有JavaBean或BeanContext实例。- Specified by:
 -  
              
iteratorin界面Collection - Specified by:
 -  
              
iteratorin界面Iterable - 结果
 - 
               一个 
              
Iterator嵌套的孩子 
 
-  
toArray
public Object[] toArray()
获取当前嵌套在此BeanContext中的所有JavaBean或BeanContext实例。- Specified by:
 -  
              
toArrayin interfaceCollection - 结果
 - 
               一个数组,其 
              runtime component type是 
              
Object,包含此集合中的所有元素 
 
-  
toArray
public Object[] toArray(Object[] arry)
获取一个数组,其中包含此BeanContext中与BeanContext中包含的类型匹配的所有子项。- Specified by:
 -  
              
toArray,接口Collection - 参数
 -  
              
arry- 感兴趣的对象类型数组。 - 结果
 - 一系列的孩子
 
 
-  
createBCSChild
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
子类可以重写此方法以插入自己的Child子类,而不必覆盖add()或其他将子项添加到集合的Collection方法。
- 参数
 -  
              
targetChild- 代表孩子创建孩子 -  
              
peer- 如果tragetChild和peer通过BeanContextProxy的实现相关,则为peer - 结果
 - Child的子类型特定子类,不覆盖集合方法
 
 
-  
add
public boolean add(Object targetChild)
在这个BeanContext添加/嵌套一个孩子。作为java.beans.Beans.instantiate()的副作用调用。 如果子对象无法添加,则此方法将抛出IllegalStateException。
- Specified by:
 -  
              
add在界面Collection - 参数
 -  
              
targetChild- 要在此BeanContext嵌套的子对象 - 结果
 - 如果已成功添加子项,则为true。
 - 另请参见:
 -  
              
validatePendingAdd(java.lang.Object) 
 
-  
remove
public boolean remove(Object targetChild)
从此BeanContext中删除子项。 如果子对象不是用于添加,则此方法将抛出IllegalStateException。- Specified by:
 -  
              
remove在界面Collection - 参数
 -  
              
targetChild- 要删除的子对象 - 结果
 -  
              
true如果由于此调用而删除了某个元素 - 另请参见:
 -  
              
validatePendingRemove(java.lang.Object) 
 
-  
remove
protected boolean remove(Object targetChild, boolean callChildSetBC)
删除由意外setBeanContext或remove()调用引起的内部删除。- 参数
 -  
              
targetChild- 要删除的JavaBean,BeanContext或Object -  
              
callChildSetBC- 用于表示应通知孩子它不再嵌套在此BeanContext。 - 结果
 - 在被移除之前是否存在
 
 
-  
containsAll
public boolean containsAll(Collection c)
测试以查看指定的Collection中的所有对象是否为此BeanContext子BeanContext。- Specified by:
 -  
              
containsAllin interfaceCollection - 参数
 -  
              
c- 指定的Collection - 结果
 -  
              
true如果集合中的所有对象都是此BeanContext子对象,BeanContextfalse,否则为false。 - 另请参见:
 -  
              
Collection.contains(Object) 
 
-  
addAll
public boolean addAll(Collection c)
添加到子集(不支持)实现的集合必须在层次结构锁和“children”受保护字段上同步- Specified by:
 -  
              
addAll接口Collection - 参数
 -  
              
c- 包含要添加到此集合的元素的集合 - 结果
 - 
               此实现无条件抛出 
              
UnsupportedOperationException - 异常
 -  
              
UnsupportedOperationException- 由此实现无条件抛出 - 另请参见:
 -  
              
Collection.add(Object) 
 
-  
removeAll
public boolean removeAll(Collection c)
删除所有指定的子(不支持)实现必须在层次结构锁和“children”受保护字段上同步- Specified by:
 -  
              
removeAllin interfaceCollection - 参数
 -  
              
c- 包含要从此集合中删除的元素的集合 - 结果
 - 
               这个实现无条件抛出 
              
UnsupportedOperationException - 异常
 -  
              
UnsupportedOperationException- 由此实现无条件抛出 - 另请参见:
 -  
              
Collection.remove(Object),Collection.contains(Object) 
 
-  
retainAll
public boolean retainAll(Collection c)
仅保留指定的子项(不支持)实现必须在层次结构锁和“children”受保护字段上同步- Specified by:
 -  
              
retainAllin interfaceCollection - 参数
 -  
              
c- 包含要在此集合中保留的元素的集合 - 结果
 - 
               此实现无条件抛出 
              
UnsupportedOperationException - 异常
 -  
              
UnsupportedOperationException- 由此实现无条件抛出 - 另请参见:
 -  
              
Collection.remove(Object),Collection.contains(Object) 
 
-  
clear
public void clear()
清除子(不支持)实现必须在层次结构锁和“children”受保护字段上同步- Specified by:
 -  
              
clear接口Collection - 异常
 -  
              
UnsupportedOperationException- 由此实现无条件抛出 
 
-  
addBeanContextMembershipListener
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
添加BeanContextMembershipListener- Specified by:
 -  
              
addBeanContextMembershipListener在接口BeanContext - 参数
 -  
              
bcml- 要添加的BeanContextMembershipListener - 异常
 -  
              
NullPointerException- 如果参数为null 
 
-  
removeBeanContextMembershipListener
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
删除BeanContextMembershipListener- Specified by:
 -  
              
removeBeanContextMembershipListenerin interfaceBeanContext - 参数
 -  
              
bcml- 要删除的BeanContextMembershipListener - 异常
 -  
              
NullPointerException- 如果参数为null 
 
-  
getResourceAsStream
public InputStream getResourceAsStream(String name, BeanContextChild bcc)
从界面复制的说明:BeanContext与java.lang.ClassLoader.getResourceAsStream(),此方法允许BeanContext实现在子Component和基础ClassLoader之间插入行为。- Specified by:
 -  
              
getResourceAsStreamin interfaceBeanContext - 参数
 -  
              
name- 请求的资源的名称。 -  
              
bcc- 发出请求的子对象。 - 结果
 - 请求的资源作为InputStream
 - 异常
 -  
              
NullPointerException- 如果参数为null 
 
-  
getResource
public URL getResource(String name, BeanContextChild bcc)
从界面复制的说明:BeanContext与java.lang.ClassLoader.getResource(),此方法允许BeanContext实现插入子Component与底层ClassLoader之间的行为。- Specified by:
 -  
              
getResource在界面BeanContext - 参数
 -  
              
name- 请求的资源的名称。 -  
              
bcc- 发出请求的子对象。 - 结果
 - 请求的资源作为InputStream
 
 
-  
setDesignTime
public void setDesignTime(boolean dTime)
设置此BeanContext的新设计时间值。- Specified by:
 -  
              
setDesignTime在接口DesignMode - 参数
 -  
              
dTime- 新的designTime值 - 另请参见:
 -  
              
BeanContext,BeanContextMembershipListener,PropertyChangeEvent 
 
-  
isDesignTime
public boolean isDesignTime()
报告此对象当前是否处于设计时模式。- Specified by:
 -  
              
isDesignTimein interfaceDesignMode - 结果
 -  
              
true如果在设计时模式下,如果没有false 
 
-  
setLocale
public void setLocale(Locale newLocale) throws PropertyVetoException
设置此BeanContext的语言环境。- 参数
 -  
              
newLocale- 新的语言环境。 如果newLocale是null则此方法调用null。 - 异常
 -  
              
PropertyVetoException- 如果新值被拒绝 
 
-  
getLocale
public Locale getLocale()
获取此BeanContext的语言环境。- 结果
 -  
              
BeanContext的当前区域设置 
 
-  
needsGui
public boolean needsGui()
通常从环境调用此方法,以确定实现者是否“需要”GUI。
这里使用的算法测试BeanContextPeer及其当前子节点,以确定它们是容器,组件,还是它们实现可见性并返回needsGui()== true。
- Specified by:
 -  
              
needsGuiin interfaceVisibility - 结果
 -  
              
true如果实现者需要GUI 
 
-  
dontUseGui
public void dontUseGui()
通知此实例它可能不再呈现GUI。- Specified by:
 -  
              
dontUseGui在界面Visibility 
 
-  
okToUseGui
public void okToUseGui()
通知此实例它现在可以呈现GUI- Specified by:
 -  
              
okToUseGui在界面Visibility 
 
-  
avoidingGui
public boolean avoidingGui()
用于确定BeanContext子级是否正在避免使用其GUI。- Specified by:
 -  
              
avoidingGui在界面Visibility - 结果
 - 这个实例是否避免使用它的GUI?
 - 另请参见:
 -  
              
Visibility 
 
-  
isSerializing
public boolean isSerializing()
这是BeanContext正在序列化吗?- 结果
 - 
               如果此 
              
BeanContext当前正在序列化 
 
-  
bcsChildren
protected Iterator<BeanContextSupport.BCSChild> bcsChildren()
返回此BeanContext的所有子项的迭代器。- 结果
 - 所有当前BCSChild值的迭代器
 
 
-  
bcsPreSerializationHook
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
在defaultWriteObject()之后但在序列化当前可序列化的子级之前由writeObject调用。 子类可以重写此方法,以在此超类序列化子级之前执行其状态的自定义序列化。 但是,子类不应该使用此方法来替换writeObject()的自己的实现(如果有)。- 参数
 -  
              
oos- 序列化期间使用的ObjectOutputStream - 异常
 -  
              
IOException- 如果序列化失败 
 
-  
bcsPreDeserializationHook
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
在defaultReadObject()之后但在反序列化任何子级之前由readObject调用。 子类可以重写此方法,以在此超类反序列化子项之前对其状态执行自定义反序列化。 但是,子类不应该使用此方法来替换它们自己的readObject()实现(如果有)。- 参数
 -  
              
ois- 反序列化期间使用的ObjectInputStream - 异常
 -  
              
IOException- 如果反序列化失败 -  
              
ClassNotFoundException- 如果找不到需要的课程 
 
-  
childDeserializedHook
protected void childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
由readObject与新反序列化的子项和BCSChild调用。- 参数
 -  
              
child- 新反序列化的孩子 -  
              
bcsc- 新反序列化的BCSChild 
 
-  
serialize
protected final void serialize(ObjectOutputStream oos, Collection<?> coll) throws IOException
由writeObject用于序列化Collection。- 参数
 -  
              
oos- 序列化期间使用的ObjectOutputStream -  
              
coll- 要序列化的Collection - 异常
 -  
              
IOException- 如果序列化失败 
 
-  
deserialize
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException
readObject用于反序列化集合。- 参数
 -  
              
ois- 要使用的ObjectInputStream -  
              
coll- 该系列 - 异常
 -  
              
IOException- 如果反序列化失败 -  
              
ClassNotFoundException- 如果找不到需要的课程 
 
-  
writeChildren
public final void writeChildren(ObjectOutputStream oos) throws IOException
用于序列化此BeanContext所有子女。- 参数
 -  
              
oos- 序列化期间使用的ObjectOutputStream - 异常
 -  
              
IOException- 如果序列化失败 
 
-  
readChildren
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException
当此类的实例用作BeanContext协议(及其子协议)的实现的委托时,在反序列化期间存在“鸡和蛋”问题- 参数
 -  
              
ois- 要使用的ObjectInputStream - 异常
 -  
              
IOException- 如果反序列化失败 -  
              
ClassNotFoundException- 如果找不到需要的课程 
 
-  
vetoableChange
public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException
子类可以封装以监视否决子属性更改。- Specified by:
 -  
              
vetoableChange在界面VetoableChangeListener - 参数
 -  
              
pce- 描述事件源和已更改属性的PropertyChangeEvent对象。 - 异常
 -  
              
PropertyVetoException- 如果收件人希望回滚属性更改。 
 
-  
propertyChange
public void propertyChange(PropertyChangeEvent pce)
子类可以封装以监视子属性更改。- Specified by:
 -  
              
propertyChangein interfacePropertyChangeListener - 参数
 -  
              
pce- 描述事件源和已更改的属性的PropertyChangeEvent对象。 
 
-  
validatePendingAdd
protected boolean validatePendingAdd(Object targetChild)
此类的子类可以覆盖或封装此方法,以便为BeanContext添加验证行为,以便在将子对象添加到BeanContext之前立即检查它们。
- 参数
 -  
              
targetChild- 代表孩子创建Child - 结果
 - 如果将子项添加到此BeanContext,则为true,否则为false。
 
 
-  
validatePendingRemove
protected boolean validatePendingRemove(Object targetChild)
此类的子类可以覆盖或包含此方法,以便为BeanContext添加验证行为,以便在将子对象从BeanContext中删除之前立即检查它们。
- 参数
 -  
              
targetChild- 代表孩子创建Child - 结果
 - 如果可以从此BeanContext中删除子项,则为true,否则为false。
 
 
-  
childJustAddedHook
protected void childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
子类可以覆盖此方法,以便在添加子项之后和事件通知发生之前简单地扩展add()语义。 在子进程同步的情况下调用该方法。- 参数
 -  
              
child- 孩子 -  
              
bcsc- BCSChild 
 
-  
childJustRemovedHook
protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
子类可以重写此方法,以便在删除子项之后和事件通知发生之前简单地扩展remove()语义。 在子进程同步的情况下调用该方法。- 参数
 -  
              
child- 孩子 -  
              
bcsc- BCSChild 
 
-  
getChildVisibility
protected static final Visibility getChildVisibility(Object child)
获取与指定子项关联的Component(如果有)。- 参数
 -  
              
child- 指定的子项 - 结果
 - 与指定子项关联的Component(如果有)。
 
 
-  
getChildSerializable
protected static final Serializable getChildSerializable(Object child)
获取与指定Child关联的Serializable(如果有)- 参数
 -  
              
child- 指定的子项 - 结果
 - 与指定Child关联的Serializable(如果有)
 
 
-  
getChildPropertyChangeListener
protected static final PropertyChangeListener getChildPropertyChangeListener(Object child)
获取指定子级的PropertyChangeListener(如果有)- 参数
 -  
              
child- 指定的子项 - 结果
 - 指定子级的PropertyChangeListener(如果有)
 
 
-  
getChildVetoableChangeListener
protected static final VetoableChangeListener getChildVetoableChangeListener(Object child)
获取指定子级的VetoableChangeListener(如果有)- 参数
 -  
              
child- 指定的子项 - 结果
 - 指定子级的VetoableChangeListener(如果有)
 
 
-  
getChildBeanContextMembershipListener
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child)
获取指定子级的BeanContextMembershipListener(如果有)- 参数
 -  
              
child- 指定的子项 - 结果
 - 指定子节点的BeanContextMembershipListener(如果有)
 
 
-  
getChildBeanContextChild
protected static final BeanContextChild getChildBeanContextChild(Object child)
获取指定子级的BeanContextChild(如果有)- 参数
 -  
              
child- 指定的子项 - 结果
 - 指定子节点的BeanContextChild(如果有)
 - 异常
 -  
              
IllegalArgumentException- 如果child实现BeanContextChild和BeanContextProxy 
 
-  
fireChildrenAdded
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme)
在BeanContextMembershipListener接口上触发BeanContextshipEvent- 参数
 -  
              
bcme- 要开火的事件 
 
-  
fireChildrenRemoved
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme)
在BeanContextMembershipListener接口上触发BeanContextshipEvent- 参数
 -  
              
bcme- 要开火的事件 
 
-  
initialize
protected void initialize()
从构造函数和readObject调用的protected方法,用于初始化BeanContextSupport实例的临时状态。 此类使用此方法实例化用于监视子级上的PropertyChange和VetoableChange事件的内部类侦听器。 子类可以包含此方法以添加自己的初始化行为 
-  
copyChildren
protected final Object[] copyChildren()
获取此BeanContext的子项的副本。- 结果
 - 当前嵌套子项的副本
 
 
 -  
 
 -