Polishing
This commit is contained in:
@@ -29,10 +29,10 @@ import org.springframework.util.Assert;
|
||||
* type pairs (see {@link #getConvertibleTypes()}. In addition, GenericConverter implementations
|
||||
* have access to source/target {@link TypeDescriptor field context} during the type conversion
|
||||
* process. This allows for resolving source and target field metadata such as annotations and
|
||||
* generics information, which can be used influence the conversion logic.
|
||||
* generics information, which can be used to influence the conversion logic.
|
||||
*
|
||||
* <p>This interface should generally not be used when the simpler {@link Converter} or
|
||||
* {@link ConverterFactory} interfaces are sufficient.
|
||||
* {@link ConverterFactory} interface is sufficient.
|
||||
*
|
||||
* <p>Implementations may additionally implement {@link ConditionalConverter}.
|
||||
*
|
||||
@@ -47,16 +47,16 @@ import org.springframework.util.Assert;
|
||||
public interface GenericConverter {
|
||||
|
||||
/**
|
||||
* Return the source and target types which this converter can convert between. Each
|
||||
* entry is a convertible source-to-target type pair.
|
||||
* <p>For {@link ConditionalConverter conditional} converters this method may return
|
||||
* Return the source and target types that this converter can convert between.
|
||||
* <p>Each entry is a convertible source-to-target type pair.
|
||||
* <p>For {@link ConditionalConverter conditional converters} this method may return
|
||||
* {@code null} to indicate all source-to-target pairs should be considered.
|
||||
*/
|
||||
Set<ConvertiblePair> getConvertibleTypes();
|
||||
|
||||
/**
|
||||
* Convert the source to the targetType described by the TypeDescriptor.
|
||||
* @param source the source object to convert (may be null)
|
||||
* Convert the source object to the targetType described by the {@code TypeDescriptor}.
|
||||
* @param source the source object to convert (may be {@code null})
|
||||
* @param sourceType the type descriptor of the field we are converting from
|
||||
* @param targetType the type descriptor of the field we are converting to
|
||||
* @return the converted object
|
||||
@@ -67,7 +67,7 @@ public interface GenericConverter {
|
||||
/**
|
||||
* Holder for a source-to-target class pair.
|
||||
*/
|
||||
public static final class ConvertiblePair {
|
||||
final class ConvertiblePair {
|
||||
|
||||
private final Class<?> sourceType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user