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; }
if (_tripleNotEquals) { _matched_1=true; return this.evaluate(((XSwitchExpression)container).getSwitch(), ctx);
public Object evaluate(final XExpression it) { HashSet<XExpression> _newHashSet = CollectionLiterals.<XExpression>newHashSet(); Context _context = new Context(null, null, null, _newHashSet); return this.evaluate(it, _context); }
public Object evaluateAssociatedExpression(final XExpression it, final Context ctx) { Object _switchResult = null; boolean _matched = false; if (it instanceof XAbstractFeatureCall) { JvmIdentifiableElement _feature = ((XAbstractFeatureCall)it).getFeature(); if ((_feature instanceof JvmEnumerationLiteral)) { _matched=true; throw this.notConstantExpression(it); } } if (!_matched) { _switchResult = this.evaluate(it, ctx); } return _switchResult; }
public boolean isConstant(final XCasePart casePart) { final XExpression case_ = casePart.getCase(); if ((case_ == null)) { return false; } try { this._switchConstantExpressionsInterpreter.evaluate(case_); return true; } catch (final Throwable _t) { if (_t instanceof ConstantExpressionEvaluationException) { return false; } else { throw Exceptions.sneakyThrow(_t); } } }
Object result = switchConstantExpressionsInterpreter.evaluate(casePart.getCase()); if (!(result instanceof JvmEnumerationLiteral)) { return;
Object result = switchConstantExpressionsInterpreter.evaluate(caseExpression, true); if (result instanceof JvmTypeReference) { JvmTypeReference jvmTypeReference = (JvmTypeReference) result;