Package org.springframework.aot.generate

# Class ValueCodeGeneratorDelegates.MapDelegate

java.lang.Object
org.springframework.aot.generate.ValueCodeGeneratorDelegates.MapDelegate

All Implemented Interfaces:
  `ValueCodeGenerator.Delegate`

Enclosing class:
  ValueCodeGeneratorDelegates

public static class ValueCodeGeneratorDelegates.MapDelegate extends Object implements ValueCodeGenerator.Delegate
`ValueCodeGenerator.Delegate` for `Map` types.

## Constructor Summary

Constructors
Constructor
Description
`MapDelegate()`

## 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`.
`protected org.springframework.javapoet.CodeBlock`
`generateMapCode(ValueCodeGenerator valueCodeGenerator, Map<?,?> map)`
Generate the code for a non-empty `Map`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MapDelegate

public MapDelegate()

## Method Details

### generateCode

@Nullable public org.springframework.javapoet.CodeBlock generateCode(ValueCodeGenerator valueCodeGenerator, Object value)
Description copied from interface: `ValueCodeGenerator.Delegate`
Generate the code for the specified non-null `value`. If this instance does not support the value, it should return `null` to indicate so.

Specified by:
  `generateCode` in interface `ValueCodeGenerator.Delegate`
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.

### generateMapCode

@Nullable protected org.springframework.javapoet.CodeBlock generateMapCode(ValueCodeGenerator valueCodeGenerator, Map<?,?> map)
Generate the code for a non-empty `Map`.

Parameters:
  `valueCodeGenerator` - the code generator to use for embedded values
  `map` - the value to generate
Returns:
  the code that represents the specified map or `null` if the specified map is not supported.