public ConstantExpressionEvaluationException notConstantExpression(final XExpression expression) { String _text = null; if (expression!=null) { _text=this.toText(expression); } String _plus = ("Not a constant expression : \'" + _text); String _plus_1 = (_plus + "\'"); return new ConstantExpressionEvaluationException(_plus_1, expression); }
protected boolean _or(final Object left, final Object right) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'||\' for operands (" + left) + ", ") + right) + ")")); }
protected Object _internalEvaluate(final Void nullValue, final Context ctx) { throw this.notConstantExpression(null); }
protected Object _internalEvaluate(final XBinaryOperation it, final Context ctx) { Object _xblockexpression = null; { final Context context = ctx.cloneWithExpectation(null); final Object left = this.evaluate(it.getLeftOperand(), context); final Object right = this.evaluate(it.getRightOperand(), context); _xblockexpression = this.evaluateBinaryOperation(it, left, right); } return _xblockexpression; }
public Context cloneWithExpectation(final JvmTypeReference newExpectation) { return new Context(newExpectation, this.classFinder, this.visibleFeatures, this.alreadyEvaluating); }
public Object evaluate(final XExpression it, final boolean validationMode) { Object _xblockexpression = null; { HashSet<XExpression> _newHashSet = CollectionLiterals.<XExpression>newHashSet(); final SwitchConstantExpressionsInterpreter.SwitchContext ctx = new SwitchConstantExpressionsInterpreter.SwitchContext(null, null, null, _newHashSet); ctx.validationMode = validationMode; _xblockexpression = this.evaluate(it, ctx); } return _xblockexpression; }
public StackedConstantExpressionEvaluationException(final XExpression expression, final JvmField field, final ConstantExpressionEvaluationException cause) { super(new Function0<String>() { 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 _minus(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'-\' for operands " + left) + " and ") + right)); }
protected Object _internalEvaluate(final XExpression expression, final Context ctx) { throw this.notConstantExpression(expression); }
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 _minus(final Object operand) { throw new ConstantExpressionEvaluationException(("Unsupported operator \'-\' for operand " + operand)); }
protected Object _shiftRightUnsigned(final Object operand, final Object bits) { throw new ConstantExpressionEvaluationException((((("Unsupported operator \'>>>\' for operands (" + operand) + ", ") + bits) + ")")); }
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 _notSame(final Object left, final Object right) { throw new ConstantExpressionEvaluationException(((("Unsupported operator \'!==\' for operands " + left) + " and ") + right)); }