Record Class Loader.ImporterSettings

java.lang.Object
java.lang.Record
ghidra.app.util.opinion.Loader.ImporterSettings
Record Components:
provider - The bytes to load.
importName - The name for the primary Loaded DomainObject. Path information that appears at the beginning the name will be appended to the projectRootPath during the saving process.
project - The Project. Loaders can use this to take advantage of existing DomainFolders and DomainFiles to do custom behaviors such as loading libraries. A Project is also required during the saving process. Could be null if there is no project.
projectRootPath - The project folder path that all Loaded DomainObjects will be saved relative to. If null, "/" will be used.
mirrorFsLayout - True if the filesystem layout should be mirrored when saving; otherwise, false
loadSpec - The LoadSpec to use during load.
options - The load options.
consumer - A reference to the object "consuming" the returned LoadResults, used to ensure the underlying Programs are only closed when every consumer is done with it (see LoadResults.close()).
log - The message log.
monitor - A task monitor.
Enclosing interface:
Loader

public static record Loader.ImporterSettings(ByteProvider provider, String importName, Project project, String projectRootPath, boolean mirrorFsLayout, LoadSpec loadSpec, List<Option> options, Object consumer, MessageLog log, TaskMonitor monitor) extends Record
A Loader configuration
  • Constructor Details

    • ImporterSettings

      public ImporterSettings(ByteProvider provider, String importName, Project project, String projectRootPath, boolean mirrorFsLayout, LoadSpec loadSpec, List<Option> options, Object consumer, MessageLog log, TaskMonitor monitor)
      Creates an instance of a ImporterSettings record class.
      Parameters:
      provider - the value for the provider record component
      importName - the value for the importName record component
      project - the value for the project record component
      projectRootPath - the value for the projectRootPath record component
      mirrorFsLayout - the value for the mirrorFsLayout record component
      loadSpec - the value for the loadSpec record component
      options - the value for the options record component
      consumer - the value for the consumer record component
      log - the value for the log record component
      monitor - the value for the monitor record component
  • Method Details

    • importNameOnly

      public String importNameOnly()
      Returns The name portion of the importName, stripping off any leading path information that may be present.
      Returns:
      The name portion of the importName, stripping off any leading path information that may be present
    • importPathOnly

      public String importPathOnly()
      Returns The path portion of the importName if present, stripping off the trailing name (could be the empty string).
      Returns:
      The path portion of the importName if present, stripping off the trailing name (could be the empty string)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • provider

      public ByteProvider provider()
      Returns the value of the provider record component.
      Returns:
      the value of the provider record component
    • importName

      public String importName()
      Returns the value of the importName record component.
      Returns:
      the value of the importName record component
    • project

      public Project project()
      Returns the value of the project record component.
      Returns:
      the value of the project record component
    • projectRootPath

      public String projectRootPath()
      Returns the value of the projectRootPath record component.
      Returns:
      the value of the projectRootPath record component
    • mirrorFsLayout

      public boolean mirrorFsLayout()
      Returns the value of the mirrorFsLayout record component.
      Returns:
      the value of the mirrorFsLayout record component
    • loadSpec

      public LoadSpec loadSpec()
      Returns the value of the loadSpec record component.
      Returns:
      the value of the loadSpec record component
    • options

      public List<Option> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component
    • consumer

      public Object consumer()
      Returns the value of the consumer record component.
      Returns:
      the value of the consumer record component
    • log

      public MessageLog log()
      Returns the value of the log record component.
      Returns:
      the value of the log record component
    • monitor

      public TaskMonitor monitor()
      Returns the value of the monitor record component.
      Returns:
      the value of the monitor record component