public final class ExpressionUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static IdentifierTree |
extractIdentifier(AssignmentExpressionTree tree) |
static boolean |
isNullLiteral(ExpressionTree tree) |
static boolean |
isSecuringByte(ExpressionTree expression) |
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 IdentifierTree |
methodName(MethodInvocationTree mit)
Retrieve the identifier corresponding to the method name associated to the method invocation
|
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)
public static boolean isSecuringByte(ExpressionTree expression)
public static IdentifierTree methodName(MethodInvocationTree mit)
Copyright © 2012–2018 SonarSource. All rights reserved.