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: * Represents a root.
11: */
12: public class Root {
13:
14: private final String rootName;
15: private final String fieldName;
16:
17: public Root(String rootName, String fieldName) {
18: Assert.assertNotBlank(fieldName);
19:
20: this .rootName = rootName;
21: this .fieldName = fieldName;
22: }
23:
24: public String rootName() {
25: return this .rootName;
26: }
27:
28: public String fieldName() {
29: return this .fieldName;
30: }
31:
32: public String toString() {
33: return new OurStringBuilder(this ,
34: OurStringBuilder.COMPACT_STYLE).append("name",
35: this .rootName).append("field", this.fieldName)
36: .toString();
37: }
38: }
|