public interface

ICOperation

implements ICLeftExpression
com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICOperation

Class Overview

C AST interface to represent arithmetic and logical expressions.

An expression consists of one or two members (the left and right members) and an operator. The left member is optional, and should be null for unary operators.

A third member may be specified for ternary expressions.

Examples:

 a + 1
 a * ((int)b - foo())
 !x
 x ^ y | z
 c ? a: b
 

Summary

Public Methods
abstract boolean checkOperatorType(COperatorType optype)
abstract ICOperation duplicate()
Deep duplication of the element.
abstract int getCountOfOperands()
abstract ICExpression getFirstOperand()
Get the first operand, never null.
abstract ICOperator getOperator()
abstract COperatorType getOperatorType()
abstract ICExpression getSecondOperand()
Get the second operand, might be null.
abstract ICExpression getThirdOperand()
Get the third operand, might be null.
abstract boolean mirror(ICOperatorFactory of)
Mirror the operation order, whenever possible.
abstract boolean reverse(ICOperatorFactory of)
Logical negation of the operation, whenever possible.
abstract void setFirstOperand(ICExpression e)
abstract void setOperator(ICOperator operator)
Set the operator for the expression.
abstract void setSecondOperand(ICExpression e)
abstract void setThirdOperand(ICExpression e)
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICElement
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICExpression
From interface com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICLeftExpression

Public Methods

public abstract boolean checkOperatorType (COperatorType optype)

public abstract ICOperation duplicate ()

Deep duplication of the element. Sub-elements are duplicated.

Note: ICClass, ICMethod, ICField, ICIdentifier, ICConstant, ICType and ICLabel are not duplicated.

public abstract int getCountOfOperands ()

public abstract ICExpression getFirstOperand ()

Get the first operand, never null.

public abstract ICOperator getOperator ()

public abstract COperatorType getOperatorType ()

public abstract ICExpression getSecondOperand ()

Get the second operand, might be null.

public abstract ICExpression getThirdOperand ()

Get the third operand, might be null.

public abstract boolean mirror (ICOperatorFactory of)

Mirror the operation order, whenever possible. The object is modified.

Returns
  • true if mirroring was possible, false otherwise

public abstract boolean reverse (ICOperatorFactory of)

Logical negation of the operation, whenever possible. The object is modified.

Returns
  • true if reversing was possible, false otherwise

public abstract void setFirstOperand (ICExpression e)

public abstract void setOperator (ICOperator operator)

Set the operator for the expression. Dangerous method! the operator type is not checked, it is the caller's responsibility to do so.

Parameters
operator operator, cannot be null

public abstract void setSecondOperand (ICExpression e)

public abstract void setThirdOperand (ICExpression e)