Class RegisterBankService

java.lang.Object
com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterBankService

public class RegisterBankService extends Object
The register bank service is a global registry maintaining processors' register banks, used by native code objects.

Typically, register banks are added to this service in a code plugin static initializer block.

  • Method Details

    • getInstance

      public static RegisterBankService getInstance()
    • add

      public IRegisterBank add(ProcessorType proctype, IRegisterBank bank)
      Register a register bank for a given processor. Only a single bank can be associated with a given processor.
      Parameters:
      proctype - processor type
      bank - register bank
      Returns:
      the previous bank associated with the given processor type, null if there was none
    • remove

      public boolean remove(ProcessorType proctype)
      Unregister a register bank.
      Parameters:
      proctype - processor type
      Returns:
      success indicator: true if the bank was removed, false otherwise (e.g. it was not registered)
    • get

      public IRegisterBank get(ProcessorType proctype)
      Retrieve the register bank associated with the given processor type, if any.
      Parameters:
      proctype - processor type
      Returns:
      a bank or null
    • getSupportedProcessors

      public Collection<ProcessorType> getSupportedProcessors()
      Retrieve the list of processor types having a register bank, managed by this service.
      Returns:
      a collection of unique processor types