# Interface: com.pnfsoftware.jeb.core.units.code.java.IJavaFor

Java AST interface used to represent a standard for loop statement. A for loop is a pre\-tested loop, that consists of an initializer statement, a test predicate, a post\-iteration statement, and a body. 

 Example:  

```

 for(initializer; predicate; poststm) {
     // body
 }
 
```

## Method: duplicate
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaFor`


## Method: getBody
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`

Description: Get the loop body.
return: the loop body, never null

## Method: getInitializer
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`

Description: Get the initializer statement.
return: the initializer statement, may be null

## Method: getPostStatement
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`

Description: Get the post\-iteration statement.
return: the post\-iteration statement, may be null

## Method: getPredicate
- return type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`

Description: Get the loop predicate.
return: the loop predicate, may be null

## Method: setBody
- parameter: `b`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaBlock`

Description: Set the loop post\-iteration statement.
parameter: b: mandatory loop body

## Method: setInitializer
- parameter: `initializer`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`

Description: Set the loop initializer statement.
parameter: initializer: optional initializer

## Method: setPostStatement
- parameter: `poststm`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaStatement`

Description: Set the loop post\-iteration statement.
parameter: poststm: optional post\-iteration statement

## Method: setPredicate
- parameter: `p`, type: `com.pnfsoftware.jeb.core.units.code.java.IJavaPredicate`

Description: Set the loop predicate.
parameter: p: optional loop predicate

