-  
       
- All Superinterfaces:
 -  
         
BeanContextChild,Collection,DesignMode,Iterable,Visibility 
- All Known Subinterfaces:
 -  
         
BeanContextServices 
- 所有已知实现类:
 -  
         
BeanContextServicesSupport,BeanContextSupport 
public interface BeanContext extends BeanContextChild, Collection, DesignMode, Visibility
BeanContext是JavaBeans的逻辑分层容器。
- 从以下版本开始:
 - 1.2
 - 另请参见:
 -  
         
Beans,BeanContextChild,BeanContextMembershipListener,PropertyChangeEvent,DesignMode,Visibility,Collection 
 
-  
        
       
-  
             
字段汇总
字段 变量和类型 字段 描述 static ObjectglobalHierarchyLockBeanContext和BeanContextServices实现器使用此全局锁来序列化BeanContext层次结构中的更改以及任何服务请求等。-  
               
Fields declared in interface java.beans.DesignMode
PROPERTYNAME 
 -  
               
 
-  
             
方法摘要
所有方法 实例方法 抽象方法 变量和类型 方法 描述 voidaddBeanContextMembershipListener(BeanContextMembershipListener bcml)添加指定BeanContextMembershipListener接收BeanContextMembershipEvents从这个BeanContext无论何时添加或删除孩子Component(S)。URLgetResource(String name, BeanContextChild bcc)与java.lang.ClassLoader.getResource(),此方法允许BeanContext实现在子Component和底层ClassLoader之间插入行为。InputStreamgetResourceAsStream(String name, BeanContextChild bcc)与java.lang.ClassLoader.getResourceAsStream(),此方法允许BeanContext实现插入子Component与底层ClassLoader之间的行为。ObjectinstantiateChild(String beanName)实例BeanContext为此BeanContext的子级的javaBean。voidremoveBeanContextMembershipListener(BeanContextMembershipListener bcml)删除指定的BeanContextMembershipListener以便在添加或删除子Component时不再接收BeanContextMembershipEvent。-  
               
声明方法的接口 java.beans.beancontext.BeanContextChild
addPropertyChangeListener, addVetoableChangeListener, getBeanContext, removePropertyChangeListener, removeVetoableChangeListener, setBeanContext 
-  
               
声明方法的接口 java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, parallelStream, remove, removeAll, removeIf, retainAll, size, spliterator, stream, toArray, toArray, toArray 
-  
               
声明方法的接口 java.beans.DesignMode
isDesignTime, setDesignTime 
-  
               
声明方法的接口 java.beans.Visibility
avoidingGui, dontUseGui, needsGui, okToUseGui 
 -  
               
 
 -  
             
 
-  
        
       
-  
             
字段详细信息
-  
globalHierarchyLock
static final Object globalHierarchyLock
BeanContext和BeanContextServices实现器使用此全局锁来序列化BeanContext层次结构中的更改以及任何服务请求等。 
 -  
 
-  
             
方法详细信息
-  
instantiateChild
Object instantiateChild(String beanName) throws IOException, ClassNotFoundException
实例BeanContext为此BeanContext的子级的javaBean。 JavaBean的实现派生自beanName参数的值,并由java.beans.Beans.instantiate()方法定义。- 参数
 -  
              
beanName- 要实例化为此BeanContext的子级的JavaBean的名称 - 结果
 - 
               一个名为此 
              
BeanContext的子级的javaBean - 异常
 -  
              
IOException- 如果发生IO问题 -  
              
ClassNotFoundException- 如果找不到beanName参数标识的类 
 
-  
getResourceAsStream
InputStream getResourceAsStream(String name, BeanContextChild bcc) throws IllegalArgumentException
与java.lang.ClassLoader.getResourceAsStream(),此方法允许BeanContext实现在子Component和底层ClassLoader之间插入行为。- 参数
 -  
              
name- 资源名称 -  
              
bcc- 指定的子级 - 结果
 - 
               一个 
              
InputStream读取资源,或null如果资源不能被发现。 - 异常
 -  
              
IllegalArgumentException- 如果资源无效 
 
-  
getResource
URL getResource(String name, BeanContextChild bcc) throws IllegalArgumentException
与java.lang.ClassLoader.getResource(),此方法允许BeanContext实现在子Component和底层ClassLoader之间插入行为。- 参数
 -  
              
name- 资源名称 -  
              
bcc- 指定的子项 - 结果
 - 
               a 
              
URL,用于指定子项的指定资源 - 异常
 -  
              
IllegalArgumentException- 如果资源无效 
 
-  
addBeanContextMembershipListener
void addBeanContextMembershipListener(BeanContextMembershipListener bcml)
添加指定BeanContextMembershipListener接收BeanContextMembershipEvents从这个BeanContext无论何时添加或删除孩子Component(S)。- 参数
 -  
              
bcml- 要添加的BeanContextMembershipListener 
 
-  
removeBeanContextMembershipListener
void removeBeanContextMembershipListener(BeanContextMembershipListener bcml)
删除指定的BeanContextMembershipListener以便在添加或删除子Component时不再接收BeanContextMembershipEvent。- 参数
 -  
              
bcml- 要删除的BeanContextMembershipListener 
 
 -  
 
 -