com.pnfsoftware.jeb.core.units.code.java.IJavaOperator |
This interface is used to define a Java operator.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract boolean | canCauseException() | ||||||||||
abstract void | format(DFormattingContext fctx) | ||||||||||
abstract JavaOperatorType.Associativity |
getAssociativity()
Get the associativity (left, right) of the operator.@return
| ||||||||||
abstract IJavaType |
getCastType()
Return the cast type of a cast operator.
| ||||||||||
abstract IJavaOperatorFactory | getFactory() | ||||||||||
abstract JavaOperatorType |
getOperatorType()
Get the type of operator represented by this object.
| ||||||||||
abstract int |
getPrecedence()
Get the precedence of the operator.
| ||||||||||
abstract int |
getPrecedenceDelta(IJavaOperator other)
Check the precedence of this operator against another operator.
| ||||||||||
abstract boolean | is(JavaOperatorType optype) | ||||||||||
abstract boolean | isAnyOf(JavaOperatorType... optypes) | ||||||||||
abstract boolean |
isArithmetic()
Determine if the operator is an arithmetic or bitwise operator.
| ||||||||||
abstract boolean |
isBinary()
Determine if the operator uses two operands.
| ||||||||||
abstract boolean |
isCast()
Determine if the operator is a cast operator.
| ||||||||||
abstract boolean | isCastToPrimitive() | ||||||||||
abstract boolean |
isLogical()
Determine if the operator is a logical operator, i.e.
| ||||||||||
abstract boolean | isNoneOf(JavaOperatorType... optypes) | ||||||||||
abstract boolean |
isUnary()
Determine if the operator uses a single operand.
| ||||||||||
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.
|
Get the associativity (left, right) of the operator.@return
RuntimeException | if the associativity is not found |
---|
Return the cast type of a cast operator. This method will throw if the operator is not a cast
operator. Use isCast()
first.
Get the type of operator represented by this object.
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
RuntimeException | if the precedence is not found |
---|
Check the precedence of this operator against another operator.
Exception |
---|
Determine if the operator is an arithmetic or bitwise operator.
ADD, SUB, MUL, DIV, REM, AND, OR, XOR, SHL, SHR, USHR, NEG, NOT
Determine if the operator uses two operands.
Determine if the operator is a cast operator.
Determine if the operator is a logical operator, i.e. one that evaluates to true or false.
LOG_IDENT, LOG_NOT, LOG_OR, LOG_AND, EQ, NE, LT, GE, GT, LE, INSTANCEOF
Determine if the operator uses a single operand.
Determine if this operator is one of the 11 (+1) arithmetic operators that can be used to build a combined-operator assignment.