Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal.axes

public abstract Class BasicTestIterator

extends LocPathIterator
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xpath.internal.axes.ChildTestIterator, com.sun.org.apache.xpath.internal.axes.FilterExprIterator
Imports
com.sun.org.apache.xml.internal.dtm.DTM, .DTMFilter, .DTMIterator, com.sun.org.apache.xml.internal.utils.PrefixResolver, com.sun.org.apache.xpath.internal.compiler.Compiler, .OpMap

Base for iterators that handle predicates. Does the basic next node logic, so all the derived iterator has to do is get the next node.

Field Summary

Modifier and TypeField and Description
pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.axes.LocPathIterator:
m_allowDetachm_cdtmm_clonesm_contextm_currentContextNodem_execContextm_lastFetchedm_lengthm_posm_stackFrame

Constructor Summary

AccessConstructor and Description
protected
BasicTestIterator()

Create a LocPathIterator object.

protected
BasicTestIterator(PrefixResolver
The namespace context for this iterator, should be OK if null.
nscontext
)

Create a LocPathIterator object.

protected
BasicTestIterator(Compiler
The Compiler which is creating this expression.
compiler
,
int
The position of this iterator in the opcode list from the compiler.
opPos
,
int analysis)

Create a LocPathIterator object, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions.

protected
BasicTestIterator(Compiler
The Compiler which is creating this expression.
compiler
,
int
The position of this iterator in the opcode list from the compiler.
opPos
,
int analysis, boolean
True if walkers should be loaded, or false if this is a derived iterator and it doesn't wish to load child walkers.
shouldLoadWalkers
)

Create a LocPathIterator object, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions.

Method Summary

Modifier and TypeMethod and Description
public DTMIterator

Returns:

A cloned NodeIterator set of the start of the query.
cloneWithReset
()

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.cloneWithReset.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.cloneWithReset.

Get a cloned Iterator that is reset to the beginning of the query.

protected abstract int

Returns:

The next node on the axis, or DTM.NULL.
getNextNode
()

Get the next node via getNextXXX.

public int

Returns:

The next Node in the set being iterated over, or null if there are no more members in that set.
nextNode
()

Implements abstract com.sun.org.apache.xpath.internal.axes.LocPathIterator.nextNode.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.nextNode.

Returns the next node in the set and advances the position of the iterator in the set.

Inherited from com.sun.org.apache.xpath.internal.axes.LocPathIterator:
allowDetachToReleaseasIteratorasNodeboolcallVisitorsdetachexecuteexecuteCharsToContentHandlergetAnalysisBitsgetAxisgetContextgetCurrentContextNodegetCurrentNodegetCurrentPosgetDTMgetDTMManagergetExpandEntityReferencesgetFiltergetFoundLastgetIsTopLevelgetLastPosgetLengthgetPrefixResolvergetRootgetWhatToShowgetXPathContextincrementCurrentPosisDocOrderedisFreshisMutableisNodesetExpritempreviousNoderesetreturnNextNoderunTosetCurrentContextNodesetCurrentPossetEnvironmentsetIsTopLevelsetItemsetNextPositionsetRootsetShouldCacheNodessize

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.axes.LocPathIterator.serialVersionUID.

Constructor Detail

BasicTestIteratorback to summary
protected BasicTestIterator()

Create a LocPathIterator object.

BasicTestIteratorback to summary
protected BasicTestIterator(PrefixResolver nscontext)

Create a LocPathIterator object.

Parameters
nscontext:PrefixResolver

The namespace context for this iterator, should be OK if null.

BasicTestIteratorback to summary
protected BasicTestIterator(Compiler compiler, int opPos, int analysis) throws TransformerException

Create a LocPathIterator object, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions.

Parameters
compiler:Compiler

The Compiler which is creating this expression.

opPos:int

The position of this iterator in the opcode list from the compiler.

BasicTestIteratorback to summary
protected BasicTestIterator(Compiler compiler, int opPos, int analysis, boolean shouldLoadWalkers) throws TransformerException

Create a LocPathIterator object, including creation of step walkers from the opcode list, and call back into the Compiler to create predicate expressions.

Parameters
compiler:Compiler

The Compiler which is creating this expression.

opPos:int

The position of this iterator in the opcode list from the compiler.

shouldLoadWalkers:boolean

True if walkers should be loaded, or false if this is a derived iterator and it doesn't wish to load child walkers.

Method Detail

cloneWithResetback to summary
public DTMIterator cloneWithReset() throws CloneNotSupportedException

Overrides com.sun.org.apache.xpath.internal.axes.LocPathIterator.cloneWithReset.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.cloneWithReset.

Get a cloned Iterator that is reset to the beginning of the query.

Returns:DTMIterator

A cloned NodeIterator set of the start of the query.

getNextNodeback to summary
protected abstract int getNextNode()

Get the next node via getNextXXX. Bottlenecked for derived class override.

Returns:int

The next node on the axis, or DTM.NULL.

nextNodeback to summary
public int nextNode()

Implements abstract com.sun.org.apache.xpath.internal.axes.LocPathIterator.nextNode.

Implements com.sun.org.apache.xml.internal.dtm.DTMIterator.nextNode.

Returns the next node in the set and advances the position of the iterator in the set. After a NodeIterator is created, the first call to nextNode() returns the first node in the set.

Returns:int

The next Node in the set being iterated over, or null if there are no more members in that set.