default @Nullable FileModifier getFileModifierForPreview(@NotNull PsiFile target) {
    if (!startInWriteAction()) return null;
    for (Field field : ReflectionUtil.collectFields(((Object)this).getClass())) {
      if (Modifier.isStatic(field.getModifiers())) continue;
      if (field.getAnnotation(SafeFieldForPreview.class) != null) continue;
      Class<?> type = field.getType();
      while (type.isArray()) type = type.getComponentType();
      if (type.getAnnotation(SafeTypeForPreview.class) != null) continue;
      if (type.isPrimitive() || type.isEnum() || type.equals(String.class) ||
          type.equals(Class.class) || type.equals(Integer.class) || type.equals(Boolean.class) ||
          type.equals(Long.class) || type.equals(Double.class) || type.equals(Float.class) ||
          type.equals(Short.class) || type.equals(Byte.class) || type.equals(Character.class) ||
          // Back-link to the parent inspection looks safe, as inspection should not depend on the file
          (field.isSynthetic() && field.getName().equals("this$0") &&
           LocalInspectionTool.class.isAssignableFrom(type))) {
        continue;
      }
      return null;
    }
    // No PSI-specific state: it's safe to apply this action to a file copy
    return this;
  }
default @Nullable FileModifier getFileModifierForPreview(@NotNull PsiFile target)