code: protected boolean isOverride(TypeElement typeElement, ExecutableElement methodElement) {
      TypeElement currentTypeElement = typeElement;
      do {
        if (currentTypeElement != typeElement) {
          List<? extends Element> enclosedElements = currentTypeElement.getEnclosedElements();
          for (Element enclosedElement : enclosedElements) {
            if (enclosedElement.getSimpleName().equals(methodElement.getSimpleName())
                && enclosedElement.getAnnotation(Inject.class) != null
                && enclosedElement.getKind() == ElementKind.METHOD) {
              return true;
            }
          }
        }
        TypeMirror superclass = currentTypeElement.getSuperclass();
        if (superclass.getKind() == TypeKind.DECLARED) {
          DeclaredType superType = (DeclaredType) superclass;
          currentTypeElement = (TypeElement) superType.asElement();
        } else {
          currentTypeElement = null;
        }
      } while (currentTypeElement != null);
      return false;
    }
docs: the {@code methodElement} would be an override of this method.