Package ghidra.trace.database.listing

# Interface DBTraceDataAdapter

All Superinterfaces:
  `CodeUnit`, `Data`, `DataAdapterFromDataType`, `DataAdapterFromSettings`, `DataAdapterMinimal`, `DBTraceCodeUnitAdapter`, `MemBuffer`, `MemBufferMixin`, `PropertySet`, `Settings`, `TraceCodeUnit`, `TraceData`

All Known Subinterfaces:
  `DBTraceDefinedDataAdapter`

All Known Implementing Classes:
  `AbstractDBTraceDataComponent`, `AbstractDBTraceProgramViewListing.DBTraceProgramViewUndefinedData`, `DBTraceData`, `DBTraceDataArrayElementComponent`, `DBTraceDataCompositeFieldComponent`, `UndefinedDBTraceData`

public interface DBTraceDataAdapter extends DBTraceCodeUnitAdapter, DataAdapterMinimal, DataAdapterFromDataType, DataAdapterFromSettings, TraceData
A base interface for implementations of `TraceData`

This behaves somewhat like a mixin, allowing it to be used on data units as well as data components, e.g., fields of a struct data unit.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String[]`
  `EMPTY_STRING_ARRAY`

  ### Fields inherited from interface ghidra.program.model.listing.CodeUnit

  `COMMENT_PROPERTY, DEFINED_DATA_PROPERTY, EOL_COMMENT, INSTRUCTION_PROPERTY, MNEMONIC, PLATE_COMMENT, POST_COMMENT, PRE_COMMENT, REPEATABLE_COMMENT, SPACE_PROPERTY`

  ### Fields inherited from interface ghidra.trace.util.DataAdapterMinimal

  `DATA_OP_INDEX, EMPTY_INT_ARRAY`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default void`
  `addValueReference(Address refAddr, RefType type)`
  Add a memory reference to the value.
  `default void`
  `clearAllSettings()`
  Removes all name-value pairs from this settings object
  `default void`
  `clearSetting(String name)`
  Removes any value associated with the given name
  `default Long`
  `getLong(String name)`
  Gets the Long value associated with the given name
  `default String[]`
  `getNames()`
  Get this list of keys that currently have values associated with them
  `DBTraceDataAdapter`
  `getPrimitiveAt(int offset)`
  Returns the primitive component containing this offset (i.e., one that does not have sub-components).
  `DBTraceDataAdapter`
  `getRoot()`
  Get the highest level Data item in a hierarchy of structures containing this component.
  `default <T extends SettingsDefinition>
  T`
  `getSettingsDefinition(Class<T> settingsDefinitionClass)`
  `DBTraceDataSettingsOperations`
  `getSettingsSpace(boolean createIfAbsent)`
  Get the same space from the internal settings adapter
  `default String`
  `getString(String name)`
  Gets the String value associated with the given name
  `default Object`
  `getValue(String name)`
  Gets the object associated with the given name
  `default TraceReference[]`
  `getValueReferences()`
  Get the references for the value.
  `default boolean`
  `hasMutability(int mutabilityType)`
  `default boolean`
  `isChangeAllowed(SettingsDefinition settingsDefinition)`
  Determine if a settings change corresponding to the specified settingsDefinition is permitted.
  `default boolean`
  `isEmpty()`
  Returns true if there are no key-value pairs stored in this settings object.
  `default void`
  `removeValueReference(Address refAddr)`
  Remove a reference to the value.
  `default void`
  `setLong(String name, long value)`
  Associates the given long value with the name.
  `default void`
  `setString(String name, String value)`
  Associates the given String value with the name.
  `default void`
  `setValue(String name, Object value)`
  Associates the given object with the name.

  ### Methods inherited from interface ghidra.program.model.listing.CodeUnit

  `getComment, getCommentAsArray, getLength, getMaxAddress, setComment, setCommentAsArray`

  ### Methods inherited from interface ghidra.program.model.listing.Data

  `getBaseDataType, getComponentIndex, getComponentLevel, getComponentPath, getComponentPathName, getComponentsContaining, getDataType, getFieldName, getNumComponents, getParent, getParentOffset, getPathName, getRootOffset, isDefined, isImmutableSettings`

  ### Methods inherited from interface ghidra.trace.util.DataAdapterFromDataType

  `doToString, getAddress, getDefaultLabelPrefix, getDefaultValueRepresentation, getMnemonicString, getScalar, getValue, getValueClass, hasStringValue, isArray, isDynamic, isPointer, isStructure, isUnion`

  ### Methods inherited from interface ghidra.trace.util.DataAdapterFromSettings

  `isConstant, isVolatile, isWritable`

  ### Methods inherited from interface ghidra.trace.util.DataAdapterMinimal

  `getNumOperands, getPrimarySymbolOrDynamicName`

  ### Methods inherited from interface ghidra.trace.database.listing.DBTraceCodeUnitAdapter

  `addMnemonicReference, addOperandReference, compareTo, contains, getAddressSpace, getAddressString, getBytes, getBytesInCodeUnit, getComment, getCommentAsArray, getExternalReference, getIntProperty, getLabel, getMemory, getMinAddress, getMnemonicReferences, getObjectProperty, getOperandReferences, getPrimaryReference, getPrimarySymbol, getProgram, getProperty, getReferenceIteratorTo, getReferencesFrom, getStringProperty, getSymbols, getTrace, getVoidProperty, hasProperty, isBigEndian, propertyNames, removeExternalReference, removeMnemonicReference, removeOperandReference, removeProperty, setComment, setCommentAsArray, setPrimaryMemoryReference, setProperty, setProperty, setProperty, setProperty, setProperty, setRegisterReference, setStackReference, setTypedProperty`

  ### Methods inherited from interface ghidra.program.model.mem.MemBuffer

  `getAddress, getInputStream, getInputStream, getUnsignedByte, getUnsignedInt, getUnsignedShort, getVarLengthInt, getVarLengthUnsignedInt, isInitializedMemory`

  ### Methods inherited from interface ghidra.program.model.mem.MemBufferMixin

  `getBigInteger, getByte, getBytes, getBytes, getBytesInFull, getInt, getLong, getShort`

  ### Methods inherited from interface ghidra.docking.settings.Settings

  `getDefaultSettings, getSuggestedValues`

  ### Methods inherited from interface ghidra.trace.model.listing.TraceCodeUnit

  `delete, getBounds, getBytes, getEndSnap, getLanguage, getLifespan, getPlatform, getRange, getStartSnap, getThread, setEndSnap`

  ### Methods inherited from interface ghidra.trace.model.listing.TraceData

  `getComponent, getComponent, getComponentAt, getComponentContaining`

