Public Member Functions | Static Public Member Functions

# BinNavi.API.disassembly.OperandExpression Class Reference

Represents a single operand expression of an operand. More...

Inherits BinNavi::APIHelpers::ApiObject< INaviOperandTreeNode >.

List of all members.

## Public Member Functions
void | addListener (final IOperandExpressionListener listener)
| Adds an operand expression listener.
Reference | addReference (final Address address, final ReferenceType type) throws CouldntSaveDataException
| Adds a new reference to the operand expression.
void | deleteReference (final Reference reference) throws CouldntDeleteException
| Deletes a reference from the operand expression.
List< OperandExpression > | getChildren ()
| Child nodes of the operand.
OperandExpression | getParent ()
| Parent node of the operand.
List< Reference > | getReferences ()
| References associated with the expression.
String | getReplacement ()
| Replacement value of the expression.
ExpressionType | getType ()
| Type of the expression.
String | getValue ()
| Value of the expression.
void | removeListener (final IOperandExpressionListener listener)
| Removes a listener from the operand expression.
String | toString ()
| Printable representation of the expression.
## Static Public Member Functions
static OperandExpression | create (final Module module, final String value, final ExpressionType type)
| Creates a new operand expression.

## Detailed Description

An operand expression is a single, atomic part of an operand tree. Examples for operand expressions are registers, literal values, arithmetic operator like + and *, or size prefixes.

## Member Function Documentation

void BinNavi.API.disassembly.OperandExpression.addListener | ( | final IOperandExpressionListener | listener | ) |

Adds an object that is notified about changes in the operand expression.

Parameters:

  | listener | The listener object that is notified about changes in the operand expression.

Exceptions:

  | IllegalArgumentException | Thrown if the listener argument is null.
  | IllegalStateException | Thrown if the listener object is already listening on the operand expression.

Reference BinNavi.API.disassembly.OperandExpression.addReference | ( | final Address | address,
|  | final ReferenceType | type |
| ) |  |  | throws CouldntSaveDataException

This method can be used to add new code or data references to operand expressions.

Parameters:

  | address | The target address of the new reference.
  | type | The type of the new reference.

Returns:
  The created reference.

Exceptions:

  | CouldntSaveDataException | Thrown if the new reference could not be saved.

static OperandExpression BinNavi.API.disassembly.OperandExpression.create | ( | final Module | module,
|  | final String | value,
|  | final ExpressionType | type |
| ) |  |  | `[static]`

Creates a new operand expression.

Parameters:

  | module | The module the operand expression belongs to.
  | value | The value of the operand expression.
  | type | The type of the operand expression.

Returns:
  The created operand expression.

void BinNavi.API.disassembly.OperandExpression.deleteReference | ( | final Reference | reference | ) | throws CouldntDeleteException

Permanently deletes a code or data reference from this operand expression.

Parameters:

  | reference | The reference to delete.

Exceptions:

  | CouldntDeleteException | Thrown if the reference could not be deleted.

List<OperandExpression> BinNavi.API.disassembly.OperandExpression.getChildren | ( |  | ) |

Returns the child expressions of the operand expression.

Returns:
  The child expressions of the operand expression.

OperandExpression BinNavi.API.disassembly.OperandExpression.getParent | ( |  | ) |

Returns the parent expression of the operand expression. If this expression is null, the operand expression is a root node in its operand tree.

Returns:
  The parent expression of the operand expression or null if the operand expression is a root node.

List<Reference> BinNavi.API.disassembly.OperandExpression.getReferences | ( |  | ) |

Returns the reference objects associated with this operand expression.

Returns:
  The reference objects associated with the operand expression.

String BinNavi.API.disassembly.OperandExpression.getReplacement | ( |  | ) |

Returns the replacement value of the operand expression. This is the value that is shown in views instead of the original value of the expression. If an operand expression has no replacement, null is returned.

Returns:
  The replacement of the operand expression or null.

ExpressionType BinNavi.API.disassembly.OperandExpression.getType | ( |  | ) |

Returns the type of the operand expression.

Returns:
  The type of the operand expression.

String BinNavi.API.disassembly.OperandExpression.getValue | ( |  | ) |

Returns the string value of the operand expression.

Returns:
  The string value of the operand expression.

void BinNavi.API.disassembly.OperandExpression.removeListener | ( | final IOperandExpressionListener | listener | ) |

Removes a listener object from the operand expression.

Parameters:

  | listener | The listener object to remove from the operand expression.

Exceptions:

  | IllegalArgumentException | Thrown if the listener argument is null.
  | IllegalStateException | Thrown if the listener object was not listening on the operand expression.

String BinNavi.API.disassembly.OperandExpression.toString | ( |  | ) |

Returns the string representation of the operand expression.

Returns:
  The string representation of the operand expression.