private void resolveAnnotationsForClassOrObject( AnnotationResolver annotationResolver, JetClassOrObject jetClass, MutableClassDescriptor descriptor) { JetModifierList modifierList = jetClass.getModifierList(); if (modifierList != null) { descriptor .getAnnotations() .addAll( annotationResolver.resolveAnnotations( descriptor.getScopeForSupertypeResolution(), modifierList.getAnnotationEntries())); } }
@Override public List<AnnotationDescriptor> getAnnotations() { if (annotations == null) { JetClassLikeInfo classInfo = declarationProvider.getOwnerInfo(); JetModifierList modifierList = classInfo.getModifierList(); if (modifierList != null) { AnnotationResolver annotationResolver = resolveSession.getInjector().getAnnotationResolver(); annotations = annotationResolver.resolveAnnotations( resolveSession.getResolutionScope(classInfo.getScopeAnchor()), modifierList, resolveSession.getTrace()); } else { annotations = Collections.emptyList(); } } return annotations; }