/** * Returns the injectee for a field. * * @param bean bean in which the field is placed. * @param field the field to analyze. * @return the list (in order) of parameters to the constructor. */ private static Injectee getFieldInjectee(Bean<?> bean, Field field) { Set<Annotation> annotations = Arrays.stream(field.getAnnotations()) .collect(ImmutableCollectors.toImmutableSet()); Type adjustedType = ReflectionUtils.resolveField(bean.getBeanClass(), field); InjecteeImpl injectee = new InjecteeImpl(); injectee.setParentClassScope(bean.getScope()); if (isProvider(adjustedType)) { ParameterizedType paramType = (ParameterizedType) adjustedType; injectee.setRequiredType(paramType.getActualTypeArguments()[0]); injectee.setProvider(true); } else { injectee.setRequiredType(adjustedType); } injectee.setParent(field); injectee.setRequiredQualifiers(getFieldAdjustedQualifierAnnotations(field, annotations)); return injectee; }