@Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
      try {
        Method override = getClass().getMethod(method.getName(), method.getParameterTypes());
        if (override.getDeclaringClass() == getClass()) {
          return override.invoke(this, args);
        }
      } catch (NoSuchMethodException ignored) {
        // OK: we don't have an override for this method, so just invoke the original method.
      }
      return method.invoke(original, args);
    }
InvocationHandler that forwards every method to an original object, except methods where there
is an implementation in this class with the same signature. So for example in the subclass
{@link ElementsHandler} there is a method {@link ElementsHandler#getTypeElement(CharSequence)},
which means that a call of {@link Elements#getTypeElement(CharSequence)} on the proxy with this
invocation handler will end up calling that method, but a call of any of the other methods of
{@code Elements} will end up calling the method on the original object.
value/src/test/java/com/google/auto/value/processor/GeneratedDoesNotExistTest.java