added initial support for handling unknown nested type values when converting collections; now favor factory method for constructing nested type descriptors for clarity (made constructor private); improved javadoc

git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3867 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
Keith Donald
2011-01-06 05:14:49 +00:00
parent 480aa5d993
commit ed2a257e69
7 changed files with 107 additions and 64 deletions
@@ -236,7 +236,7 @@ public class ReflectionHelper {
TypeDescriptor targetType;
if (varargsPosition != null && argPosition >= varargsPosition) {
MethodParameter methodParam = MethodParameter.forMethodOrConstructor(methodOrCtor, varargsPosition);
targetType = new TypeDescriptor(methodParam.getParameterType().getComponentType(), methodParam);
targetType = TypeDescriptor.forNestedType(methodParam.getParameterType().getComponentType(), methodParam);
}
else {
targetType = new TypeDescriptor(MethodParameter.forMethodOrConstructor(methodOrCtor, argPosition));
@@ -268,7 +268,7 @@ public class ReflectionHelper {
TypeDescriptor targetType;
if (varargsPosition != null && argPosition >= varargsPosition) {
MethodParameter methodParam = new MethodParameter(method, varargsPosition);
targetType = new TypeDescriptor(methodParam.getParameterType().getComponentType(), methodParam);
targetType = TypeDescriptor.forNestedType(methodParam.getParameterType().getComponentType(), methodParam);
}
else {
targetType = new TypeDescriptor(new MethodParameter(method, argPosition));