/** * Creates a new unparented enhanced for statement node owned by this AST. * By default, the paramter and expression are unspecified * but legal subtrees, and the body is an empty block. * * @return a new unparented throw statement node * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public EnhancedForStatement newEnhancedForStatement() { return new EnhancedForStatement(this); }
/** * Creates a new unparented enhanced for statement node owned by this AST. * By default, the paramter and expression are unspecified * but legal subtrees, and the body is an empty block. * * @return a new unparented throw statement node * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public EnhancedForStatement newEnhancedForStatement() { return new EnhancedForStatement(this); }
/** * Creates a new unparented enhanced for statement node owned by this AST. * By default, the paramter and expression are unspecified * but legal subtrees, and the body is an empty block. * * @return a new unparented throw statement node * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public EnhancedForStatement newEnhancedForStatement() { return new EnhancedForStatement(this); }
/** * Creates a new unparented enhanced for statement node owned by this AST. * By default, the paramter and expression are unspecified * but legal subtrees, and the body is an empty block. * * @return a new unparented throw statement node * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public EnhancedForStatement newEnhancedForStatement() { return new EnhancedForStatement(this); }
/** * Creates a new unparented enhanced for statement node owned by this AST. * By default, the paramter and expression are unspecified * but legal subtrees, and the body is an empty block. * * @return a new unparented throw statement node * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public EnhancedForStatement newEnhancedForStatement() { return new EnhancedForStatement(this); }
/** * Creates a new unparented enhanced for statement node owned by this AST. * By default, the paramter and expression are unspecified * but legal subtrees, and the body is an empty block. * * @return a new unparented throw statement node * @exception UnsupportedOperationException if this operation is used in * a JLS2 AST * @since 3.1 */ public EnhancedForStatement newEnhancedForStatement() { return new EnhancedForStatement(this); }
public Statement convert(ForeachStatement statement) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : return createFakeEmptyStatement(statement); default : EnhancedForStatement enhancedForStatement = new EnhancedForStatement(this.ast); enhancedForStatement.setParameter(convertToSingleVariableDeclaration(statement.elementVariable)); org.eclipse.jdt.internal.compiler.ast.Expression collection = statement.collection; if (collection == null) return null; enhancedForStatement.setExpression(convert(collection)); final Statement action = convert(statement.action); if (action == null) return null; enhancedForStatement.setBody(action); int start = statement.sourceStart; int end = statement.sourceEnd; enhancedForStatement.setSourceRange(start, end - start + 1); return enhancedForStatement; } }
public Statement convert(ForeachStatement statement) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : return createFakeEmptyStatement(statement); default : EnhancedForStatement enhancedForStatement = new EnhancedForStatement(this.ast); enhancedForStatement.setParameter(convertToSingleVariableDeclaration(statement.elementVariable)); org.eclipse.jdt.internal.compiler.ast.Expression collection = statement.collection; if (collection == null) return null; enhancedForStatement.setExpression(convert(collection)); final Statement action = convert(statement.action); if (action == null) return null; enhancedForStatement.setBody(action); int start = statement.sourceStart; int end = statement.sourceEnd; enhancedForStatement.setSourceRange(start, end - start + 1); return enhancedForStatement; } }
public Statement convert(ForeachStatement statement) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : return createFakeEmptyStatement(statement); default : EnhancedForStatement enhancedForStatement = new EnhancedForStatement(this.ast); enhancedForStatement.setParameter(convertToSingleVariableDeclaration(statement.elementVariable)); org.eclipse.jdt.internal.compiler.ast.Expression collection = statement.collection; if (collection == null) return null; enhancedForStatement.setExpression(convert(collection)); final Statement action = convert(statement.action); if (action == null) return null; enhancedForStatement.setBody(action); int start = statement.sourceStart; int end = statement.sourceEnd; enhancedForStatement.setSourceRange(start, end - start + 1); return enhancedForStatement; } }
public Statement convert(ForeachStatement statement) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : return createFakeEmptyStatement(statement); default : EnhancedForStatement enhancedForStatement = new EnhancedForStatement(this.ast); enhancedForStatement.setParameter(convertToSingleVariableDeclaration(statement.elementVariable)); org.eclipse.jdt.internal.compiler.ast.Expression collection = statement.collection; if (collection == null) return null; enhancedForStatement.setExpression(convert(collection)); final Statement action = convert(statement.action); if (action == null) return null; enhancedForStatement.setBody(action); int start = statement.sourceStart; int end = statement.sourceEnd; enhancedForStatement.setSourceRange(start, end - start + 1); return enhancedForStatement; } }
public Statement convert(ForeachStatement statement) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : return createFakeEmptyStatement(statement); default : EnhancedForStatement enhancedForStatement = new EnhancedForStatement(this.ast); enhancedForStatement.setParameter(convertToSingleVariableDeclaration(statement.elementVariable)); org.eclipse.jdt.internal.compiler.ast.Expression collection = statement.collection; if (collection == null) return null; enhancedForStatement.setExpression(convert(collection)); final Statement action = convert(statement.action); if (action == null) return null; enhancedForStatement.setBody(action); int start = statement.sourceStart; int end = statement.sourceEnd; enhancedForStatement.setSourceRange(start, end - start + 1); return enhancedForStatement; } }
public Statement convert(ForeachStatement statement) { switch(this.ast.apiLevel) { case AST.JLS2_INTERNAL : return createFakeEmptyStatement(statement); case AST.JLS3 : EnhancedForStatement enhancedForStatement = new EnhancedForStatement(this.ast); enhancedForStatement.setParameter(convertToSingleVariableDeclaration(statement.elementVariable)); org.eclipse.jdt.internal.compiler.ast.Expression collection = statement.collection; if (collection == null) return null; enhancedForStatement.setExpression(convert(collection)); final Statement action = convert(statement.action); if (action == null) return null; enhancedForStatement.setBody(action); int start = statement.sourceStart; int end = statement.sourceEnd; enhancedForStatement.setSourceRange(start, end - start + 1); return enhancedForStatement; default: return createFakeEmptyStatement(statement); } }
ASTNode clone0(AST target) { EnhancedForStatement result = new EnhancedForStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setParameter((SingleVariableDeclaration) getParameter().clone(target)); result.setExpression((Expression) getExpression().clone(target)); result.setBody( (Statement) ASTNode.copySubtree(target, getBody())); return result; }
@Override ASTNode clone0(AST target) { EnhancedForStatement result = new EnhancedForStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setParameter((SingleVariableDeclaration) getParameter().clone(target)); result.setExpression((Expression) getExpression().clone(target)); result.setBody( (Statement) ASTNode.copySubtree(target, getBody())); return result; }
ASTNode clone0(AST target) { EnhancedForStatement result = new EnhancedForStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setParameter((SingleVariableDeclaration) getParameter().clone(target)); result.setExpression((Expression) getExpression().clone(target)); result.setBody( (Statement) ASTNode.copySubtree(target, getBody())); return result; }
ASTNode clone0(AST target) { EnhancedForStatement result = new EnhancedForStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setParameter((SingleVariableDeclaration) getParameter().clone(target)); result.setExpression((Expression) getExpression().clone(target)); result.setBody( (Statement) ASTNode.copySubtree(target, getBody())); return result; }
ASTNode clone0(AST target) { EnhancedForStatement result = new EnhancedForStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setParameter((SingleVariableDeclaration) getParameter().clone(target)); result.setExpression((Expression) getExpression().clone(target)); result.setBody( (Statement) ASTNode.copySubtree(target, getBody())); return result; }
ASTNode clone0(AST target) { EnhancedForStatement result = new EnhancedForStatement(target); result.setSourceRange(getStartPosition(), getLength()); result.copyLeadingComment(this); result.setParameter((SingleVariableDeclaration) getParameter().clone(target)); result.setExpression((Expression) getExpression().clone(target)); result.setBody( (Statement) ASTNode.copySubtree(target, getBody())); return result; }