01: /*
02: * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
03: * notice. All rights reserved.
04: */
05: package com.tc.object.walker;
06:
07: import java.util.Iterator;
08:
09: class PlainNode extends AbstractNode {
10:
11: private Iterator fieldsIterator;
12:
13: protected PlainNode(Object o, WalkTest walkTest) {
14: super (o);
15: this .fieldsIterator = AllFields.getAllFields(o, true, walkTest)
16: .getFields();
17: }
18:
19: public boolean done() {
20: return !fieldsIterator.hasNext();
21: }
22:
23: public MemberValue next() {
24: FieldData fd = (FieldData) fieldsIterator.next();
25: return MemberValue.fieldValue(fd, getObject());
26: }
27:
28: }
|