spring-beans/src/main/java/org/springframework/beans/factory/support/ConstructorResolver.java
/**
	 * Resolve the prepared arguments stored in the given bean definition.
	 */
Resolve the prepared arguments stored in the given bean definition.
Resolve the prepared arguments stored in the given bean definition .
private Object[] resolvePreparedArguments(String beanName, RootBeanDefinition mbd, BeanWrapper bw,
											  Executable executable, Object[] argsToResolve, boolean fallback) {
		TypeConverter customConverter = this.beanFactory.getCustomTypeConverter();
		TypeConverter converter = (customConverter != null ? customConverter : bw);
		BeanDefinitionValueResolver valueResolver =
				new BeanDefinitionValueResolver(this.beanFactory, beanName, mbd, converter);
		Class<?>[] paramTypes = executable.getParameterTypes();
		Object[] resolvedArgs = new Object[argsToResolve.length];
		for (int argIndex = 0; argIndex < argsToResolve.length; argIndex++) {
			Object argValue = argsToResolve[argIndex];
			MethodParameter methodParam = MethodParameter.forExecutable(executable, argIndex);
			if (argValue == autowiredArgumentMarker) {
				argValue = resolveAutowiredArgument(methodParam, beanName, null, converter, fallback);
			} else if (argValue instanceof BeanMetadataElement) {
				argValue = valueResolver.resolveValueIfNecessary("constructor argument", argValue);
			} else if (argValue instanceof String) {
				argValue = this.beanFactory.evaluateBeanDefinitionString((String) argValue, mbd);
			}
			Class<?> paramType = paramTypes[argIndex];
			try {
				resolvedArgs[argIndex] = converter.convertIfNecessary(argValue, paramType, methodParam);
			} catch (TypeMismatchException ex) {
				throw new UnsatisfiedDependencyException(
						mbd.getResourceDescription(), beanName, new InjectionPoint(methodParam),
						"Could not convert argument value of type [" + ObjectUtils.nullSafeClassName(argValue) +
								"] to required type [" + paramType.getName() + "]: " + ex.getMessage());
			}
		}
		return resolvedArgs;
	}
private Object [ ] resolvePreparedArguments ( String beanName , RootBeanDefinition mbd , BeanWrapper bw , Executable executable , Object [ ] argsToResolve , boolean fallback ) { TypeConverter customConverter = this . beanFactory . getCustomTypeConverter ( ) ; TypeConverter converter = ( customConverter != null ? customConverter : bw ) ; BeanDefinitionValueResolver valueResolver = new BeanDefinitionValueResolver ( this . beanFactory , beanName , mbd , converter ) ; Class < ? > [ ] paramTypes = executable . getParameterTypes ( ) ; Object [ ] resolvedArgs = new Object [ argsToResolve . length ] ; for ( int argIndex = 0 ; argIndex < argsToResolve . length ; argIndex ++ ) { Object argValue = argsToResolve [ argIndex ] ; MethodParameter methodParam = MethodParameter . forExecutable ( executable , argIndex ) ; if ( argValue == autowiredArgumentMarker ) { argValue = resolveAutowiredArgument ( methodParam , beanName , null , converter , fallback ) ; } else if ( argValue instanceof BeanMetadataElement ) { argValue = valueResolver . resolveValueIfNecessary ( "constructor argument" , argValue ) ; } else if ( argValue instanceof String ) { argValue = this . beanFactory . evaluateBeanDefinitionString ( ( String ) argValue , mbd ) ; } Class < ? > paramType = paramTypes [ argIndex ] ; try { resolvedArgs [ argIndex ] = converter . convertIfNecessary ( argValue , paramType , methodParam ) ; } catch ( TypeMismatchException ex ) { throw new UnsatisfiedDependencyException ( mbd . getResourceDescription ( ) , beanName , new InjectionPoint ( methodParam ) , "Could not convert argument value of type [" + ObjectUtils . nullSafeClassName ( argValue ) + "] to required type [" + paramType . getName ( ) + "]: " + ex . getMessage ( ) ) ; } } return resolvedArgs ; }
Resolve the prepared arguments stored in the given bean definition.
Resolve the prepared arguments stored in the given bean definition .