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

This commit is contained in:
Keith Donald
2011-01-06 05:14:49 +00:00
parent 9420bdc246
commit 01c98c3bfb
7 changed files with 107 additions and 64 deletions

View File

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