Esempio n. 1
0
        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);
            }
        }