List of usage examples for org.eclipse.jdt.core.dom Expression equals
@Override public final boolean equals(Object obj)
ASTNode
implementation of this Object
method uses object identity (==). From source file:org.autorefactor.refactoring.rules.UseStringContainsRefactoring.java
License:Open Source License
private boolean is(final InfixExpression ie, MethodInvocation node, Operator operator, Integer constant) { final Expression leftOp = removeParentheses(ie.getLeftOperand()); final Expression rightOp = removeParentheses(ie.getRightOperand()); if (hasOperator(ie, operator)) { if (leftOp.equals(node) && constant.equals(rightOp.resolveConstantExpressionValue())) { return true; } else if (rightOp.equals(node) && constant.equals(leftOp.resolveConstantExpressionValue())) { return true; }/*from www . j av a2 s. c o m*/ } return false; }