KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > walker > PlainNode


1 /*
2  * All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright
3  * notice. All rights reserved.
4  */

5 package com.tc.object.walker;
6
7 import java.util.Iterator JavaDoc;
8
9 public class PlainNode extends AbstractNode {
10
11   private Iterator JavaDoc fieldsIterator;
12
13   protected PlainNode(Object JavaDoc o) {
14     super(o);
15     this.fieldsIterator = AllFields.getAllFields(o).getFields();
16   }
17
18   public boolean done() {
19     return !fieldsIterator.hasNext();
20   }
21
22   public MemberValue next() {
23     FieldData fd = (FieldData) fieldsIterator.next();
24     return MemberValue.fieldValue(fd, getObject());
25   }
26
27 }
28
Popular Tags