Interface Loop

All Known Subinterfaces:
ForEachLoop, WhileLoop
All Known Implementing Classes:
ForEachLoopImpl, LoopImpl, WhileLoopImpl

public interface Loop
A loop construct.
  • Method Summary

    Modifier and Type
    Method
    Description
    The block inside the loop.
    void
    Writes bytecode into the provided BytecodeCreator to make it exit the loop, effectively issuing a Java 'break' statement.
    void
    Writes bytecode into the provided BytecodeCreator to make it jump back to the start of the loop, effectively issuing a Java 'continue' statement.
  • Method Details

    • block

      The block inside the loop.
      Returns:
      the block
    • doContinue

      void doContinue(BytecodeCreator creator)
      Writes bytecode into the provided BytecodeCreator to make it jump back to the start of the loop, effectively issuing a Java 'continue' statement. Generally this will be applied to a branch of an if statement.
      Parameters:
      creator - The creator that should return to the start of the loop
    • doBreak

      void doBreak(BytecodeCreator creator)
      Writes bytecode into the provided BytecodeCreator to make it exit the loop, effectively issuing a Java 'break' statement. Generally this will be applied to a branch of an if statement.
      Parameters:
      creator - The creator that should break from the loop