public static List<DomElementProblemDescriptor> checkExtendsClassInReferences(final GenericDomValue element,
                                                                                final DomElementAnnotationHolder holder) {
    if (!isPsiClassType(element)) {
      return Collections.emptyList();
    }

    final Object valueObject = element.getValue();
    if (!(valueObject instanceof PsiClass)) return Collections.emptyList();

    final XmlElement valueElement = DomUtil.getValueElement(element);
    if (valueElement == null) return Collections.emptyList();

    PsiReference[] references = ourProvider.getReferencesByElement(valueElement, new ProcessingContext());
    String[] superClasses = JBIterable.of(references)
      .filter(JavaClassReference.class)
      .unique(o -> o.getProvider())
      .flatten(o -> o.getSuperClasses())
      .unique()
      .toArray(ArrayUtil.EMPTY_STRING_ARRAY);
    return checkExtendClass(element,
                            ((PsiClass)valueObject),
                            superClasses,
                            false,
                            false,
                            true,
                            false,
                            true,
                            true,
                            holder);
  }
public static List<DomElementProblemDescriptor> checkExtendsClassInReferences(final GenericDomValue element,
                                                                                final DomElementAnnotationHolder holder)