private static Class[] getChildrenClasses(OgnlContext context, Node[] _children) { if (_children == null) return null; Class[] argumentClasses = new Class[_children.length]; for (int i = 0; i < _children.length; i++) { Node child = _children[i]; if (child instanceof ASTList) { // special handling for ASTList - it creates a List //Class componentType = getClassMatchingAllChildren(context, ((ASTList)child)._children); //argumentClasses[i] = Array.newInstance(componentType, 0).getClass(); argumentClasses[i] = List.class; } else if (child instanceof NodeType) { argumentClasses[i] = ((NodeType)child).getGetterClass(); } else if (child instanceof ASTCtor) { try { argumentClasses[i] = ((ASTCtor)child).getCreatedClass(context); } catch (ClassNotFoundException nfe) { throw OgnlOps.castToRuntime(nfe); } } else if (child instanceof ASTTest) { argumentClasses[i] = getClassMatchingAllChildren(context, ((ASTTest)child)._children); } else { throw new UnsupportedOperationException("Don't know how to handle child: "+child); } } return argumentClasses; }
&& ((ASTCtor)_parent).isArray()) {
int count = jjtGetNumChildren(); Object[] args = OgnlRuntime.getObjectArrayPool().create(count);
final public void constructorCall() throws ParseException { ASTCtor jjtn000 = new ASTCtor(JJTCTOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);String className; jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); } else if (jj_2_12(2)) { jj_consume_token(52); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); jjtn000.setArray(true); } else if (jj_2_13(2)) { jj_consume_token(52); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); jjtn000.setArray(true); } else { jj_consume_token(-1);
ctorValue = this.getValueBody(context, target); context.setCurrentObject(ctorValue);
final public void constructorCall() throws ParseException { ASTCtor jjtn000 = new ASTCtor(JJTCTOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);String className; jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); } else if (jj_2_12(2)) { jj_consume_token(52); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); jjtn000.setArray(true); } else if (jj_2_13(2)) { jj_consume_token(52); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); jjtn000.setArray(true); } else { jj_consume_token(-1);
ctorValue = this.getValueBody(context, target); context.setCurrentObject(ctorValue);
final public void constructorCall() throws ParseException { ASTCtor jjtn000 = new ASTCtor(JJTCTOR); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);String className; jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); } else if (jj_2_12(2)) { jj_consume_token(52); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); jjtn000.setArray(true); } else if (jj_2_13(2)) { jj_consume_token(52); jjtree.closeNodeScope(jjtn000, true); jjtc000 = false; jjtn000.setClassName(className); jjtn000.setArray(true); } else { jj_consume_token(-1);
private static Class[] getChildrenClasses(OgnlContext context, Node[] _children) { if (_children == null) return null; Class[] argumentClasses = new Class[_children.length]; for (int i = 0; i < _children.length; i++) { Node child = _children[i]; if (child instanceof ASTList) { // special handling for ASTList - it creates a List //Class componentType = getClassMatchingAllChildren(context, ((ASTList)child)._children); //argumentClasses[i] = Array.newInstance(componentType, 0).getClass(); argumentClasses[i] = List.class; } else if (child instanceof NodeType) { argumentClasses[i] = ((NodeType)child).getGetterClass(); } else if (child instanceof ASTCtor) { try { argumentClasses[i] = ((ASTCtor)child).getCreatedClass(context); } catch (ClassNotFoundException nfe) { throw OgnlOps.castToRuntime(nfe); } } else if (child instanceof ASTTest) { argumentClasses[i] = getClassMatchingAllChildren(context, ((ASTTest)child)._children); } else { throw new UnsupportedOperationException("Don't know how to handle child: "+child); } } return argumentClasses; }
int count = jjtGetNumChildren(); Object[] args = OgnlRuntime.getObjectArrayPool().create(count);
&& ((ASTCtor)_parent).isArray()) {