Class ObjectPropertyMapDB<T extends Saveable>
java.lang.Object
ghidra.program.database.properties.PropertyMapDB<T>
ghidra.program.database.properties.ObjectPropertyMapDB<T>
- Type Parameters:
T
-Saveable
property value type
- All Implemented Interfaces:
ObjectPropertyMap<T>
,PropertyMap<T>
public class ObjectPropertyMapDB<T extends Saveable>
extends PropertyMapDB<T>
implements ObjectPropertyMap<T>
Property manager that deals with properties that are of
a
Saveable
Object type and store within a database table.-
Field Summary
Fields inherited from class ghidra.program.database.properties.PropertyMapDB
addrMap, cache, changeMgr, dbHandle, DEFAULT_CACHE_SIZE, errHandler, lock, name, NO_SCHEMA_FIELD_NAMES, NO_SCHEMA_FIELDS, PROPERTY_VALUE_COL, propertyTable, schema, SCHEMA_FIELD_NAMES
-
Constructor Summary
ConstructorDescriptionObjectPropertyMapDB
(DBHandle dbHandle, OpenMode openMode, ErrorHandler errHandler, ChangeManager changeMgr, AddressMap addrMap, String name, Class<T> saveableObjectClass, TaskMonitor monitor, boolean supportsPrivate) Construct an Saveable object property map. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add an object value at the specified address.protected void
Create the necessary table(s) to support this property.Returns the property value stored at the specified address or null if no property found.getSaveableClassForName
(String classPath) Returns the class for the indicated class path name.Returns property value class.Methods inherited from class ghidra.program.database.properties.PropertyMapDB
createTable, delete, getAddressKeyIterator, getAddressKeyIterator, getAddressKeyIterator, getFirstPropertyAddress, getLastPropertyAddress, getName, getNextPropertyAddress, getPreviousPropertyAddress, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getSize, getTableName, getTableName, hasProperty, intersects, intersects, invalidateCache, moveRange, remove, removeRange, setCacheSize
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ghidra.program.model.util.ObjectPropertyMap
add
Methods inherited from interface ghidra.program.model.util.PropertyMap
getFirstPropertyAddress, getLastPropertyAddress, getName, getNextPropertyAddress, getPreviousPropertyAddress, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getPropertyIterator, getSize, hasProperty, intersects, intersects, moveRange, remove, removeRange
-
Constructor Details
-
ObjectPropertyMapDB
public ObjectPropertyMapDB(DBHandle dbHandle, OpenMode openMode, ErrorHandler errHandler, ChangeManager changeMgr, AddressMap addrMap, String name, Class<T> saveableObjectClass, TaskMonitor monitor, boolean supportsPrivate) throws VersionException, CancelledException, IOException Construct an Saveable object property map.- Parameters:
dbHandle
- database handle.openMode
- the mode that the program was openned in or null if instantiated during cache invalidate. Used to detect versioning error only.errHandler
- database error handler.changeMgr
- change manager for event notificationaddrMap
- address map.name
- property name.saveableObjectClass
- saveable implementation classmonitor
- progress monitor that is only used when upgradingsupportsPrivate
- if private saveable changes should not be broadcast- Throws:
CancelledException
- if the user cancels the upgrade operation.IOException
- if a database io error occurs.VersionException
- the map version is incompatible with the current Saveable object class version. This will never be thrown if upgrade is true.
-
-
Method Details
-
getSaveableClassForName
Returns the class for the indicated class path name. If the class can't be determined, the GenericSaveable class is returned.- Parameters:
classPath
- the class path name of the desired class.- Returns:
- the class or a GenericSaveable.
-
add
Description copied from interface:ObjectPropertyMap
Add an object value at the specified address.- Specified by:
add
in interfaceObjectPropertyMap<T extends Saveable>
- Parameters:
addr
- address for the propertyvalue
- value of the property
-
getValueClass
Description copied from interface:PropertyMap
Returns property value class.- Specified by:
getValueClass
in interfacePropertyMap<T extends Saveable>
- Returns:
- property value class or null for an unsupported map type
-
get
Description copied from interface:PropertyMap
Returns the property value stored at the specified address or null if no property found.- Specified by:
get
in interfacePropertyMap<T extends Saveable>
- Parameters:
addr
- property address- Returns:
- property value
-
createTable
protected void createTable()Create the necessary table(s) to support this property. Schema will vary depending upon Saveable object.
-