code: private void indexSupertypes(TypeElement rootElement, TypeElement element) throws IOException {
  
  		for (TypeMirror mirror : types.directSupertypes(element.asType())) {
  			if (mirror.getKind() != TypeKind.DECLARED) {
  				continue;
  			}
  
  			DeclaredType superType = (DeclaredType) mirror;
  			TypeElement superTypeElement = (TypeElement) superType.asElement();
  			storeSubclass(superTypeElement, rootElement);
  
  			for (AnnotationMirror annotationMirror : superTypeElement.getAnnotationMirrors()) {
  				TypeElement annotationElement = (TypeElement) annotationMirror.getAnnotationType()
  						.asElement();
  
  				if (hasAnnotation(annotationElement, Inherited.class)) {
  					storeAnnotation(annotationElement, rootElement);
  				}
  			}
  
  			indexSupertypes(rootElement, superTypeElement);
  		}
  	}
docs: Index super types for {@link IndexSubclasses} and any {@link IndexAnnotated}
  additionally accompanied by {@link Inherited}.