37
37
import org .springframework .util .StringUtils ;
38
38
39
39
/**
40
- * Context about a type to convert to.
41
- *
40
+ * Context about a type to convert from or to.
42
41
* @author Keith Donald
43
42
* @author Andy Clement
44
43
* @author Juergen Hoeller
@@ -85,8 +84,8 @@ public class TypeDescriptor {
85
84
private final Annotation [] annotations ;
86
85
87
86
/**
88
- * Create a new type descriptor from a method or constructor parameter .
89
- * Use this constructor when a target conversion point is a method parameter.
87
+ * Create a new type descriptor from a {@link MethodParameter} .
88
+ * Use this constructor when a conversion point is a constructor parameter, method parameter, or method return value.
90
89
* @param methodParameter the method parameter
91
90
*/
92
91
public TypeDescriptor (MethodParameter methodParameter ) {
@@ -95,7 +94,7 @@ public TypeDescriptor(MethodParameter methodParameter) {
95
94
96
95
/**
97
96
* Create a new type descriptor for a field.
98
- * Use this constructor when a target conversion point is a field.
97
+ * Use this constructor when a conversion point is a field.
99
98
* @param field the field
100
99
*/
101
100
public TypeDescriptor (Field field ) {
@@ -155,8 +154,8 @@ public static TypeDescriptor map(Class<?> mapType, TypeDescriptor keyType, TypeD
155
154
/**
156
155
* Create a new type descriptor for an object.
157
156
* Use this factory method to introspect a source object's type before asking the conversion system to convert it to some another type.
158
- * Builds in population of nested type descriptors for collection and map objects through object introspection.
159
- * If the object is null, returns {@link TypeDescriptor#NULL}.
157
+ * Populates nested type descriptors for collection and map objects through object introspection.
158
+ * If the provided object is null, returns {@link TypeDescriptor#NULL}.
160
159
* If the object is not a collection or map, simply calls {@link #valueOf(Class)}.
161
160
* If the object is a collection or map, this factory method will derive nested element or key/value types by introspecting the collection or map.
162
161
* The introspection algorithm derives nested element or key/value types by resolving the "common element type" across the collection or map.
0 commit comments