Class IdenticalOperandOnBinaryExpressionCheck
java.lang.Object
org.sonar.java.ast.visitors.SubscriptionVisitor
org.sonar.plugins.java.api.IssuableSubscriptionVisitor
org.sonar.java.checks.IdenticalOperandOnBinaryExpressionCheck
- All Implemented Interfaces:
JavaCheck, JavaFileScanner
-
Field Summary
Fields inherited from class SubscriptionVisitor
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExpressionTreeequivalentOperand(BinaryExpressionTree tree, ExpressionTree rightOperand) static ExpressionTreeequivalentOperand(ExpressionTree left, ExpressionTree right, Tree.Kind binaryKind) voidMethods inherited from class IssuableSubscriptionVisitor
addIssue, addIssueOnFile, leaveFile, reportIssue, reportIssue, reportIssue, reportIssue, scanFile, scanTree, setContextMethods inherited from class SubscriptionVisitor
leaveNode, visitToken, visitTriviaMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface JavaFileScanner
scanWithoutParsing
-
Constructor Details
-
IdenticalOperandOnBinaryExpressionCheck
public IdenticalOperandOnBinaryExpressionCheck()
-
-
Method Details
-
nodesToVisit
- Specified by:
nodesToVisitin classSubscriptionVisitor
-
visitNode
- Overrides:
visitNodein classSubscriptionVisitor
-
equivalentOperand
@CheckForNull public static ExpressionTree equivalentOperand(BinaryExpressionTree tree, ExpressionTree rightOperand) -
equivalentOperand
public static ExpressionTree equivalentOperand(ExpressionTree left, ExpressionTree right, Tree.Kind binaryKind)
-