private void appendClassName(PsiElement declaration) {
      if (declaration instanceof PsiClass psiClass) {
        final String ownerClassQN = getTopmostOwnerClassQualifiedName(psiClass);
        if (ownerClassQN != null) {
          appendClassName(ownerClassQN);
          final String ownerClassPackageName = StringUtil.getPackageName(ownerClassQN);
          if (!StringUtil.isEmpty(ownerClassPackageName)) {
            appendDemandedPackageName(ownerClassPackageName);
          }
        }
        else {
          final String classQN = psiClass.getQualifiedName();
          if (classQN != null) {
            appendClassName(classQN);
          }
        }
      }
    }
private void appendClassName(PsiElement declaration)