public Object internalEvaluate(final XExpression it, final Context ctx) { if (it instanceof XBinaryOperation) { return _internalEvaluate((XBinaryOperation)it, ctx); } else if (it instanceof XUnaryOperation) { return _internalEvaluate((XUnaryOperation)it, ctx); } else if (it instanceof XAbstractFeatureCall) { return _internalEvaluate((XAbstractFeatureCall)it, ctx); } else if (it instanceof XBooleanLiteral) { return _internalEvaluate((XBooleanLiteral)it, ctx); } else if (it instanceof XCastedExpression) { return _internalEvaluate((XCastedExpression)it, ctx); } else if (it instanceof XNumberLiteral) { return _internalEvaluate((XNumberLiteral)it, ctx); } else if (it instanceof XStringLiteral) { return _internalEvaluate((XStringLiteral)it, ctx); } else if (it instanceof XTypeLiteral) { return _internalEvaluate((XTypeLiteral)it, ctx); } else if (it instanceof XAnnotation) { return _internalEvaluate((XAnnotation)it, ctx); } else if (it != null) { return _internalEvaluate(it, ctx); } else if (it == null) { return _internalEvaluate((Void)null, ctx); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(it, ctx).toString()); } } }
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; }
if (feature instanceof JvmType) { _matched=true; return this.toTypeReference(((JvmType)feature), 0); final XExpression associatedExpression = this._iLogicalContainerProvider.getAssociatedExpression(feature); if ((associatedExpression != null)) { return this.evaluateAssociatedExpression(associatedExpression, ctx); if (((!((XVariableDeclaration)feature).isWriteable()) && (((XVariableDeclaration)feature).getRight() != null))) { _matched=true; return this.evaluateAssociatedExpression(((XVariableDeclaration)feature).getRight(), ctx); if (_tripleNotEquals) { _matched_1=true; return this.evaluate(((XSwitchExpression)container).getSwitch(), ctx);
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 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 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;