@Override Type getParameterType(Parameter parameter) { Type type = super.getParameterType(parameter); if (!parameter.isAnnotationPresent(SingleValue.class)) { Class<?> erasedType = GenericTypes.getErasedType(type); if (Iterable.class.isAssignableFrom(erasedType)) { return GenericTypes.findGenericParameter(type, Iterable.class).get(); } else if (Iterator.class.isAssignableFrom(erasedType)) { return GenericTypes.findGenericParameter(type, Iterator.class).get(); } else if (GenericTypes.isArray(type)) { return ((Class<?>) type).getComponentType(); } } return type; }