public static WrapperProxyState getWrapperProxyState ( Object proxy ) { // A business interface proxy. if ( proxy instanceof BusinessLocalWrapperProxy ) { return ( ( BusinessLocalWrapperProxy ) proxy ) . ivState ; } // An EJBLocalHome or EJBLocalObject proxy. if ( proxy instanceof EJSLocalWrapperProxy ) { return ( ( EJSLocalWrapperProxy ) proxy ) . ivState ; } // A no-interface view proxy. if ( proxy instanceof LocalBeanWrapperProxy ) { return EJSWrapperCommon . getLocalBeanWrapperProxyState ( ( LocalBeanWrapperProxy ) proxy ) ; } if ( proxy instanceof WrapperProxy ) { // Something implemented WrapperProxy without updating this method. throw new IllegalStateException ( Util . identity ( proxy ) ) ; } // The caller passed something that was not a WrapperProxy. throw new IllegalArgumentException ( Util . identity ( proxy ) ) ; }
Return the state for a wrapper proxy .