public interface BeanContext extends BeanContextChild, Collection, DesignMode, Visibility
BeanContext对JavaBeans起着逻辑分层容器的作用。
Beans , BeanContextChild , BeanContextMembershipListener , PropertyChangeEvent , DesignMode , Visibility , Collection
| Modifier and Type | Field and Description |
|---|---|
static Object |
globalHierarchyLock
这个全局锁由
BeanContext和
BeanContextServices实现者使用,以序列化
BeanContext层次结构和任何服务请求等中的更改。
|
PROPERTYNAME| Modifier and Type | Method and Description |
|---|---|
void |
addBeanContextMembershipListener(BeanContextMembershipListener bcml)
添加指定的
BeanContextMembershipListener收到
BeanContextMembershipEvents从这个
BeanContext无论何时添加或删除孩子
Component (S)。
|
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之间的行为。
|
Object |
instantiateChild(String beanName)
实例化命名为此
BeanContext的孩子的javaBean。
|
void |
removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
移除指定
BeanContextMembershipListener ,以便它不再接收
BeanContextMembershipEvent ■当孩子
Component (多个)被添加或移除。
|
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContextadd, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArrayisDesignTime, setDesignTimeavoidingGui, dontUseGui, needsGui, okToUseGuistatic final Object globalHierarchyLock
BeanContext和
BeanContextServices实现者都使用这个全局锁来序列化
BeanContext层次结构和任何服务请求等中的更改。
Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
BeanContext的孩子的javaBean。
JavaBean的实现来自于beanName参数的值,由java.beans.Beans.instantiate()方法定义。
beanName - JavaBean的名称,作为这个
BeanContext的孩子来
BeanContext
BeanContext的孩子
IOException - 如果发生IO问题
ClassNotFoundException - 如果找不到由beanName参数标识的类
InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException
java.lang.ClassLoader.getResourceAsStream() ,这种方法允许一个
BeanContext实现介入孩子
Component和底层
ClassLoader之间的行为。
name - 资源名称
bcc - 指定的孩子
InputStream读取资源,或
null如果资源不能被发现。
IllegalArgumentException - 如果资源无效
URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException
java.lang.ClassLoader.getResource() ,该方法允许
BeanContext实现孩子之间的干预行为
Component和基本
ClassLoader 。
name - 资源名称
bcc - 指定的孩子
URL为指定的子的命名资源
IllegalArgumentException - 如果资源无效
void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
BeanContextMembershipListener收到
BeanContextMembershipEvents从这个
BeanContext无论何时添加或删除孩子
Component (S)。
bcml - 要添加的BeanContextMembershipListener
void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
BeanContextMembershipListener ,以便它不再接收
BeanContextMembershipEvent ■当孩子
Component (多个)被添加或移除。
bcml - 要删除的
BeanContextMembershipListener
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.