JsfBeansAnnotationPostProcessor implements BeanPostProcessor { boolean isAutowiredField(Field field) { for (Class<? extends Annotation> autowiredAnnotationType : this.autowiredAnnotationTypes) { if (AnnotatedElementUtils.hasAnnotation(field, autowiredAnnotationType)) { return true; } } return false; } JsfBeansAnnotationPostProcessor(JsfBeansAutoConfiguration jsfBeansAutoConfiguration); @Override Object postProcessBeforeInitialization(Object bean, String beanName);  }
@Test public void testIsAutowiredField() { class TestFields { @Autowired private Object a; @Value("b") private Object b; @Inject private Object c; private Object d; } assertThat(this.jsfBeansAnnotationPostProcessor.isAutowiredField(ReflectionUtils.findField(TestFields.class, "a"))).isTrue(); assertThat(this.jsfBeansAnnotationPostProcessor.isAutowiredField(ReflectionUtils.findField(TestFields.class, "b"))).isTrue(); assertThat(this.jsfBeansAnnotationPostProcessor.isAutowiredField(ReflectionUtils.findField(TestFields.class, "c"))).isTrue(); assertThat(this.jsfBeansAnnotationPostProcessor.isAutowiredField(ReflectionUtils.findField(TestFields.class, "d"))).isFalse(); }