public Object[] create(Object singleton) { Object[] result = create(1); result[0] = singleton; return result; }
public Object[] create(Object object1, Object object2) { Object[] result = create(2); result[0] = object1; result[1] = object2; return result; }
public Object[] create(Object object1, Object object2, Object object3, Object object4, Object object5) { Object[] result = create(5); result[0] = object1; result[1] = object2; result[2] = object3; result[3] = object4; result[4] = object5; return result; }
public synchronized Object[] create(Object singleton) { Object[] result = create(1); result[0] = singleton; return result; }
public synchronized Object[] create(Object object1, Object object2, Object object3, Object object4) { Object[] result = create(4); result[0] = object1; result[1] = object2; result[2] = object3; result[3] = object4; return result; }
public Object[] create(Object object1, Object object2, Object object3) { Object[] result = create(3); result[0] = object1; result[1] = object2; result[2] = object3; return result; }
public Object[] create(Object object1, Object object2, Object object3, Object object4) { Object[] result = create(4); result[0] = object1; result[1] = object2; result[2] = object3; result[3] = object4; return result; }
public Object[] create(Object object1, Object object2, Object object3, Object object4, Object object5) { Object[] result = create(5); result[0] = object1; result[1] = object2; result[2] = object3; result[3] = object4; result[4] = object5; return result; }
public synchronized Object[] create(Object object1, Object object2, Object object3) { Object[] result = create(3); result[0] = object1; result[1] = object2; result[2] = object3; return result; }
public synchronized Object[] create(Object object1, Object object2, Object object3, Object object4, Object object5) { Object[] result = create(5); result[0] = object1; result[1] = object2; result[2] = object3; result[3] = object4; result[4] = object5; return result; }
public Object[] create(Object object1, Object object2) { Object[] result = create(2); result[0] = object1; result[1] = object2; return result; }
public Object[] create(Object object1, Object object2, Object object3, Object object4) { Object[] result = create(4); result[0] = object1; result[1] = object2; result[2] = object3; result[3] = object4; return result; }
public Object[] create(Object singleton) { Object[] result = create(1); result[0] = singleton; return result; }
public synchronized Object[] create(Object object1, Object object2) { Object[] result = create(2); result[0] = object1; result[1] = object2; return result; }
public Object[] create(Object object1, Object object2, Object object3) { Object[] result = create(3); result[0] = object1; result[1] = object2; result[2] = object3; return result; }
/** * Utility to convert a List into an Object[] array. If the list is zero elements this will * return a constant array; toArray() on List always returns a new object and this is wasteful * for our purposes. */ public static Object[] toArray(List list) { Object[] result; int size = list.size(); if (size == 0) { result = NoArguments; } else { result = getObjectArrayPool().create(list.size()); for (int i = 0; i < size; i++) { result[i] = list.get(i); } } return result; }
protected 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 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 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 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, 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); } }