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 super
isSelectOnThisOrSuper(MemberSelectExpressionTree)
public static boolean isSelectOnThisOrSuper(MemberSelectExpressionTree tree)
this
or super
tree
- The tree to check.this
or super
isSelectOnThisOrSuper(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.