[Groovy] Class ThreadInterruptibleASTTransformation
- org.codehaus.groovy.transform.ThreadInterruptibleASTTransformation
Allows "interrupt-safe" executions of scripts by adding Thread.currentThread().isInterrupted() checks on loops (for, while, do) and first statement of closures. By default, also adds an interrupt check statement on the beginning of method calls.
- See Also:
- ThreadInterrupt
- Authors:
- Cedric Champeau
- Hamlet D'Arcy
- Since:
- 1.8.0
Fields inherited from class | Fields |
---|---|
class AbstractInterruptibleASTTransformation | CHECK_METHOD_START_MEMBER, THROWN_EXCEPTION_TYPE, applyToAllClasses, applyToAllMembers, checkOnMethodStart, source, thrownExceptionType |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
protected Expression |
createCondition() | |
protected String |
getErrorMessage() | |
protected ClassNode |
type() | |
void |
visitClosureExpression(ClosureExpression closureExpr) | |
void |
visitMethod(MethodNode node) |
Inherited Methods Summary
Method Detail
protected Expression createCondition()
protected String getErrorMessage()
protected ClassNode type()
@Override void visitClosureExpression(ClosureExpression closureExpr)
@Override void visitMethod(MethodNode node)
© 2003-2020 The Apache Software Foundation
Licensed under the Apache license.
https://docs.groovy-lang.org/2.4.21/html/gapi/org/codehaus/groovy/transform/ThreadInterruptibleASTTransformation.html