Package ghidra.app.util.importer

# Class AutoImporter

java.lang.Object
ghidra.app.util.importer.AutoImporter

public final class AutoImporter extends Object
Utility methods to do `Program` imports automatically (without requiring user interaction)

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Loaded<Program>`
  `importAsBinary(ByteProvider bytes, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `ByteProvider` bytes with the `BinaryLoader`, using the given language and compiler specification.
  `static Loaded<Program>`
  `importAsBinary(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `File` with the `BinaryLoader`, using the given language and compiler specification.
  `static LoadResults<Program>`
  `importByLookingForLcs(FSRL fsrl, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `FSRL` with the best matching `Loader` that supports the given language and compiler specification.
  `static LoadResults<Program>`
  `importByLookingForLcs(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `File` with the best matching `Loader` that supports the given language and compiler specification.
  `static LoadResults<Program>`
  `importByUsingBestGuess(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the give `bytes` with the best matching `Loader` for the `ByteProvider`'s format.
  `static LoadResults<Program>`
  `importByUsingBestGuess(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `FSRL` with the best matching `Loader` for the `File`'s format.
  `static LoadResults<Program>`
  `importByUsingBestGuess(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `File` with the best matching `Loader` for the `File`'s format.
  `static LoadResults<Program>`
  `importByUsingSpecificLoaderClass(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `FSRL` with the given type of `Loader`.
  `static LoadResults<Program>`
  `importByUsingSpecificLoaderClass(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `File` with the given type of `Loader`.
  `static LoadResults<Program>`
  `importByUsingSpecificLoaderClassAndLcs(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `FSRL` with the given type of `Loader`, language, and compiler specification.
  `static LoadResults<Program>`
  `importByUsingSpecificLoaderClassAndLcs(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor)`
  Automatically imports the given `File` with the given type of `Loader`, language, and compiler specification.
  `static LoadResults<Program>`
  `importFresh(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser)`
  Automatically imports the given `bytes` with advanced options.
  `static LoadResults<Program>`
  `importFresh(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser)`
  Automatically imports the given `FSRL` with advanced options.
  `static LoadResults<Program>`
  `importFresh(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser)`
  Automatically imports the given `File` with advanced options.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### importByUsingBestGuess

    public static LoadResults<Program> importByUsingBestGuess(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `File` with the best matching `Loader` for the `File`'s format.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `file` - The `File` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByUsingBestGuess

    public static LoadResults<Program> importByUsingBestGuess(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `FSRL` with the best matching `Loader` for the `File`'s format.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `fsrl` - The `FSRL` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByUsingBestGuess

    public static LoadResults<Program> importByUsingBestGuess(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the give `bytes` with the best matching `Loader` for the `ByteProvider`'s format.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `provider` - The bytes to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByUsingSpecificLoaderClass

    public static LoadResults<Program> importByUsingSpecificLoaderClass(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `File` with the given type of `Loader`.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `file` - The `File` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderClass` - The `Loader` class to use
      `loaderArgs` - A `List` of optional `Loader`-specific arguments
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByUsingSpecificLoaderClass

    public static LoadResults<Program> importByUsingSpecificLoaderClass(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `FSRL` with the given type of `Loader`.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `fsrl` - The `FSRL` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderClass` - The `Loader` class to use
      `loaderArgs` - A `List` of optional `Loader`-specific arguments
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByLookingForLcs

    public static LoadResults<Program> importByLookingForLcs(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `File` with the best matching `Loader` that supports the given language and compiler specification.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `file` - The `File` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `language` - The desired `Language`
      `compilerSpec` - The desired `compiler specification`
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByLookingForLcs

    public static LoadResults<Program> importByLookingForLcs(FSRL fsrl, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `FSRL` with the best matching `Loader` that supports the given language and compiler specification.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `fsrl` - The `FSRL` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `language` - The desired `Language`
      `compilerSpec` - The desired `compiler specification`
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importByUsingSpecificLoaderClassAndLcs

    public static LoadResults<Program> importByUsingSpecificLoaderClassAndLcs(File file, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException
    Automatically imports the given `File` with the given type of `Loader`, language, and compiler specification.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `file` - The `File` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderClass` - The `Loader` class to use
      `loaderArgs` - A `List` of optional `Loader`-specific arguments
      `language` - The desired `Language`
      `compilerSpec` - The desired `compiler specification`
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade

  - ### importByUsingSpecificLoaderClassAndLcs

    public static LoadResults<Program> importByUsingSpecificLoaderClassAndLcs(FSRL fsrl, Project project, String projectFolderPath, Class<? extends Loader> loaderClass, List<Pair<String,String>> loaderArgs, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException
    Automatically imports the given `FSRL` with the given type of `Loader`, language, and compiler specification.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `fsrl` - The `FSRL` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderClass` - The `Loader` class to use
      `loaderArgs` - A `List` of optional `Loader`-specific arguments
      `language` - The desired `Language`
      `compilerSpec` - The desired `compiler specification`
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade

  - ### importAsBinary

    public static Loaded<Program> importAsBinary(File file, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `File` with the `BinaryLoader`, using the given language and compiler specification.

    Note that when the import completes, the returned `Loaded` `Program` is not saved to a project. That is the responsibility of the caller (see `Loaded.save(Project, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program` with `Loaded.release(Object)` when it is no longer needed.

    Parameters:
      `file` - The `File` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`. This is just a suggestion, and a `Loader` implementation reserves the right to change it for the `Loaded` result. The `Loaded` result should be queried for its true project folder paths using `Loaded.getProjectFolderPath()`.
      `language` - The desired `Language`
      `compilerSpec` - The desired `compiler specification`
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `Loaded` `Program` (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importAsBinary

    public static Loaded<Program> importAsBinary(ByteProvider bytes, Project project, String projectFolderPath, Language language, CompilerSpec compilerSpec, Object consumer, MessageLog messageLog, TaskMonitor monitor) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `ByteProvider` bytes with the `BinaryLoader`, using the given language and compiler specification.

    Note that when the import completes, the returned `Loaded` `Program` is not saved to a project. That is the responsibility of the caller (see `Loaded.save(Project, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program` with `Loaded.release(Object)` when it is no longer needed.

    Parameters:
      `bytes` - The bytes to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`. This is just a suggestion, and a `Loader` implementation reserves the right to change it the `Loaded` result. The `Loaded` result should be queried for its true project folder paths using `Loaded.getProjectFolderPath()`.
      `language` - The desired `Language`
      `compilerSpec` - The desired `compiler specification`
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `Loaded` `Program` (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importFresh

    public static LoadResults<Program> importFresh(File file, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `File` with advanced options.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `file` - The `File` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderFilter` - A `Predicate` used to choose what `Loader`(s) get used
      `loadSpecChooser` - A `LoadSpecChooser` used to choose what `LoadSpec`(s) get used
      `importNameOverride` - The name to use for the imported thing. Null to use the `Loader`'s preferred name.
      `optionChooser` - A `OptionChooser` used to choose what `Loader` options get used
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importFresh

    public static LoadResults<Program> importFresh(FSRL fsrl, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `FSRL` with advanced options.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `fsrl` - The `FSRL` to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderFilter` - A `Predicate` used to choose what `Loader`(s) get used
      `loadSpecChooser` - A `LoadSpecChooser` used to choose what `LoadSpec`(s) get used
      `importNameOverride` - The name to use for the imported thing. Null to use the `Loader`'s preferred name.
      `optionChooser` - A `OptionChooser` used to choose what `Loader` options get used
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded

  - ### importFresh

    public static LoadResults<Program> importFresh(ByteProvider provider, Project project, String projectFolderPath, Object consumer, MessageLog messageLog, TaskMonitor monitor, Predicate<Loader> loaderFilter, LoadSpecChooser loadSpecChooser, String importNameOverride, OptionChooser optionChooser) throws IOException, CancelledException, DuplicateNameException, InvalidNameException, VersionException, LoadException
    Automatically imports the given `bytes` with advanced options.

    Note that when the import completes, the returned `Loaded` `Program`s are not saved to a project. That is the responsibility of the caller (see `LoadResults.save(Project, Object, MessageLog, TaskMonitor)`).

    It is also the responsibility of the caller to release the returned `Loaded` `Program`s with `LoadResults.release(Object)` when they are no longer needed.

    Parameters:
      `provider` - The bytes to import
      `project` - The `Project`. Loaders can use this to take advantage of existing `DomainFolder`s and `DomainFile`s to do custom behaviors such as loading libraries. Could be null if there is no project.
      `projectFolderPath` - A suggested project folder path for the `Loaded` `Program`s. This is just a suggestion, and a `Loader` implementation reserves the right to change it for each `Loaded` result. The `Loaded` results should be queried for their true project folder paths using `Loaded.getProjectFolderPath()`.
      `loaderFilter` - A `Predicate` used to choose what `Loader`(s) get used
      `loadSpecChooser` - A `LoadSpecChooser` used to choose what `LoadSpec`(s) get used
      `importNameOverride` - The name to use for the imported thing. Null to use the `Loader`'s preferred name.
      `optionChooser` - A `OptionChooser` used to choose what `Loader` options get used
      `consumer` - A consumer
      `messageLog` - The log
      `monitor` - A task monitor
    Returns:
      The `LoadResults` which contains one ore more `Loaded` `Program`s (created but not saved)
    Throws:
      `IOException` - if there was an IO-related problem loading
      `CancelledException` - if the operation was cancelled
      `DuplicateNameException` - if the load resulted in a `Program` naming conflict
      `InvalidNameException` - if an invalid `Program` name was used during load
      `VersionException` - if there was an issue with database versions, probably due to a failed language upgrade
      `LoadException` - if nothing was loaded