} else {
optionalCompleters = new HashMap<String, Completer>();
final Map<Integer, Method> methods = new HashMap<Integer, Method>();
for (Class<?> type = function.getActionClass(); type != null; type = type.getSuperclass()) {
for (Method method : type.getDeclaredMethods()) {
CompleterValues completerMethod = method.getAnnotation(CompleterValues.class);
if (completerMethod != null) {
int index = completerMethod.index();
Integer key = index;
if (index >= arguments.size() || index < 0) {
LOGGER.warn("Index out of range on @CompleterValues on class " + type.getName() + " for index: " + key + " see: " + method);
}
if (methods.containsKey(key)) {