protected Object _minus(final Object operand) { throw new ConstantExpressionEvaluationException(("Unsupported operator \'-\' for operand " + operand)); }
public Object evaluate(final XExpression expression, final JvmTypeReference expectedType) { try { final Object result = this.interpreter.evaluate(expression, expectedType); return this.translate(result); } catch (final Throwable _t) { if (_t instanceof ConstantExpressionEvaluationException) { final ConstantExpressionEvaluationException e = (ConstantExpressionEvaluationException)_t; String _message = e.getMessage(); final EObjectDiagnosticImpl error = new EObjectDiagnosticImpl(Severity.ERROR, "constant_expression_evaluation_problem", _message, expression, null, (-1), null); expression.eResource().getErrors().add(error); return null; } else { throw Exceptions.sneakyThrow(_t); } } }
public String apply() { StringConcatenation _builder = new StringConcatenation(); _builder.append("Error during call to "); String _simpleName = field.getSimpleName(); _builder.append(_simpleName); _builder.append(" : "); String _message = cause.getMessage(); _builder.append(_message); return _builder.toString(); } }.apply(), expression, cause);
protected Object _shiftRightUnsigned(final Object operand, final Object bits) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'>>>\' for operands (" + operand) + ", ") + bits) + ")")); }
@Override public Object getValue(final String property) { try { final JvmOperation op = this.findOperation(property); final Function1<JvmAnnotationValue, Boolean> _function = (JvmAnnotationValue it) -> { return Boolean.valueOf((Objects.equal(it.getOperation(), op) || ((it.getOperation() == null) && Objects.equal(op.getSimpleName(), "value")))); }; final JvmAnnotationValue annotationValue = IterableExtensions.<JvmAnnotationValue>findFirst(this.getDelegate().getValues(), _function); final boolean isArrayType = ((op != null) && this.getCompilationUnit().getTypeReferences().isArray(op.getReturnType())); if ((annotationValue != null)) { return this.getCompilationUnit().translateAnnotationValue(annotationValue, isArrayType); } } catch (final Throwable _t) { if (_t instanceof ConstantExpressionEvaluationException) { final ConstantExpressionEvaluationException e = (ConstantExpressionEvaluationException)_t; this.getCompilationUnit().getProblemSupport().addError(this, e.getMessage()); } else { throw Exceptions.sneakyThrow(_t); } } return null; }
protected boolean _lessEquals(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'<=\' for operands " + left) + " and ") + right)); }
protected EvaluationResult _internalEvaluate(final Void nullValue, final EvaluationContext context) { throw new ConstantExpressionEvaluationException("null"); }
protected Object _shiftRight(final Object operand, final Object bits) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'>>\' for operands (" + operand) + ", ") + bits) + ")")); }
protected boolean _and(final Object left, final Object right) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'&&\' for operands (" + left) + ", ") + right) + ")")); }
protected Object _divide(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'/\' for operands " + left) + " and ") + right)); }
protected boolean _or(final Object left, final Object right) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'||\' for operands (" + left) + ", ") + right) + ")")); }
protected Object _minus(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'-\' for operands " + left) + " and ") + right)); }
protected boolean _greaterThan(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'>\' for operands " + left) + " and ") + right)); }
protected Object _modulo(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'%\' for operands " + left) + " and ") + right)); }
protected Object _shiftLeft(final Object operand, final Object bits) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'<<\' for operands (" + operand) + ", ") + bits) + ")")); }
protected Object _plus(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'+\' for operands " + left) + " and ") + right)); }
protected boolean _lessThan(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'<\' for operands " + left) + " and ") + right)); }
protected Object _multiply(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'*\' for operands " + left) + " and ") + right)); }
protected boolean _same(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'===\' for operands " + left) + " and ") + right)); }
protected boolean _greaterEquals(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'>=\' for operands " + left) + " and ") + right)); }