Top Description Inners Fields Constructors Methods
org.springframework.beans.factory.aot

pack-priv abstract Class BeanDefinitionPropertyValueCodeGeneratorDelegates

extends Object
Class Inheritance
Imports
java.util.Iterator, .LinkedHashMap, .List, .Map, .Map.Entry, org.springframework.aot.generate.GeneratedMethod, .GeneratedMethods, .ValueCodeGenerator, .ValueCodeGenerator.Delegate, .ValueCodeGeneratorDelegates, .ValueCodeGeneratorDelegates.CollectionDelegate, .ValueCodeGeneratorDelegates.MapDelegate, org.springframework.beans.factory.config.BeanReference, .RuntimeBeanReference, .TypedStringValue, org.springframework.beans.factory.support.ManagedList, .ManagedMap, .ManagedSet, org.springframework.javapoet.AnnotationSpec, .CodeBlock

Code generator Delegate for common bean definition property values.
Author
Stephane Nicoll
Since
6.1.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static class
private static class
private static class

Field Summary

Modifier and TypeField and Description
public static final List<ValueCodeGenerator.Delegate>
INSTANCES

Return the Delegate implementations for common bean definition property value types.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INSTANCESback to summary
public static final List<ValueCodeGenerator.Delegate> INSTANCES

Return the Delegate implementations for common bean definition property value types. These are:

When combined with the delegates for common value types, this should be added first as they have special handling for list, set, and map.

Constructor Detail

BeanDefinitionPropertyValueCodeGeneratorDelegatesback to summary
pack-priv BeanDefinitionPropertyValueCodeGeneratorDelegates()
org.springframework.beans.factory.aot back to summary

private Class BeanDefinitionPropertyValueCodeGeneratorDelegates.BeanReferenceDelegate

extends Object
implements Delegate
Class Inheritance
  • java.lang.Object
  • org.springframework.beans.factory.aot.BeanDefinitionPropertyValueCodeGeneratorDelegates.BeanReferenceDelegate
All Implemented Interfaces
org.springframework.aot.generate.ValueCodeGenerator.Delegate

Delegate for BeanReference types.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CodeBlock
generateCode(ValueCodeGenerator
the code generator to use for embedded values
valueCodeGenerator
,
Object
the value to generate
value
)

Implements org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

Generate the code for the specified non-null value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

BeanReferenceDelegateback to summary
private BeanReferenceDelegate()

Method Detail

generateCodeback to summary
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value)

Implements org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

Doc from org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

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:ValueCodeGenerator

the code generator to use for embedded values

value:Object

the value to generate

Returns:CodeBlock

the code that represents the specified value or null if the specified value is not supported.

Annotations
@Override
org.springframework.beans.factory.aot back to summary

private Class BeanDefinitionPropertyValueCodeGeneratorDelegates.LinkedHashMapDelegate

extends MapDelegate
Class Inheritance

Delegate for Map types.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private CodeBlock
generateLinkedHashMapCode(ValueCodeGenerator valueCodeGenerator, GeneratedMethods generatedMethods, Map<?, ?> map)

protected CodeBlock
generateMapCode(ValueCodeGenerator
the code generator to use for embedded values
valueCodeGenerator
,
Map<?, ?>
the value to generate
map
)

Overrides org.springframework.aot.generate.ValueCodeGeneratorDelegates.MapDelegate.generateMapCode.

Generate the code for a non-empty Map.

Inherited from org.springframework.aot.generate.ValueCodeGeneratorDelegates.MapDelegate:
generateCode

Constructor Detail

LinkedHashMapDelegateback to summary
private LinkedHashMapDelegate()

Method Detail

generateLinkedHashMapCodeback to summary
private CodeBlock generateLinkedHashMapCode(ValueCodeGenerator valueCodeGenerator, GeneratedMethods generatedMethods, Map<?, ?> map)
generateMapCodeback to summary
protected CodeBlock generateMapCode(ValueCodeGenerator valueCodeGenerator, Map<?, ?> map)

Overrides org.springframework.aot.generate.ValueCodeGeneratorDelegates.MapDelegate.generateMapCode.

Doc from org.springframework.aot.generate.ValueCodeGeneratorDelegates.MapDelegate.generateMapCode.

Generate the code for a non-empty Map.

Parameters
valueCodeGenerator:ValueCodeGenerator

