Package ghidra.trace.database.symbol

# Class DBTraceReferenceSpace.DBTraceReferenceEntry

java.lang.Object
ghidra.program.database.DatabaseObject
ghidra.util.database.DBAnnotatedObject
ghidra.util.database.spatial.DBTreeRecord<TraceAddressSnapRange,TraceAddressSnapRange>
ghidra.util.database.spatial.DBTreeDataRecord<TraceAddressSnapRange,TraceAddressSnapRange,DBTraceReferenceSpace.DBTraceReferenceEntry>
ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<DBTraceReferenceSpace.DBTraceReferenceEntry>
ghidra.trace.database.symbol.DBTraceReferenceSpace.DBTraceReferenceEntry

All Implemented Interfaces:
  `DBTraceOverlaySpaceAdapter.DecodesAddresses`, `TraceAddressSnapRange`, `BoundedShape<TraceAddressSnapRange>`, `BoundingShape<TraceAddressSnapRange>`, `Rectangle2D<Address,Long,TraceAddressSnapRange>`

Enclosing class:
  `DBTraceReferenceSpace`

protected static class DBTraceReferenceSpace.DBTraceReferenceEntry extends DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<DBTraceReferenceSpace.DBTraceReferenceEntry> implements DBTraceOverlaySpaceAdapter.DecodesAddresses
A reference entry

Version history:

