Annotation Type GuardedBy


  • @Documented
    @Target({FIELD,METHOD})
    @Retention(RUNTIME)
    public @interface GuardedBy
    With this annotation you can document the lock which guards the field or method. This annotation is only for documentation - there is no aspect available which uses it.

    See also GuardedBy from jcip.net.

    Since:
    16.01.2009
    Version:
    $Revision: 1.5 $
    Author:
    oliver
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String value
      use the object (e.g.
    • Element Detail

      • value

        java.lang.String value
        use the object (e.g. "myLock") which guardes the lock
        Returns:
        the string
        Default:
        "this"