1 4 package com.tc.object; 5 6 import java.util.ArrayList ; 7 import java.util.Collection ; 8 import java.util.Iterator ; 9 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, Object value) { 19 references.add(new NamedTraversedReference(className, fieldName, value)); 20 } 21 22 public void addNamedReference(String fullyQualifiedFieldName, Object value) { 23 references.add(new NamedTraversedReference(fullyQualifiedFieldName, value)); 24 } 25 26 public Iterator iterator() { 27 return references.iterator(); 28 } 29 30 } 31 | Popular Tags |