Supplier<FileElement> (@NotNull FileElement treeElement) { if (isKeepTreeElementByHardReference()) { return () -> treeElement; } return myManager.isBatchFilesProcessingMode() ? new PatchedWeakReference<>(treeElement) : new SoftReference<>(treeElement); }