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.schema;
05:
06: import com.tc.util.Assert;
07: import com.tc.util.stringification.OurStringBuilder;
08:
09: /**
10: * An {@link InstrumentedClass} that represents an included class.
11: */
12: public class IncludedInstrumentedClass implements InstrumentedClass {
13:
14: private final String classExpression;
15: private final boolean honorTransient;
16: private final boolean honorVolatile;
17: private final IncludeOnLoad onLoad;
18:
19: public IncludedInstrumentedClass(String classExpression,
20: boolean honorTransient, boolean honorVolatile,
21: IncludeOnLoad onLoad) {
22: Assert.assertNotBlank(classExpression);
23:
24: this .classExpression = classExpression;
25: this .honorTransient = honorTransient;
26: this .honorVolatile = honorVolatile;
27: this .onLoad = onLoad;
28: }
29:
30: public boolean isInclude() {
31: return true;
32: }
33:
34: public String classExpression() {
35: return this .classExpression;
36: }
37:
38: public boolean honorTransient() {
39: return this .honorTransient;
40: }
41:
42: public boolean honorVolatile() {
43: return this .honorVolatile;
44: }
45:
46: public IncludeOnLoad onLoad() {
47: return this .onLoad;
48: }
49:
50: public String toString() {
51: return new OurStringBuilder(this ,
52: OurStringBuilder.COMPACT_STYLE).append(
53: "classExpression", this .classExpression).append(
54: "honorTransient", this .honorTransient).append(
55: "honorVolatile", this .honorVolatile).append("onLoad",
56: this.onLoad).toString();
57: }
58: }
|