Package io.quarkus.gizmo
Interface Loop
- All Known Subinterfaces:
ForEachLoop,WhileLoop
- All Known Implementing Classes:
ForEachLoopImpl,LoopImpl,WhileLoopImpl
public interface Loop
A loop construct.
-
Method Summary
Modifier and TypeMethodDescriptionblock()The block inside the loop.voiddoBreak(BytecodeCreator creator) Writes bytecode into the providedBytecodeCreatorto make it exit the loop, effectively issuing a Java 'break' statement.voiddoContinue(BytecodeCreator creator) Writes bytecode into the providedBytecodeCreatorto make it jump back to the start of the loop, effectively issuing a Java 'continue' statement.
-
Method Details
-
block
BytecodeCreator block()The block inside the loop.- Returns:
- the block
-
doContinue
Writes bytecode into the providedBytecodeCreatorto 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
Writes bytecode into the providedBytecodeCreatorto 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
-