Controller.java 文件源码

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

项目:Diorite 作者:
@Override
protected Map<Class<? extends Annotation>, ? extends Annotation> extractRawScopeAnnotations(AnnotatedCodeElement element)
{
    Annotation[] annotations = AsmUtils.getAnnotations(element, RetentionPolicy.RUNTIME);
    Map<Class<? extends Annotation>, Annotation> resultMap = new HashMap<>(annotations.length + 1);
    for (Annotation annotation : annotations)
    {
        Class<? extends Annotation> annotationType = annotation.annotationType();
        if (annotationType.isAnnotationPresent(Scope.class))
        {
            if (resultMap.containsKey(annotationType))
            {
                throw new IllegalStateException("Duplicated scope! Found: " + annotation + ", others: " + resultMap);
            }
            resultMap.put(annotationType, annotation);
        }
    }
    return resultMap;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号