@Documented @Target(value={FIELD,METHOD}) @Retention(value=RUNTIME) public @interface GuardedBy
public abstract String value
this
indicates the intrinsic lock of the instance containing the field or method.class-name.this
which allows for disambiguation of which this
when dealing
with inner classesitself
which is valid for reference fields only, and indicates that the referenced instance's
own intrinsic lock should be used as the guardfield-name
indicates the named instance or static field is to be used as the guard. If
the field type is not a sub-type of Lock
then the intrinsic lock of
the referenced instance is to be usedclass-name.field-name
indicates the named static field is to be used as the
guard. If the field type is not a sub-type of Lock
then the intrinsic lock of
the referenced instance is to be usedmethod-name()
indicates that the zero-argument method should be called to obtain the
lock object. If the return type is not a sub-type of Lock
then the intrinsic
lock of the returned instance is to be usedclass-name.class
indicates that the intrinsic lock of the specified class should be used
as the guardCopyright © 2013. All Rights Reserved.