Class AbstractLongOffsetPcodeExecutorStatePiece.CacheingSpaceMap<B,S>

java.lang.Object
ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap<S>
ghidra.pcode.exec.AbstractLongOffsetPcodeExecutorStatePiece.CacheingSpaceMap<B,S>
Type Parameters:
B - the type of the object backing the cache for each address space
S - the type of cache for each address space
Enclosing class:
AbstractLongOffsetPcodeExecutorStatePiece<A,T,S>

public abstract static class AbstractLongOffsetPcodeExecutorStatePiece.CacheingSpaceMap<B,S> extends AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap<S>
Use this when each S is possibly a cache to some other state (backing) object
  • Constructor Details

    • CacheingSpaceMap

      public CacheingSpaceMap()
    • CacheingSpaceMap

      protected CacheingSpaceMap(Map<AddressSpace,S> spaces)
  • Method Details

    • getBacking

      protected abstract B getBacking(AddressSpace space)
      Get the object backing the cache for the given address space
      Parameters:
      space - the space
      Returns:
      the backing object
    • newSpace

      protected abstract S newSpace(AddressSpace space, B backing)
      Construct a new space internally associated with the given address space, having the given backing

      As the name implies, this often simply wraps S's constructor

      Parameters:
      space - the address space
      backing - the backing, if applicable. null for the unique space
      Returns:
      the new space
    • getForSpace

      public S getForSpace(AddressSpace space, boolean toWrite)
      Specified by:
      getForSpace in class AbstractLongOffsetPcodeExecutorStatePiece.AbstractSpaceMap<S>