public final class ExpressionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static IdentifierTree |
extractIdentifier(AssignmentExpressionTree tree) |
static boolean |
isNullLiteral(ExpressionTree tree) |
static boolean |
isSelectOnThisOrSuper(AssignmentExpressionTree tree)
|
static boolean |
isSelectOnThisOrSuper(MemberSelectExpressionTree tree)
Checks of is the given tree is selecting with
this or super |
static boolean |
isSimpleAssignment(AssignmentExpressionTree tree)
In case of simple assignments, only the expression is evaluated, as we only use the reference to the variable to store the result.
|
static ExpressionTree |
skipParentheses(ExpressionTree tree) |
public static boolean isSimpleAssignment(AssignmentExpressionTree tree)
tree - The assignment treeextractIdentifier(AssignmentExpressionTree)public static boolean isSelectOnThisOrSuper(AssignmentExpressionTree tree)
tree - The tree to check.this or superisSelectOnThisOrSuper(MemberSelectExpressionTree)public static boolean isSelectOnThisOrSuper(MemberSelectExpressionTree tree)
this or supertree - The tree to check.this or superisSelectOnThisOrSuper(AssignmentExpressionTree)public static IdentifierTree extractIdentifier(AssignmentExpressionTree tree)
public static ExpressionTree skipParentheses(ExpressionTree tree)
public static boolean isNullLiteral(ExpressionTree tree)
Copyright © 2012–2017 SonarSource. All rights reserved.