public class

RegisterBankService

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

Class Overview

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.

Summary

Public Methods
IRegisterBank add(ProcessorType proctype, IRegisterBank bank)
Register a register bank for a given processor.
IRegisterBank get(ProcessorType proctype)
Retrieve the register bank associated with the given processor type, if any.
static RegisterBankService getInstance()
Collection<ProcessorType> getSupportedProcessors()
Retrieve the list of processor types having a register bank, managed by this service.
boolean remove(ProcessorType proctype)
Unregister a register bank.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

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

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

public static RegisterBankService getInstance ()

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

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)