protected boolean isReassignFirstArgument(XAbstractFeatureCall featureCall) { if (featureCall instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) featureCall; return binaryOperation.isReassignFirstArgument(); } return false; }
private boolean needMultiAssignment(XAbstractFeatureCall expr) { if (expr instanceof XBinaryOperation) { final XBinaryOperation binaryOperation = (XBinaryOperation) expr; return binaryOperation.isReassignFirstArgument(); } return false; }
protected boolean needMultiAssignment(XAbstractFeatureCall expr) { if (expr instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) expr; return binaryOperation.isReassignFirstArgument(); } return false; }
protected List<QualifiedName> getMethodNames(XAbstractFeatureCall featureCall, QualifiedName operatorSymbol) { List<QualifiedName> methodNames = new ArrayList<QualifiedName>(); methodNames.add(operatorMapping.getMethodName(operatorSymbol)); if (featureCall instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) featureCall; if (binaryOperation.isReassignFirstArgument()) { QualifiedName simpleOperator = operatorMapping.getSimpleOperator(operatorSymbol); if (simpleOperator != null) { methodNames.add(operatorMapping.getMethodName(simpleOperator)); } } } return methodNames; }
protected QualifiedName getOperator(XAbstractFeatureCall call, QualifiedName name) { QualifiedName operator = operatorMapping.getOperator(name); if (!(call instanceof XBinaryOperation)) { return operator; } XBinaryOperation binaryOperation = (XBinaryOperation) call; if (!binaryOperation.isReassignFirstArgument()) { return operator; } if (operatorMapping.getCompoundOperators().contains(operator)) { return operator; } return operatorMapping.getCompoundOperator(operator); }
@Check public void checkAssignment(XBinaryOperation binaryOperation) { if (binaryOperation.isReassignFirstArgument()) { XExpression leftOperand = binaryOperation.getLeftOperand(); checkAssignment(leftOperand, false); } }
/** Replies if the given operator is a reassignment operator. * A reassignment operator changes its left operand. * * @param operator the operator. * @return {@code true} if the operator changes its left operand. */ protected boolean isReassignmentOperator(XBinaryOperation operator) { if (operator.isReassignFirstArgument()) { return true; } final QualifiedName operatorName = this.operatorMapping.getOperator( QualifiedName.create(operator.getFeature().getSimpleName())); final QualifiedName compboundOperatorName = this.operatorMapping.getSimpleOperator(operatorName); return compboundOperatorName != null; }
public boolean hasSideEffects(XAbstractFeatureCall featureCall, boolean inspectContents) { if (featureCall instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) featureCall; if (binaryOperation.isReassignFirstArgument()) { return true;
if (binaryOperation.isReassignFirstArgument()) { return true; if (binaryOperation.isReassignFirstArgument()) { return true;
if (expression instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) expression; if (binaryOperation.isReassignFirstArgument()) { return false;
if (featureCall instanceof XBinaryOperation) { XBinaryOperation binaryOperation = (XBinaryOperation) featureCall; if (binaryOperation.isReassignFirstArgument()) { XAbstractFeatureCall leftOperand = (XAbstractFeatureCall) binaryOperation.getLeftOperand(); assignValueTo(leftOperand.getFeature(), featureCall, result, context, indicator);