Exemple #1
0
        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);
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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);
        }
Exemple #4
0
        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);
        }
Exemple #5
0
 protected override object getValueBody(OgnlContext context, object source) // throws OgnlException
 {
     return(OgnlOps.booleanValue(children[0].getValue(context, source))? false : true);
 }