/** * Sets the condition of this if statement. * * @param expression the expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setExpression(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.expression; preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); this.expression = expression; postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); }
/** * Sets the condition of this if statement. * * @param expression the expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setExpression(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.expression; preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); this.expression = expression; postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); }
/** * Sets the condition of this if statement. * * @param expression the expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setExpression(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.expression; preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); this.expression = expression; postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); }
/** * Sets the condition of this if statement. * * @param expression the expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setExpression(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.expression; preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); this.expression = expression; postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); }
/** * Sets the condition of this if statement. * * @param expression the expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setExpression(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.expression; preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); this.expression = expression; postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); }
/** * Sets the condition of this if statement. * * @param expression the expression node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setExpression(Expression expression) { if (expression == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.expression; preReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); this.expression = expression; postReplaceChild(oldChild, expression, EXPRESSION_PROPERTY); }
/** * Sets the "then" part of this if statement. * <p> * Special note: The Java language does not allow a local variable declaration * to appear as the "then" part of an if statement (they may only appear within a * block). However, the AST will allow a <code>VariableDeclarationStatement</code> * as the thenStatement of a <code>IfStatement</code>. To get something that will * compile, be sure to embed the <code>VariableDeclarationStatement</code> * inside a <code>Block</code>. * </p> * * @param statement the "then" statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setThenStatement(Statement statement) { if (statement == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.thenStatement; preReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); this.thenStatement = statement; postReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); }
/** * Sets the "then" part of this if statement. * <p> * Special note: The Java language does not allow a local variable declaration * to appear as the "then" part of an if statement (they may only appear within a * block). However, the AST will allow a <code>VariableDeclarationStatement</code> * as the thenStatement of a <code>IfStatement</code>. To get something that will * compile, be sure to embed the <code>VariableDeclarationStatement</code> * inside a <code>Block</code>. * </p> * * @param statement the "then" statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setThenStatement(Statement statement) { if (statement == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.thenStatement; preReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); this.thenStatement = statement; postReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); }
/** * Sets the "then" part of this if statement. * <p> * Special note: The Java language does not allow a local variable declaration * to appear as the "then" part of an if statement (they may only appear within a * block). However, the AST will allow a <code>VariableDeclarationStatement</code> * as the thenStatement of a <code>IfStatement</code>. To get something that will * compile, be sure to embed the <code>VariableDeclarationStatement</code> * inside a <code>Block</code>. * </p> * * @param statement the "then" statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setThenStatement(Statement statement) { if (statement == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.thenStatement; preReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); this.thenStatement = statement; postReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); }
/** * Sets the "then" part of this if statement. * <p> * Special note: The Java language does not allow a local variable declaration * to appear as the "then" part of an if statement (they may only appear within a * block). However, the AST will allow a <code>VariableDeclarationStatement</code> * as the thenStatement of a <code>IfStatement</code>. To get something that will * compile, be sure to embed the <code>VariableDeclarationStatement</code> * inside a <code>Block</code>. * </p> * * @param statement the "then" statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setThenStatement(Statement statement) { if (statement == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.thenStatement; preReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); this.thenStatement = statement; postReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); }
preReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY); this.optionalElseStatement = statement; postReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY);
/** * Sets the "then" part of this if statement. * <p> * Special note: The Java language does not allow a local variable declaration * to appear as the "then" part of an if statement (they may only appear within a * block). However, the AST will allow a <code>VariableDeclarationStatement</code> * as the thenStatement of a <code>IfStatement</code>. To get something that will * compile, be sure to embed the <code>VariableDeclarationStatement</code> * inside a <code>Block</code>. * </p> * * @param statement the "then" statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setThenStatement(Statement statement) { if (statement == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.thenStatement; preReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); this.thenStatement = statement; postReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); }
/** * Sets the "then" part of this if statement. * <p> * Special note: The Java language does not allow a local variable declaration * to appear as the "then" part of an if statement (they may only appear within a * block). However, the AST will allow a <code>VariableDeclarationStatement</code> * as the thenStatement of a <code>IfStatement</code>. To get something that will * compile, be sure to embed the <code>VariableDeclarationStatement</code> * inside a <code>Block</code>. * </p> * * @param statement the "then" statement node * @exception IllegalArgumentException if: * <ul> * <li>the node belongs to a different AST</li> * <li>the node already has a parent</li> * <li>a cycle in would be created</li> * </ul> */ public void setThenStatement(Statement statement) { if (statement == null) { throw new IllegalArgumentException(); } ASTNode oldChild = this.thenStatement; preReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); this.thenStatement = statement; postReplaceChild(oldChild, statement, THEN_STATEMENT_PROPERTY); }
preReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY); this.optionalElseStatement = statement; postReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY);
preReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY); this.optionalElseStatement = statement; postReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY);
preReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY); this.optionalElseStatement = statement; postReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY);
preReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY); this.optionalElseStatement = statement; postReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY);
preReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY); this.optionalElseStatement = statement; postReplaceChild(oldChild, statement, ELSE_STATEMENT_PROPERTY);