langtools/src/share/classes/com/sun/source/tree/EnhancedForLoopTree.java
changeset 25287 d2440361b323
parent 20612 4761f3ff7afb
equal deleted inserted replaced
25286:09b9113ad68a 25287:d2440361b323
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    24  */
    24  */
    25 
    25 
    26 package com.sun.source.tree;
    26 package com.sun.source.tree;
    27 
    27 
    28 /**
    28 /**
    29  * A tree node for an "enhanced" 'for' loop statement.
    29  * A tree node for an "enhanced" {@code for} loop statement.
    30  *
    30  *
    31  * For example:
    31  * For example:
    32  * <pre>
    32  * <pre>
    33  *   for ( <em>variable</em> : <em>expression</em> )
    33  *   for ( <em>variable</em> : <em>expression</em> )
    34  *       <em>statement</em>
    34  *       <em>statement</em>
    40  * @author Jonathan Gibbons
    40  * @author Jonathan Gibbons
    41  * @since 1.6
    41  * @since 1.6
    42  */
    42  */
    43 @jdk.Exported
    43 @jdk.Exported
    44 public interface EnhancedForLoopTree extends StatementTree {
    44 public interface EnhancedForLoopTree extends StatementTree {
       
    45     /**
       
    46      * Returns the control variable for the loop.
       
    47      * @return the control variable
       
    48      */
    45     VariableTree getVariable();
    49     VariableTree getVariable();
       
    50 
       
    51     /**
       
    52      * Returns the expression yielding the values for the control variable.
       
    53      * @return the expression
       
    54      */
    46     ExpressionTree getExpression();
    55     ExpressionTree getExpression();
       
    56 
       
    57     /**
       
    58      * Returns the body of the loop.
       
    59      * @return the body of the loop
       
    60      */
    47     StatementTree getStatement();
    61     StatementTree getStatement();
    48 }
    62 }