/** * Gets the class of the implementor. * @return the class of the implementor object */ public Class<?> getImplementorClass() { return implementorClass != null ? implementorClass : ClassHelper.getRealClass(bus, implementor); }
public static Class<?> getRealClassFromClass(Bus bus, Class<?> cls) { bus = getBus(bus); return getContextClassHelper(bus).getRealClassFromClassInternal(cls); }
public static Class getRealClass(Object o) { return HELPER.getRealClassInternal(o); }
public static Object getRealObject(Object o) { Bus bus = getBus(null); return getContextClassHelper(bus).getRealObjectInternal(o); }
protected boolean nonProxyClass(String beanName) { // JAX-RS runtime needs to be able to access the real component class to introspect it for // JAX-RS annotations; the following check ensures that the valid proxified components // are accepted while the client proxies are ignored. Class<?> type = ClassHelper.getRealClassFromClass(applicationContext.getType(beanName)); if (Proxy.isProxyClass(type) && applicationContext.isSingleton(beanName)) { type = ClassHelper.getRealClass(applicationContext.getBean(beanName)); } if (Proxy.isProxyClass(type)) { LOG.fine("Can not determine the real class of the component '" + beanName + "'"); return false; } return true; } protected boolean matchesComponentName(String beanName, Set<String> componentScanBeansSet) {
pushOntoStack(ori, ClassHelper.getRealClass(resourceObject), inMessage); final boolean paramsAvailable = cri.paramsAvailable(); if (contextsAvailable || paramsAvailable) { Object realResourceObject = ClassHelper.getRealObject(resourceObject); if (paramsAvailable) { JAXRSUtils.injectParameters(ori, realResourceObject, inMessage); ClassHelper.getRealClass(result), result); if (subCri == null) { org.apache.cxf.common.i18n.Message errorM =
private static AbstractClient toAbstractClient(Object client) { if (client instanceof AbstractClient) { return (AbstractClient)client; } else if (client instanceof InvocationHandlerAware) { return (AbstractClient)((InvocationHandlerAware)client).getInvocationHandler(); } else { Object realObject = ClassHelper.getRealObject(client); if (realObject instanceof AbstractClient) { return (AbstractClient)realObject; } } return null; }
public static Object getRealObject(Object o) { return HELPER.getRealObjectInternal(o); }
public static Class<?> getRealClass(Bus bus, Object o) { bus = getBus(bus); if (bus != null && bus.getProperty(ClassUnwrapper.class.getName()) != null) { ClassUnwrapper unwrapper = (ClassUnwrapper) bus.getProperty(ClassUnwrapper.class.getName()); return unwrapper.getRealClass(o); } return getContextClassHelper(bus).getRealClassInternal(o); }
public static Class<?> getRealClassFromClass(Class<?> cls) { return HELPER.getRealClassFromClassInternal(cls); }
public static Class<?> getRealClassFromClass(Class<?> cls) { return getRealClassFromClass(null, cls); }
private void init() { Class<?> type = ClassHelper.getRealClassFromClass(ac.getType(beanId)); if (Proxy.isProxyClass(type)) { type = ClassHelper.getRealClass(ac.getBean(beanId)); } c = ResourceUtils.findResourceConstructor(type, !isSingleton()); if (c == null) { throw new RuntimeException("Resource class " + type + " has no valid constructor"); } postConstructMethod = ResourceUtils.findPostConstructMethod(type, postConstructMethodName); preDestroyMethod = ResourceUtils.findPreDestroyMethod(type, preDestroyMethodName); isSingleton = ac.isSingleton(beanId); if (!isSingleton) { isPrototype = ac.isPrototype(beanId); } }
private static AbstractClient toAbstractClient(Object client) { if (client instanceof AbstractClient) { return (AbstractClient)client; } else if (client instanceof InvocationHandlerAware) { return (AbstractClient)((InvocationHandlerAware)client).getInvocationHandler(); } else { Object realObject = ClassHelper.getRealObject(client); if (realObject instanceof AbstractClient) { return (AbstractClient)realObject; } } return null; }
public static Object getRealObject(Object o) { return HELPER.getRealObjectInternal(o); }
public static Class<?> getRealClass(Bus bus, Object o) { bus = getBus(bus); if (bus != null && bus.getProperty(ClassUnwrapper.class.getName()) != null) { ClassUnwrapper unwrapper = (ClassUnwrapper) bus.getProperty(ClassUnwrapper.class.getName()); return unwrapper.getRealClass(o); } return getContextClassHelper(bus).getRealClassInternal(o); }
public static Object getRealObject(Object o) { Bus bus = getBus(null); return getContextClassHelper(bus).getRealObjectInternal(o); }
public static Class<?> getRealClassFromClass(Class<?> cls) { return HELPER.getRealClassFromClassInternal(cls); }
public static Class<?> getRealClassFromClass(Class<?> cls) { return getRealClassFromClass(null, cls); }
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException { Class<?> clazz = ClassHelper.getRealClass(getServletBus(), bean); if (clazz.isAnnotationPresent(WebService.class)) { WebService ws = clazz.getAnnotation(WebService.class); String url = urlPrefix + ws.serviceName(); Message message = new Message("SELECTED_SERVICE", LOG, beanName, clazz.getName(), url); LOG.info(message.toString()); createAndPublishEndpoint(url, bean); registerHandler(url, new ServletAdapter(shadowCxfServlet)); } else { Message message = new Message("REJECTED_NO_ANNOTATION", LOG, beanName, clazz.getName()); LOG.fine(message.toString()); } return bean; }
private void init() { type = ClassHelper.getRealClassFromClass(ac.getType(beanId)); if (Proxy.isProxyClass(type)) { type = ClassHelper.getRealClass(ac.getBean(beanId)); } isSingleton = ac.isSingleton(beanId); postConstructMethod = ResourceUtils.findPostConstructMethod(type, postConstructMethodName); preDestroyMethod = ResourceUtils.findPreDestroyMethod(type, preDestroyMethodName); if (isSingleton()) { try { singletonInstance = ac.getBean(beanId); } catch (BeansException ex) { // ignore for now, try resolving resource constructor later } if (singletonInstance != null) { return; } } else { isPrototype = ac.isPrototype(beanId); } c = ResourceUtils.findResourceConstructor(type, !isSingleton()); if (c == null) { throw new RuntimeException("Resource class " + type + " has no valid constructor"); } }