Package org.springframework.aot.generate
Class ValueCodeGeneratorDelegates.CollectionDelegate<T extends Collection<?>>
java.lang.Object
org.springframework.aot.generate.ValueCodeGeneratorDelegates.CollectionDelegate<T>
- Type Parameters:
T
- type the collection type
- All Implemented Interfaces:
ValueCodeGenerator.Delegate
- Enclosing class:
- ValueCodeGeneratorDelegates
public abstract static class ValueCodeGeneratorDelegates.CollectionDelegate<T extends Collection<?>>
extends Object
implements ValueCodeGenerator.Delegate
Abstract
ValueCodeGenerator.Delegate
for Collection
types.-
Constructor Summary
ModifierConstructorDescriptionprotected
CollectionDelegate
(Class<?> collectionType, org.springframework.javapoet.CodeBlock emptyResult) -
Method Summary
Modifier and TypeMethodDescription@Nullable org.springframework.javapoet.CodeBlock
generateCode
(ValueCodeGenerator valueCodeGenerator, Object value) Generate the code for the specified non-nullvalue
.protected org.springframework.javapoet.CodeBlock
generateCollectionCode
(ValueCodeGenerator valueCodeGenerator, T collection) protected final org.springframework.javapoet.CodeBlock
generateCollectionOf
(ValueCodeGenerator valueCodeGenerator, Collection<?> collection, Class<?> collectionType)
-
Constructor Details
-
CollectionDelegate
protected CollectionDelegate(Class<?> collectionType, org.springframework.javapoet.CodeBlock emptyResult)
-
-
Method Details
-
generateCode
public @Nullable org.springframework.javapoet.CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value) Description copied from interface:ValueCodeGenerator.Delegate
Generate the code for the specified non-nullvalue
. If this instance does not support the value, it should returnnull
to indicate so.- Specified by:
generateCode
in interfaceValueCodeGenerator.Delegate
- 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.
-
generateCollectionCode
protected org.springframework.javapoet.CodeBlock generateCollectionCode(ValueCodeGenerator valueCodeGenerator, T collection) -
generateCollectionOf
protected final org.springframework.javapoet.CodeBlock generateCollectionOf(ValueCodeGenerator valueCodeGenerator, Collection<?> collection, Class<?> collectionType)
-