private @Nullable PsiJavaCodeReferenceElement findReference() {
    PsiReferenceList permitsList = myParentClass.getPermitsList();
    if (permitsList == null) return null;
    PsiJavaCodeReferenceElement[] childRefs = permitsList.getReferenceElements();
    if (childRefs.length < 1) return null;
    return ContainerUtil.find(childRefs, ref -> ref.resolve() == getReferencedElement());
  }
private @Nullable PsiJavaCodeReferenceElement findReference()