Package org.codehaus.groovy.classgen.asm

# Class CompileStack.BlockRecorder

java.lang.Object
org.codehaus.groovy.classgen.asm.CompileStack.BlockRecorder

Enclosing class:
  CompileStack

public static class CompileStack.BlockRecorder extends Object
Records a block for finally or other special handling.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `Runnable`
  `excludedStatement`
  Callback used when visiting the block outside its recorded range.
  `final LinkedList<CompileStack.LabelRange>`
  `ranges`
  Label ranges covered by this recorder.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BlockRecorder()`
  Creates an empty block recorder.
  `BlockRecorder(Runnable excludedStatement)`
  Creates a block recorder with an excluded statement.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `closeRange(org.objectweb.asm.Label end)`
  Closes the current range at the given label.
  `void`
  `startRange(org.objectweb.asm.Label start)`
  Starts a new range at the given label.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### excludedStatement

    public Runnable excludedStatement
    Callback used when visiting the block outside its recorded range.

  - ### ranges

    public final LinkedList<CompileStack.LabelRange> ranges
    Label ranges covered by this recorder.

- ## Constructor Details

  - ### BlockRecorder

    public BlockRecorder()
    Creates an empty block recorder.

  - ### BlockRecorder

    public BlockRecorder(Runnable excludedStatement)
    Creates a block recorder with an excluded statement.
    Parameters:
      `excludedStatement` - the statement to exclude from the block

- ## Method Details

  - ### startRange

    public void startRange(org.objectweb.asm.Label start)
    Starts a new range at the given label.
    Parameters:
      `start` - the start label

  - ### closeRange

    public void closeRange(org.objectweb.asm.Label end)
    Closes the current range at the given label.
    Parameters:
      `end` - the end label