@Nullable
  public static PsiClass getClassAt(@Nullable SourcePosition position) {
    if (position == null) {
      return null;
    }
    final PsiElement element = position.getElementAt();
    return element != null && element.isValid() ? PsiTreeUtil.getParentOfType(element, PsiClass.class, false) : null;
  }
@Nullable
  public static PsiClass getClassAt(@Nullable SourcePosition position)