public class BeanContextSupport extends BeanContextChildSupport implements BeanContext, Serializable, PropertyChangeListener, VetoableChangeListener
由于这类直接实现beancontext接口,类可以,目的是可以通过子类化实现,或者通过另一个该类的实例特别代表团。
Modifier and Type | Class and Description |
---|---|
protected class |
BeanContextSupport.BCSChild |
protected static class |
BeanContextSupport.BCSIterator
最后一类保护封装了迭代器实现空remove()方法。
|
Modifier and Type | Field and Description |
---|---|
protected ArrayList |
bcmListeners
所有的访问的
protected ArrayList bcmListeners 场应同步对象。
|
protected HashMap |
children
所有的访问的
protected HashMap children 场应同步对象。
|
protected boolean |
designTime
一个
boolean指示是否这个对象是当前设计模式。
|
protected Locale |
locale
这beancontext当前区域。
|
protected boolean |
okToUseGui
一个
boolean表示如果这种情况现在可以提供一个GUI。
|
beanContext, beanContextChildPeer, pcSupport, rejectedSetBCOnce, vcSupport
globalHierarchyLock
PROPERTYNAME
Constructor and Description |
---|
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的实例
|
Modifier and Type | Method and Description |
---|---|
boolean |
add(Object targetChild)
添加/窝在这
BeanContext孩子。
|
boolean |
addAll(Collection c)
添加集合到一组儿童(不支持)的实现必须同步的层次结构锁和“儿童”保护的字段
|
void |
addBeanContextMembershipListener(BeanContextMembershipListener bcml)
增加了一个beancontextmembershiplistener
|
boolean |
avoidingGui()
用于确定是否
BeanContext孩子避免使用GUI。
|
protected Iterator |
bcsChildren()
返回所有的孩子这
BeanContext迭代器。
|
protected void |
bcsPreDeserializationHook(ObjectInputStream ois)
被称为后defaultreadobject()但任何儿童反序列化之前readObject。
|
protected void |
bcsPreSerializationHook(ObjectOutputStream oos)
被称为后defaultwriteobject()但目前序列化序列化的writeObject孩子之前。
|
protected void |
childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
所谓的readObject与新反序列化的孩子和bcschild。
|
protected void |
childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
子类可以重写此方法以简单的扩展()语义之后孩子已添加和之前已经发生的事件通知。
|
protected void |
childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
子类可以重写此方法以简单的扩展remove()语义之后孩子已被删除,之前已经发生的事件通知。
|
protected static boolean |
classEquals(类 first, 类 second)
测试,看看两个类对象,或它们的名称是相等的。
|
void |
clear()
清除“层次锁”和“孩子”保护字段中的“孩子”(不支持的)实现必须同步
|
boolean |
contains(Object o)
决定是否指定的对象是目前这一
BeanContext孩子。
|
boolean |
containsAll(Collection c)
测试是否在指定的
Collection所有的对象都是这个
BeanContext儿童。
|
boolean |
containsKey(Object o)
决定是否指定的对象是目前这一
BeanContext孩子。
|
protected Object[] |
copyChildren()
得到一份本beancontext的孩子。
|
protected BeanContextSupport.BCSChild |
createBCSChild(Object targetChild, Object peer)
子类可以重写此方法以插入自己的子类的孩子无需重写()或其他的收集方法,增加孩子的设置。
|
protected void |
deserialize(ObjectInputStream ois, Collection coll)
用readObject反序列化集合。
|
void |
dontUseGui()
通知这个实例,它可能不再呈现一个图形用户界面。
|
protected void |
fireChildrenAdded(BeanContextMembershipEvent bcme)
火beancontextshipevent在beancontextmembershiplistener接口
|
protected void |
fireChildrenRemoved(BeanContextMembershipEvent bcme)
火beancontextshipevent在beancontextmembershiplistener接口
|
BeanContext |
getBeanContextPeer()
获取
BeanContext实例,这个对象提供实施。
|
protected static BeanContextChild |
getChildBeanContextChild(Object child)
得到beancontextchild(如果有)指定的孩子
|
protected static BeanContextMembershipListener |
getChildBeanContextMembershipListener(Object child)
得到beancontextmembershiplistener(如果有)指定的孩子
|
protected static PropertyChangeListener |
getChildPropertyChangeListener(Object child)
得到propertychangelistener(如果有)指定的孩子
|
protected static Serializable |
getChildSerializable(Object child)
获取序列化(如果有的话)与孩子相关的规定
|
protected static VetoableChangeListener |
getChildVetoableChangeListener(Object child)
得到vetoablechangelistener(如果有)指定的孩子
|
protected static Visibility |
getChildVisibility(Object child)
获取与指定的子关联的组件(如果有的话)。
|
Locale |
getLocale()
获取此
BeanContext现场。
|
URL |
getResource(String name, BeanContextChild bcc)
类似于
java.lang.ClassLoader.getResource() ,此方法允许一个
BeanContext 实施干预行为之间的孩子
Component 和潜在的
ClassLoader 。
|
InputStream |
getResourceAsStream(String name, BeanContextChild bcc)
类似于
java.lang.ClassLoader.getResourceAsStream() ,此方法允许一个
BeanContext 实施干预行为之间的孩子
Component 和潜在的
ClassLoader 。
|
protected void |
initialize()
保护法从构造函数和readObject称BeanContextSupport实例初始化暂态。
|
Object |
instantiateChild(String beanName)
在BeanContext的instantiatechild方法方便钩简化实例化bean,任务嵌套,为
BeanContext。
|
boolean |
isDesignTime()
报告是否此对象在当前处于设计时模式。
|
boolean |
isEmpty()
这
BeanContext报告是否是空的。
|
boolean |
isSerializing()
这是
BeanContext在序列化的过程吗?
|
Iterator |
iterator()
获取所有JavaBean或
BeanContext实例目前嵌套在这
BeanContext。
|
boolean |
needsGui()
这种方法通常是以环境来确定是否实现“需要”一个GUI。
|
void |
okToUseGui()
通知此实例,它可能会呈现一个图形用户界面
|
void |
propertyChange(PropertyChangeEvent pce)
子类可以包络来监视子属性的变化。
|
void |
readChildren(ObjectInputStream ois)
当这个类的一个实例作为一个beancontext协议的实施代表(及其子协议)存在“鸡和蛋”的问题在反序列化期间
|
boolean |
remove(Object targetChild)
从这个beancontext移除一个孩子。
|
protected boolean |
remove(Object targetChild, boolean callChildSetBC)
内部去除使用时去除引起意想不到的
setBeanContext或
remove()调用。
|
boolean |
removeAll(Collection c)
删除所有指定的儿童(不支持的)实现必须同步的层次结构锁和“儿童”保护的字段
|
void |
removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
删除一个beancontextmembershiplistener
|
boolean |
retainAll(Collection c)
只保留指定的儿童(不支持的)实现必须同步的层次结构锁和“儿童”保护的字段
|
protected void |
serialize(ObjectOutputStream oos, Collection coll)
使用writeObject序列化集合。
|
void |
setDesignTime(boolean dTime)
设置此
BeanContext新设计的时间价值。
|
void |
setLocale(Locale newLocale)
设置此beancontext现场。
|
int |
size()
得到孩子的数量目前在这beancontext嵌套。
|
Object[] |
toArray()
获取所有JavaBean或
BeanContext实例目前嵌套在这beancontext。
|
Object[] |
toArray(Object[] arry)
获取一个数组包含所有的孩子这
BeanContext匹配包含在数组类型。
|
protected boolean |
validatePendingAdd(Object targetChild)
这一类的子类可以重写,或信封,这种方法添加的beancontext检查子对象之前被添加到beancontext验证行为。
|
protected boolean |
validatePendingRemove(Object targetChild)
这一类的子类可以重写,或信封,这种方法添加的beancontext检查子对象之前他们从beancontext删除验证行为。
|
void |
vetoableChange(PropertyChangeEvent pce)
子类可以信封监视否决子属性的变化。
|
void |
writeChildren(ObjectOutputStream oos)
用于序列化的所有子
BeanContext。
|
addPropertyChangeListener, addVetoableChangeListener, firePropertyChange, fireVetoableChange, getBeanContext, getBeanContextChildPeer, initializeBeanContextResources, isDelegated, releaseBeanContextResources, removePropertyChangeListener, removeVetoableChangeListener, serviceAvailable, serviceRevoked, setBeanContext, validatePendingSetBeanContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext
equals, hashCode, parallelStream, removeIf, spliterator, stream
protected transient HashMap children
protected HashMap children
场应同步对象。
protected transient ArrayList bcmListeners
protected ArrayList bcmListeners
场应同步对象。
protected Locale locale
protected boolean okToUseGui
protected boolean designTime
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dTime, boolean visible)
peer
-同行
BeanContext我们供应的实现,或
null如果这个对象是自己的同伴
lcle
目前这beancontext现场。如果
lcle是
null,默认区域设置分配给
BeanContext实例。
dTime
-初始状态,
true如果在设计模式中,
false如果运行。
visible
-初始可见性。
Locale.getDefault()
,
Locale.setDefault(java.util.Locale)
public BeanContextSupport(BeanContext peer, Locale lcle, boolean dtime)
peer
-同行
BeanContext我们供应的实现,或
null如果这个对象是自己的同伴
lcle
目前这
BeanContext现场。如果
lcle是
null,默认区域设置分配给
BeanContext实例。
dtime
-初始状态,
true如果在设计模式中,
false如果运行。
Locale.getDefault()
,
Locale.setDefault(java.util.Locale)
public BeanContextSupport(BeanContext peer, Locale lcle)
peer
-同行beancontext我们供应的实现,或
null如果这个对象是自己的同伴
lcle
目前这
BeanContext现场。如果
lcle是
null,默认区域设置分配给
BeanContext实例。
Locale.getDefault()
,
Locale.setDefault(java.util.Locale)
public BeanContextSupport(BeanContext peer)
peer
-同行
BeanContext我们供应的实现,或
null如果这个对象是自己的同伴
public BeanContextSupport()
public BeanContext getBeanContextPeer()
public Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
在BeanContext的instantiatechild方法方便钩简化实例化bean,任务嵌套,为BeanContext。
beanname参数的语义定义的java.beans.beans.instantiate。
instantiateChild
接口
BeanContext
beanName
- bean的名字实例化在这个BeanContext
IOException
-如果有一个I/O错误时,豆子被反序列化
ClassNotFoundException
-如果类的beanname参数确定是找不到的
public int size()
size
接口
Collection
public boolean isEmpty()
isEmpty
接口
Collection
public boolean contains(Object o)
contains
接口
Collection
o
-对象的问题
public boolean containsKey(Object o)
o
-对象的问题
public Iterator iterator()
iterator
接口
Iterable
iterator
接口
Collection
public Object[] toArray()
toArray
接口
Collection
public Object[] toArray(Object[] arry)
toArray
接口
Collection
arry
-感兴趣的对象类型的数组。
protected BeanContextSupport.BCSChild createBCSChild(Object targetChild, Object peer)
子类可以重写此方法以插入自己的子类的孩子无需重写()或其他的收集方法,增加孩子的设置。
targetChild
-孩子代表创造的孩子
peer
-同行如果tragetchild和同行相关的实施beancontextproxy *归亚型特异性类的孩子没有压倒一切的收集方法
public boolean add(Object targetChild)
调用java的一个副作用。豆类。豆类。instantiate()。如果孩子对象无效添加此方法抛出IllegalStateException。
add
接口
Collection
targetChild
-子对象嵌套在这个
BeanContext
validatePendingAdd(java.lang.Object)
public boolean remove(Object targetChild)
remove
接口
Collection
targetChild
的子对象删除
validatePendingRemove(java.lang.Object)
protected boolean remove(Object targetChild, boolean callChildSetBC)
targetChild
的JavaBean,beancontext,或对象被删除
callChildSetBC
-用于表示孩子应该被通知,它不再是嵌套在这
BeanContext。
public boolean containsAll(Collection c)
containsAll
接口
Collection
c
-指定
Collection
Collection.contains(Object)
public boolean addAll(Collection c)
addAll
接口
Collection
c
收集包含的元素被添加到这个集合
UnsupportedOperationException
实施无条件投
UnsupportedOperationException
-扔
Collection.add(Object)
public boolean removeAll(Collection c)
removeAll
接口
Collection
c
收集包含要从集合中删除的元素
UnsupportedOperationException
实施无条件投
UnsupportedOperationException
-扔
Collection.remove(Object)
,
Collection.contains(Object)
public boolean retainAll(Collection c)
retainAll
接口
Collection
c
收集包含元素被保留在这个集合
UnsupportedOperationException
实施无条件投
UnsupportedOperationException
-扔
Collection.remove(Object)
,
Collection.contains(Object)
public void clear()
clear
接口
Collection
UnsupportedOperationException
-扔
public void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
addBeanContextMembershipListener
接口
BeanContext
bcml
- beancontextmembershiplistener添加
NullPointerException
-如果参数为空
public void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
removeBeanContextMembershipListener
接口
BeanContext
bcml
- beancontextmembershiplistener删除
NullPointerException
-如果参数为空
public InputStream getResourceAsStream(String name, BeanContextChild bcc)
BeanContext
java.lang.ClassLoader.getResourceAsStream()
,此方法允许一个
BeanContext
实施干预行为之间的孩子
Component
和潜在的
ClassLoader
。
getResourceAsStream
接口
BeanContext
name
-资源名称要求。
bcc
-子对象发出请求。
NullPointerException
-如果参数为空
public URL getResource(String name, BeanContextChild bcc)
BeanContext
java.lang.ClassLoader.getResource()
,此方法允许一个
BeanContext
实施干预行为之间的孩子
Component
和潜在的
ClassLoader
。
getResource
接口
BeanContext
name
-资源名称要求。
bcc
-子对象发出请求。
public void setDesignTime(boolean dTime)
setDesignTime
接口
DesignMode
dTime
-新的设计时间价值
BeanContext
,
BeanContextMembershipListener
,
PropertyChangeEvent
public boolean isDesignTime()
isDesignTime
接口
DesignMode
public void setLocale(Locale newLocale) throws PropertyVetoException
newLocale
-新的现场。这个方法的调用将如果newlocale是
null
没有影响。
PropertyVetoException
如果新值被拒绝
public Locale getLocale()
public boolean needsGui()
这种方法通常是以环境来确定是否实现“需要”一个GUI。
该算法所采用的测试beancontextpeer,及其目前的孩子是否是容器、组件,或者如果他们执行并返回needsgui() = =真的能见度。
needsGui
接口
Visibility
public void dontUseGui()
dontUseGui
接口
Visibility
public void okToUseGui()
okToUseGui
接口
Visibility
public boolean avoidingGui()
avoidingGui
接口
Visibility
Visibility
public boolean isSerializing()
protected Iterator bcsChildren()
protected void bcsPreSerializationHook(ObjectOutputStream oos) throws IOException
oos
-
ObjectOutputStream
使用序列化期间
IOException
如果序列化失败
protected void bcsPreDeserializationHook(ObjectInputStream ois) throws IOException, ClassNotFoundException
ois
-
ObjectInputStream
使用在反序列化期间
IOException
如果反序列化失败
ClassNotFoundException
-如果没有找到所需要的类
protected void childDeserializedHook(Object child, BeanContextSupport.BCSChild bcsc)
child
-新反序列化的孩子
bcsc
-新反序列化bcschild
protected final void serialize(ObjectOutputStream oos, Collection coll) throws IOException
oos
-
ObjectOutputStream使用序列化期间
coll
-
Collection序列化
IOException
如果序列化失败
protected final void deserialize(ObjectInputStream ois, Collection coll) throws IOException, ClassNotFoundException
ois
-对象输入流使用
coll
-集合
IOException
如果反序列化失败
ClassNotFoundException
-如果没有找到所需要的类
public final void writeChildren(ObjectOutputStream oos) throws IOException
oos
-
ObjectOutputStream使用序列化期间
IOException
如果序列化失败
public final void readChildren(ObjectInputStream ois) throws IOException, ClassNotFoundException
ois
-对象输入流使用
IOException
如果反序列化失败
ClassNotFoundException
-如果没有找到所需要的类
public void vetoableChange(PropertyChangeEvent pce) throws PropertyVetoException
vetoableChange
接口
VetoableChangeListener
pce
-
PropertyChangeEvent
对象描述事件源和性质已经改变。
PropertyVetoException
-如果收件人的祝福属性改变被回滚。
public void propertyChange(PropertyChangeEvent pce)
propertyChange
接口
PropertyChangeListener
pce
- PropertyChangeEvent对象描述事件源和性质已经改变。
protected boolean validatePendingAdd(Object targetChild)
这一类的子类可以重写,或信封,这种方法添加的beancontext检查子对象之前被添加到beancontext验证行为。
targetChild
-孩子代表创造的孩子
protected boolean validatePendingRemove(Object targetChild)
这一类的子类可以重写,或信封,这种方法添加的beancontext检查子对象之前他们从beancontext删除验证行为。
targetChild
-孩子代表创造的孩子
protected void childJustAddedHook(Object child, BeanContextSupport.BCSChild bcsc)
child
-孩子
bcsc
- bcschild
protected void childJustRemovedHook(Object child, BeanContextSupport.BCSChild bcsc)
child
-孩子
bcsc
- bcschild
protected static final Visibility getChildVisibility(Object child)
child
-指定的孩子
protected static final Serializable getChildSerializable(Object child)
child
-指定的孩子
protected static final PropertyChangeListener getChildPropertyChangeListener(Object child)
child
-指定的孩子
protected static final VetoableChangeListener getChildVetoableChangeListener(Object child)
child
-指定的孩子
protected static final BeanContextMembershipListener getChildBeanContextMembershipListener(Object child)
child
-指定的孩子
protected static final BeanContextChild getChildBeanContextChild(Object child)
child
-指定的孩子
IllegalArgumentException
-如果孩子实现beancontextchild和BeanContextProxy
protected final void fireChildrenAdded(BeanContextMembershipEvent bcme)
bcme
-火灾事件
protected final void fireChildrenRemoved(BeanContextMembershipEvent bcme)
bcme
-火灾事件
protected void initialize()
protected final Object[] copyChildren()
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.