Class LoopImpl

All Implemented Interfaces:
BytecodeCreator, Loop, AutoCloseable
Direct Known Subclasses:
ForEachLoopImpl, WhileLoopImpl

abstract class LoopImpl extends BytecodeCreatorImpl implements Loop
  • Constructor Details

  • Method Details

    • result

      protected abstract BranchResult result()
    • writeOperations

      protected void writeOperations(org.objectweb.asm.MethodVisitor visitor)
      Overrides:
      writeOperations in class BytecodeCreatorImpl
    • block

      public BytecodeCreator block()
      Description copied from interface: Loop
      The block inside the loop.
      Specified by:
      block in interface Loop
      Returns:
      the block
    • doContinue

      public void doContinue(BytecodeCreator creator)
      Description copied from interface: Loop
      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.
      Specified by:
      doContinue in interface Loop
      Parameters:
      creator - The creator that should return to the start of the loop
    • doBreak

      public void doBreak(BytecodeCreator creator)
      Description copied from interface: Loop
      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.
      Specified by:
      doBreak in interface Loop
      Parameters:
      creator - The creator that should break from the loop