public final class ExpressionUtils extends Object
Modifier and Type | Method | 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 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)
public static boolean isSecuringByte(ExpressionTree expression)
public static IdentifierTree methodName(MethodInvocationTree mit)
Copyright © 2012–2018 SonarSource. All rights reserved.