public class InWhileLoopWrapper
extends Object
Wrap the body of a method in a while loop, nested in a try-catch. This is the first step in making a tail recursive method iterative.
There are two ways to invoke the next iteration step:
| Modifiers | Name | Description |
|---|---|---|
static GotoRecurHereException |
LOOP_EXCEPTION |
Exception instance thrown from closures to restart the generated loop. |
static String |
LOOP_LABEL |
Label targeted by synthesized continue statements. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
wrap(MethodNode method)Wraps the supplied method body in the loop structure used by the tail-recursion transform. |
Exception instance thrown from closures to restart the generated loop.
Label targeted by synthesized continue statements.
Wraps the supplied method body in the loop structure used by the tail-recursion transform.
method - the method to rewrite