@Override
  protected Object evaluateInitialization(EvaluationContextImpl context, Object value) throws EvaluateException {
    final Object iterable = myIterableEvaluator.evaluate(context);
    if (!(iterable instanceof ObjectReference)) {
      throw new EvaluateException("Unable to do foreach for" + iterable);
    }
    IdentityEvaluator iterableEvaluator = new IdentityEvaluator((Value)iterable);
    if (iterable instanceof ArrayReference) {
      myCurrentIndex = 0;
      myArrayLength = ((ArrayReference)iterable).length();
      myNextEvaluator = new AssignmentEvaluator(myIterationParameterEvaluator,
                                                new Evaluator() {
                                                  @Override
                                                  public Object evaluate(EvaluationContextImpl context) throws EvaluateException {
                                                    return ((ArrayReference)iterable).getValue(myCurrentIndex++);
                                                  }
                                                });
    }
    else {
      Object iterator = new MethodEvaluator(iterableEvaluator, null, "iterator", null, new Evaluator[0]).evaluate(context);
      IdentityEvaluator iteratorEvaluator = new IdentityEvaluator((Value)iterator);
      myConditionEvaluator = new MethodEvaluator(iteratorEvaluator, null, "hasNext", null, new Evaluator[0]);
      myNextEvaluator = new AssignmentEvaluator(myIterationParameterEvaluator,
                                                new MethodEvaluator(iteratorEvaluator, null, "next", null, new Evaluator[0]));
    }
    return value;
  }
@Override
  protected Object evaluateInitialization(EvaluationContextImpl context, Object value)