KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > code > CtForEach


1 package spoon.reflect.code;
2
3 /**
4  * This code element defines a <code>foreach</code> loop (enhanced <code>for</code>).
5  */

6
7 public interface CtForEach extends CtLoop {
8     /**
9      * Gets the iterated expression (an iterable of an array).
10      */

11     CtExpression<?> getExpression();
12
13     /**
14      * Gets the variable that references the currently iterated element.
15      */

16     CtLocalVariable<?> getVariable();
17
18     /**
19      * Sets the iterated expression (an iterable of an array).
20      */

21     void setExpression(CtExpression<?> expression);
22
23     /**
24      * Sets the variable that references the currently iterated element.
25      */

26     void setVariable(CtLocalVariable<?> variable);
27 }
28
Popular Tags