ClassDeclarationImpl.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:form-follows-function 作者:
/**
 * {@inheritDoc}
 * Overridden here to handle @Inherited.
 */
public <A extends Annotation> A getAnnotation(Class<A> annoType) {

    boolean inherited = annoType.isAnnotationPresent(Inherited.class);
    for (Type t = sym.type;
         t.tsym != env.symtab.objectType.tsym && !t.isErroneous();
         t = env.jctypes.supertype(t)) {

        A result = getAnnotation(annoType, t.tsym);
        if (result != null || !inherited) {
            return result;
        }
    }
    return null;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号