Interface ValueCodeGenerator.Delegate

All Known Implementing Classes:
ValueCodeGeneratorDelegates.CollectionDelegate, ValueCodeGeneratorDelegates.MapDelegate
Enclosing class:
ValueCodeGenerator

public static interface ValueCodeGenerator.Delegate
Strategy interface that can be used to implement code generation for a particular value type.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.javapoet.CodeBlock
    generateCode(ValueCodeGenerator valueCodeGenerator, Object value)
    Generate the code for the specified non-null value.
  • Method Details

    • generateCode

      @Nullable org.springframework.javapoet.CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value)
      Generate the code for the specified non-null value. If this instance does not support the value, it should return null to indicate so.
      Parameters:
      valueCodeGenerator - the code generator to use for embedded values
      value - the value to generate
      Returns:
      the code that represents the specified value or null if the specified value is not supported.