@WithReadLock and @WithWriteLock annotation.@WithReadLock will obtain a read lock and release it in a finally block.@WithWriteLock will obtain a write lock and release it in a finally block.WithReadLock and WithWriteLock
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| private static final ClassNode | |
| private static final ClassNode | |
| private static final ClassNode |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Expression | |
| private FieldNode | |
| public void | visit(ASTNode[]
The ASTnodes when the call was triggered. Element 0 is the AnnotationNode that triggered this
annotation to be activated. Element 1 is the AnnotatedNode decorated, such as a MethodNode or ClassNode. For
global transformations it is usually safe to ignore this parameter. nodes, SourceUnit The source unit being compiled. The source unit may contain several classes. For global transformations,
information about the AST can be retrieved from this object. source)Implements org. |
| DEFAULT_INSTANCE_LOCKNAME | back to summary |
|---|---|
| public static final String DEFAULT_INSTANCE_LOCKNAME | |
| DEFAULT_STATIC_LOCKNAME | back to summary |
|---|---|
| public static final String DEFAULT_STATIC_LOCKNAME | |
| LOCK_TYPE | back to summary |
|---|---|
| private static final ClassNode LOCK_TYPE | |
| READ_LOCK_TYPE | back to summary |
|---|---|
| private static final ClassNode READ_LOCK_TYPE | |
| WRITE_LOCK_TYPE | back to summary |
|---|---|
| private static final ClassNode WRITE_LOCK_TYPE | |
| ReadWriteLockASTTransformation | back to summary |
|---|---|
| public ReadWriteLockASTTransformation() | |
| createLockObject | back to summary |
|---|---|
| private static Expression createLockObject() | |
| determineLock | back to summary |
|---|---|
| private FieldNode determineLock(String value, ClassNode targetClass, boolean isStatic, String myTypeName) | |
| visit | back to summary |
|---|---|
| public void visit(ASTNode[] nodes, SourceUnit source) Implements org. Doc from org. The method is invoked when an AST Transformation is active. For local transformations, it is invoked once each time the local annotation is encountered. For global transformations, it is invoked once for every source unit, which is typically a source file.
| |