|
55 | 55 | * Value object to capture custom conversion. That is essentially a {@link List} of converters and some additional logic
|
56 | 56 | * around them. The converters build up two sets of types which store-specific basic types can be converted into and
|
57 | 57 | * from. These types will be considered simple ones (which means they neither need deeper inspection nor nested
|
58 |
| - * conversion. Thus, the {@link CustomConversions} also act as factory for {@link SimpleTypeHolder} . |
| 58 | + * conversion. Thus, the {@link CustomConversions} also act as factory for {@link SimpleTypeHolder}. |
| 59 | + * <p> |
| 60 | + * Custom conversions supports the following converters: |
| 61 | + * <ul> |
| 62 | + * <li>Converters built by {@link ConverterBuilder}</li> |
| 63 | + * <li>{@link GenericConverter}</li> |
| 64 | + * <li>{@link ConverterFactory}</li> |
| 65 | + * <li>{@link Converter}</li> |
| 66 | + * </ul> |
| 67 | + * Note that CustomConversions does not support {@link org.springframework.core.convert.converter.ConditionalConverter} |
| 68 | + * as custom conversions maintains a registry of convertible type pairs; We cannot determine convertible types based on |
| 69 | + * {@code ConditionalConverter#matches}, instead, we require a converter to provide its convertible types either through |
| 70 | + * the class declaration or {@code GenericConverter#getConvertibleTypes}. |
59 | 71 | *
|
60 | 72 | * @author Oliver Gierke
|
61 | 73 | * @author Thomas Darimont
|
@@ -119,9 +131,9 @@ public CustomConversions(ConverterConfiguration converterConfiguration) {
|
119 | 131 |
|
120 | 132 | List<Object> registeredConverters = collectPotentialConverterRegistrations(
|
121 | 133 | converterConfiguration.getStoreConversions(), converterConfiguration.getUserConverters()).stream()
|
122 |
| - .filter(this::isSupportedConverter).filter(this::shouldRegister) |
123 |
| - .map(ConverterRegistrationIntent::getConverterRegistration).map(this::register).distinct() |
124 |
| - .collect(Collectors.toList()); |
| 134 | + .filter(this::isSupportedConverter).filter(this::shouldRegister) |
| 135 | + .map(ConverterRegistrationIntent::getConverterRegistration).map(this::register).distinct() |
| 136 | + .collect(Collectors.toList()); |
125 | 137 |
|
126 | 138 | Collections.reverse(registeredConverters);
|
127 | 139 |
|
|
0 commit comments