public interface

IJavaForEach

implements IJavaCompound
com.pnfsoftware.jeb.core.units.code.java.IJavaForEach

Class Overview

Java AST interface used to represent a for-each (Java 5+) loop statement.

Example:

 for(type var: iterable) {
     // body
 }
 

Summary

[Expand]
Inherited Constants
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
Public Methods
abstract IJavaForEach duplicate()
Duplicate this element.
abstract IJavaBlock getBody()
Get the loop body.
abstract IJavaExpression getIterable()
abstract IJavaDefinition getVariable()
abstract void setBody(IJavaBlock b)
Set the loop post-iteration statement.
abstract void setIterable(IJavaExpression iterable)
abstract void setVariable(IJavaDefinition var)
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaCompound
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaExpression
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaStatement

Public Methods

public abstract IJavaForEach duplicate ()

Duplicate this element.

Returns
  • a (possibly) duplicated object of the same type

public abstract IJavaBlock getBody ()

Get the loop body.

Returns
  • the loop body, never null

public abstract IJavaExpression getIterable ()

public abstract IJavaDefinition getVariable ()

public abstract void setBody (IJavaBlock b)

Set the loop post-iteration statement.

Parameters
b mandatory loop body

public abstract void setIterable (IJavaExpression iterable)

public abstract void setVariable (IJavaDefinition var)