01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.config;
05:
06: import org.apache.commons.lang.builder.ToStringBuilder;
07:
08: import com.tc.util.Assert;
09:
10: /**
11: * representation of a lock from the config file
12: */
13: public class Lock {
14:
15: private String methodJoinPointExpression;
16: private LockDefinition lockDefinition;
17:
18: public String toString() {
19: return ToStringBuilder.reflectionToString(this );
20: }
21:
22: public Lock(String methodJoinPointExpression,
23: LockDefinition lockDefinition) {
24: Assert.assertNotNull(lockDefinition);
25:
26: this .methodJoinPointExpression = methodJoinPointExpression;
27: this .lockDefinition = lockDefinition;
28: }
29:
30: public String getMethodJoinPointExpression() {
31: return this .methodJoinPointExpression;
32: }
33:
34: public LockDefinition getLockDefinition() {
35: return this.lockDefinition;
36: }
37:
38: }
|