[Groovy] Class InWhileLoopWrapper
- org.codehaus.groovy.transform.tailrec.InWhileLoopWrapper
@CompileStatic 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:
- "continue _RECUR_HERE_" is used by recursive calls outside of closures
- "throw LOOP_EXCEPTION" is used by recursive calls within closures b/c you cannot invoke "continue" from there
Properties Summary
Type | Name and description |
---|---|
static org.codehaus.groovy.transform.tailrec.GotoRecurHereException |
LOOP_EXCEPTION |
static String |
LOOP_LABEL |
Constructor Summary
Constructor and description |
---|
InWhileLoopWrapper
() |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
void |
wrap(MethodNode method) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Property Detail
static final org.codehaus.groovy.transform.tailrec.GotoRecurHereException LOOP_EXCEPTION
static final String LOOP_LABEL
Constructor Detail
InWhileLoopWrapper()
Method Detail
void wrap(MethodNode method)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/3.0.7/html/gapi/org/codehaus/groovy/transform/tailrec/InWhileLoopWrapper.html