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 voidadd(Address startAddr, Address endAddr)Add the address range to the property map.voidadd(AddressSetView addressSet)Add the address set to the property map.voidclear()Clear the property map.booleancontains(Address addr)Return whether the property map contains the given address.static AddressSetPropertyMapDBcreatePropertyMap(ProgramDB program, java.lang.String mapName, ErrorHandler errHandler, AddressMap addrMap, Lock lock)voiddelete()AddressIteratorgetAddresses()Return an address iterator over the property map.AddressRangeIteratorgetAddressRanges()Return an address range iterator over the property map.AddressSetgetAddressSet()Return the address set for the property map.static AddressSetPropertyMapDBgetPropertyMap(ProgramDB program, java.lang.String mapName, ErrorHandler errHandler, AddressMap addrMap, Lock lock)voidmoveAddressRange(Address fromAddr, Address toAddr, long length, TaskMonitor monitor)Move the address range to a new starting address.voidremove(Address startAddr, Address endAddr)Remove the address range from the property map.voidremove(AddressSetView addressSet)Remove the address set from the property map.voidset(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:AddressSetPropertyMapAdd the address range to the property map.- Specified by:
addin interfaceAddressSetPropertyMap- Parameters:
startAddr- start of the rangeendAddr- end of the range
-
add
public void add(AddressSetView addressSet)
Description copied from interface:AddressSetPropertyMapAdd the address set to the property map.- Specified by:
addin interfaceAddressSetPropertyMap- Parameters:
addressSet- address set to add
-
set
public void set(AddressSetView addressSet)
Description copied from interface:AddressSetPropertyMapClear the property map and set it with the given address set.- Specified by:
setin interfaceAddressSetPropertyMap- Parameters:
addressSet- address set to use
-
remove
public void remove(Address startAddr, Address endAddr)
Description copied from interface:AddressSetPropertyMapRemove the address range from the property map.- Specified by:
removein interfaceAddressSetPropertyMap- Parameters:
startAddr- start of the rangeendAddr- end of the range
-
remove
public void remove(AddressSetView addressSet)
Description copied from interface:AddressSetPropertyMapRemove the address set from the property map.- Specified by:
removein interfaceAddressSetPropertyMap- Parameters:
addressSet- address set to remove
-
getAddressSet
public AddressSet getAddressSet()
Description copied from interface:AddressSetPropertyMapReturn the address set for the property map.- Specified by:
getAddressSetin interfaceAddressSetPropertyMap
-
getAddresses
public AddressIterator getAddresses()
Description copied from interface:AddressSetPropertyMapReturn an address iterator over the property map.- Specified by:
getAddressesin interfaceAddressSetPropertyMap
-
getAddressRanges
public AddressRangeIterator getAddressRanges()
Description copied from interface:AddressSetPropertyMapReturn an address range iterator over the property map.- Specified by:
getAddressRangesin interfaceAddressSetPropertyMap
-
clear
public void clear()
Description copied from interface:AddressSetPropertyMapClear the property map.- Specified by:
clearin interfaceAddressSetPropertyMap
-
contains
public boolean contains(Address addr)
Description copied from interface:AddressSetPropertyMapReturn whether the property map contains the given address.- Specified by:
containsin 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:
CancelledExceptionAddressOverflowException
-
-