Polish
This commit is contained in:
parent
dab7e03c93
commit
cf10cee16a
|
|
@ -1046,12 +1046,9 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA
|
||||||
}
|
}
|
||||||
|
|
||||||
private CodeBlock generateParameterTypesCode(Class<?>[] parameterTypes) {
|
private CodeBlock generateParameterTypesCode(Class<?>[] parameterTypes) {
|
||||||
CodeBlock.Builder code = CodeBlock.builder();
|
return CodeBlock.join(Arrays.stream(parameterTypes)
|
||||||
for (int i = 0; i < parameterTypes.length; i++) {
|
.map(parameterType -> CodeBlock.of("$T.class", parameterType))
|
||||||
code.add((i != 0 ? ", " : ""));
|
.toList(), ", ");
|
||||||
code.add("$T.class", parameterTypes[i]);
|
|
||||||
}
|
|
||||||
return code.build();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerHints(RuntimeHints runtimeHints) {
|
private void registerHints(RuntimeHints runtimeHints) {
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ class DefaultBeanRegistrationCodeFragments implements BeanRegistrationCodeFragme
|
||||||
}
|
}
|
||||||
return new InstanceSupplierCodeGenerator(generationContext,
|
return new InstanceSupplierCodeGenerator(generationContext,
|
||||||
beanRegistrationCode.getClassName(), beanRegistrationCode.getMethods(), allowDirectSupplierShortcut)
|
beanRegistrationCode.getClassName(), beanRegistrationCode.getMethods(), allowDirectSupplierShortcut)
|
||||||
.generateCode(this.registeredBean,this.constructorOrFactoryMethod.get());
|
.generateCode(this.registeredBean, this.constructorOrFactoryMethod.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue