JavaTM 2 Platform
Standard Ed. 6

介面 java.beans.beancontext.BeanContextChild
的使用

使用 BeanContextChild 的軟體套件
java.beans.beancontext 提供與 bean 上下文有關的類別和介面。 
 

java.beans.beancontext 中 BeanContextChild 的使用
 

java.beans.beancontext 中 BeanContextChild 的子介面
 interface BeanContext
           BeanContext 是 JavaBean 的邏輯層次容器。
 interface BeanContextServices
           BeanContextServices 介面為 BeanContext 提供某種機制,將一般的 "services" 向其中的 BeanContextChild 物件公開。
 

實作 BeanContextChild 的 java.beans.beancontext 中的類別
 class BeanContextChildSupport
           這是一個為實作 BeanContextChild 協議提供支持的一般支持類別。
 class BeanContextServicesSupport
           此說明器類別提供 java.beans.beancontext.BeanContextServices 介面的實用工具實作。
 class BeanContextSupport
          此說明器類別提供 java.beans.beancontext.BeanContext 介面的實用工具實作。
 

宣告為 BeanContextChild 的 java.beans.beancontext 中的欄位
 BeanContextChild BeanContextChildSupport.beanContextChildPeer
          在其中巢狀此 BeanContextChild 的 BeanContext。
 

返回 BeanContextChild 的 java.beans.beancontext 中的方法
 BeanContextChild BeanContextChildSupport.getBeanContextChildPeer()
          獲得與此 BeanContextChildSupport 相關聯的 BeanContextChild。
 BeanContextChild BeanContextProxy.getBeanContextProxy()
          獲得與此物件相關聯的 BeanContextChild(或子介面)。
protected static BeanContextChild BeanContextSupport.getChildBeanContextChild(Object child)
          與指定 Child 相關聯的 BeanContextChild(如果有)。
 

參數型別為 BeanContextChild 的 java.beans.beancontext 中的方法
 URL BeanContext.getResource(String name, BeanContextChild bcc)
          與 java.lang.ClassLoader.getResource() 類似,此方法允許 BeanContext 實作協調子 Component 和基礎 ClassLoader 之間的行為。
 URL BeanContextSupport.getResource(String name, BeanContextChild bcc)
           
 InputStream BeanContext.getResourceAsStream(String name, BeanContextChild bcc)
          與 java.lang.ClassLoader.getResourceAsStream() 類似,此方法允許 BeanContext 實作協調子 Component 和基礎 ClassLoader 之間的行為。
 InputStream BeanContextSupport.getResourceAsStream(String name, BeanContextChild bcc)
           
 Object BeanContextServices.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
          BeanContextChild(或任意與 BeanContextChild 關聯的物件)可以通過調用此方法從其巢狀 BeanContextServices 中獲得對當前已註冊服務的參考。
 Object BeanContextServicesSupport.getService(BeanContextChild child, Object requestor, Class serviceClass, Object serviceSelector, BeanContextServiceRevokedListener bcsrl)
          獲得一個可被委託的服務。
 void BeanContextServices.releaseService(BeanContextChild child, Object requestor, Object service)
          通過在基礎 BeanContextServiceProvider 上調用 releaseService() 釋放 BeanContextChild(或與 BeanContextChild 關聯的任意物件)對指定服務的參考。
 void BeanContextServicesSupport.releaseService(BeanContextChild child, Object requestor, Object service)
          釋放服務。
 

參數型別為 BeanContextChild 的 java.beans.beancontext 中的建構子
BeanContextChildSupport(BeanContextChild bcc)
          建構一個 BeanContextChildSupport,其中 JavaBean 元件自身實作 BeanContextChild 並封裝它,並將該介面委託給此實作
 


JavaTM 2 Platform
Standard Ed. 6

提交錯誤或意見

版權所有 2008 Sun Microsystems, Inc. 保留所有權利。請遵守GNU General Public License, version 2 only。