Package org.jeyzer.annotations
Annotation Type Locker
-
@Inherited @Target({CONSTRUCTOR,METHOD,TYPE,PACKAGE}) @Retention(SOURCE) public @interface Locker
Generates a Jeyzer analysis pattern locker entry.
Example :<locker name="ReadLock" pattern="java.util.concurrent.locks.ReentrantReadWriteLock$ReadLock.lock" priority="900" />
Pattern entry is generated in the
jeyzer_patterns.xml
file located in thejeyzer
directory under the target/generated-sources build directory.
If file creation is not possible there, file will be created under the standard generated source code directory.
Pattern locker attributes are :
- Name. It is either provided as annotation attribute or deduced from the element name.
For example, for aacquireLock
method, name will be set as Acquire lock.
In the case of constructors, name will be set with the class name suffixed with instantiation - Code pattern. It is prefixed with the fully qualified package name.
For example, if the annotation applies on theManager
class located in thecom.sample
package, pattern will be set as com.sample.Manager. - Priority. It is optional. If specified, value must be set between 101 and 1000.
- Name. It is either provided as annotation attribute or deduced from the element name.
-
-
Element Detail
-
name
String name
The locker name. Optional- Returns:
- the name
- Default:
- ""
-
-