Package ghidra.trace.util

# Interface DataAdapterFromDataType

All Superinterfaces:
  `CodeUnit`, `Data`, `MemBuffer`, `PropertySet`, `Settings`

All Known Subinterfaces:
  `DBTraceDataAdapter`, `DBTraceDefinedDataAdapter`

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

public interface DataAdapterFromDataType extends Data

- ## Field Summary

  ### 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.docking.settings.Settings

  `EMPTY_STRING_ARRAY`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default String`
  `doToString()`
  `default Address`
  `getAddress(int opIndex)`
  Get the Address for the given operand index if one exists.
  `default String`
  `getDefaultLabelPrefix(DataTypeDisplayOptions options)`
  Returns the appropriate string to use as the default label prefix or null if it has no preferred default label prefix;
  `default String`
  `getDefaultValueRepresentation()`
  Returns a string that represents the data value without markup.
  `default String`
  `getMnemonicString()`
  Returns the mnemonic for this code unit, e.g., MOV, JMP.
  `default Scalar`
  `getScalar(int opIndex)`
  Returns the scalar at the given operand index.
  `default Object`
  `getValue()`
  Returns the value of this data as determined by the corresponding `DataType`.
  `default Class<?>`
  `getValueClass()`
  Get the class used to express the value of this data.
  `default boolean`
  `hasStringValue()`
  Returns true if this data corresponds to string data.
  `default boolean`
  `isArray()`
  Returns true if this data item is an Array of DataTypes
  `default boolean`
  `isDynamic()`
  Returns true if this data item is a dynamic DataType.
  `default boolean`
  `isPointer()`
  Returns true if this is a pointer, which implies getValue() will return an Object that is an Address.
  `default boolean`
  `isStructure()`
  Returns true if this data item is a Structure.
  `default boolean`
  `isUnion()`
  Returns true if this data item is a Union.

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

  `addMnemonicReference, addOperandReference, compareTo, contains, getAddressString, getBytes, getBytesInCodeUnit, getComment, getComment, getCommentAsArray, getCommentAsArray, getExternalReference, getLabel, getLength, getMaxAddress, getMinAddress, getMnemonicReferences, getNumOperands, getOperandReferences, getPrimaryReference, getPrimarySymbol, getProgram, getReferenceIteratorTo, getReferencesFrom, getSymbols, removeExternalReference, removeMnemonicReference, removeOperandReference, setComment, setComment, setCommentAsArray, setCommentAsArray, setPrimaryMemoryReference, setRegisterReference, setStackReference`

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

  `addValueReference, getBaseDataType, getComponent, getComponent, getComponentAt, getComponentContaining, getComponentIndex, getComponentLevel, getComponentPath, getComponentPathName, getComponentsContaining, getDataType, getFieldName, getNumComponents, getParent, getParentOffset, getPathName, getPrimitiveAt, getRoot, getRootOffset, getValueReferences, isConstant, isDefined, isImmutableSettings, isVolatile, isWritable, removeValueReference`

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

  `getAddress, getBigInteger, getByte, getBytes, getInputStream, getInputStream, getInt, getLong, getMemory, getShort, getUnsignedByte, getUnsignedInt, getUnsignedShort, getVarLengthInt, getVarLengthUnsignedInt, isBigEndian, isInitializedMemory`

  ### Methods inherited from interface ghidra.program.model.util.PropertySet

  `getIntProperty, getObjectProperty, getStringProperty, getVoidProperty, hasProperty, propertyNames, removeProperty, setProperty, setProperty, setProperty, setProperty`

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

  `clearAllSettings, clearSetting, getDefaultSettings, getLong, getNames, getString, getSuggestedValues, getValue, isChangeAllowed, isEmpty, setLong, setString, setValue`

- ## Method Details

  - ### doToString

    default String doToString()

  - ### getMnemonicString

    default String getMnemonicString()
    Description copied from interface: `CodeUnit`
    Returns the mnemonic for this code unit, e.g., MOV, JMP.
    Specified by:
      `getMnemonicString` in interface `CodeUnit`
    Returns:
      the mnemonic for this code unit, e.g., MOV, JMP

  - ### getAddress

    default Address getAddress(int opIndex)
    Description copied from interface: `CodeUnit`
    Get the Address for the given operand index if one exists. Data objects have one operand (the value).
    Specified by:
      `getAddress` in interface `CodeUnit`
    Parameters:
      `opIndex` - index of the operand.
    Returns:
      An address if the operand represents a fully qualified address (given the context), or if the operand is a Scalar treated as an address. Null is returned if no address or scalar exists on that operand.

  - ### getScalar

    default Scalar getScalar(int opIndex)
    Description copied from interface: `CodeUnit`
    Returns the scalar at the given operand index. Data objects have one operand (the value).
    Specified by:
      `getScalar` in interface `CodeUnit`
    Parameters:
      `opIndex` - index of the operand.
    Returns:
      the scalar at the given operand index or null if no scalar exists at that index.

  - ### getValue

    default Object getValue()
    Description copied from interface: `Data`
    Returns the value of this data as determined by the corresponding `DataType`. The value may be an `Address`, `Scalar`, a datatype-defined object or null if no value.
    Specified by:
      `getValue` in interface `Data`
    Returns:
      the value

  - ### getValueClass

    default Class<?> getValueClass()
    Description copied from interface: `Data`
    Get the class used to express the value of this data.

    NOTE: This determination is made based upon data type and settings only and does not examine memory bytes which are used to construct the data value object.

    Specified by:
      `getValueClass` in interface `Data`
    Returns:
      value class or null if a consistent value class is not utilized.

  - ### hasStringValue

    default boolean hasStringValue()
    Description copied from interface: `Data`
    Returns true if this data corresponds to string data. This is determined by the corresponding data type producing a String value.
    Specified by:
      `hasStringValue` in interface `Data`
    Returns:
      true if this data returns a String value and can be treated as string data.

  - ### isPointer

    default boolean isPointer()
    Description copied from interface: `Data`
    Returns true if this is a pointer, which implies getValue() will return an Object that is an Address.
    Specified by:
      `isPointer` in interface `Data`
    Returns:
      true if a pointer

  - ### isUnion

    default boolean isUnion()
    Description copied from interface: `Data`
    Returns true if this data item is a Union.
    Specified by:
      `isUnion` in interface `Data`
    Returns:
      true if a union

  - ### isStructure

    default boolean isStructure()
    Description copied from interface: `Data`
    Returns true if this data item is a Structure.
    Specified by:
      `isStructure` in interface `Data`
    Returns:
      true if a structure

  - ### isArray

    default boolean isArray()
    Description copied from interface: `Data`
    Returns true if this data item is an Array of DataTypes
    Specified by:
      `isArray` in interface `Data`
    Returns:
      true if an array

  - ### isDynamic

    default boolean isDynamic()
    Description copied from interface: `Data`
    Returns true if this data item is a dynamic DataType.
    Specified by:
      `isDynamic` in interface `Data`
    Returns:
      true if is dynamic

  - ### getDefaultValueRepresentation

    default String getDefaultValueRepresentation()
    Description copied from interface: `Data`
    Returns a string that represents the data value without markup.
    Specified by:
      `getDefaultValueRepresentation` in interface `Data`
    Returns:
      the string

  - ### getDefaultLabelPrefix

    default String getDefaultLabelPrefix(DataTypeDisplayOptions options)
    Description copied from interface: `Data`
    Returns the appropriate string to use as the default label prefix or null if it has no preferred default label prefix;
    Specified by:
      `getDefaultLabelPrefix` in interface `Data`
    Parameters:
      `options` - the options
    Returns:
      the prefix