- ## Field Details

  - ### EMPTY_STRING_ARRAY

    static final String[] EMPTY_STRING_ARRAY

- ## Method Details

  - ### getRoot

    DBTraceDataAdapter getRoot()
    Description copied from interface: `Data`
    Get the highest level Data item in a hierarchy of structures containing this component.
    Specified by:
      `getRoot` in interface `Data`
    Returns:
      the data

  - ### getValueReferences

    default TraceReference[] getValueReferences()
    Description copied from interface: `Data`
    Get the references for the value.
    Specified by:
      `getValueReferences` in interface `Data`
    Specified by:
      `getValueReferences` in interface `DataAdapterMinimal`
    Specified by:
      `getValueReferences` in interface `TraceData`
    Returns:
      the references

  - ### addValueReference

    default void addValueReference(Address refAddr, RefType type)
    Description copied from interface: `Data`
    Add a memory reference to the value.
    Specified by:
      `addValueReference` in interface `Data`
    Parameters:
      `refAddr` - address referenced.
      `type` - the type of reference to be added.

  - ### removeValueReference

    default void removeValueReference(Address refAddr)
    Description copied from interface: `Data`
    Remove a reference to the value.
    Specified by:
      `removeValueReference` in interface `Data`
    Parameters:
      `refAddr` - address of reference to be removed.

  - ### getSettingsSpace

    DBTraceDataSettingsOperations getSettingsSpace(boolean createIfAbsent)
    Get the same space from the internal settings adapter
    Parameters:
      `createIfAbsent` - true to create the space if its not already present
    Returns:
      the space or null

  - ### isChangeAllowed

    default boolean isChangeAllowed(SettingsDefinition settingsDefinition)
    Description copied from interface: `Settings`
    Determine if a settings change corresponding to the specified settingsDefinition is permitted.
    Specified by:
      `isChangeAllowed` in interface `Settings`
    Parameters:
      `settingsDefinition` - settings definition
    Returns:
      true if change permitted else false

  - ### setLong

    default void setLong(String name, long value)
    Description copied from interface: `Settings`
    Associates the given long value with the name. Note that an attempted setting change may be ignored if prohibited (e.g., immutable Settings, undefined setting name).
    Specified by:
      `setLong` in interface `Settings`
    Parameters:
      `name` - the key
      `value` - the value associated with the key

  - ### getLong

    default Long getLong(String name)
    Description copied from interface: `Settings`
    Gets the Long value associated with the given name
    Specified by:
      `getLong` in interface `Settings`
    Parameters:
      `name` - the key used to retrieve a value
    Returns:
      the Long value for a key

  - ### setString

    default void setString(String name, String value)
    Description copied from interface: `Settings`
    Associates the given String value with the name. Note that an attempted setting change may be ignored if prohibited (e.g., immutable Settings, undefined setting name).
    Specified by:
      `setString` in interface `Settings`
    Parameters:
      `name` - the key
      `value` - the value associated with the key

  - ### getString

    default String getString(String name)
    Description copied from interface: `Settings`
    Gets the String value associated with the given name
    Specified by:
      `getString` in interface `Settings`
    Parameters:
      `name` - the key used to retrieve a value
    Returns:
      the String value for a key

  - ### setValue

    default void setValue(String name, Object value)
    Description copied from interface: `Settings`
    Associates the given object with the name. Note that an attempted setting change may be ignored if prohibited (e.g., immutable Settings, undefined setting name).
    Specified by:
      `setValue` in interface `Settings`
    Parameters:
      `name` - the key
      `value` - the value to associate with the key

  - ### getValue

    default Object getValue(String name)
    Description copied from interface: `Settings`
    Gets the object associated with the given name
    Specified by:
      `getValue` in interface `Settings`
    Parameters:
      `name` - the key used to retrieve a value
    Returns:
      the object associated with a given key

  - ### clearSetting

    default void clearSetting(String name)
    Description copied from interface: `Settings`
    Removes any value associated with the given name
    Specified by:
      `clearSetting` in interface `Settings`
    Parameters:
      `name` - the key to remove any association

  - ### clearAllSettings

    default void clearAllSettings()
    Description copied from interface: `Settings`
    Removes all name-value pairs from this settings object
    Specified by:
      `clearAllSettings` in interface `Settings`

  - ### getNames

    default String[] getNames()
    Description copied from interface: `Settings`
    Get this list of keys that currently have values associated with them
    Specified by:
      `getNames` in interface `Settings`
    Returns:
      an array of string keys.

  - ### isEmpty

    default boolean isEmpty()
    Description copied from interface: `Settings`
    Returns true if there are no key-value pairs stored in this settings object. This is not a reflection of the underlying default settings which may still contain a key-value pair when this settings object is empty.
    Specified by:
      `isEmpty` in interface `Settings`
    Returns:
      true if there are no key-value pairs stored in this settings object

  - ### getSettingsDefinition

    default <T extends SettingsDefinition> T getSettingsDefinition(Class<T> settingsDefinitionClass)
    Specified by:
      `getSettingsDefinition` in interface `DataAdapterFromSettings`

  - ### hasMutability

    default boolean hasMutability(int mutabilityType)
    Specified by:
      `hasMutability` in interface `DataAdapterFromSettings`

  - ### getPrimitiveAt

    DBTraceDataAdapter getPrimitiveAt(int offset)
    Description copied from interface: `Data`
    Returns the primitive component containing this offset (i.e., one that does not have sub-components). This is useful for data items which are made up of multiple layers of other data items. This method immediately goes to the lowest level data item. If the minimum offset of a component is specified, the only first component containing the offset will be considered (e.g., 0-element array).
    Specified by:
      `getPrimitiveAt` in interface `Data`
    Specified by:
      `getPrimitiveAt` in interface `TraceData`
    Parameters:
      `offset` - the offset
    Returns:
      primitive component containing this offset