[Java] Class ReadWriteLockASTTransformation
- org.codehaus.groovy.transform.ReadWriteLockASTTransformation
Handles generation of code for the @
WithReadLock and @
WithWriteLock annotation.
This transformation adds an instance of ReentrantReadWriteLock to the class.
Any method annotated with @
WithReadLock will obtain a read lock and release it in a finally block.
Any method annotated with @
WithWriteLock will obtain a write lock and release it in a finally block.
For more information see WithReadLock and WithWriteLock
- Authors:
- Hamlet D'Arcy
Field Summary
Modifiers | Name | Description |
---|---|---|
static String | DEFAULT_INSTANCE_LOCKNAME | |
static String | DEFAULT_STATIC_LOCKNAME |
Fields inherited from class | Fields |
---|---|
class AbstractASTTransformation | RETENTION_CLASSNODE, sourceUnit |
Methods Summary
Type Params | Return Type | Name and description |
---|---|---|
void |
visit(ASTNode[] nodes, SourceUnit source) |
Inherited Methods Summary
Methods inherited from class | Name |
---|---|
class AbstractASTTransformation | addError, checkIncludeExclude, checkIncludeExclude, checkNotInterface, copyAnnotatedNodeAnnotations, deemedInternalName, getClassList, getMemberClassValue, getMemberClassValue, getMemberIntValue, getMemberList, getMemberStringValue, getMemberStringValue, getMemberValue, hasAnnotation, init, memberHasValue, nonGeneric, shouldSkip, shouldSkipOnDescriptor, tokenize |
class Object | wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail
public static final String DEFAULT_INSTANCE_LOCKNAME
public static final String DEFAULT_STATIC_LOCKNAME
Method Detail
public void visit(ASTNode[] nodes, SourceUnit source)
© 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/ReadWriteLockASTTransformation.html