Package ghidra.trace.database.address

# Class DBTraceOverlaySpaceAdapter.AddressDBFieldCodec<OT extends DBAnnotatedObject & DBTraceOverlaySpaceAdapter.DecodesAddresses>

java.lang.Object
ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec<Address,OT,FixedField10>
ghidra.trace.database.address.DBTraceOverlaySpaceAdapter.AddressDBFieldCodec<OT>

Type Parameters:
  `OT` - the type of object containing the field

All Implemented Interfaces:
  `DBCachedObjectStoreFactory.DBFieldCodec<Address,OT,FixedField10>`

Enclosing class:
  `DBTraceOverlaySpaceAdapter`

public static class DBTraceOverlaySpaceAdapter.AddressDBFieldCodec<OT extends DBAnnotatedObject & DBTraceOverlaySpaceAdapter.DecodesAddresses> extends DBCachedObjectStoreFactory.AbstractDBFieldCodec<Address,OT,FixedField10>
Used for objects having an `Address` field.

Most managers storing things by address will actually have a table per space, so the address is encoded only as an offset. However, any other `Address` field (not constrained to the same space) will need to encode the space information as well. This codec can do that. The object will need to return its trace's space adapter, though.

- ## Field Summary

  ### Fields inherited from class ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec

  `column, field, fieldType, objectType, valueType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AddressDBFieldCodec(Class<OT> objectType, Field field, int column)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static Address`
  `decode(byte[] enc, DBTraceOverlaySpaceAdapter osa)`
  `protected void`
  `doLoad(OT obj, DBRecord record)`
  Same as `DBCachedObjectStoreFactory.AbstractDBFieldCodec.load(DBAnnotatedObject, DBRecord)`, but permits exceptions
  `protected void`
  `doStore(OT obj, DBRecord record)`
  Same as `DBCachedObjectStoreFactory.AbstractDBFieldCodec.store(DBAnnotatedObject, DBRecord)`, but permits exceptions
  `static byte[]`
  `encode(Address address)`
  `void`
  `store(Address value, FixedField10 f)`
  Encode the given field value into the given field

  ### Methods inherited from class ghidra.util.database.DBCachedObjectStoreFactory.AbstractDBFieldCodec

  `getFieldType, getObjectType, getValue, getValueType, load, setValue, store`

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.util.database.DBCachedObjectStoreFactory.DBFieldCodec

  `encodeField`

- ## Constructor Details

  - ### AddressDBFieldCodec

    public AddressDBFieldCodec(Class<OT> objectType, Field field, int column)

- ## Method Details

  - ### encode

    public static byte[] encode(Address address)

  - ### decode

    public static Address decode(byte[] enc, DBTraceOverlaySpaceAdapter osa)

  - ### store

    public void store(Address value, FixedField10 f)
    Description copied from interface: `DBCachedObjectStoreFactory.DBFieldCodec`
    Encode the given field value into the given field
    Parameters:
      `value` - the value
      `f` - the field

  - ### doStore

    protected void doStore(OT obj, DBRecord record) throws IllegalArgumentException, IllegalAccessException
    Description copied from class: `DBCachedObjectStoreFactory.AbstractDBFieldCodec`
    Same as `DBCachedObjectStoreFactory.AbstractDBFieldCodec.store(DBAnnotatedObject, DBRecord)`, but permits exceptions
    Specified by:
      `doStore` in class `DBCachedObjectStoreFactory.AbstractDBFieldCodec<Address,OT extends DBAnnotatedObject & DBTraceOverlaySpaceAdapter.DecodesAddresses,FixedField10>`
    Throws:
      `IllegalArgumentException`
      `IllegalAccessException`

  - ### doLoad

    protected void doLoad(OT obj, DBRecord record) throws IllegalArgumentException, IllegalAccessException
    Description copied from class: `DBCachedObjectStoreFactory.AbstractDBFieldCodec`
    Same as `DBCachedObjectStoreFactory.AbstractDBFieldCodec.load(DBAnnotatedObject, DBRecord)`, but permits exceptions
    Specified by:
      `doLoad` in class `DBCachedObjectStoreFactory.AbstractDBFieldCodec<Address,OT extends DBAnnotatedObject & DBTraceOverlaySpaceAdapter.DecodesAddresses,FixedField10>`
    Throws:
      `IllegalArgumentException`
      `IllegalAccessException`