/** * Resolves the consumer method on the target bean after the Spring component has been started. * * @return the bean consumer method */ private Method getConsumerMethod() { if (beanMethod != null) { return beanMethod; } Class<?> beanClass = component.getBeanClass(beanName); for (Method method : beanClass.getMethods()) { Class<?>[] params = method.getParameterTypes(); // setters are only supported if (params.length == 1 && method.getName().equals(consumerName) && params[0].isAssignableFrom(type.getType())) { beanMethod = method; return beanMethod; } } throw new ServiceRuntimeException("Could not load method with type: " + type); }
/** * Resolves the consumer method on the target bean after the Spring component has been started. * * @return the bean consumer method */ private Method getConsumerMethod() { if (beanMethod != null) { return beanMethod; } Class<?> beanClass = component.getBeanClass(beanName); for (Method method : beanClass.getMethods()) { Class<?>[] params = method.getParameterTypes(); // setters are only supported if (params.length == 1 && method.getName().equals(consumerName) && params[0].isAssignableFrom(type.getType())) { beanMethod = method; return beanMethod; } } throw new ServiceRuntimeException("Could not load method with type: " + type); }
/** * Resolves the consumer method on the target bean after the Spring component has been started. * * @return the bean consumer method */ private Method getConsumerMethod() { if (beanMethod != null) { return beanMethod; } Class<?> beanClass = component.getBeanClass(beanName); for (Method method : beanClass.getMethods()) { Class<?>[] params = method.getParameterTypes(); // setters are only supported if (params.length == 1 && method.getName().equals(consumerName) && params[0].isAssignableFrom(type.getPhysical())) { beanMethod = method; return beanMethod; } } throw new ServiceRuntimeException("Could not load method with type: " + type); }