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.
  • 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 notification
      addrMap - address map.
      name - property name.
      saveableObjectClass - saveable implementation class
      monitor - progress monitor that is only used when upgrading
      supportsPrivate - 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

      public static Class<? extends Saveable> getSaveableClassForName(String classPath)
      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

      public void add(Address addr, T value)
      Description copied from interface: ObjectPropertyMap
      Add an object value at the specified address.
      Specified by:
      add in interface ObjectPropertyMap<T extends Saveable>
      Parameters:
      addr - address for the property
      value - value of the property
    • getValueClass

      public Class<T> getValueClass()
      Description copied from interface: PropertyMap
      Returns property value class.
      Specified by:
      getValueClass in interface PropertyMap<T extends Saveable>
      Returns:
      property value class or null for an unsupported map type
    • get

      public T get(Address addr)
      Description copied from interface: PropertyMap
      Returns the property value stored at the specified address or null if no property found.
      Specified by:
      get in interface PropertyMap<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.