|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.ast.CodeVisitorSupport org.codehaus.groovy.ast.ClassCodeVisitorSupport org.codehaus.groovy.transform.AbstractInterruptibleASTTransformation org.codehaus.groovy.transform.ThreadInterruptibleASTTransformation
@GroovyASTTransformation(phase = CompilePhase.CANONICALIZATION) class ThreadInterruptibleASTTransformation extends AbstractInterruptibleASTTransformation
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.
Field Summary |
---|
Fields inherited from class AbstractInterruptibleASTTransformation | |
---|---|
CHECK_METHOD_START_MEMBER, THROWN_EXCEPTION_TYPE, applyToAllClasses, applyToAllMembers, checkOnMethodStart, source, thrownExceptionType |
Method Summary | |
---|---|
protected Expression
|
createCondition()
|
protected String
|
getErrorMessage()
|
protected ClassNode
|
type()
|
void
|
visitClosureExpression(ClosureExpression closureExpr)
|
void
|
visitMethod(MethodNode node)
|
Method Detail |
---|
protected Expression createCondition()
protected String getErrorMessage()
protected ClassNode type()
@Override void visitClosureExpression(ClosureExpression closureExpr)
@Override void visitMethod(MethodNode node)
Copyright © 2003-2013 The Codehaus. All rights reserved.