KickJava   Java API By Example, From Geeks To Geeks.

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


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 public class SubClassA extends SuperClassWithNoFields implements Cloneable JavaDoc {
7
8   public synchronized void method1() {
9     super.method1();
10   }
11   
12   public SubClassA getCopy() {
13     try {
14       return (SubClassA) super.clone();
15     } catch (CloneNotSupportedException JavaDoc e) {
16       throw new RuntimeException JavaDoc(e);
17     }
18   }
19
20   public String JavaDoc toString() {
21     return "SubClassA::" + super.toString();
22   }
23
24   public boolean equals(Object JavaDoc o) {
25     if (this == o) return true;
26     if (o instanceof SubClassA) { return super.equals(o); }
27     return false;
28   }
29 }
30
Popular Tags