@Override public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class argClass) { Value value = expr.eval(env, VHelper.noCtx()).getOne(); return marshalValue(env, ctx, value, argClass); }
@SuppressWarnings("unchecked") public <T> T marshal(Env env, Expr expr, Class<T> expectedClass) { return (T) env.lookupPwd(expr.eval(env)); }
public Object marshal(Env env, Expr expr, Class expectedClass) { return new Integer((int) expr.evalLong(env)); }
public Object marshal(Env env, Expr expr, Class expectedClass) { return new Float((float) expr.evalDouble(env)); }
public Object marshal(Env env, Expr expr, Class expectedClass) { return expr.eval(env).toArrayValue(env); }
@Override public int getMarshalingCost(Expr expr) { if (expr.isArray()) return Marshal.ZERO; else return Marshal.ONE; }
@Override public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) { return marshalValue(env, ctx, expr.eval(env, VHelper.noCtx()).getOne(), expectedClass); }
public Object marshal(Env env, Expr expr, Class expectedClass) { return RegexpModule.createRegexpArray(env, expr.eval(env)); }
public Value evalInitExpr(Env env) { return _initValue.eval(env).copy(); }
public Object marshal(Env env, Expr expr, Class argClass) { String name = expr.evalString(env); return Enum.valueOf(_enumClass, name); }
@Override public Object marshal(Env env, FeatureExpr ctx, Expr expr, Class expectedClass) { return new Long(expr.evalLong(env, VHelper.noCtx()).getOne()); }
/** Executes the statement, returning the expression value. */ public Value execute(Env env) { if (_target == null) return ContinueValue.CONTINUE; else return new ContinueValue(_target.eval(env).toInt()); }