/** * Initializes a list expression with a Java Collection */ public ASTList(Collection objects) { super(ExpressionParserTreeConstants.JJTLIST); setValues(objects); }
/** * Initializes a list expression with a Java Collection */ public ASTList(Collection<?> objects) { super(ExpressionParserTreeConstants.JJTLIST); setValues(objects); }
/** * Initializes a list expression with a Java Iterator. */ public ASTList(Iterator<?> objects) { super(ExpressionParserTreeConstants.JJTLIST); setValues(objects); }
/** * Initializes a list expression with an Object[]. */ public ASTList(Object[] objects) { super(ExpressionParserTreeConstants.JJTLIST); setValues(objects); }
/** * Initializes a list expression with an Object[]. */ public ASTList(Object[] objects) { super(ExpressionParserTreeConstants.JJTLIST); setValues(objects); }
/** * Initializes a list expression with a Java Iterator. */ public ASTList(Iterator objects) { super(ExpressionParserTreeConstants.JJTLIST); setValues(objects); }
public void setOperand(int index, Object value) { if (index != 0) { throw new ArrayIndexOutOfBoundsException(index); } setValues(value); }
@Override public void setOperand(int index, Object value) { if (index != 0) { throw new ArrayIndexOutOfBoundsException(index); } setValues(value); }
@Override public void jjtClose() { super.jjtClose(); // For backwards compatibility set a List value wrapping the nodes. // or maybe we should rewrite the parser spec to insert children // directly into internal collection? int size = jjtGetNumChildren(); Object[] listValue = new Object[size]; for (int i = 0; i < size; i++) { listValue[i] = unwrapChild(jjtGetChild(i)); } setValues(listValue); // clean children - we are not supposed to use them anymore children = null; }
public void jjtClose() { super.jjtClose(); // For backwards compatibility set a List value wrapping the nodes. // or maybe we should rewrite the parser spec to insert children // directly into internal collection? int size = jjtGetNumChildren(); Object[] listValue = new Object[size]; for (int i = 0; i < size; i++) { listValue[i] = unwrapChild(jjtGetChild(i)); } setValues(listValue); // clean children - we are not supposed to use them anymore children = null; } }