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: import java.util.ArrayList;
07: import java.util.Collection;
08: import java.util.Iterator;
09:
10: public class TraversedReferencesImpl implements TraversedReferences {
11:
12: private final Collection references = new ArrayList();
13:
14: public void addAnonymousReference(Object o) {
15: references.add(new AnonymousTraversedReference(o));
16: }
17:
18: public void addNamedReference(String className, String fieldName,
19: Object value) {
20: references.add(new NamedTraversedReference(className,
21: fieldName, value));
22: }
23:
24: public void addNamedReference(String fullyQualifiedFieldName,
25: Object value) {
26: references.add(new NamedTraversedReference(
27: fullyQualifiedFieldName, value));
28: }
29:
30: public Iterator iterator() {
31: return references.iterator();
32: }
33:
34: }
|