Package org.springframework.aot.generate
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 TypeMethodDescriptionorg.springframework.javapoet.CodeBlock
generateCode
(ValueCodeGenerator valueCodeGenerator, Object value) Generate the code for the specified non-nullvalue
.
-
Method Details
-
generateCode
@Nullable org.springframework.javapoet.CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value) Generate the code for the specified non-nullvalue
. If this instance does not support the value, it should returnnull
to indicate so.- Parameters:
valueCodeGenerator
- the code generator to use for embedded valuesvalue
- the value to generate- Returns:
- the code that represents the specified value or
null
if the specified value is not supported.
-