KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tctest > transparency > SubClassD


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.tctest.transparency;
5
6 /* Super class contains private members */
7 public class SubClassD extends NotInstrumented implements Cloneable JavaDoc {
8
9   public int d = 2;
10
11   public synchronized void method1() {
12     toString();
13   }
14   
15   public synchronized Object JavaDoc clone() {
16     try {
17       return super.clone();
18     } catch (CloneNotSupportedException JavaDoc e) {
19       throw new RuntimeException JavaDoc(e);
20     }
21   }
22
23   public String JavaDoc toString() {
24     return "SubClassD::" + super.toString();
25   }
26
27   public boolean equals(Object JavaDoc o) {
28     if (this == o) return true;
29     if (o instanceof SubClassD) { return d == ((SubClassD) o).d && super.equals(o); }
30     return false;
31   }
32 }
33
Popular Tags