@Override public SqlStatementParameterCustomizer createForParameter(Annotation annotation, Class<?> sqlObjectType, Method method, Parameter param, int index, Type paramType) { final BindMethodsList bindMethodsList = (BindMethodsList) annotation; final String name = ParameterUtil.findParameterName(bindMethodsList.value(), param) .orElseThrow(() -> new UnsupportedOperationException("A @BindMethodsList parameter was not given a name, " + "and parameter name data is not present in the class file, for: " + param.getDeclaringExecutable() + "::" + param)); return (stmt, arg) -> { if (arg == null) { throw new IllegalArgumentException("argument is null; null was explicitly forbidden on BindMethodsList"); } stmt.bindMethodsList(name, IterableLike.iterable(arg), Arrays.asList(bindMethodsList.methodNames())); }; } }