public interface

IJavaFor

implements ICompound
com.pnfsoftware.jeb.core.units.code.java.IJavaFor

Class Overview

Java AST interface used to represent a standard for loop statement.

A for loop is a kind of pre-tested loop, that consists of an initializer statement, a test predicate, a post-iteration statement, and a body.

 for(initializer; predicate; poststm)
   body
 

Summary

Public Methods
abstract IJavaBlock getBody()
Get the loop body.
abstract IStatement getInitializer()
Get the initializer statement.
abstract IStatement getPostStatement()
Get the post-iteration statement.
abstract IJavaPredicate getPredicate()
Get the loop predicate.
abstract void setBody(IJavaBlock b)
Set the loop post-iteration statement.
abstract void setInitializer(IStatement initializer)
Set the loop initializer statement.
abstract void setPostStatement(IStatement poststm)
Set the loop post-iteration statement.
abstract void setPredicate(IJavaPredicate p)
Set the loop predicate.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.java.ICompound
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement

Public Methods

public abstract IJavaBlock getBody ()

Get the loop body.

Returns
  • the loop body, never null

public abstract IStatement getInitializer ()

Get the initializer statement.

Returns
  • the initializer statement, may be null

public abstract IStatement getPostStatement ()

Get the post-iteration statement.

Returns
  • the post-iteration statement, may be null

public abstract IJavaPredicate getPredicate ()

Get the loop predicate.

Returns
  • the loop predicate, may be null

public abstract void setBody (IJavaBlock b)

Set the loop post-iteration statement.

Parameters
b mandatory loop body

public abstract void setInitializer (IStatement initializer)

Set the loop initializer statement.

Parameters
initializer optional initializer

public abstract void setPostStatement (IStatement poststm)

Set the loop post-iteration statement.

Parameters
poststm optional post-iteration statement

public abstract void setPredicate (IJavaPredicate p)

Set the loop predicate.

Parameters
p optional loop predicate