if (baseType.isGeneric())
throw new InjectionException(L.l("'{0}' is an invalid type for injection because it's generic. {1}",
baseType, ij));
*/
if (baseType.isGenericVariable())
throw new InjectionException(L.l("'{0}' is an invalid type for injection because it's a variable generic type.\n {1}",
baseType, ij));
Set<Bean<?>> set = resolveRec(baseType, qualifiers, ij);
if (set == null || set.size() == 0) {
if (InjectionPoint.class.equals(type))
return new InjectionPointBean(this, ij);
throw unsatisfiedException(type, qualifiers);
}
Bean<?> bean = resolve(set);
if (bean != null
&& type instanceof Class<?>
&& ((Class<?>) type).isPrimitive()
&& bean.isNullable()) {
throw new InjectionException(L.l("'{0}' cannot be injected because it's a primitive with {1}",
type, bean));
}
return bean;