added forNestedType(MethodParameter) for resolution of nested parameter types for collection, array, and map parameter types

This commit is contained in:
Keith Donald
2011-01-06 21:59:34 +00:00
parent 61cfb96d95
commit 4c9731d572
6 changed files with 91 additions and 35 deletions

View File

@@ -236,7 +236,7 @@ public class ReflectionHelper {
TypeDescriptor targetType;
if (varargsPosition != null && argPosition >= varargsPosition) {
MethodParameter methodParam = MethodParameter.forMethodOrConstructor(methodOrCtor, varargsPosition);
targetType = TypeDescriptor.forNestedType(methodParam.getParameterType().getComponentType(), methodParam);
targetType = TypeDescriptor.forNestedType(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 = TypeDescriptor.forNestedType(methodParam.getParameterType().getComponentType(), methodParam);
targetType = TypeDescriptor.forNestedType(methodParam);
}
else {
targetType = new TypeDescriptor(new MethodParameter(method, argPosition));