}
@Override
public void checkType(TypeContext context) {
Type type = context.getPropertyType(parameterName, propertyPath);
TypeToken typeToken = new TypeToken(type);
Class<?> mappedClass = typeToken.getMappedClass();
if (!typeToken.isIterable()) { // 不是集合或数组抛出异常
throw new IncorrectParameterTypeException("invalid type of " + fullName + ", " +
"expected array or implementations of java.util.List or implementations of java.util.Set " +
"but " + type);
}
if (mappedClass == null || !JdbcUtils.isSingleColumnClass(mappedClass)) {
String s = typeToken.isArray() ? "component" : "actual";
throw new IncorrectParameterTypeException("invalid " + s + " type of " + fullName + ", " +
s + " type of " + fullName + " expected a class can be identified by jdbc " +
"but " + typeToken.getMappedType());
}
}