# Interface: com.pnfsoftware.jeb.core.units.code.java.IJavaOperator

This interface is used to define a Java operator.

## Method: canCauseException
- return type: `boolean`

Description: Determine whether evaluating this operator may cause an exception.
return: true if the operator may cause an exception

## Method: format
- parameter: `fctx`, type: `com.pnfsoftware.jeb.core.units.code.android.ir.DFormattingContext`

Description: Format this operator.
parameter: fctx: formatting context

## Method: getAssociativity
- return type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType.Associativity`

Description: Get the associativity \(left, right\) of the operator.
return: operator associativity
throws: if the associativity is not found

## Method: getCastType
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaType`

Description: Return the cast type of a cast operator. This method will throw if the operator is not a cast operator. Use [#isCast()](#isCast()) first.
return: the cast\-to object type

## Method: getFactory
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperatorFactory`

Description: Retrieve the operator factory that created this operator.
return: operator factory

## Method: getMirror
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperator`

Description: Retrieve the mirrored operator.
return: mirror operator, or null if none exists

## Method: getOperatorType
- return type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType`

Description: Get the type of operator represented by this object.
return: operator type

## Method: getPrecedence
- return type: `int`

Description: 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: operator precedence
throws: if the precedence is not found

## Method: getPrecedenceDelta
- parameter: `other`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperator`
- return type: `int`

Description: Check the precedence of this operator against another operator.
parameter: other: operator to compare with this one
return: delta: negative if this operator has higher precedence than other, 0 if their         precedence is the same, or positive if this operator has lower precedence than other
throws: if precedence cannot be determined

## Method: getReverse
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperator`

Description: Retrieve the logical reverse operator.
return: reverse operator, or null if none exists

## Method: getType
- return type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType`

Description: Get the type of operator represented by this object.
return: operator type

## Method: is
- parameter: `optype`, type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType`
- return type: `boolean`

Description: Determine whether this operator has a specific type.
parameter: optype: operator type
return: true if this operator has the provided type

## Method: isAnyOf
- parameter: `optypes`, type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType[]`
- return type: `boolean`

Description: Determine whether this operator has any of the provided types.
parameter: optypes: operator types
return: true if this operator has one of the provided types

## Method: isArithmetic
- return type: `boolean`

Description: Determine if the operator is an arithmetic or bitwise operator.
return: true for `ADD, SUB, MUL, DIV, REM, AND, OR, XOR, SHL, SHR, USHR, NEG, NOT`

## Method: isBinary
- return type: `boolean`

Description: Determine if the operator uses two operands.
return: true if the operator is a binary operator

## Method: isCast
- return type: `boolean`

Description: Determine if the operator is a cast operator.
return: true if the operator is a cast operator

## Method: isCastToPrimitive
- return type: `boolean`

Description: Determine if the operator is a cast operator to a primitive type.
return: true if the operator casts to a primitive type

## Method: isLogical
- return type: `boolean`

Description: Determine if the operator is a logical operator, i.e. one that evaluates to true or false.
return: true for `LOG_IDENT, LOG_NOT, LOG_OR, LOG_AND, EQ, NE, LT, GE, GT, LE, INSTANCEOF`

## Method: isNoneOf
- parameter: `optypes`, type: `com.pnfsoftware.jeb.core.units.code.java.JavaOperatorType[]`
- return type: `boolean`

Description: Determine whether this operator has none of the provided types.
parameter: optypes: operator types
return: true if this operator has none of the provided types

## Method: isUnary
- return type: `boolean`

Description: Determine if the operator uses a single operand.
return: true if the operator is a unary operator

## Method: isValidForCombinedAssignment
- return type: `boolean`

Description: Determine if this operator is one of the 11 \(\+1\) arithmetic operators that can be used to build a combined\-operator assignment.
return: true if one of: mul, div, add, sub, rem, shl, shr, ushr, and, xor, or

