Skip to content

Commit 08180e9

Browse files
author
Keith Donald
committed
javadoc polishing
1 parent a8dbac6 commit 08180e9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

org.springframework.core/src/main/java/org/springframework/core/convert/TypeDescriptor.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@
3737
import org.springframework.util.StringUtils;
3838

3939
/**
40-
* Context about a type to convert to.
41-
*
40+
* Context about a type to convert from or to.
4241
* @author Keith Donald
4342
* @author Andy Clement
4443
* @author Juergen Hoeller
@@ -85,8 +84,8 @@ public class TypeDescriptor {
8584
private final Annotation[] annotations;
8685

8786
/**
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.
9089
* @param methodParameter the method parameter
9190
*/
9291
public TypeDescriptor(MethodParameter methodParameter) {
@@ -95,7 +94,7 @@ public TypeDescriptor(MethodParameter methodParameter) {
9594

9695
/**
9796
* 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.
9998
* @param field the field
10099
*/
101100
public TypeDescriptor(Field field) {
@@ -155,8 +154,8 @@ public static TypeDescriptor map(Class<?> mapType, TypeDescriptor keyType, TypeD
155154
/**
156155
* Create a new type descriptor for an object.
157156
* 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}.
160159
* If the object is not a collection or map, simply calls {@link #valueOf(Class)}.
161160
* 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.
162161
* The introspection algorithm derives nested element or key/value types by resolving the "common element type" across the collection or map.

0 commit comments

Comments
 (0)