@AutoFinal
@CompileStatic
@GroovyASTTransformation
class TimedInterruptibleASTTransformation
extends AbstractASTTransformation
Allows "interrupt-safe" executions of scripts by adding timer expiration 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.
| Fields inherited from class | Fields |
|---|---|
class AbstractASTTransformation |
RETENTION_CLASSNODE, sourceUnit |
| Constructor and description |
|---|
TimedInterruptibleASTTransformation() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static Object |
getConstantAnnotationParameter(AnnotationNode node, String parameterName, Class type, Object defaultValue)Resolves a constant annotation member, coercing it to the requested type when possible. |
|
void |
visit(ASTNode[] nodes, SourceUnit source)Applies the timed interrupt transformation to the annotated target. |
Resolves a constant annotation member, coercing it to the requested type when possible.
node - the annotation node to inspectparameterName - the member name to resolvetype - the expected value typedefaultValue - the fallback value when the member is absentdefaultValueApplies the timed interrupt transformation to the annotated target.
nodes - the annotation node and annotated AST nodesource - the source unit containing the annotationCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.