TypeInfo typeInfo,
MethodInfo getter,
MethodInfo setter) {
TypeInfo resolvedTI = beanTypeInfo.resolve(typeInfo);
if (resolvedTI instanceof ParameterizedTypeInfo) {
ParameterizedTypeInfo parameterizedTI = (ParameterizedTypeInfo)resolvedTI;
TypeInfo rawTI = parameterizedTI.getRawType();
if (rawTI instanceof ClassTypeInfo) {
ClassTypeInfo rawClassTI = (ClassTypeInfo)rawTI;
String rawClassName = rawClassTI.getName();
if (rawClassName.equals("java.util.Collection") || rawClassName.equals("java.util.List")) {
TypeInfo elementTV = parameterizedTI.getTypeArguments().get(0);
ClassTypeInfo elementTI = resolveClass(beanTypeInfo, elementTV);
if (elementTI != null) {
ValueInfo resolvedElementTI = createValue(elementTI, getter, setter);
if (rawClassName.equals("java.util.Collection")) {
return new CollectionPropertyInfo<ValueInfo>(
name,
resolvedElementTI,
getter,
setter);
} else {
return new ListPropertyInfo<ValueInfo>(
name,
resolvedElementTI,
getter,
setter);
}
}
} else if (rawClassName.equals("java.util.Map")) {
TypeInfo elementTV = parameterizedTI.getTypeArguments().get(1);
ClassTypeInfo elementTI = resolveClass(beanTypeInfo, elementTV);
if (elementTI != null) {
ValueInfo resolvedElementTI = createValue(elementTI, getter, setter);
TypeInfo keyTV = parameterizedTI.getTypeArguments().get(0);
ClassTypeInfo keyTI = resolveClass(beanTypeInfo, keyTV);
if (keyTI != null) {
ValueInfo resolvedKeyTI = createValue(keyTI, getter, setter);
return new MapPropertyInfo<ValueInfo, ValueInfo>(
name,