KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > common > proxy > subpkg > PackagePrivateClass


1 /**
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.common.proxy.subpkg;
5
6 /**
7  * This class is non-public and in a different package as the DelegatingInvoicationHandlerTests. It's sole
8  * purpose to make sure we handle the case where the delegation is asked to invoke a method directly on a
9  * non-accessible class
10  */

11 class PackagePrivateClass implements TestInterface {
12   private static int count = 0;
13
14   private final int number;
15
16   PackagePrivateClass() {
17     synchronized (PackagePrivateClass.class) {
18       number = count++;
19     }
20   }
21
22   // from the public test interface
23
public void method() {
24     System.out.println("I am number " + number);
25   }
26 }
Popular Tags