private void initializeAnnotations() {
if (lazyAnnotations != null) {
return;
}
if (parent != null) {
lazyAnnotations = new HashMap<Class<?>, Annotation>();
// ((Annotations)parent).initializeAnnotations();
// for (Entry<Class<?>, Annotation> entry :
// ((Annotations)parent).lazyAnnotations.entrySet()) {
// if
// (entry.getValue().annotationType().isAnnotationPresent(Inherited.class))
// {
// lazyAnnotations.put(entry.getKey(), entry.getValue());
// }
// }
for (Annotation a : parent.getAnnotations()) {
if (ClassHelper.AsClass(a.annotationType())
.isAnnotationPresent(Inherited.class)) {
lazyAnnotations.put(a.annotationType(), a);
}
}
lazyAnnotations.putAll(declaredAnnotations);
} else {
lazyAnnotations = declaredAnnotations;
}
}
Annotations.java 文件源码
java
阅读 38
收藏 0
点赞 0
评论 0
项目:gwt-backbone
作者:
评论列表
文章目录