Interface AutoReadMemorySpec


public interface AutoReadMemorySpec
An interface for specifying how to automatically read target memory.
  • Method Details

    • getConfigName

      String getConfigName()
      Get the configuration name

      This is the value stored in configuration files to identify this specification

      Returns:
      the configuration name
    • getMenuName

      String getMenuName()
      A human-readable name for this specification

      This is the text displayed in menus

      Returns:
      the menu name, or null to omit from menus
    • getMenuIcon

      Icon getMenuIcon()
      Get the icon for this specification
      Returns:
      the icon
    • getEffective

      AutoReadMemorySpec getEffective(DebuggerCoordinates coordinates)
      Get the "effective" specification.

      This allows a specification to defer to some other (possibly hidden) specification, depending on the coordinates.

      Parameters:
      coordinates - the current coordinates
      Returns:
      the specification
    • readMemory

      CompletableFuture<Boolean> readMemory(PluginTool tool, DebuggerCoordinates coordinates, AddressSetView visible)
      Perform the automatic read, if applicable

      Note, the implementation should perform all the error handling. The returned future is for follow-up purposes only, and should always complete normally. It should complete with true if any memory was actually loaded. Otherwise, it should complete with false.

      NOTE: This returns the future, rather than being synchronous, because not all specs will actually need to create a background task. If this were synchronous, the caller would have to invoke it from a background thread, requiring it to create that thread whether or not this method actually does anything.

      Parameters:
      tool - the tool containing the provider
      coordinates - the provider's current coordinates
      visible - the provider's visible addresses
      Returns:
      a future that completes when the memory has been read