Package ghidra.program.database.util
Class AddressSetPropertyMapDB
- java.lang.Object
-
- ghidra.program.database.util.AddressSetPropertyMapDB
-
- All Implemented Interfaces:
AddressSetPropertyMap
public class AddressSetPropertyMapDB extends java.lang.Object implements AddressSetPropertyMap
AddressSetPropertyMap that uses a RangeMapDB to maintain a set of addresses.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(Address startAddr, Address endAddr)
Add the address range to the property map.void
add(AddressSetView addressSet)
Add the address set to the property map.void
clear()
Clear the property map.boolean
contains(Address addr)
Return whether the property map contains the given address.static AddressSetPropertyMapDB
createPropertyMap(ProgramDB program, java.lang.String mapName, ErrorHandler errHandler, AddressMap addrMap, Lock lock)
void
delete()
AddressIterator
getAddresses()
Return an address iterator over the property map.AddressRangeIterator
getAddressRanges()
Return an address range iterator over the property map.AddressSet
getAddressSet()
Return the address set for the property map.static AddressSetPropertyMapDB
getPropertyMap(ProgramDB program, java.lang.String mapName, ErrorHandler errHandler, AddressMap addrMap, Lock lock)
void
moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor)
Move the address range to a new starting address.void
remove(Address startAddr, Address endAddr)
Remove the address range from the property map.void
remove(AddressSetView addressSet)
Remove the address set from the property map.void
set(AddressSetView addressSet)
Clear the property map and set it with the given address set.
-
-
-
Method Detail
-
getPropertyMap
public static AddressSetPropertyMapDB getPropertyMap(ProgramDB program, java.lang.String mapName, ErrorHandler errHandler, AddressMap addrMap, Lock lock)
-
createPropertyMap
public static AddressSetPropertyMapDB createPropertyMap(ProgramDB program, java.lang.String mapName, ErrorHandler errHandler, AddressMap addrMap, Lock lock) throws DuplicateNameException
- Throws:
DuplicateNameException
-
add
public void add(Address startAddr, Address endAddr)
Description copied from interface:AddressSetPropertyMap
Add the address range to the property map.- Specified by:
add
in interfaceAddressSetPropertyMap
- Parameters:
startAddr
- start of the rangeendAddr
- end of the range
-
add
public void add(AddressSetView addressSet)
Description copied from interface:AddressSetPropertyMap
Add the address set to the property map.- Specified by:
add
in interfaceAddressSetPropertyMap
- Parameters:
addressSet
- address set to add
-
set
public void set(AddressSetView addressSet)
Description copied from interface:AddressSetPropertyMap
Clear the property map and set it with the given address set.- Specified by:
set
in interfaceAddressSetPropertyMap
- Parameters:
addressSet
- address set to use
-
remove
public void remove(Address startAddr, Address endAddr)
Description copied from interface:AddressSetPropertyMap
Remove the address range from the property map.- Specified by:
remove
in interfaceAddressSetPropertyMap
- Parameters:
startAddr
- start of the rangeendAddr
- end of the range
-
remove
public void remove(AddressSetView addressSet)
Description copied from interface:AddressSetPropertyMap
Remove the address set from the property map.- Specified by:
remove
in interfaceAddressSetPropertyMap
- Parameters:
addressSet
- address set to remove
-
getAddressSet
public AddressSet getAddressSet()
Description copied from interface:AddressSetPropertyMap
Return the address set for the property map.- Specified by:
getAddressSet
in interfaceAddressSetPropertyMap
-
getAddresses
public AddressIterator getAddresses()
Description copied from interface:AddressSetPropertyMap
Return an address iterator over the property map.- Specified by:
getAddresses
in interfaceAddressSetPropertyMap
-
getAddressRanges
public AddressRangeIterator getAddressRanges()
Description copied from interface:AddressSetPropertyMap
Return an address range iterator over the property map.- Specified by:
getAddressRanges
in interfaceAddressSetPropertyMap
-
clear
public void clear()
Description copied from interface:AddressSetPropertyMap
Clear the property map.- Specified by:
clear
in interfaceAddressSetPropertyMap
-
contains
public boolean contains(Address addr)
Description copied from interface:AddressSetPropertyMap
Return whether the property map contains the given address.- Specified by:
contains
in interfaceAddressSetPropertyMap
- Parameters:
addr
- address to check
-
delete
public void delete()
-
moveAddressRange
public void moveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor) throws AddressOverflowException, CancelledException
Move the address range to a new starting address.- Parameters:
fromAddr
- move from addresstoAddr
- move to addresslength
- number of address to movemonitor
-- Throws:
CancelledException
AddressOverflowException
-
-