public class PsiPrecedenceUtil
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ADDITIVE_PRECEDENCE |
static int |
AND_PRECEDENCE |
static int |
ASSIGNMENT_PRECEDENCE |
static int |
BINARY_AND_PRECEDENCE |
static int |
BINARY_OR_PRECEDENCE |
static int |
BINARY_XOR_PRECEDENCE |
static int |
CONDITIONAL_PRECEDENCE |
static int |
EQUALITY_PRECEDENCE |
static int |
LAMBDA_PRECEDENCE |
static int |
LITERAL_PRECEDENCE |
static int |
METHOD_CALL_PRECEDENCE |
static int |
MULTIPLICATIVE_PRECEDENCE |
static int |
NUM_PRECEDENCES |
static int |
OR_PRECEDENCE |
static int |
PARENTHESIZED_PRECEDENCE |
static int |
POSTFIX_PRECEDENCE |
static int |
PREFIX_PRECEDENCE |
static int |
RELATIONAL_PRECEDENCE |
static int |
SHIFT_PRECEDENCE |
static int |
TYPE_CAST_PRECEDENCE |
Constructor and Description |
---|
PsiPrecedenceUtil() |
Modifier and Type | Method and Description |
---|---|
static boolean |
areParenthesesNeeded(PsiExpression expression,
PsiExpression parentExpression,
boolean ignoreClarifyingParentheses) |
static boolean |
areParenthesesNeeded(PsiJavaToken compoundAssignmentToken,
PsiExpression rhs) |
static boolean |
areParenthesesNeeded(PsiParenthesizedExpression expression,
boolean ignoreClarifyingParentheses) |
static int |
getPrecedence(PsiExpression expression) |
static int |
getPrecedenceForOperator(IElementType operator) |
static boolean |
isAssociativeOperation(PsiPolyadicExpression expression) |
static boolean |
isCommutativeOperation(PsiPolyadicExpression expression) |
static boolean |
isCommutativeOperator(IElementType token) |
public static final int PARENTHESIZED_PRECEDENCE
public static final int LITERAL_PRECEDENCE
public static final int METHOD_CALL_PRECEDENCE
public static final int POSTFIX_PRECEDENCE
public static final int PREFIX_PRECEDENCE
public static final int TYPE_CAST_PRECEDENCE
public static final int MULTIPLICATIVE_PRECEDENCE
public static final int ADDITIVE_PRECEDENCE
public static final int SHIFT_PRECEDENCE
public static final int RELATIONAL_PRECEDENCE
public static final int EQUALITY_PRECEDENCE
public static final int BINARY_AND_PRECEDENCE
public static final int BINARY_XOR_PRECEDENCE
public static final int BINARY_OR_PRECEDENCE
public static final int AND_PRECEDENCE
public static final int OR_PRECEDENCE
public static final int CONDITIONAL_PRECEDENCE
public static final int ASSIGNMENT_PRECEDENCE
public static final int LAMBDA_PRECEDENCE
public static final int NUM_PRECEDENCES
public static boolean isCommutativeOperator(IElementType token)
public static boolean isCommutativeOperation(PsiPolyadicExpression expression)
public static boolean isAssociativeOperation(PsiPolyadicExpression expression)
public static int getPrecedence(PsiExpression expression)
public static int getPrecedenceForOperator(IElementType operator)
public static boolean areParenthesesNeeded(PsiParenthesizedExpression expression, boolean ignoreClarifyingParentheses)
public static boolean areParenthesesNeeded(PsiExpression expression, PsiExpression parentExpression, boolean ignoreClarifyingParentheses)
public static boolean areParenthesesNeeded(PsiJavaToken compoundAssignmentToken, PsiExpression rhs)