@Override public Object visit(ASTArrayAccess node, Object data) { node.childrenAccept(this, data); return data; }
/** {@inheritDoc} */ public Object visit(ASTArrayAccess node, Object data) { accept(node.jjtGetChild(0), data); int num = node.jjtGetNumChildren(); for (int i = 1; i < num; ++i) { builder.append("["); accept(node.jjtGetChild(i), data); builder.append("]"); } return data; }
@Override public Object visit(ASTArrayAccess node, Object data) { STATE state = STATE.IGNORABLE; if (output != null) { output.writeLine(data + node.toString() + " -> " + state); } return state; }
final public void ArrayAccess() throws ParseException { ASTArrayAccess jjtn000 = new ASTArrayAccess(JJTARRAYACCESS); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000);
/** {@inheritDoc} */ public Object visit(ASTArrayAccess node, Object data) { // first objectNode is the identifier Object object = node.jjtGetChild(0).jjtAccept(this, data); // can have multiple nodes - either an expression, integer literal or reference int numChildren = node.jjtGetNumChildren(); for (int i = 1; i < numChildren; i++) { JexlNode nindex = node.jjtGetChild(i); if (nindex instanceof JexlNode.Literal<?>) { object = nindex.jjtAccept(this, object); } else { Object index = nindex.jjtAccept(this, null); object = getAttribute(object, index, nindex); } } return object; }
public Object visit(ASTArrayAccess node, Object data) { output.writeLine(data + node.toString()); childrenAccept(node, this, data + PREFIX); return null; }
Object nobject = narray.jjtGetChild(0).jjtAccept(this, object); if (nobject == null) { throw new JexlException(objectNode, "array element is null"); last = narray.jjtGetNumChildren() - 1; for (int i = 1; i < last; i++) { objectNode = narray.jjtGetChild(i); if (objectNode instanceof JexlNode.Literal<?>) { object = objectNode.jjtAccept(this, object); property = narray.jjtGetChild(last).jjtAccept(this, null); } else if (!isRegister) { throw new JexlException(objectNode, "illegal assignment form");