protected override void setValueBody(OgnlContext context, object target, object value) // throws OgnlException { object test = children[0].getValue(context, target); int branch = OgnlOps.booleanValue(test)? 1 : 2; children[branch].setValue(context, target, value); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object v1 = children[0].getValue(context, source); object v2 = children[1].getValue(context, source); return(OgnlOps.remainder(v1, v2)); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object v1 = children[0].getValue(context, source); object v2 = children[1].getValue(context, source); return(OgnlOps.operin(v1, v2)? false : true); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object test = children[0].getValue(context, source); int branch = OgnlOps.booleanValue(test)? 1 : 2; return(children[branch].getValue(context, source)); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object result = children[0].getValue(context, source); for (int i = 1; i < children.Length; ++i) { result = OgnlOps.multiply(result, children[i].getValue(context, source)); } return(result); }
protected override void setValueBody(OgnlContext context, object target, object value) // throws OgnlException { int last = children.Length - 1; for (int i = 0; i < last; ++i) { object v = children[i].getValue(context, target); if (OgnlOps.booleanValue(v)) { return; } } children[last].setValue(context, target, value); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object result = null; int last = children.Length - 1; for (int i = 0; i <= last; ++i) { result = children[i].getValue(context, source); if (i != last && OgnlOps.booleanValue(result)) { break; } } return(result); }
/*=================================================================== * Overridden methods * ===================================================================*/ protected internal override void runTest() // throws OgnlException { object result; result = OgnlOps.convertValue(value, toClass); if (!isEqual(result, expectedValue)) { if (scale >= 0) { double scalingFactor = Math.Pow(10, scale), v1 = Convert.ToDouble(value) * scalingFactor, v2 = Convert.ToDouble(expectedValue) * scalingFactor; Assert.IsTrue((int)v1 == (int)v2); } else { Assert.Fail(); } } }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { return(OgnlOps.negate(children[0].getValue(context, source))); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { return(OgnlOps.booleanValue(children[0].getValue(context, source))? false : true); }