throw new AmbiguousException();
default: throw new AmbiguousException();
throw new AmbiguousException();
@Override public Method find(final String methodName, final Object[] args) throws AmbiguousException { Preconditions.checkNotNull(args, "params cannot not be null"); //first try direct matches final Class<?>[] parametersTypes = VelocityTypesUtil.getParametersTypes(args); final Collection<Method> methods = copyOf(Iterables.filter(get(methodName), new Predicate<Method>() { @Override public boolean apply(final Method method) { return Arrays.equals(VelocityTypesUtil.getMethodArgsTypes(method), parametersTypes); } })); if (methods.size() == 1) { return Iterables.getOnlyElement(methods); } else if (methods.isEmpty()) { return super.find(methodName, args); } else { throw new MethodMap.AmbiguousException(); } }