/**
* Index super types for {@link IndexSubclasses} and any {@link IndexAnnotated}
* additionally accompanied by {@link Inherited}.
*/
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);
}
}
ClassIndexProcessor.java 文件源码
java
阅读 31
收藏 0
点赞 0
评论 0
项目:soklet
作者:
评论列表
文章目录