@Contract("null -> null")
    static StreamSource tryCreate(PsiLoopStatement statement) {
      if (statement == null) return null;
      BufferedReaderLines readerSource = BufferedReaderLines.from(statement);
      if (readerSource != null) return readerSource;
      if (statement instanceof PsiForStatement) {
        CountingLoopSource countingLoopSource = CountingLoopSource.from((PsiForStatement)statement);
        if (countingLoopSource != null) return countingLoopSource;
        return IterateStreamSource.from((PsiForStatement)statement);
      }
      if (statement instanceof PsiForeachStatement) {
        ArrayStream source = ArrayStream.from((PsiForeachStatement)statement);
        return source == null ? CollectionStream.from((PsiForeachStatement)statement) : source;
      }
      return null;
    }
@Contract("null -> null")
    static StreamSource tryCreate(PsiLoopStatement statement)