- 1: Change `DBTraceSpaceBased.toAddress(long)` to 10-byte fixed encoding
- 0: Initial version and previous unversioned implementation

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ghidra.util.database.spatial.DBTreeDataRecord

  `DBTreeDataRecord.RecordEntry<DS extends BoundedShape<NS>,NS extends BoundingShape<NS>,T>`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected long`
  `ext`
  `protected byte`
  `flags`
  `protected byte`
  `opIndex`
  `protected DBTraceReference`
  `ref`
  `protected RefType`
  `refType`
  `protected final DBTraceReferenceSpace`
  `space`
  `protected long`
  `symbolId`
  `protected Address`
  `toAddrMax`
  `protected Address`
  `toAddrMin`
  `protected AddressRange`
  `toRange`

  ### Fields inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData

  `lifespan, range, tree`

  ### Fields inherited from class ghidra.program.database.DatabaseObject

  `key`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBTraceReferenceEntry(DBTraceReferenceSpace space, DBTraceAddressSnapRangePropertyMapTree<DBTraceReferenceSpace.DBTraceReferenceEntry,?> tree, DBCachedObjectStore<?> store, DBRecord record)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `doDelete()`
  `protected void`
  `fresh(boolean created)`
  Extension point: Called when the object's fields are populated.
  `DBTraceOverlaySpaceAdapter`
  `getOverlaySpaceAdapter()`
  Get the space adapter for the trace containing the object
  `protected DBTraceReferenceSpace.DBTraceReferenceEntry`
  `getRecordValue()`
  Get the value of this record Note that the value is sometimes the record itself, i.e., this method returns `this`.
  `RefType`
  `getRefType()`
  `SourceType`
  `getSourceType()`
  `long`
  `getSymbolId()`
  `boolean`
  `isPrimary()`
  `protected void`
  `set(AddressRange toRange, long symbolId, RefType refType, int opIndex, long ext, boolean isPrimary, DBTraceReferenceSpace.TypeEnum type, SourceType sourceType)`
  `void`
  `setEndSnap(long endSnap)`
  `protected void`
  `setLifespan(Lifespan lifespan)`
  `void`
  `setPrimary(boolean b)`
  `protected void`
  `setRecordValue(DBTraceReferenceSpace.DBTraceReferenceEntry value)`
  Set the value of this record Note that the value is sometimes the record itself.
  `void`
  `setRefType(RefType refType)`
  `void`
  `setSymbolId(long symbolId)`
  `static String`
  `tableName(AddressSpace space)`

  ### Methods inherited from class ghidra.trace.database.map.DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData

  `doSetLifespan, doSetRange, equals, getBounds, getLifespan, getParentKey, getRange, getShape, getSpace, hashCode, setParentKey, setShape, shapeEquals`

  ### Methods inherited from class ghidra.util.database.spatial.DBTreeDataRecord

  `asEntry, getDataCount, toString`

  ### Methods inherited from class ghidra.util.database.DBAnnotatedObject

  `doRefresh, doUpdateAll, doUpdated, doWrite, getObjectKey, getTableName, isDeleted, refresh, refresh, update, update, update, update`

  ### Methods inherited from class ghidra.program.database.DatabaseObject

  `checkDeleted, checkIsValid, checkIsValid, getKey, isDeleted, isInvalid, keyChanged, setDeleted, setInvalid, validate`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

  ### Methods inherited from interface ghidra.util.database.spatial.rect.Rectangle2D

  `computeAreaIntersection, computeAreaUnionBounds, computeCentroidDistance, contains, contains, doEquals, doHashCode, enclosedBy, encloses, getArea, getCenter, getMargin, intersection, intersects, unionBounds`

  ### Methods inherited from interface ghidra.trace.model.TraceAddressSnapRange

  `description, getX1, getX2, getY1, getY2, immutable`

- ## Field Details

  - ### toAddrMin

    protected Address toAddrMin

  - ### toAddrMax

    protected Address toAddrMax

  - ### symbolId

    protected long symbolId

  - ### refType

    protected RefType refType

  - ### opIndex

    protected byte opIndex

  - ### ext

    protected long ext

  - ### flags

    protected byte flags

  - ### space

    protected final DBTraceReferenceSpace space

  - ### toRange

    protected AddressRange toRange

  - ### ref

    protected DBTraceReference ref

- ## Constructor Details

  - ### DBTraceReferenceEntry

    public DBTraceReferenceEntry(DBTraceReferenceSpace space, DBTraceAddressSnapRangePropertyMapTree<DBTraceReferenceSpace.DBTraceReferenceEntry,?> tree, DBCachedObjectStore<?> store, DBRecord record)

- ## Method Details

  - ### tableName

    public static String tableName(AddressSpace space)

  - ### getOverlaySpaceAdapter

    public DBTraceOverlaySpaceAdapter getOverlaySpaceAdapter()
    Description copied from interface: `DBTraceOverlaySpaceAdapter.DecodesAddresses`
    Get the space adapter for the trace containing the object
    Specified by:
      `getOverlaySpaceAdapter` in interface `DBTraceOverlaySpaceAdapter.DecodesAddresses`
    Returns:
      the adapter

  - ### fresh

    protected void fresh(boolean created) throws IOException
    Description copied from class: `DBAnnotatedObject`
    Extension point: Called when the object's fields are populated.

    This provides an opportunity for the object to initialize any non-database-backed fields that depend on the database-backed fields. Note that its use may indicate a situation better solved by a custom `DBCachedObjectStoreFactory.DBFieldCodec`. If both the database-backed and non-database-backed fields are used frequently, then a codec may not be indicated. If the database-backed fields are only used in this method or to encode another frequently-used field, then a codec is likely better.

    For a new object, the database-backed fields remain at their initial values. They will be saved after this method returns, so they may be further initialized with custom logic.

    For an object loaded from the database, the database-backed fields are already populated from the record when this method is called. They are not automatically saved after this method returns. This method should not further initialize database-backed fields in this case.

    Overrides:
      `fresh` in class `DBTraceAddressSnapRangePropertyMapTree.AbstractDBTraceAddressSnapRangePropertyMapData<DBTraceReferenceSpace.DBTraceReferenceEntry>`
    Parameters:
      `created` - `true` when object is being created, or `false` when it is being loaded.
    Throws:
      `IOException` - if further initialization fails.

  - ### setRecordValue

    protected void setRecordValue(DBTraceReferenceSpace.DBTraceReferenceEntry value)
    Description copied from class: `DBTreeDataRecord`
    Set the value of this record Note that the value is sometimes the record itself. In this case, this method expects `value` to be `null` and does nothing. See `SpatialMap.put(BoundedShape, Object)` for more details of this pattern.
    Specified by:
      `setRecordValue` in class `DBTreeDataRecord<TraceAddressSnapRange,TraceAddressSnapRange,DBTraceReferenceSpace.DBTraceReferenceEntry>`
    Parameters:
      `value` - the record's new value

  - ### getRecordValue

    protected DBTraceReferenceSpace.DBTraceReferenceEntry getRecordValue()
    Description copied from class: `DBTreeDataRecord`
    Get the value of this record Note that the value is sometimes the record itself, i.e., this method returns `this`. See `SpatialMap.put(BoundedShape, Object)` for more details of this pattern.
    Specified by:
      `getRecordValue` in class `DBTreeDataRecord<TraceAddressSnapRange,TraceAddressSnapRange,DBTraceReferenceSpace.DBTraceReferenceEntry>`
    Returns:
      the record's value

  - ### set

    protected void set(AddressRange toRange, long symbolId, RefType refType, int opIndex, long ext, boolean isPrimary, DBTraceReferenceSpace.TypeEnum type, SourceType sourceType)

  - ### setLifespan

    protected void setLifespan(Lifespan lifespan)

  - ### setEndSnap

    public void setEndSnap(long endSnap)

  - ### setSymbolId

    public void setSymbolId(long symbolId)

  - ### getSymbolId

    public long getSymbolId()

  - ### setRefType

    public void setRefType(RefType refType)

  - ### getRefType

    public RefType getRefType()

  - ### setPrimary

    public void setPrimary(boolean b)

  - ### isPrimary

    public boolean isPrimary()

  - ### getSourceType

    public SourceType getSourceType()

  - ### doDelete

    protected void doDelete()