Class FieldBeansCollector


public class FieldBeansCollector extends Object
Convenience class to extract information about the type and generics of a field to inject. The field is a List, a Map or a Set and the generic type of its elements is extracted as well
Tobias Soloschenko, Andrea Del Bene
  • Constructor Details

    • FieldBeansCollector

      public FieldBeansCollector(org.springframework.core.ResolvableType fieldResolvableType)
  • Method Details

    • getBeansToInject

      Returns an instance containing all the beans collected for the field and compatible with the type of the field.
      the instance to inject into the field.
    • addBean

      public void addBean(String beanName, Object bean)
      Adds compatible bean to the field. This means that the field type is Map, a List or a Set and that the given bean is compatible with its elements type.
      beanName - the name of the bean to inject
      bean - the bean to inject
    • getFieldType