Polishing

This commit is contained in:
Juergen Hoeller
2015-12-01 19:16:16 +01:00
parent 948ab21f43
commit 85863a5442
2 changed files with 25 additions and 19 deletions

View File

@@ -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;