static boolean annotationMatchesTarget(Element annotationElement, ElementType elementType) {
@Nullable Target target = annotationElement.getAnnotation(Target.class);
if (target != null) {
ElementType[] targetTypes = target.value();
if (targetTypes.length == 0) {
return false;
}
boolean found = false;
for (ElementType t : targetTypes) {
if (t == elementType) {
found = true;
}
}
if (!found) {
return false;
}
}
return true;
}
Annotations.java 文件源码
java
阅读 40
收藏 0
点赞 0
评论 0
项目:GitHub
作者:
评论列表
文章目录