protected override void setValueBody(OgnlContext context, object target, object value) // throws OgnlException { object expr = children[0].getValue(context, target), previousRoot = context.getRoot(); Node node; target = children[1].getValue(context, target); node = (expr is Node) ? (Node)expr : (Node)Ognl.parseExpression(expr.ToString()); try { context.setRoot(target); node.setValue(context, target, value); } finally { context.setRoot(previousRoot); } }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object[] args = OgnlRuntime.getObjectArrayPool().create(jjtGetNumChildren()); object root = context.getRoot(); try { for (int i = 0, icount = args.Length; i < icount; ++i) { args[i] = children[i].getValue(context, root); } return(OgnlRuntime.callStaticMethod(context, className, methodName, args)); } finally { OgnlRuntime.getObjectArrayPool().recycle(args); } }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object result, expr = children[0].getValue(context, source), previousRoot = context.getRoot(); Node node; source = children[1].getValue(context, source); node = (expr is Node) ? (Node)expr : (Node)Ognl.parseExpression(expr.ToString()); try { context.setRoot(source); result = node.getValue(context, source); } finally { context.setRoot(previousRoot); } return(result); }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { object[] args = OgnlRuntime.getObjectArrayPool().create(jjtGetNumChildren()); try { object result, root = context.getRoot(); for (int i = 0, icount = args.Length; i < icount; ++i) { args[i] = children[i].getValue(context, root); } result = OgnlRuntime.callMethod(context, source, methodName, null, args); if (result == null) { NullHandler nh = OgnlRuntime.getNullHandler(OgnlRuntime.getTargetClass(source)); result = nh.nullMethodResult(context, source, methodName, args); } return(result); } finally { OgnlRuntime.getObjectArrayPool().recycle(args); } }
protected override object getValueBody(OgnlContext context, object source) // throws OgnlException { return(context.getRoot()); }