01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tctest.transparency;
05:
06: import java.util.List;
07:
08: public class MatchingAutolockedSubclass extends MatchingClass {
09:
10: private String moo;
11:
12: public MatchingAutolockedSubclass() {
13: //
14: }
15:
16: public MatchingAutolockedSubclass(List shared) {
17: synchronized (shared) {
18: shared.add(this );
19: }
20: }
21:
22: public void setMoo(String moo) {
23: synchronized (this ) {
24: this .moo = moo;
25: }
26: }
27:
28: public String getMoo() {
29: return moo;
30: }
31:
32: }
|