public interface

ICOperator

com.pnfsoftware.jeb.core.units.code.asm.decompiler.ast.ICOperator

Class Overview

This interface is used to define a C operator.

Summary

Constants
String OP_CARRY
String OP_PARITY
String OP_POW
String OP_ROL
String OP_ROR
Public Methods
abstract boolean checkType(COperatorType... candidateTypes)
abstract COperatorType.Associativity getAssociativity()
Get the associativity (left, right) of the operator.@return
abstract ICType getCastType()
abstract COperatorType getInternalOperatorType()
abstract ICOperator getMirror()
abstract int getOperandCount()
abstract int getPrecedence()
Get the precedence of the operator.
abstract int getPrecedenceDelta(ICOperator other)
Check the precedence of this operator against another operator.
abstract ICOperator getReverse()
abstract COperatorType getType()
abstract boolean isBinary()
abstract boolean isCast()
abstract boolean isCustom()
abstract boolean isRegular()
abstract boolean isTertiary()
abstract boolean isUnary()
abstract boolean isValidForCombinedAssignment()
Determine if this operator is one of the 11 (+1) arithmetic operators that can be used to build a combined-operator assignment.

Constants

public static final String OP_CARRY

Constant Value: "__carry__"

public static final String OP_PARITY

Constant Value: "__parity__"

public static final String OP_POW

Constant Value: "__pow__"

public static final String OP_ROL

Constant Value: "__rol__"

public static final String OP_ROR

Constant Value: "__ror__"

Public Methods

public abstract boolean checkType (COperatorType... candidateTypes)

public abstract COperatorType.Associativity getAssociativity ()

Get the associativity (left, right) of the operator.@return

Throws
RuntimeException if the associativity is not found

public abstract ICType getCastType ()

public abstract COperatorType getInternalOperatorType ()

public abstract ICOperator getMirror ()

public abstract int getOperandCount ()

public abstract int getPrecedence ()

Get the precedence of the operator. Currently not implemented for all operators, and the method will throw if it cannot find a precedence value.@return

Throws
RuntimeException if the precedence is not found

public abstract int getPrecedenceDelta (ICOperator other)

Check the precedence of this operator against another operator.

Returns
  • delta: <0 if this operator has higher precedence than other, 0 if their precedence is the same, or >0 if this operator has lower precedence than other.
Throws
Exception

public abstract ICOperator getReverse ()

public abstract COperatorType getType ()

public abstract boolean isBinary ()

public abstract boolean isCast ()

public abstract boolean isCustom ()

public abstract boolean isRegular ()

public abstract boolean isTertiary ()

public abstract boolean isUnary ()

public abstract boolean isValidForCombinedAssignment ()

Determine if this operator is one of the 11 (+1) arithmetic operators that can be used to build a combined-operator assignment.

Returns
  • true if one of: mul, div, add, sub, rem, shl, shr, ushr, and, xor, or