package net.jcip;
/** class Test.
*/
// @net.jcip.annotations.Immutable // OK, findBugs say length must be final !!
@net.jcip.annotations.ThreadSafe
public final class Test
{
@net.jcip.annotations.GuardedBy("this")
public int length;
/** Constructor. */
public Test()
{
}
public synchronized int getLength() { return length; }
public void setLength(int a) { this.length = a; }
public static void main(String[] args)
{
new Test();
}
}
|