Class BeanParameterGenerator
java.lang.Object
org.springframework.beans.factory.generator.BeanParameterGenerator
Support for writing parameters.
- Since:
- 6.0
- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsConstructorDescriptionCreate an instance with no support for inner bean definitions.BeanParameterGenerator(BiConsumer<BeanDefinition, org.springframework.javapoet.CodeBlock.Builder> innerBeanDefinitionWriter) Create an instance with the callback to use to write an inner bean definition. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.javapoet.CodeBlockwriteExecutableParameterTypes(Executable executable) Write the parameter types of the specifiedExecutable.org.springframework.javapoet.CodeBlockwriteParameterValue(Object value) Write the specified parametervalue.org.springframework.javapoet.CodeBlockwriteParameterValue(Object value, Supplier<ResolvableType> parameterType) Write the specified parametervalue.
-
Constructor Details
-
BeanParameterGenerator
public BeanParameterGenerator(BiConsumer<BeanDefinition, org.springframework.javapoet.CodeBlock.Builder> innerBeanDefinitionWriter) Create an instance with the callback to use to write an inner bean definition.- Parameters:
innerBeanDefinitionWriter- the inner bean definition writer
-
BeanParameterGenerator
public BeanParameterGenerator()Create an instance with no support for inner bean definitions.
-
-
Method Details
-
writeParameterValue
Write the specified parametervalue.- Parameters:
value- the value of the parameter- Returns:
- the value of the parameter
-
writeParameterValue
public org.springframework.javapoet.CodeBlock writeParameterValue(@Nullable Object value, Supplier<ResolvableType> parameterType) Write the specified parametervalue.- Parameters:
value- the value of the parameterparameterType- the type of the parameter- Returns:
- the value of the parameter
-
writeExecutableParameterTypes
Write the parameter types of the specifiedExecutable.- Parameters:
executable- the executable- Returns:
- the parameter types of the executable as a comma separated list
-