Interface JFor

All Superinterfaces:
JBlock, JCommentable, JStatement
All Known Implementing Classes:
ForJBlock

public interface JFor extends JBlock
A for loop.
  • Method Details

    • init

      JVarDeclaration init(int mods, String type, String name, JExpr value)
      Add a loop initializer.
      Parameters:
      mods - the modifiers for the initializer variable declaration
      type - the type of the initializer variables
      name - the name of the first initializer variable
      value - the initial value for the first initializer variable
      Returns:
      the initializer variable declaration
    • init

      JVarDeclaration init(int mods, JType type, String name, JExpr value)
      Add a loop initializer.
      Parameters:
      mods - the modifiers for the initializer variable declaration
      type - the type of the initializer variables
      name - the name of the first initializer variable
      value - the initial value for the first initializer variable
      Returns:
      the initializer variable declaration
    • init

      JVarDeclaration init(int mods, Class<?> type, String name, JExpr value)
      Add a loop initializer.
      Parameters:
      mods - the modifiers for the initializer variable declaration
      type - the type of the initializer variables
      name - the name of the first initializer variable
      value - the initial value for the first initializer variable
      Returns:
      the initializer variable declaration
    • test

      JFor test(JExpr expr)
      Add a test expression.
      Parameters:
      expr - the test expression
      Returns:
      this for loop
    • update

      JFor update(JExpr updateExpr)
      Add an update expression.
      Parameters:
      updateExpr - the update expression
      Returns:
      this for loop