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

Java 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. 

 Examples: 

```

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

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

Description: Determine whether this operation can be mirrored.
return: true if [#mirror(IJavaOperatorFactory)](#mirror(IJavaOperatorFactory)) may succeed

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

Description: Determine whether this operation can be logically reversed.
return: true if [#reverse(IJavaOperatorFactory)](#reverse(IJavaOperatorFactory)) may succeed

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

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

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperation`


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

Description: Retrieve the operand count.
return: operand count

## Method: getLeft
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Get the left member sub\-expression.
return: the left expression, null if none

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

Description: Get the expression's operator.
return: the operator

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

Description: Retrieve the operation's operator type.
return: operator type

## Method: getRight
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Get the right sub\-expression.
return: the right expression

## Method: mirror
- parameter: `of`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperatorFactory`
- return type: `boolean`

Description: Mirror the operation order, whenever possible. The object is modified.
parameter: of: operator factory
return: true if mirroring was possible, false otherwise

## Method: reverse
- parameter: `of`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperatorFactory`
- return type: `boolean`

Description: Logical negation of the operation, whenever possible. The object is modified.
parameter: of: operator factory
return: true if reversing was possible, false otherwise

## Method: setLeft
- parameter: `left`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Set the left member sub\-expression.
parameter: left: left expression, or null for unary operators

## Method: setOperator
- parameter: `operator`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaOperator`

Description: Set the operator for the expression. Dangerous method\! the operator type is not checked, it is the caller's responsibility to do so.
parameter: operator: operator, cannot be null

## Method: setRight
- parameter: `right`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaExpression`

Description: Set the right member sub\-expression.
parameter: right: right expression

