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); }
protected String _case( JvmOperation input, XBinaryOperation context, EReference ref, JvmFeatureDescription jvmFeatureDescription) { final int irrelevantArguments = jvmFeatureDescription.getNumberOfIrrelevantArguments(); if (input.getParameters().size() - irrelevantArguments != 1) return INVALID_NUMBER_OF_ARGUMENTS; if (context.getRightOperand() != null && context.getLeftOperand() != null) { JvmTypeReference rightOperandType = getTypeProvider().getType(context.getRightOperand(), true); if (rightOperandType == null) return INVALID_ARGUMENT_TYPES; final JvmFormalParameter rightParam = input.getParameters().get(0 + irrelevantArguments); if (!conformance.isConformant(rightParam.getParameterType(), rightOperandType, true)) return INVALID_ARGUMENT_TYPES; } return null; }