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;
05:
06: public class NamedTraversedReference implements TraversedReference {
07:
08: private final String className;
09: private final String fieldName;
10: private final Object value;
11:
12: public NamedTraversedReference(String fullyQualifiedFieldname,
13: Object value) {
14: this .className = null;
15: this .fieldName = fullyQualifiedFieldname;
16: this .value = value;
17: }
18:
19: public NamedTraversedReference(String className, String fieldName,
20: Object value) {
21: this .className = className;
22: this .fieldName = fieldName;
23: this .value = value;
24: }
25:
26: public Object getValue() {
27: return this .value;
28: }
29:
30: public boolean isAnonymous() {
31: return false;
32: }
33:
34: public String getFullyQualifiedReferenceName() {
35: return this .className == null ? fieldName : className + "."
36: + fieldName;
37: }
38:
39: }
|