public interface BeanContextProxy
此接口由JavaBean不直接有beancontext实施(孩子)与它(通过实现接口或接口方法),但有一个公共beancontext(孩子)授权的。例如,对java.awt.container子类可能有一个beancontext与它相关的那个容器应包含在所有组件的孩子。
一个对象可能不能实现这个接口,beancontextchild接口(或任何其子接口)他们是互斥的。
这个接口的用户应检查返回类型为获得特定接口的beancontextchild如下: BeanContextChild bcc = o.getBeanContextProxy(); if (bcc instanceof BeanContext) { // ... }
或 BeanContextChild bcc = o.getBeanContextProxy(); BeanContext bc = null; try { bc = (BeanContext)bcc; } catch (ClassCastException cce) { // cast failed, bcc is not an instanceof BeanContext }
返回值是实施实例的生命期的常数
BeanContextChild
,
BeanContextChildSupport
Modifier and Type | Method and Description |
---|---|
BeanContextChild |
getBeanContextProxy()
得到
BeanContextChild (或接口)与该对象相关的。
|
BeanContextChild getBeanContextProxy()
BeanContextChild
(或接口)与该对象相关的。
BeanContextChild
(或接口)与该对象相关的
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.