org.apache.commons.jxpath.ri.model.beans
Class PropertyIterator

java.lang.Object
  extended byorg.apache.commons.jxpath.ri.model.beans.PropertyIterator
All Implemented Interfaces:
NodeIterator
Direct Known Subclasses:
BeanAttributeIterator, DynamicPropertyIterator

public class PropertyIterator
extends java.lang.Object
implements NodeIterator

Iterates property values of an object pointed at with a PropertyOwnerPointer. Examples of such objects are JavaBeans and objects with Dynamic Properties.

Version:
$Revision: 1.13 $ $Date: 2004/03/25 03:49:50 $
Author:
Dmitri Plotnikov

Field Summary
private  boolean empty
           
private  boolean includeStart
           
private  java.lang.String name
           
private  int position
           
private  PropertyPointer propertyNodePointer
           
private  boolean ready
           
private  boolean reverse
           
private  int startIndex
           
private  int startPropertyIndex
           
private  boolean targetReady
           
 
Constructor Summary
PropertyIterator(PropertyOwnerPointer pointer, java.lang.String name, boolean reverse, NodePointer startWith)
           
 
Method Summary
private  int getLength()
          Computes length for the current pointer - ignores any exceptions
 NodePointer getNodePointer()
           
 int getPosition()
           
protected  NodePointer getPropertyPointer()
           
protected  void prepareForIndividualProperty(java.lang.String name)
           
 void reset()
           
 boolean setPosition(int position)
          Sets the new current position and returns true if there a node at that position.
private  boolean setPositionAllProperties(int position)
           
private  boolean setPositionIndividualProperty(int position)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

empty

private boolean empty

reverse

private boolean reverse

name

private java.lang.String name

startIndex

private int startIndex

targetReady

private boolean targetReady

position

private int position

propertyNodePointer

private PropertyPointer propertyNodePointer

startPropertyIndex

private int startPropertyIndex

ready

private boolean ready

includeStart

private boolean includeStart
Constructor Detail

PropertyIterator

public PropertyIterator(PropertyOwnerPointer pointer,
                        java.lang.String name,
                        boolean reverse,
                        NodePointer startWith)
Method Detail

getPropertyPointer

protected NodePointer getPropertyPointer()

reset

public void reset()

getNodePointer

public NodePointer getNodePointer()
Specified by:
getNodePointer in interface NodeIterator

getPosition

public int getPosition()
Specified by:
getPosition in interface NodeIterator

setPosition

public boolean setPosition(int position)
Description copied from interface: NodeIterator
Sets the new current position and returns true if there a node at that position.

Specified by:
setPosition in interface NodeIterator

setPositionIndividualProperty

private boolean setPositionIndividualProperty(int position)

setPositionAllProperties

private boolean setPositionAllProperties(int position)

prepareForIndividualProperty

protected void prepareForIndividualProperty(java.lang.String name)

getLength

private int getLength()
Computes length for the current pointer - ignores any exceptions