Test.java :  » IDE » tIDE » net » jcip » Java Open Source

Java Open Source » IDE » tIDE 
tIDE » net » jcip » Test.java
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();
   }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.