public static InvocationHandler getInvocationHandler(Object proxy) { if (!isProxyClass(proxy.getClass())) { throw new IllegalArgumentException("Not a proxy instance"); } try { return (InvocationHandler)_invocationHandlerField.get(proxy); } catch (Exception e) { throw new IllegalArgumentException(e); } }
private Class<?> _getModelClass(ModelListener<?> modelListener) { Class<?> clazz = modelListener.getClass(); if (ProxyUtil.isProxyClass(clazz)) { InvocationHandler invocationHandler = ProxyUtil.getInvocationHandler(modelListener); if (invocationHandler instanceof ClassLoaderBeanHandler) { ClassLoaderBeanHandler classLoaderBeanHandler = (ClassLoaderBeanHandler)invocationHandler; Object bean = classLoaderBeanHandler.getBean(); clazz = bean.getClass(); } } return _getGenericSuperType(clazz); }
Object service = _field.get(null); if (!ProxyUtil.isProxyClass(service.getClass()) || (ProxyUtil.getInvocationHandler(service) != this)) {
@Override public LayoutSetStagingHandler getLayoutSetStagingHandler( LayoutSet layoutSet) { if (!ProxyUtil.isProxyClass(layoutSet.getClass())) { return null; } InvocationHandler invocationHandler = ProxyUtil.getInvocationHandler( layoutSet); if (!(invocationHandler instanceof LayoutSetStagingHandler)) { return null; } return (LayoutSetStagingHandler)invocationHandler; }
@Override public LayoutStagingHandler getLayoutStagingHandler(Layout layout) { if (layout == null) { return null; } if (!ProxyUtil.isProxyClass(layout.getClass())) { return null; } InvocationHandler invocationHandler = ProxyUtil.getInvocationHandler( layout); if (!(invocationHandler instanceof LayoutStagingHandler)) { return null; } return (LayoutStagingHandler)invocationHandler; }
protected Class<?> getTargetClass(Object service) throws Exception { Class<?> clazz = service.getClass(); if (ProxyUtil.isProxyClass(clazz)) { AdvisedSupport advisedSupport = ServiceBeanAopProxy.getAdvisedSupport(service); TargetSource targetSource = advisedSupport.getTargetSource(); Object target = targetSource.getTarget(); clazz = target.getClass(); } return clazz; }
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(journalArticleLocalization.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(journalArticleLocalization);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmTemplateLink.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmTemplateLink);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmDataProviderInstanceLink.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmDataProviderInstanceLink);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmTemplateVersion.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmTemplateVersion);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmStructureVersion.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmStructureVersion);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmFormInstanceVersion.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmFormInstanceVersion);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmStructureLayout.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmStructureLayout);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmStructureLink.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmStructureLink);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(journalFeed.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(journalFeed);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmFormInstance.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmFormInstance);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(journalArticleResource.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(journalArticleResource);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmStorageLink.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmStorageLink);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmDataProviderInstance.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmDataProviderInstance);
InvocationHandler invocationHandler = null; if (ProxyUtil.isProxyClass(ddmFormInstanceRecordVersion.getClass())) { invocationHandler = ProxyUtil.getInvocationHandler(ddmFormInstanceRecordVersion);