* @param bean the bean to be injected
*/
protected void injectFields(final Object bean, final String beanName) {
ReflectionUtils.doWithFields(bean.getClass(), new ReflectionUtils.FieldCallback() {
public void doWith(Field field) throws IllegalArgumentException, IllegalAccessException {
EndpointInject endpointInject = field.getAnnotation(EndpointInject.class);
if (endpointInject != null && getPostProcessor().matchContext(endpointInject.context())) {
injectField(field, endpointInject.uri(), endpointInject.ref(), bean, beanName);
}
Produce produce = field.getAnnotation(Produce.class);
if (produce != null && getPostProcessor().matchContext(produce.context())) {
injectField(field, produce.uri(), produce.ref(), bean, beanName);