Class BeanParameterGenerator

java.lang.Object
org.springframework.beans.factory.generator.BeanParameterGenerator

public final class BeanParameterGenerator extends Object
Support for writing parameters.
Since:
6.0
Author:
Stephane Nicoll
  • 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

      public org.springframework.javapoet.CodeBlock writeParameterValue(@Nullable Object value)
      Write the specified parameter value.
      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 parameter value.
      Parameters:
      value - the value of the parameter
      parameterType - the type of the parameter
      Returns:
      the value of the parameter
    • writeExecutableParameterTypes

      public org.springframework.javapoet.CodeBlock writeExecutableParameterTypes(Executable executable)
      Write the parameter types of the specified Executable.
      Parameters:
      executable - the executable
      Returns:
      the parameter types of the executable as a comma separated list