Package ghidra.program.model.pcode

# Class VarnodeTranslator

java.lang.Object
ghidra.program.model.pcode.VarnodeTranslator

public class VarnodeTranslator extends Object

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VarnodeTranslator(Language lang)`
  `VarnodeTranslator(Program program)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Register`
  `getRegister(Varnode node)`
  Translate the Varnode into a register if possible
  `List<Register>`
  `getRegisters()`
  Get all defined registers for the program this translator was created with.
  `Varnode`
  `getVarnode(Register register)`
  Get a varnode that maps to the given register
  `boolean`
  `supportsPcode()`

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

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

- ## Constructor Details

  - ### VarnodeTranslator

    public VarnodeTranslator(Language lang)

  - ### VarnodeTranslator

    public VarnodeTranslator(Program program)

- ## Method Details

  - ### supportsPcode

    public boolean supportsPcode()
    Returns:
      true if this program's language supports pcode

  - ### getRegister

    public Register getRegister(Varnode node)
    Translate the Varnode into a register if possible
    Parameters:
      `node` - varnode to translate
    Returns:
      Register or null if node is not a register

  - ### getVarnode

    public Varnode getVarnode(Register register)
    Get a varnode that maps to the given register
    Parameters:
      `register` - register to translate into a varnode
    Returns:
      varnode that reprents the register

  - ### getRegisters

    public List<Register> getRegisters()
    Get all defined registers for the program this translator was created with.
    Returns:
      all defined registers as unmodifiable list