Lombok - v0.10.8

lombok
Annotation Type Synchronized


@Target(value=METHOD)
@Retention(value=SOURCE)
public @interface Synchronized

Almost exactly like putting the 'synchronized' keyword on a method, except will synchronize on a private internal Object, so that other code not under your control doesn't meddle with your thread management by locking on your own instance.

For non-static methods, a field named $lock is used, and for static methods, $LOCK is used. These will be generated if needed and if they aren't already present. The contents of the fields will be serializable.


Optional Element Summary
 String value
          Optional: specify the name of a different field to lock on.
 

value

public abstract String value
Optional: specify the name of a different field to lock on. It is a compile time error if this field doesn't already exist (the fields are automatically generated only if you don't specify a specific name.

Default:
""

Lombok - v0.10.8

Copyright © 2009-2011 The Project Lombok Authors, licensed under the MIT licence.