When a constructor should be invoked to create a bean instance, there is the danger that several flavors exist with different parameter types so that the call to new MyBean(attributes.get(0)
is ambiguous as the type is not declared.
There is an explicit check for this case where an explicit type-based method on InjectedElementAttributes
is used. Unfortunately, it hasn't been applied to factory methods that suffer from the same problem if several methods have a similar signature.