code: private ExecutableElement getOriginalMethod(
        ExecutableElement topMethod, TypeElement declaringClass, TypeElement currentType) {
      if (currentType == null) {
        return null;
      }
      // TODO(tball): simplify to ElementUtil.getSuperclass() when javac update is complete.
      TypeElement superclass = currentType.getKind().isInterface()
          ? typeUtil.getJavaObject() : ElementUtil.getSuperclass(currentType);
      ExecutableElement original = getOriginalMethod(topMethod, declaringClass, superclass);
      if (original != null) {
        return original;
      }
      for (TypeMirror supertype : currentType.getInterfaces()) {
        original = getOriginalMethod(topMethod, declaringClass, TypeUtil.asTypeElement(supertype));
        if (original != null) {
          return original;
        }
      }
      if (declaringClass == currentType) {
        return topMethod;
      }
      for (ExecutableElement candidate : ElementUtil.getMethods(currentType)) {
        if (ElementUtil.isInstanceMethod(candidate)
            && elementUtil.overrides(topMethod, candidate, declaringClass)) {
          return candidate;
        }
      }
      return null;
    }
docs: Finds the original method element to use for generating a selector. The method returned is the
  first method found in the hierarchy while traversing in order of declared inheritance that
  doesn't override a method from a supertype. (ie. it is the first leaf node found in the tree of
  overriding methods)