Class AddressSetMapping

java.lang.Object
ghidra.program.model.address.AddressSetMapping

public class AddressSetMapping extends Object
Class that provides random access to Addresses in an AddressSet, based on the index of the address in the set, not the address offset value.

For instance, a AddressSet containing addresses [0,1,2,3,4,90,91,92,93,94], getAddress(1) will return an Address with an offset value of 1, but getAddress(5) will return an Address instance with an offset value of 90.

This collapses a sparse address space with holes into a contiguous list of addresses.

  • Constructor Details

  • Method Details

    • getAddress

      public Address getAddress(int index)
      Returns the Address at the specified position in the AddressSet.
      Parameters:
      index - the index into the ordered list of addresses within an AddressSet.
      Returns:
      the Address at the specified position.