the code generator to use for embedded values

map:Map<?, ?>

the value to generate

Returns:CodeBlock

the code that represents the specified map or null if the specified map is not supported.

Annotations
@Override
org.springframework.beans.factory.aot back to summary

private Class BeanDefinitionPropertyValueCodeGeneratorDelegates.ManagedListDelegate

extends ValueCodeGeneratorDelegates.CollectionDelegate<ManagedList<?>>
Class Inheritance

Delegate for ManagedList types.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.springframework.aot.generate.ValueCodeGeneratorDelegates.CollectionDelegate:
generateCodegenerateCollectionCodegenerateCollectionOf

Constructor Detail

ManagedListDelegateback to summary
public ManagedListDelegate()
org.springframework.beans.factory.aot back to summary

private Class BeanDefinitionPropertyValueCodeGeneratorDelegates.ManagedMapDelegate

extends Object
implements Delegate
Class Inheritance
  • java.lang.Object
  • org.springframework.beans.factory.aot.BeanDefinitionPropertyValueCodeGeneratorDelegates.ManagedMapDelegate
All Implemented Interfaces
org.springframework.aot.generate.ValueCodeGenerator.Delegate

Delegate for ManagedMap types.

Field Summary

Modifier and TypeField and Description
private static final CodeBlock

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CodeBlock
generateCode(ValueCodeGenerator
the code generator to use for embedded values
valueCodeGenerator
,
Object
the value to generate
value
)

Implements org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

Generate the code for the specified non-null value.

private <K, V> CodeBlock
generateManagedMapCode(ValueCodeGenerator valueCodeGenerator, ManagedMap<K, V> managedMap)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

EMPTY_RESULTback to summary
private static final CodeBlock EMPTY_RESULT

Constructor Detail

ManagedMapDelegateback to summary
private ManagedMapDelegate()

Method Detail

generateCodeback to summary
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value)

Implements org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

Doc from org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

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:ValueCodeGenerator

the code generator to use for embedded values

value:Object

the value to generate

Returns:CodeBlock

the code that represents the specified value or null if the specified value is not supported.

Annotations
@Override
generateManagedMapCodeback to summary
private <K, V> CodeBlock generateManagedMapCode(ValueCodeGenerator valueCodeGenerator, ManagedMap<K, V> managedMap)
org.springframework.beans.factory.aot back to summary

private Class BeanDefinitionPropertyValueCodeGeneratorDelegates.ManagedSetDelegate

extends ValueCodeGeneratorDelegates.CollectionDelegate<ManagedSet<?>>
Class Inheritance

Delegate for ManagedSet types.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from org.springframework.aot.generate.ValueCodeGeneratorDelegates.CollectionDelegate:
generateCodegenerateCollectionCodegenerateCollectionOf

Constructor Detail

ManagedSetDelegateback to summary
public ManagedSetDelegate()
org.springframework.beans.factory.aot back to summary

private Class BeanDefinitionPropertyValueCodeGeneratorDelegates.TypedStringValueDelegate

extends Object
implements Delegate
Class Inheritance
  • java.lang.Object
  • org.springframework.beans.factory.aot.BeanDefinitionPropertyValueCodeGeneratorDelegates.TypedStringValueDelegate
All Implemented Interfaces
org.springframework.aot.generate.ValueCodeGenerator.Delegate

Delegate for TypedStringValue types.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public CodeBlock
generateCode(ValueCodeGenerator
the code generator to use for embedded values
valueCodeGenerator
,
Object
the value to generate
value
)

Implements org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

Generate the code for the specified non-null value.

private CodeBlock
generateTypeStringValueCode(ValueCodeGenerator valueCodeGenerator, TypedStringValue typedStringValue)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

TypedStringValueDelegateback to summary
private TypedStringValueDelegate()

Method Detail

generateCodeback to summary
public CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value)

Implements org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

Doc from org.springframework.aot.generate.ValueCodeGenerator.Delegate.generateCode.

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:ValueCodeGenerator

the code generator to use for embedded values

value:Object

the value to generate

Returns:CodeBlock

the code that represents the specified value or null if the specified value is not supported.

Annotations
@Override
generateTypeStringValueCodeback to summary
private CodeBlock generateTypeStringValueCode(ValueCodeGenerator valueCodeGenerator, TypedStringValue typedStringValue)