@Override
	default DBTraceDefinedDataAdapter getComponentContaining(int offset) {
		// We may write to the cache
		try (LockHold hold = LockHold.lock(getTrace().getReadWriteLock().writeLock())) {
			if (offset < 0 || offset >= getLength()) {
				return null;
			}

			DataType baseDataType = getBaseDataType();
			if (baseDataType instanceof Array) {
				Array array = (Array) baseDataType;
				int elementLength = array.getElementLength();
				int index = offset / elementLength;
				return getComponent(index);
			}
			if (baseDataType instanceof Structure) {
				Structure structure = (Structure) baseDataType;
				DataTypeComponent dtc = structure.getComponentContaining(offset);
				return dtc == null ? null : getComponent(dtc.getOrdinal());
			}
			if (baseDataType instanceof Union) {
				return null; // Use getComponentsContaining
			}
			if (baseDataType instanceof DynamicDataType) {
				DynamicDataType dynamic = (DynamicDataType) baseDataType;
				DataTypeComponent dtc = dynamic.getComponentAt(offset, this);
				return dtc == null ? null : getComponent(dtc.getOrdinal());
			}
			return null;
		}
	}
TODO: Document me

Note this will always be called with the write lock

@return the new or existing component cache
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/database/listing/DBTraceDefinedDataAdapter.java