< prev index next >

src/java.desktop/share/classes/java/beans/beancontext/BeanContextProxy.java

Print this page

        

*** 41,69 **** * (or any subinterfaces thereof) they are mutually exclusive. * </p> * <p> * Callers of this interface shall examine the return type in order to * obtain a particular subinterface of BeanContextChild as follows: ! * <code> * BeanContextChild bcc = o.getBeanContextProxy(); * * if (bcc instanceof BeanContext) { * // ... * } ! * </code> * or ! * <code> * BeanContextChild bcc = o.getBeanContextProxy(); * BeanContext bc = null; * * try { * bc = (BeanContext)bcc; * } catch (ClassCastException cce) { * // cast failed, bcc is not an instanceof BeanContext * } ! * </code> ! * </p> * <p> * The return value is a constant for the lifetime of the implementing * instance * </p> * @author Laurence P. G. Cable --- 41,68 ---- * (or any subinterfaces thereof) they are mutually exclusive. * </p> * <p> * Callers of this interface shall examine the return type in order to * obtain a particular subinterface of BeanContextChild as follows: ! * <pre>{@code * BeanContextChild bcc = o.getBeanContextProxy(); * * if (bcc instanceof BeanContext) { * // ... * } ! * }</pre> * or ! * <pre>{@code * BeanContextChild bcc = o.getBeanContextProxy(); * BeanContext bc = null; * * try { * bc = (BeanContext)bcc; * } catch (ClassCastException cce) { * // cast failed, bcc is not an instanceof BeanContext * } ! * }</pre> * <p> * The return value is a constant for the lifetime of the implementing * instance * </p> * @author Laurence P. G. Cable
*** 74,85 **** */ public interface BeanContextProxy { /** ! * Gets the <code>BeanContextChild</code> (or subinterface) * associated with this object. ! * @return the <code>BeanContextChild</code> (or subinterface) * associated with this object */ BeanContextChild getBeanContextProxy(); } --- 73,84 ---- */ public interface BeanContextProxy { /** ! * Gets the {@code BeanContextChild} (or subinterface) * associated with this object. ! * @return the {@code BeanContextChild} (or subinterface) * associated with this object */ BeanContextChild getBeanContextProxy(); }
< prev index next >