private static int getCompareType(PsiImportDeclaration importStatement) {
    if (importStatement instanceof PsiImportStatementBase importStatementBase) {
      return importStatementBase.isOnDemand() ? 1 : 0;
    }
    else if (importStatement instanceof PsiImportModuleStatement) {
      return 2;
    } else {
      return 4;
    }
  }
private static int getCompareType(PsiImportDeclaration importStatement)