|
|
@ -37,7 +37,7 @@ import org.springframework.javapoet.CodeBlock;
|
|
|
|
* {@link BeanRegistrationAotProcessor} for immutable configuration properties.
|
|
|
|
* {@link BeanRegistrationAotProcessor} for immutable configuration properties.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @author Stephane Nicoll
|
|
|
|
* @author Stephane Nicoll
|
|
|
|
* @see ConstructorBindingValueSupplier
|
|
|
|
* @see ConstructorBound
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
class ConfigurationPropertiesBeanRegistrationAotProcessor implements BeanRegistrationAotProcessor {
|
|
|
|
class ConfigurationPropertiesBeanRegistrationAotProcessor implements BeanRegistrationAotProcessor {
|
|
|
|
|
|
|
|
|
|
|
@ -83,8 +83,8 @@ class ConfigurationPropertiesBeanRegistrationAotProcessor implements BeanRegistr
|
|
|
|
builder.addStatement("$T beanFactory = registeredBean.getBeanFactory()", BeanFactory.class);
|
|
|
|
builder.addStatement("$T beanFactory = registeredBean.getBeanFactory()", BeanFactory.class);
|
|
|
|
builder.addStatement("$T beanName = registeredBean.getBeanName()", String.class);
|
|
|
|
builder.addStatement("$T beanName = registeredBean.getBeanName()", String.class);
|
|
|
|
builder.addStatement("$T<?> beanClass = registeredBean.getBeanClass()", Class.class);
|
|
|
|
builder.addStatement("$T<?> beanClass = registeredBean.getBeanClass()", Class.class);
|
|
|
|
builder.addStatement("return ($T) $T.createValueObject(beanFactory, beanName, beanClass)",
|
|
|
|
builder.addStatement("return ($T) $T.from(beanFactory, beanName, beanClass)", beanClass,
|
|
|
|
beanClass, ConstructorBindingValueSupplier.class);
|
|
|
|
ConstructorBound.class);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
return CodeBlock.of("$T.of($T::$L)", InstanceSupplier.class, beanRegistrationCode.getClassName(),
|
|
|
|
return CodeBlock.of("$T.of($T::$L)", InstanceSupplier.class, beanRegistrationCode.getClassName(),
|
|
|
|
method.getName());
|
|
|
|
method.getName());
|
|
|
|