protected Node getValue() { return (jjtGetNumChildren() > 1) ? children[1] : null; }
public String toString() { String result = "{ "; for ( int i=0; i < jjtGetNumChildren(); ++i ) { if (i > 0) { result = result + ", "; } result = result + children[i].toString(); } return result + " }"; } }
protected Object getValueBody( OgnlContext context, Object source ) throws OgnlException { List answer = new ArrayList( jjtGetNumChildren() ); for ( int i=0; i < jjtGetNumChildren(); ++i ) answer.add( children[i].getValue(context, source) ); return answer; }
public String toString() { String result = "#"; if (className != null) { result = result + "@" + className + "@"; } result = result + "{ "; for ( int i = 0; i < jjtGetNumChildren(); ++i ) { ASTKeyValue kv = (ASTKeyValue)children[i]; if (i > 0) { result = result + ", "; } result = result + kv.getKey() + " : " + kv.getValue(); } return result + " }"; } }
protected Object getValueBody( OgnlContext context, Object source ) throws OgnlException { Map answer; if (className == null) { try { answer = (Map)DEFAULT_MAP_CLASS.newInstance(); } catch (Exception ex) { /* This should never happen */ throw new OgnlException("Default Map class '" + DEFAULT_MAP_CLASS.getName() + "' instantiation error", ex); } } else { try { answer = (Map)OgnlRuntime.classForName(context, className).newInstance(); } catch (Exception ex) { throw new OgnlException("Map implementor '" + className + "' not found", ex); } } for ( int i=0; i < jjtGetNumChildren(); ++i ) { ASTKeyValue kv = (ASTKeyValue)children[i]; Node k = kv.getKey(), v = kv.getValue(); answer.put( k.getValue(context, source), (v == null) ? null : v.getValue(context, source) ); } return answer; }
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); } }
int count = jjtGetNumChildren(); Object[] args = OgnlRuntime.getObjectArrayPool().create(count);
int maxIndex = ctx.getRootEvaluation().getNode().jjtGetNumChildren() - 1;
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, 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); } }