Package ghidra.app.plugin.processors.generic

# Class VarnodeTemplate

java.lang.Object
ghidra.app.plugin.processors.generic.VarnodeTemplate

All Implemented Interfaces:
  `Serializable`

public class VarnodeTemplate extends Object implements Serializable
To change this generated comment edit the template variable "typecomment": Window>Preferences>Java>Templates. To enable and disable the creation of type comments go to Window>Preferences>Java>Code Generation.

See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VarnodeTemplate(ConstantTemplate space, ConstantTemplate offset, ConstantTemplate size, AddressFactory addressFactory, boolean ou)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `boolean`
  `loadomit()`
  `ConstantTemplate`
  `offset()`
  `boolean`
  `oneuse()`
  `Varnode`
  `resolve(Position position, int bufoff)`
  Resolves a varnode at the given position and buffer offset
  `Varnode`
  `resolve(HashMap<Object,Handle> handles, Position position, int bufoff)`
  Method resolve.
  `void`
  `setDef(OpTemplate opTemplate)`
  Method setDef.
  `void`
  `setReplace(Operand op, boolean load)`
  `ConstantTemplate`
  `size()`
  `ConstantTemplate`
  `space()`

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

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

- ## Constructor Details

  - ### VarnodeTemplate

    public VarnodeTemplate(ConstantTemplate space, ConstantTemplate offset, ConstantTemplate size, AddressFactory addressFactory, boolean ou)

- ## Method Details

  - ### setDef

    public void setDef(OpTemplate opTemplate)
    Method setDef.
    Parameters:
      `opTemplate` -

  - ### resolve

    public Varnode resolve(HashMap<Object,Handle> handles, Position position, int bufoff) throws Exception
    Method resolve.
    Parameters:
      `handles` -
    Returns:
      Varnode
    Throws:
      `Exception`

  - ### resolve

    public Varnode resolve(Position position, int bufoff) throws Exception
    Resolves a varnode at the given position and buffer offset
    Parameters:
      `position` - the position
      `bufoff` - the buffer offset
    Returns:
      the resolved `raw varnode`. (Only contains an address and size)
    Throws:
      `Exception` - if an error occurs resolving the varnode

  - ### oneuse

    public boolean oneuse()

  - ### space

    public ConstantTemplate space()

  - ### offset

    public ConstantTemplate offset()

  - ### size

    public ConstantTemplate size()

  - ### setReplace

    public void setReplace(Operand op, boolean load)

  - ### loadomit

    public boolean loadomit()

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`