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

public Class WalkingIteratorSorted

extends WalkingIterator
Class Inheritance
Imports
com.sun.org.apache.xml.internal.dtm.Axis, com.sun.org.apache.xml.internal.utils.PrefixResolver, .QName, com.sun.org.apache.xpath.internal.compiler.Compiler, java.util.List

This class iterates over set of nodes that needs to be sorted.

Field Summary

Modifier and TypeField and Description
protected boolean
m_inNaturalOrderStatic

True if the nodes will be found in document order, and this can be determined statically.

pack-priv static final long
Inherited from com.sun.org.apache.xpath.internal.axes.WalkingIterator:
m_firstWalkerm_lastUsedWalker

Constructor Summary

AccessConstructor and Description
public
WalkingIteratorSorted(PrefixResolver
The namespace context for this iterator, should be OK if null.
nscontext
)

Create a WalkingIteratorSorted object.

pack-priv
WalkingIteratorSorted(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 WalkingIterator iterator, 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
pack-priv boolean

Returns:

true if the nodeset can be walked in doc order, without sorting.
canBeWalkedInNaturalDocOrderStatic
()

Tell if the nodeset can be walked in doc order, via static analysis.

public void
fixupVariables(List<QName>
List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).
vars
,
int globalsSize)

Overrides com.sun.org.apache.xpath.internal.axes.WalkingIterator.fixupVariables.

This function is used to perform some extra analysis of the iterator.

public boolean

Returns:

true as a default.
isDocOrdered
()

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

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

Returns true if all the nodes in the iteration well be returned in document order.

Inherited from com.sun.org.apache.xpath.internal.axes.WalkingIterator:
callVisitorsclonedeepEqualsdetachgetAnalysisBitsgetExpressiongetFirstWalkergetLastUsedWalkernextNoderesetsetExpressionsetFirstWalkersetLastUsedWalkersetRoot

Field Detail

m_inNaturalOrderStaticback to summary
protected boolean m_inNaturalOrderStatic

True if the nodes will be found in document order, and this can be determined statically.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

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

Constructor Detail

WalkingIteratorSortedback to summary
public WalkingIteratorSorted(PrefixResolver nscontext)

Create a WalkingIteratorSorted object.

Parameters
nscontext:PrefixResolver

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

WalkingIteratorSortedback to summary
pack-priv WalkingIteratorSorted(Compiler compiler, int opPos, int analysis, boolean shouldLoadWalkers) throws TransformerException

Create a WalkingIterator iterator, 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

canBeWalkedInNaturalDocOrderStaticback to summary
pack-priv boolean canBeWalkedInNaturalDocOrderStatic()

Tell if the nodeset can be walked in doc order, via static analysis.

Returns:boolean

true if the nodeset can be walked in doc order, without sorting.

fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Overrides com.sun.org.apache.xpath.internal.axes.WalkingIterator.fixupVariables.

This function is used to perform some extra analysis of the iterator.

Parameters
vars:List<QName>

List of QNames that correspond to variables. This list should be searched backwards for the first qualified name that corresponds to the variable reference qname. The position of the QName in the vector from the start of the vector will be its position in the stack frame (but variables above the globalsTop value will need to be offset to the current stack frame).

isDocOrderedback to summary
public boolean isDocOrdered()

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

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

Returns true if all the nodes in the iteration well be returned in document order.

Returns:boolean

true as a default.